We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qbase/baseabci/baseapp.go
Line 761 in af3670b
一个transaction中含多条iTx时,当前gas策略是,先执行所有交易,再扣gas,且只扣第一个iTx的gas
存在问题: 假如扣gas失败,则整个交易回滚,之前的计算资源被浪费 应用可以将耗费gas较大的iTx放在后面,规避gas
方案: 扣gas失败的iTx及其以前的iTx执行结果回滚,之前的iTx扣gas,失败的iTx及其之后的iTx不被扣gas。缺点,有失公平 iTx增加参数maxGas,执行时先扣maxGas,执行后将maxGas - gasUsed返还
The text was updated successfully, but these errors were encountered:
不是只扣第一个iTx的gas,是所有iTx的gas,这块代码说的是从第一个iTx签名账户扣
Line 661 in af3670b
Sorry, something went wrong.
No branches or pull requests
qbase/baseabci/baseapp.go
Line 761 in af3670b
一个transaction中含多条iTx时,当前gas策略是,先执行所有交易,再扣gas,且只扣第一个iTx的gas
存在问题:
假如扣gas失败,则整个交易回滚,之前的计算资源被浪费
应用可以将耗费gas较大的iTx放在后面,规避gas
方案:
扣gas失败的iTx及其以前的iTx执行结果回滚,之前的iTx扣gas,失败的iTx及其之后的iTx不被扣gas。缺点,有失公平
iTx增加参数maxGas,执行时先扣maxGas,执行后将maxGas - gasUsed返还
The text was updated successfully, but these errors were encountered: