Skip to content
New issue

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

add chain_config system contract, add upMaxBlockSize and upGasPrice func #460

Conversation

superlitian
Copy link
Contributor

@superlitian superlitian commented Jan 24, 2024

usage

updateMaxBlockSize
{ "args" : { "min_vote_percent": "51", "stop_vote_height": "30" }, "trigger": { "height": 35, "module": "xkernel", "contract": "$chainConfig", "method": "updateMaxBlockSize", "args" : { "maxBlockSize": 12222222 } } }

updateGasPrice
{ "args" : { "min_vote_percent": "51", "stop_vote_height": "20" }, "trigger": { "height": 25, "module": "xkernel", "contract": "$chainConfig", "method": "updateGasPrice", "args" : { "gas_price": { "cpu_rate": 1, "mem_rate": 1, "disk_rate": 2, "xfee_rate": 2 } } } }

rollBackUpdateGasPrice and rollBackUpdateMaxBlockSize 保证区块回滚时数据一起回滚。

@codecov-commenter
Copy link

Codecov Report

Attention: 74 lines in your changes are missing coverage. Please review.

Comparison is base (d295a7a) 43.97% compared to head (906acaa) 43.28%.
Report is 3 commits behind head on master.

Files Patch % Lines
bcs/ledger/xledger/state/state.go 0.00% 36 Missing and 1 partial ⚠️
bcs/ledger/xledger/state/meta/meta.go 39.47% 13 Missing and 10 partials ⚠️
kernel/network/p2p/util.go 0.00% 6 Missing ⚠️
bcs/contract/xvm/aot_creator.go 50.00% 2 Missing ⚠️
bcs/contract/xvm/interp_creator.go 0.00% 2 Missing ⚠️
kernel/engines/xuperos/chain.go 50.00% 1 Missing and 1 partial ⚠️
kernel/engines/xuperos/xtoken/xtoken_contract.go 0.00% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #460      +/-   ##
==========================================
- Coverage   43.97%   43.28%   -0.70%     
==========================================
  Files         149      155       +6     
  Lines       13367    14766    +1399     
==========================================
+ Hits         5878     6391     +513     
- Misses       6306     6888     +582     
- Partials     1183     1487     +304     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants