-
Notifications
You must be signed in to change notification settings - Fork 55
feat(protocol): PCR-2 base changes #5270
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 4 Skipped Deployments
|
kodemartin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @cyberphysic4l , a few nitpicks and a proposal with more impact to discuss.
crates/iota-types/src/iota_system_state/iota_system_state_inner_v2.rs
Outdated
Show resolved
Hide resolved
valeriyr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description of change
protocol_defined_base_feeand config parameterbase_gas_price.protocol_defined_base_feeenables the base fee defined bybase_gas_pricein the place of the reference gas price defined by the gas price survey in earlier protocol versions. Thisbase_gas_pricefor each transaction is burned, and any additional gas price will be passed to the validators as a tip.advance_epochfunction in the iota framework is updated to burn the base fee and pass additional fee to validators. The function now takes an additional call argument -computation_charge_burned- to allow the base fee component and tip to be distinguished.IotaSystemStateV2and associated types to include asafe_mode_computation_charges_burnedfield. Some tests are updated to deal with this new system state version. Updates were carried out following the guide provided in crates/iota-framework/packages/iota-system/sources/iota_system.moveChangeEpochV2transaction kind is introduced for the epoch change system transaction corresponding to theadvance_epochfunction changes mentioned above. The new feature flag,protocol_defined_base_feeis used to determined when the newChangeEpochV2transaction kind should be used and the additional call argument be passed to theadvance_epochfunctionSystemEpochInfoEventV2to include thetips_amountfield specifying how much of user computation fees are passed to validators.Links to any relevant issues
Fixes #3122
Should be merged along with iotaledger/iota-rust-sdk#22
Type of change
How the change has been tested
Existing tests pass. Added move tests for tips in
rewards_distribution_tests.moveChange checklist
Tick the boxes that are relevant to your changes, and delete any items that are not.