add bsp_samplechain algorithm and testcase
