Open abi87 opened 1 week ago
This pull request introduces several modifications across various files, primarily focusing on enhancing the handling of consensus blocks and execution payloads. Key changes include the addition of new configuration entries in .mockery.yaml
, updates to function signatures in defaults.go
and types.go
, and the introduction of new methods and fields in the StateProcessor
and related structures. Additionally, several dependency updates are made across multiple go.mod
files, ensuring compatibility with the latest versions of libraries. The changes collectively aim to streamline and improve the architecture of the codebase.
File Path | Change Summary |
---|---|
.mockery.yaml |
Added package github.com/berachain/beacon-kit/mod/state-transition/pkg/core with config settings (recursion disabled, expecter enabled, regex filter for ExecutionEngine ). |
beacond/cmd/defaults.go |
Updated DefaultComponents function: removed ProvideBlobVerifier , updated parameters for ProvideChainService , ProvideDispatcher , and ProvideServiceRegistry . |
beacond/cmd/types.go |
Removed type aliases ABCIMiddleware and BlobVerifier , added ConsensusBlock , updated ChainService to include *ConsensusBlock . |
beacond/go.mod |
Updated various dependencies, including github.com/gabriel-vasile/mimetype from 1.4.4 to 1.4.6 , and others related to cosmos-sdk and golang.org/x/... . |
build/scripts/testing.mk |
Updated Docker image name for erigon node from thorax/erigon:latest to erigontech/erigon:latest . |
kurtosis/beaconkit-all.yaml |
Updated erigon image from thorax/erigon:v2.60.1 to erigontech/erigon:v2.60.9 . |
kurtosis/beaconkit-base-gcp.yaml |
Updated erigon image from thorax/erigon:v2.60.1 to erigontech/erigon:v2.60.9 . |
kurtosis/src/nodes/consensus/beacond/node.star |
Added command-line argument for node API address in start_node command, updated timeout parameters and peer limits based on is_seed flag. |
mod/beacon/blockchain/execution_engine.go |
Changed block processing type from BeaconBlockT to ConsensusBlockT in multiple methods. |
mod/beacon/blockchain/payload.go |
Added nextPayloadTimestamp parameter to several methods, updating logic for payload rebuilding and optimistic payload builds. |
mod/beacon/blockchain/process.go |
Updated methods to process ConsensusBlockT instead of BeaconBlockT . |
mod/beacon/blockchain/receive.go |
Updated methods to process ConsensusBlockT , introduced beaconBlk variable for accessing beacon block properties. |
mod/beacon/blockchain/service.go |
Added ConsensusBlockT type parameter to Service struct, updated method signatures to handle consensus blocks. |
mod/beacon/blockchain/types.go |
Added ConsensusBlock interface with methods for handling beacon blocks and timestamps. |
mod/beacon/validator/block_builder.go |
Updated methods to include slotData and nextPayloadTimestamp for state root computation. |
mod/beacon/validator/types.go |
Added GetNextPayloadTimestamp method to SlotData interface. |
mod/chain-spec/pkg/chain/chain_spec.go |
Added GetValidatorsSetCapSize() method to Spec interface and its implementation. |
mod/chain-spec/pkg/chain/data.go |
Added ValidatorSetCapSize field to SpecData struct. |
mod/cli/go.mod |
Updated dependencies, including github.com/gabriel-vasile/mimetype from v1.4.4 to v1.4.6 . |
mod/config/pkg/spec/testnet.go |
Added ValidatorSetCapSize field in the return structure of BaseSpec() function. |
mod/consensus-types/pkg/types/payload.go |
Updated ExecutionPayload struct methods for error handling and initialization. |
mod/consensus-types/pkg/types/payload_test.go |
Added test function for ExecutionPayload JSON marshaling behavior. |
mod/consensus-types/pkg/types/validator.go |
Added ComputeEffectiveBalance function and SetWithdrawableEpoch method to Validator struct. |
mod/consensus/go.mod |
Updated several dependencies, ensuring compatibility with the latest versions. |
mod/consensus/pkg/cometbft/service/abci.go |
Introduced slotData variable for proposals, updated comments. |
mod/consensus/pkg/cometbft/service/helpers.go |
Removed file containing functions related to proposal handling. |
mod/consensus/pkg/cometbft/service/middleware/abci.go |
Updated context type in middleware methods from context.Context to sdk.Context . |
mod/consensus/pkg/cometbft/service/middleware/middleware.go |
Added minPayloadDelay field to ABCIMiddleware struct, updated constructor. |
mod/consensus/pkg/types/consensus_block.go |
Renamed package, added ConsensusBlock type and associated methods. |
mod/consensus/pkg/types/slot_data.go |
Updated field visibility and added nextPayloadTimestamp to SlotData struct. |
mod/da/pkg/blob/processor.go |
Updated Processor struct to use new verifier type. |
mod/da/pkg/blob/types.go |
Removed BlobVerifier interface. |
mod/da/pkg/blob/verifier.go |
Renamed Verifier type and updated method names for consistency. |
mod/execution/pkg/client/client.go |
Enhanced error handling in verifyChainIDAndConnection method. |
mod/node-api/engines/echo/vaildator.go |
Added ValidateValidatorStatus function and updated validation logic. |
mod/node-api/engines/go.mod |
Updated dependencies, including github.com/gabriel-vasile/mimetype from v1.4.4 to v1.4.6 . |
mod/node-api/server/config.go |
Updated defaultAddress constant from "0.0.0.0:3500" to "127.0.0.1:3500" . |
mod/node-core/go.mod |
Updated various dependencies, ensuring compatibility with the latest versions. |
mod/node-core/pkg/components/blobs.go |
Removed BlobVerifierInput struct and adjusted ProvideBlobProcessor function. |
mod/node-core/pkg/components/chain_service.go |
Updated ProvideChainService function to include ConsensusBlockT . |
mod/node-core/pkg/components/dispatcher.go |
Updated ProvideDispatcher function to include ConsensusBlockT . |
mod/node-core/pkg/components/interfaces.go |
Added ConsensusBlock interface with methods for handling beacon blocks. |
mod/node-core/pkg/components/middleware.go |
Added CmtCfg field to ABCIMiddlewareInput struct. |
mod/node-core/pkg/components/service_registry.go |
Updated ServiceRegistryInput and ProvideServiceRegistry to include ConsensusBlockT . |
mod/payload/pkg/builder/payload.go |
Added early return for disabled payload builder in SendForceHeadFCU method. |
mod/primitives/pkg/transition/context.go |
Added NextPayloadTimestamp field and corresponding getter method to Context struct. |
mod/state-transition/go.mod |
Updated dependency versions for errors and chain-spec . |
mod/state-transition/pkg/core/errors.go |
Added new error variables ErrHitValidatorsSetCap and ErrTooFarInTheFuture . |
mod/state-transition/pkg/core/helpers_test.go |
Introduced types and functions for testing state transitions. |
mod/state-transition/pkg/core/mocks/execution_engine.mock.go |
Added mock implementation for ExecutionEngine type. |
mod/state-transition/pkg/core/state/statedb.go |
Updated ExpectedWithdrawals and DecreaseBalance methods for improved logic. |
mod/state-transition/pkg/core/state_processor.go |
Added processingGenesis field to StateProcessor struct, refactored error handling. |
mod/state-transition/pkg/core/state_processor_genesis.go |
Updated InitializePreminedBeaconStateFromEth1 method to track genesis processing. |
mod/state-transition/pkg/core/state_processor_genesis_test.go |
Added unit tests for state processor functionality within the staking module. |
mod/state-transition/pkg/core/state_processor_payload.go |
Updated methods to include nextPayloadTimestamp for validation. |
mod/state-transition/pkg/core/state_processor_staking.go |
Enhanced deposit processing logic and error handling. |
mod/state-transition/pkg/core/state_processor_staking_test.go |
Introduced unit tests for staking functionality in the state processor. |
mod/state-transition/pkg/core/types.go |
Added GetNextPayloadTimestamp() method to Context interface, defined new Withdrawals interface, and updated ExecutionEngine and Validator interfaces. |
testing/e2e/config/config.go |
Updated defaultExecutionSettings function for erigon client image. |
testing/go.mod |
Updated dependencies, including github.com/gabriel-vasile/mimetype from v1.4.4 to v1.4.6 . |
sequenceDiagram
participant User
participant API
participant Service
participant Database
User->>API: Request to process block
API->>Service: Process block with ConsensusBlock
Service->>Database: Store block data
Database-->>Service: Confirmation
Service-->>API: Block processed successfully
API-->>User: Response with block status
engine-primitives
module for compatibility with mock generation.execution_engine.go
, related to execution payload handling.ExecutionPayloadHeader
and related functions, relevant to execution components.ProcessGenesisData
, related to execution payload handling..mockery.yaml
configuration.BeaconBlock
construction relevant to execution payloads.🐇 In the land of code where the rabbits play,
New mocks and blocks come out to stay.
With timestamps and payloads, we hop with glee,
Enhancing our world, just wait and see!
So let’s cheer for changes, both big and small,
For in this code garden, we’re having a ball! 🌼✨
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 23.90805%
with 331 lines
in your changes missing coverage. Please review.
Project coverage is 26.44%. Comparing base (
66bad3e
) to head (14913e4
). Report is 18 commits behind head on main.
TODO