Fix historical test error, write currentcost consumption in sudo
Merge branch 'release/v2.1.5'