Closed abi87 closed 4 days ago
The pull request introduces several modifications across multiple files, primarily focusing on enhancing logging capabilities and improving the handling of constants related to the Bartio blockchain. Key changes include updating the ProvideStateProcessor
function signature to incorporate a logger parameter, creating a new special_cases.go
file for Bartio-specific constants, and refactoring various methods to utilize these constants. Additionally, logging functionality is integrated into state processing methods, improving the overall structure and maintainability of the code.
File Path | Change Summary |
---|---|
beacond/cmd/defaults.go |
Updated ProvideStateProcessor signature to include *Logger as the first parameter. |
mod/config/pkg/spec/special_cases.go |
Added constants BartioChainID and BArtioValRoot for Bartio chain identification. |
mod/consensus-types/pkg/types/payload.go |
Replaced hardcoded chain ID check with spec.BartioChainID in ToHeader method. |
mod/node-core/pkg/components/state_processor.go |
Added LoggerT type parameter and Logger field to StateProcessorInput struct and updated ProvideStateProcessor function. |
mod/state-transition/pkg/core/helpers_test.go |
Integrated noop logger into createStateProcessor function. |
mod/state-transition/pkg/core/state_processor.go |
Added logger field to StateProcessor struct and updated NewStateProcessor constructor. |
mod/state-transition/pkg/core/state_processor_genesis.go |
Removed hardcoded constants and replaced them with spec.BArtioValRoot and spec.BartioChainID . |
mod/state-transition/pkg/core/state_processor_payload.go |
Added logging for payload height and timestamp in validateStatelessPayload method. |
mod/state-transition/pkg/core/state_processor_staking.go |
Updated methods to utilize spec.BartioChainID for chain ID checks and improved deposit handling logic. |
mod/beacon/blockchain/types.go |
Added method GetConsensusBlockHeight() to ConsensusBlock interface for logging purposes. |
mod/consensus/pkg/types/common.go |
Enhanced commonConsensusData struct with new fields and method for consensus block height. |
mod/node-core/pkg/components/interfaces.go |
Added method GetConsensusBlockHeight() to ConsensusBlock interface. |
mod/primitives/pkg/transition/context.go |
Introduced ConsensusBlockHeight field and corresponding method in Context struct. |
mod/state-transition/pkg/core/types.go |
Added method GetConsensusBlockHeight() to Context interface for consensus block height retrieval. |
mod/beacon/blockchain/process.go |
Updated executeStateTransition method to include ConsensusBlockHeight parameter. |
mod/beacon/blockchain/receive.go |
Modified verifyStateRoot method to include ConsensusBlockHeight in context. |
mod/beacon/validator/block_builder.go |
Enhanced block building methods to include consensusBlockHeight for state root calculations. |
mod/beacon/validator/types.go |
Added method GetConsensusBlockHeight() to SlotData interface for logging purposes. |
Merge me daddy
🐰 In the code we hop and play,
With logging bright to light our way.
Constants for Bartio now in sight,
Making our state process just right!
So let’s code on, with joy and cheer,
For every change brings us near! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 22.00000%
with 39 lines
in your changes missing coverage. Please review.
Project coverage is 26.24%. Comparing base (
9cbce04
) to head (7480048
). Report is 1 commits behind head on main.
on Bartio execution payload is only require to be monotonic increasing, while following https://github.com/berachain/beacon-kit/pull/2095 we do pose a cap on how much a timestamp can run ahead. This is a breaking change that would cause nodes running main to halt in a network with a majority of nodes running alpha.8.
This PR does a few things:
Summary by CodeRabbit
Release Notes
New Features
GetConsensusBlockHeight()
added to several interfaces for logging purposes.Improvements
spec
package.Bug Fixes