Closed calbera closed 5 days ago
The changes in this pull request introduce a new field, MaxBeraMintAmount
, to the BeraChainSpec
struct in the chainspec
package, specifying the maximum amount of BERA minted per block. Modifications are also made to the state_processor_staking.go
file, focusing on the processing of deposits and withdrawals, including changes to the ExpectedWithdrawals
function's signature and improved error handling. Additionally, new methods and fields related to the BGT contract are added to the Spec
interface and SpecData
struct.
File Path | Change Summary |
---|---|
examples/berad/pkg/chain-spec/berachain.go | Added field MaxBeraMintAmount uint64 \ mapstructure:"max-bera-mint-amount"`to BeraChainSpec` struct. |
mod/chain-spec/pkg/chain/chain_spec.go | Added methods BGTContractAddress() [20]byte and MaxBeraMintAmount() uint64 to Spec interface and chainSpec struct. |
mod/chain-spec/pkg/chain/data.go | Added fields BGTContractAddress [20]byte \ mapstructure:"bgt-contract-address"`and MaxBeraMintAmount uint64to SpecData` struct. |
examples/berad/pkg/state-transition/state_processor_staking.go | Updated ExpectedWithdrawals function signature and improved error handling; added comments for future TODOs in processWithdrawals and applyDeposit . |
mod/state-transition/pkg/core/state/statedb.go | Enhanced ExpectedWithdrawals method to include minting withdrawals and updated UpdateSlashingAtIndex for error handling. |
BeaconState
interface to accommodate withdrawals, related to the new MaxBeraMintAmount
field.Ready for Review
, Merge me daddy
In the fields where BERA grows,
A minting tale the rabbit knows.
With deposits and withdrawals in play,
New fields sprout in a bright array.
Hop along, let changes flow,
In the chain's embrace, we joyfully sow! 🐇✨
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 40.42%. Comparing base (
6a1664a
) to head (a6b55db
). Report is 3 commits behind head on main.
Summary by CodeRabbit
New Features
MaxBeraMintAmount
in the BeraChainSpec to specify the maximum amount of BERA minted per block.Bug Fixes
Chores