From 3ca00bc752ccc75a31d07c8602bcbe5b034d2762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fri=C3=B0rik=20=C3=81smundsson?= Date: Thu, 5 Dec 2024 14:55:03 +0000 Subject: [PATCH] beacon repository refactorings and cleanup (#2204) --- .dockerignore | 3 + .gitignore | 2 +- .mockery.yaml | 16 +- Dockerfile | 8 +- Makefile | 18 +- {mod/async/pkg => async}/broker/assert.go | 0 {mod/async/pkg => async}/broker/broker.go | 2 +- {mod/async/pkg => async}/broker/constants.go | 0 {mod/async/pkg => async}/broker/errors.go | 2 +- .../pkg => async}/dispatcher/dispatcher.go | 6 +- {mod/async/pkg => async}/dispatcher/errors.go | 4 +- .../async/pkg => async}/dispatcher/options.go | 6 +- {mod/async/pkg => async}/types/broker.go | 2 +- {mod/async/pkg => async}/types/dispatcher.go | 2 +- {mod/beacon => beacon}/blockchain/errors.go | 2 +- .../blockchain/execution_engine.go | 6 +- {mod/beacon => beacon}/blockchain/metrics.go | 2 +- {mod/beacon => beacon}/blockchain/payload.go | 2 +- {mod/beacon => beacon}/blockchain/process.go | 4 +- {mod/beacon => beacon}/blockchain/receive.go | 8 +- {mod/beacon => beacon}/blockchain/service.go | 10 +- {mod/beacon => beacon}/blockchain/types.go | 10 +- {mod/beacon => beacon}/payload-time/time.go | 2 +- .../payload-time/time_test.go | 4 +- .../validator/block_builder.go | 18 +- {mod/beacon => beacon}/validator/config.go | 0 {mod/beacon => beacon}/validator/errors.go | 2 +- {mod/beacon => beacon}/validator/metrics.go | 2 +- {mod/beacon => beacon}/validator/service.go | 12 +- {mod/beacon => beacon}/validator/types.go | 14 +- build/tools/tools.go | 4 - .../pkg => chain-spec}/chain/chain_spec.go | 0 .../pkg => chain-spec}/chain/data.go | 0 .../pkg => chain-spec}/chain/errors.go | 2 +- .../pkg => chain-spec}/chain/helpers.go | 2 +- .../pkg => chain-spec}/chain/helpers_test.go | 4 +- {mod/cli/pkg => cli}/builder/builder.go | 16 +- {mod/cli/pkg => cli}/builder/config.go | 6 +- {mod/cli/pkg => cli}/builder/options.go | 8 +- .../pkg => cli}/commands/deposit/create.go | 18 +- .../pkg => cli}/commands/deposit/deposit.go | 10 +- .../pkg => cli}/commands/deposit/errors.go | 0 .../cli/pkg => cli}/commands/deposit/flags.go | 0 {mod/cli/pkg => cli}/commands/errors.go | 2 +- .../pkg => cli}/commands/genesis/collect.go | 8 +- .../pkg => cli}/commands/genesis/deposit.go | 22 +- .../cli/pkg => cli}/commands/genesis/flags.go | 0 .../pkg => cli}/commands/genesis/genesis.go | 2 +- .../pkg => cli}/commands/genesis/payload.go | 20 +- {mod/cli/pkg => cli}/commands/genesis/root.go | 12 +- .../commands/genesis/types/validators.go | 2 +- .../commands/genesis/types/validators.ssz.go | 2 +- {mod/cli/pkg => cli}/commands/jwt/errors.go | 2 +- {mod/cli/pkg => cli}/commands/jwt/jwt.go | 10 +- {mod/cli/pkg => cli}/commands/jwt/jwt_test.go | 2 +- {mod/cli/pkg => cli}/commands/root.go | 4 +- .../commands/server/cmd/execute.go | 0 .../pkg => cli}/commands/server/pruning.go | 2 +- .../pkg => cli}/commands/server/rollback.go | 8 +- {mod/cli/pkg => cli}/commands/server/start.go | 8 +- .../pkg => cli}/commands/server/types/app.go | 2 +- {mod/cli/pkg => cli}/commands/setup.go | 24 +- {mod/cli/pkg => cli}/commands/types.go | 0 .../pkg => cli}/components/client_context.go | 2 +- {mod/cli/pkg => cli}/components/defaults.go | 0 {mod/cli/pkg => cli}/components/logger.go | 4 +- {mod/cli/pkg => cli}/config/app.go | 2 +- {mod/cli/pkg => cli}/config/client.go | 0 {mod/cli/pkg => cli}/config/comet.go | 0 {mod/cli/pkg => cli}/config/errors.go | 0 {mod/cli/pkg => cli}/config/server.go | 6 +- {mod/cli/pkg => cli}/context/cmd.go | 4 +- {mod/cli/pkg => cli}/context/keys.go | 0 {mod/cli/pkg => cli}/flags/flags.go | 2 +- {mod/cli/pkg => cli}/utils/parser/errors.go | 0 .../cli/pkg => cli}/utils/parser/validator.go | 12 +- {mod/cli/pkg => cli}/utils/yap/yap.go | 0 {beacond/cmd => cmd/beacond}/defaults.go | 2 +- {beacond/cmd => cmd/beacond}/main.go | 10 +- {beacond/cmd => cmd/beacond}/types.go | 64 +-- {mod/config => config}/config.go | 20 +- {mod/config/pkg => config}/config/config.go | 0 .../pkg => config}/config/config.toml.tpl | 0 {mod/config/pkg => config}/config/toml.go | 0 .../pkg => config}/mapstructure/parser.go | 4 +- {mod/config/pkg => config}/spec/base.go | 8 +- {mod/config/pkg => config}/spec/betnet.go | 6 +- {mod/config/pkg => config}/spec/boonet.go | 6 +- {mod/config/pkg => config}/spec/chain_ids.go | 0 {mod/config/pkg => config}/spec/devnet.go | 6 +- .../pkg => config}/spec/special_cases.go | 0 {mod/config/pkg => config}/spec/testnet.go | 6 +- .../pkg => config}/template/template.go | 0 {mod/config/pkg => config}/viper/parser.go | 4 +- .../types/attestation_data.go | 6 +- .../types/attestation_data_test.go | 6 +- .../pkg => consensus-types}/types/block.go | 8 +- .../types/block_test.go | 12 +- .../pkg => consensus-types}/types/body.go | 10 +- .../types/body_test.go | 14 +- .../pkg => consensus-types}/types/deposit.go | 8 +- .../types/deposit_message.go | 8 +- .../types/deposit_message_test.go | 12 +- .../types/deposit_test.go | 8 +- .../pkg => consensus-types}/types/deposits.go | 4 +- .../pkg => consensus-types}/types/errors.go | 2 +- .../pkg => consensus-types}/types/eth1data.go | 6 +- .../types/eth1data_test.go | 4 +- .../pkg => consensus-types}/types/fork.go | 6 +- .../types/fork_data.go | 4 +- .../types/fork_data_test.go | 6 +- .../types/fork_test.go | 6 +- .../pkg => consensus-types}/types/genesis.go | 16 +- .../types/genesis_test.go | 10 +- .../pkg => consensus-types}/types/header.go | 6 +- .../types/header_test.go | 6 +- .../pkg => consensus-types}/types/payload.go | 16 +- .../types/payload_header.go | 12 +- .../types/payload_header_test.go | 14 +- .../types/payload_test.go | 14 +- .../types/signing_data.go | 4 +- .../types/signing_data_test.go | 6 +- .../types/slashing_info.go | 6 +- .../types/slashing_info_test.go | 4 +- .../pkg => consensus-types}/types/state.go | 6 +- .../types/state_test.go | 6 +- .../types/validator.go | 10 +- .../types/validator_test.go | 10 +- .../types/validators.go | 2 +- .../types/withdrawal_credentials.go | 2 +- .../types/withdrawal_credentials_test.go | 4 +- .../cometbft/cli/commands.go | 33 +- .../pkg => consensus}/cometbft/mod.go | 0 .../cometbft/service/abci.go | 12 +- .../cometbft/service/encoding/encoding.go | 2 +- .../cometbft/service/encoding/errors.go | 2 +- .../cometbft/service/encoding/types.go | 2 +- .../cometbft/service/genesis.go | 4 +- .../cometbft/service/log/cmt_logger.go | 2 +- .../cometbft/service/log/sdk_logger.go | 2 +- .../cometbft/service/middleware/abci.go | 14 +- .../cometbft/service/middleware/constants.go | 0 .../cometbft/service/middleware/errors.go | 2 +- .../cometbft/service/middleware/metrics.go | 0 .../cometbft/service/middleware/middleware.go | 10 +- .../cometbft/service/middleware/types.go | 4 +- .../cometbft/service/noops.go | 0 .../cometbft/service/options.go | 2 +- .../cometbft/service/params/consensus.go | 2 +- .../cometbft/service/service.go | 14 +- .../cometbft/service/state.go | 0 .../cometbft/service/state/state.go | 0 .../cometbft/service/types.go | 6 +- .../pkg => consensus}/types/common.go | 2 +- .../types/consensus_block.go | 2 +- .../types/consensus_sidecars.go | 0 .../pkg => consensus}/types/slot_data.go | 2 +- {mod/da/pkg => da}/blob/factory.go | 10 +- {mod/da/pkg => da}/blob/factory_metrics.go | 2 +- {mod/da/pkg => da}/blob/factory_test.go | 0 {mod/da/pkg => da}/blob/processor.go | 8 +- {mod/da/pkg => da}/blob/processor_metrics.go | 2 +- {mod/da/pkg => da}/blob/types.go | 6 +- {mod/da/pkg => da}/blob/verifier.go | 4 +- {mod/da/pkg => da}/blob/verifier_metrics.go | 2 +- {mod/da/pkg => da}/da/service.go | 6 +- {mod/da/pkg => da}/da/types.go | 0 {mod/da/pkg => da}/kzg/ckzg/ckzg.go | 2 +- {mod/da/pkg => da}/kzg/ckzg/ckzg_cgo.go | 4 +- {mod/da/pkg => da}/kzg/ckzg/ckzg_cgo_test.go | 6 +- {mod/da/pkg => da}/kzg/ckzg/ckzg_no_cgo.go | 4 +- .../pkg => da}/kzg/ckzg/ckzg_no_cgo_test.go | 6 +- {mod/da/pkg => da}/kzg/ckzg/errors.go | 2 +- {mod/da/pkg => da}/kzg/ckzg/helpers_test.go | 8 +- {mod/da/pkg => da}/kzg/config.go | 0 {mod/da/pkg => da}/kzg/config_test.go | 2 +- {mod/da/pkg => da}/kzg/errors.go | 2 +- {mod/da/pkg => da}/kzg/gokzg/gokzg.go | 4 +- {mod/da/pkg => da}/kzg/gokzg/gokzg_test.go | 10 +- {mod/da/pkg => da}/kzg/noop/noop.go | 4 +- {mod/da/pkg => da}/kzg/noop/noop_test.go | 6 +- {mod/da/pkg => da}/kzg/proof.go | 10 +- {mod/da/pkg => da}/kzg/proof_test.go | 14 +- {mod/da/pkg => da}/kzg/types/args.go | 2 +- {mod/da/pkg => da}/store/errors.go | 2 +- {mod/da/pkg => da}/store/pruner.go | 4 +- {mod/da/pkg => da}/store/pruner_test.go | 12 +- {mod/da/pkg => da}/store/store.go | 10 +- {mod/da/pkg => da}/store/types.go | 6 +- {mod/da/pkg => da}/types/errors.go | 2 +- {mod/da/pkg => da}/types/sidecar.go | 10 +- {mod/da/pkg => da}/types/sidecar_test.go | 12 +- {mod/da/pkg => da}/types/sidecars.go | 2 +- {mod/da/pkg => da}/types/sidecars_test.go | 12 +- .../engine-primitives/attributes.go | 8 +- .../engine-primitives/attributes_test.go | 6 +- .../engine-primitives/blobs_bundle.go | 0 .../engine-primitives/blobs_bundle_test.go | 2 +- .../engine-primitives/engine.go | 4 +- .../engine-primitives/engine_test.go | 6 +- .../engine-primitives/errors.go | 2 +- .../mocks/blobs_bundle.mock.go | 4 +- .../mocks/built_execution_payload_env.mock.go | 2 +- .../mocks/payload_attributer.mock.go | 2 +- .../engine-primitives/payload_env.go | 6 +- .../engine-primitives/payload_env_test.go | 2 +- .../engine-primitives/requests.go | 12 +- .../engine-primitives/requests_test.go | 10 +- .../engine-primitives/transactions.go | 4 +- .../engine-primitives/transactions_test.go | 4 +- .../engine-primitives/withdrawal.go | 6 +- .../engine-primitives/withdrawal_ssz_test.go | 4 +- .../engine-primitives/withdrawal_test.go | 6 +- .../engine-primitives/withdrawals.go | 6 +- .../engine-primitives/withdrawals_test.go | 6 +- .../errors/errors.go | 2 +- {mod/errors => errors}/mod.go | 0 examples/berad/cmd/main.go | 21 - examples/berad/pkg/chain-spec/berachain.go | 38 -- examples/berad/pkg/consensus-types/state.go | 292 ---------- .../berad/pkg/consensus-types/validator.go | 235 -------- examples/berad/pkg/state-transition/errors.go | 77 --- .../berad/pkg/state-transition/interfaces.go | 159 ------ .../pkg/state-transition/state_processor.go | 530 ------------------ .../state_processor_committee.go | 59 -- .../state_processor_genesis.go | 125 ----- .../state_processor_payload.go | 179 ------ .../state_processor_randao.go | 139 ----- .../state_processor_slashing.go | 33 -- .../state_processor_staking.go | 196 ------- examples/berad/pkg/state-transition/types.go | 263 --------- examples/berad/pkg/storage/history.go | 127 ----- examples/berad/pkg/storage/index/validator.go | 115 ---- examples/berad/pkg/storage/keys/keys.go | 56 -- examples/berad/pkg/storage/kvstore.go | 269 --------- examples/berad/pkg/storage/randao.go | 48 -- examples/berad/pkg/storage/registry.go | 218 ------- examples/berad/pkg/storage/staking.go | 55 -- examples/berad/pkg/storage/types.go | 40 -- examples/berad/pkg/storage/versioning.go | 87 --- {mod/execution => execution}/README.md | 2 +- .../pkg => execution}/client/client.go | 14 +- .../pkg => execution}/client/config.go | 2 +- .../pkg => execution}/client/engine.go | 10 +- .../pkg => execution}/client/errors.go | 12 +- .../client/ethclient/constants.go | 0 .../client/ethclient/engine.go | 8 +- .../client/ethclient/errors.go | 2 +- .../pkg => execution}/client/ethclient/eth.go | 6 +- .../client/ethclient/ethclient.go | 4 +- .../client/ethclient/rpc/client.go | 4 +- .../client/ethclient/rpc/errors.go | 0 .../client/ethclient/rpc/header.go | 0 .../client/ethclient/rpc/options.go | 2 +- .../client/ethclient/rpc/types.go | 2 +- .../pkg => execution}/client/helpers.go | 6 +- .../pkg => execution}/client/metrics.go | 2 +- .../pkg => execution}/client/types.go | 2 +- .../pkg => execution}/deposit/contract.go | 12 +- .../pkg => execution}/deposit/metrics.go | 2 +- .../pkg => execution}/deposit/pruner.go | 6 +- .../pkg => execution}/deposit/service.go | 8 +- .../pkg => execution}/deposit/sync.go | 4 +- .../pkg => execution}/deposit/types.go | 6 +- .../pkg => execution}/engine/engine.go | 14 +- .../pkg => execution}/engine/errors.go | 2 +- .../pkg => execution}/engine/metrics.go | 6 +- .../pkg => execution}/engine/types.go | 10 +- .../pkg => geth-primitives}/bind/bind.go | 0 .../deposit/contract.abigen.go | 0 .../deposit/contract.go | 2 +- .../ethclient/ethclient.go | 0 .../execution.go | 0 .../pkg => geth-primitives}/rpc/rpc.go | 0 go.mod | 68 ++- go.sum | 128 +++-- kurtosis/Makefile | 4 +- {mod/log => log}/mod.go | 0 {mod/log/pkg => log}/noop/noop.go | 2 +- {mod/log/pkg => log}/noop/noop_test.go | 2 +- {mod/log/pkg => log}/phuslu/buffer.go | 0 {mod/log/pkg => log}/phuslu/config.go | 0 {mod/log/pkg => log}/phuslu/formatter.go | 0 {mod/log/pkg => log}/phuslu/logger.go | 0 {mod/log/pkg => log}/phuslu/style.go | 2 +- {mod/log/pkg => log}/phuslu/time.go | 0 mod/storage/README.md | 1 - {mod/node-api => node-api}/backend/backend.go | 4 +- {mod/node-api => node-api}/backend/block.go | 6 +- {mod/node-api => node-api}/backend/genesis.go | 4 +- .../backend/genesis_test.go | 0 .../backend/mocks/availability_store.mock.go | 2 +- .../backend/mocks/beacon_block_header.mock.go | 4 +- .../backend/mocks/beacon_state.mock.go | 8 +- .../backend/mocks/block_store.mock.go | 4 +- .../backend/mocks/deposit_store.mock.go | 0 .../backend/mocks/node.mock.go | 0 .../backend/mocks/state_processor.mock.go | 4 +- .../backend/mocks/storage_backend.mock.go | 0 .../backend/mocks/validator.mock.go | 4 +- .../backend/mocks/withdrawal.mock.go | 4 +- .../mocks/withdrawal_credentials.mock.go | 2 +- {mod/node-api => node-api}/backend/randao.go | 4 +- {mod/node-api => node-api}/backend/state.go | 4 +- {mod/node-api => node-api}/backend/types.go | 10 +- .../backend/utils/validator.go | 4 +- .../backend/validator.go | 6 +- .../block_store/config.go | 0 .../block_store/service.go | 6 +- .../block_store/types.go | 6 +- .../engines/echo/engine.go | 4 +- .../engines/echo/middleware.go | 6 +- .../engines/echo/types.go | 0 .../engines/echo/vaildator.go | 6 +- .../handlers/beacon/backend.go | 6 +- .../handlers/beacon/block.go | 4 +- .../handlers/beacon/genesis.go | 6 +- .../handlers/beacon/handler.go | 6 +- .../handlers/beacon/header.go | 6 +- .../handlers/beacon/historical.go | 6 +- .../handlers/beacon/randao.go | 6 +- .../handlers/beacon/routes.go | 4 +- .../handlers/beacon/types/request.go | 2 +- .../handlers/beacon/types/response.go | 4 +- .../handlers/beacon/types/types.go | 2 +- .../handlers/beacon/validators.go | 6 +- .../handlers/builder/handler.go | 4 +- .../handlers/builder/routes.go | 4 +- .../handlers/config/handler.go | 4 +- .../handlers/config/routes.go | 4 +- .../handlers/debug/handler.go | 4 +- .../handlers/debug/routes.go | 4 +- .../handlers/events/handler.go | 4 +- .../handlers/events/routes.go | 4 +- .../handlers/handlers.go | 4 +- .../handlers/node/handler.go | 4 +- .../handlers/node/placeholders.go | 0 .../handlers/node/routes.go | 4 +- .../handlers/proof/backend.go | 2 +- .../handlers/proof/block_proposer.go | 6 +- .../handlers/proof/execution_fee_recipient.go | 6 +- .../handlers/proof/execution_number.go | 6 +- .../handlers/proof/handler.go | 10 +- .../handlers/proof/merkle/beacon_state.go | 8 +- .../proof/merkle/beacon_state_test.go | 8 +- .../proof/merkle/block_proposer_index.go | 8 +- .../proof/merkle/block_proposer_index_test.go | 8 +- .../proof/merkle/block_proposer_pubkey.go | 10 +- .../merkle/block_proposer_pubkey_test.go | 12 +- .../handlers/proof/merkle/constants.go | 0 .../handlers/proof/merkle/constants_test.go | 12 +- .../proof/merkle/execution_fee_recipient.go | 8 +- .../merkle/execution_fee_recipient_test.go | 10 +- .../handlers/proof/merkle/execution_number.go | 8 +- .../proof/merkle/execution_number_test.go | 10 +- .../handlers/proof/merkle/merkle_test.go | 2 +- .../proof/merkle/mock/beacon_state.go | 8 +- .../empty_execution_number_proof.json | 0 .../testdata/empty_fee_recipient_proof.json | 0 .../merkle/testdata/empty_state_proof.json | 0 .../many_validators_proposer_index_proof.json | 0 ...many_validators_proposer_pubkey_proof.json | 0 .../non_empty_execution_number_proof.json | 0 .../non_empty_fee_recipient_proof.json | 0 .../testdata/non_empty_state_proof.json | 0 .../one_validator_proposer_index_proof.json | 0 .../one_validator_proposer_pubkey_proof.json | 0 .../handlers/proof/routes.go | 4 +- .../handlers/proof/types/request.go | 2 +- .../handlers/proof/types/response.go | 6 +- .../handlers/proof/types/types.go | 8 +- {mod/node-api => node-api}/handlers/routes.go | 2 +- .../handlers/types/errors.go | 0 .../handlers/types/request.go | 0 .../handlers/types/response.go | 0 .../handlers/utils/constants.go | 2 +- .../handlers/utils/context.go | 6 +- .../handlers/utils/id.go | 6 +- {mod/node-api => node-api}/server/config.go | 0 .../server/context/context.go | 0 {mod/node-api => node-api}/server/server.go | 8 +- {mod/node-api => node-api}/server/types.go | 6 +- .../builder/baseapp_options.go | 8 +- .../pkg => node-core}/builder/builder.go | 10 +- .../pkg => node-core}/builder/options.go | 4 +- .../pkg => node-core}/components/api.go | 14 +- .../components/api_handlers.go | 16 +- .../components/attributes_factory.go | 10 +- .../components/availability_store.go | 18 +- .../pkg => node-core}/components/backend.go | 4 +- .../pkg => node-core}/components/blobs.go | 18 +- .../components/block_store.go | 8 +- .../components/block_store_service.go | 6 +- .../components/chain_service.go | 18 +- .../components/chain_spec.go | 4 +- .../components/cometbft_service.go | 10 +- .../pkg => node-core}/components/config.go | 2 +- .../components/config_server.go | 4 +- .../components/db_manager.go | 6 +- .../pkg => node-core}/components/depinject.go | 0 .../components/deposit_contract.go | 8 +- .../components/deposit_service.go | 14 +- .../components/deposit_store.go | 18 +- .../components/dispatcher.go | 6 +- .../pkg => node-core}/components/engine.go | 16 +- .../components/interfaces.go | 22 +- .../components/jwt_secret.go | 6 +- .../components/metrics/sink.go | 0 .../components/middleware.go | 8 +- .../pkg => node-core}/components/node.go | 8 +- .../components/payload_builder.go | 16 +- .../components/reporting_service.go | 10 +- .../components/service_registry.go | 30 +- .../pkg => node-core}/components/sidecars.go | 8 +- .../pkg => node-core}/components/signer.go | 8 +- .../components/signer/errors.go | 0 .../components/signer/legacy.go | 4 +- .../components/signer/signer.go | 6 +- .../components/state_processor.go | 14 +- .../components/storage/provider.go | 0 .../components/storage/storage.go | 2 +- .../components/storage/types.go | 2 +- .../pkg => node-core}/components/store.go | 4 +- .../components/telemetry_service.go | 4 +- .../components/telemetry_sink.go | 2 +- .../components/trusted_setup.go | 6 +- .../pkg => node-core}/components/types.go | 16 +- .../components/validator_service.go | 12 +- {mod/node-core/pkg => node-core}/node/node.go | 6 +- .../services/registry/errors.go | 2 +- .../services/registry/mocks/basic.mock.go | 0 .../registry/mocks/dispatcher.mock.go | 0 .../registry/mocks/registry_option.mock.go | 2 +- .../services/registry/options.go | 2 +- .../services/registry/registry.go | 2 +- .../services/registry/registry_test.go | 6 +- .../services/version/types.go | 0 .../services/version/version.go | 12 +- .../node-core/pkg => node-core}/types/node.go | 0 .../telemetry/service.go | 0 {mod/payload => payload}/README.md | 0 .../pkg => payload}/attributes/factory.go | 6 +- .../pkg => payload}/attributes/types.go | 4 +- .../pkg => payload}/builder/builder.go | 6 +- .../payload/pkg => payload}/builder/config.go | 2 +- .../payload/pkg => payload}/builder/errors.go | 2 +- .../pkg => payload}/builder/payload.go | 6 +- {mod/payload/pkg => payload}/builder/types.go | 10 +- .../pkg => payload}/cache/payload_id.go | 0 .../cache/payload_id_fuzz_test.go | 2 +- .../pkg => payload}/cache/payload_id_test.go | 2 +- .../pkg => primitives}/async/chan.go | 0 .../pkg => primitives}/async/event.go | 0 .../primitives/pkg => primitives}/async/id.go | 0 {mod/primitives/pkg => primitives}/bytes/b.go | 2 +- .../pkg => primitives}/bytes/b20.go | 2 +- .../pkg => primitives}/bytes/b20_test.go | 2 +- .../pkg => primitives}/bytes/b256.go | 2 +- .../pkg => primitives}/bytes/b32.go | 2 +- .../pkg => primitives}/bytes/b32_test.go | 2 +- .../primitives/pkg => primitives}/bytes/b4.go | 2 +- .../pkg => primitives}/bytes/b48.go | 2 +- .../pkg => primitives}/bytes/b48_test.go | 4 +- .../pkg => primitives}/bytes/b4_test.go | 2 +- .../primitives/pkg => primitives}/bytes/b8.go | 2 +- .../pkg => primitives}/bytes/b8_test.go | 2 +- .../pkg => primitives}/bytes/b96.go | 2 +- .../pkg => primitives}/bytes/b96_test.go | 6 +- .../pkg => primitives}/bytes/b_test.go | 4 +- .../pkg => primitives}/bytes/buffer/buffer.go | 0 .../bytes/buffer/buffer_test.go | 6 +- .../pkg => primitives}/bytes/utils.go | 4 +- .../pkg => primitives}/common/consensus.go | 10 +- .../common/consensus_test.go | 6 +- .../pkg => primitives}/common/execution.go | 4 +- .../common/execution_test.go | 4 +- .../pkg => primitives}/constants/bls12_381.go | 0 .../pkg => primitives}/constants/constants.go | 0 .../pkg => primitives}/constants/domain.go | 0 .../pkg => primitives}/constants/eip4844.go | 0 .../pkg => primitives}/constants/misc.go | 0 .../pkg => primitives}/constants/payload.go | 0 .../pkg => primitives}/constraints/basic.go | 0 .../constraints/encoding.go | 4 +- .../pkg => primitives}/constraints/ssz.go | 0 .../pkg => primitives}/crypto/bls.go | 2 +- .../crypto/mocks/bls_signer.mock.go | 2 +- .../crypto/sha256/sha256.go | 0 .../pkg => primitives}/eip4844/blob.go | 2 +- .../pkg => primitives}/eip4844/blob_test.go | 2 +- .../eip4844/kzg_commitment.go | 8 +- .../eip4844/kzg_commitment_test.go | 6 +- .../pkg => primitives}/eip4844/kzg_proof.go | 2 +- .../encoding/hex/big_int.go | 0 .../encoding/hex/bit_int_test.go | 2 +- .../pkg => primitives}/encoding/hex/bytes.go | 2 +- .../encoding/hex/bytes_test.go | 2 +- .../pkg => primitives}/encoding/hex/const.go | 0 .../pkg => primitives}/encoding/hex/errors.go | 0 .../pkg => primitives}/encoding/hex/format.go | 0 .../encoding/hex/format_test.go | 2 +- .../pkg => primitives}/encoding/hex/nibble.go | 0 .../pkg => primitives}/encoding/hex/u64.go | 0 .../encoding/hex/u64_test.go | 2 +- .../pkg => primitives}/encoding/json/json.go | 0 .../encoding/ssz/constants/constants.go | 0 .../encoding/ssz/db/node.go | 4 +- .../encoding/ssz/db/node_test.go | 6 +- .../encoding/ssz/merkle/errors.go | 0 .../encoding/ssz/merkle/index.go | 4 +- .../encoding/ssz/merkle/index_test.go | 2 +- .../encoding/ssz/merkle/object_path.go | 4 +- .../encoding/ssz/merkle/object_path_test.go | 4 +- .../encoding/ssz/merkle/proof.go | 8 +- .../encoding/ssz/merkle/tree.go | 4 +- .../encoding/ssz/merkle/tree_test.go | 2 +- .../encoding/ssz/schema/common.go | 2 +- .../encoding/ssz/schema/definitions.go | 2 +- .../encoding/ssz/schema/field.go | 0 .../encoding/ssz/schema/id.go | 2 +- .../pkg => primitives}/math/constants.go | 0 .../pkg => primitives}/math/errors.go | 2 +- .../pkg => primitives}/math/log/log.go | 0 .../pkg => primitives}/math/log/log_test.go | 2 +- .../pkg => primitives}/math/pow/pow.go | 0 .../pkg => primitives}/math/pow/pow_test.go | 2 +- .../pkg => primitives}/math/u256.go | 0 .../primitives/pkg => primitives}/math/u64.go | 8 +- .../pkg => primitives}/math/u64_test.go | 4 +- .../pkg => primitives}/merkle/errors.go | 2 +- .../pkg => primitives}/merkle/hasher.go | 0 .../merkle/hasher_fuzz_test.go | 4 +- .../pkg => primitives}/merkle/hasher_test.go | 2 +- .../pkg => primitives}/merkle/proof.go | 2 +- .../pkg => primitives}/merkle/root_hasher.go | 8 +- .../merkle/root_hasher_test.go | 12 +- .../pkg => primitives}/merkle/tree.go | 10 +- .../merkle/tree_fuzz_test.go | 4 +- .../pkg => primitives}/merkle/tree_test.go | 6 +- .../pkg => primitives}/merkle/utils.go | 2 +- .../pkg => primitives}/merkle/zero/zero.go | 2 +- .../pkg => primitives}/net/http/errors.go | 0 .../pkg => primitives}/net/json-rpc/errors.go | 2 +- .../pkg => primitives}/net/jwt/errors.go | 2 +- .../pkg => primitives}/net/jwt/jwt.go | 4 +- .../pkg => primitives}/net/jwt/jwt_test.go | 4 +- .../pkg => primitives}/net/url/url.go | 0 .../pkg => primitives}/transition/context.go | 2 +- .../transition/validator_update.go | 4 +- .../transition/validator_update_test.go | 6 +- .../pkg => primitives}/version/version.go | 0 .../version/version_test.go | 2 +- {build/scripts => scripts/build}/build.mk | 3 +- {build/scripts => scripts/build}/codegen.mk | 0 {build/scripts => scripts/build}/constants.mk | 0 {build/scripts => scripts/build}/devtools.mk | 2 +- {build/scripts => scripts/build}/golines.sh | 0 {build/scripts => scripts/build}/help.mk | 0 {build/scripts => scripts/build}/linting.mk | 8 +- .../build}/proto_generate_pulsar.sh | 2 +- {build/scripts => scripts/build}/protobuf.mk | 6 +- {build/scripts => scripts/build}/release.mk | 0 {build/scripts => scripts/build}/testing.mk | 8 +- .../pkg => state-transition}/core/README.md | 0 .../core/core_test.go | 36 +- .../pkg => state-transition}/core/errors.go | 2 +- .../core/interfaces.go | 6 +- .../pkg => state-transition}/core/metrics.go | 0 .../core/mocks/execution_engine.mock.go | 4 +- .../core/state/constants.go | 0 .../core/state/interfaces.go | 6 +- .../core/state/statedb.go | 8 +- .../core/state/types.go | 6 +- .../core/state/upgrade.go | 4 +- .../core/state_processor.go | 18 +- .../core/state_processor_genesis.go | 14 +- .../core/state_processor_genesis_test.go | 14 +- .../core/state_processor_payload.go | 10 +- .../core/state_processor_randao.go | 10 +- .../core/state_processor_slashing.go | 2 +- .../core/state_processor_staking.go | 10 +- .../core/state_processor_staking_test.go | 22 +- .../core/state_processor_validators.go | 6 +- .../core/state_processor_withdrawals.go | 8 +- .../pkg => state-transition}/core/types.go | 14 +- .../core/validation_deposits.go | 6 +- {mod/storage/pkg => storage}/beacondb/eth1.go | 0 {mod/storage/pkg => storage}/beacondb/fork.go | 0 .../pkg => storage}/beacondb/history.go | 2 +- .../beacondb/index/validator.go | 6 +- .../beacondb/index/validator_test.go | 0 .../pkg => storage}/beacondb/keys/keys.go | 0 .../pkg => storage}/beacondb/kvstore.go | 8 +- .../pkg => storage}/beacondb/randao.go | 2 +- .../pkg => storage}/beacondb/registry.go | 4 +- .../pkg => storage}/beacondb/registry_test.go | 14 +- .../pkg => storage}/beacondb/slashing.go | 4 +- .../pkg => storage}/beacondb/staking_test.go | 0 .../storage/pkg => storage}/beacondb/types.go | 6 +- .../pkg => storage}/beacondb/versioning.go | 4 +- .../pkg => storage}/beacondb/withdrawals.go | 2 +- {mod/storage/pkg => storage}/block/store.go | 8 +- .../pkg => storage}/block/store_test.go | 8 +- {mod/storage/pkg => storage}/block/types.go | 4 +- {mod/storage/pkg => storage}/db/db.go | 0 {mod/storage/pkg => storage}/deposit/store.go | 8 +- {mod/storage/pkg => storage}/deposit/types.go | 4 +- {mod/storage/pkg => storage}/encoding/ssz.go | 2 +- {mod/storage/pkg => storage}/encoding/u64.go | 2 +- {mod/storage/pkg => storage}/filedb/db.go | 4 +- .../pkg => storage}/filedb/db_options.go | 2 +- .../storage/pkg => storage}/filedb/db_test.go | 4 +- .../pkg => storage}/filedb/range_db.go | 8 +- .../pkg => storage}/filedb/range_db_test.go | 6 +- {mod/storage/pkg => storage}/interfaces/db.go | 0 .../interfaces/mocks/db.mock.go | 0 .../pkg => storage}/manager/manager.go | 4 +- .../pkg => storage}/manager/manager_test.go | 8 +- {mod/storage/pkg => storage}/manager/names.go | 0 {mod/storage/pkg => storage}/manager/types.go | 4 +- .../pruner/mocks/beacon_block.mock.go | 2 +- .../pruner/mocks/block_event.mock.go | 4 +- .../pruner/mocks/prunable.mock.go | 0 .../pruner/mocks/pruner.mock.go | 2 +- {mod/storage/pkg => storage}/pruner/pruner.go | 4 +- .../pkg => storage}/pruner/pruner_test.go | 8 +- {mod/storage/pkg => storage}/pruner/types.go | 4 +- testing/benchmarks/logger_benchmark_test.go | 2 +- testing/e2e/config/config.go | 2 +- testing/e2e/e2e_api_test.go | 2 +- testing/e2e/e2e_staking_test.go | 8 +- testing/e2e/e2e_startup_test.go | 4 +- testing/e2e/suite/errors.go | 2 +- testing/e2e/suite/setup.go | 2 +- testing/e2e/suite/suite.go | 2 +- testing/e2e/suite/types/account.go | 2 +- testing/e2e/suite/types/beacon_client.go | 2 +- testing/e2e/suite/types/consensus_client.go | 2 +- testing/e2e/suite/types/errors.go | 2 +- testing/e2e/suite/types/service_context.go | 2 +- testing/e2e/suite/types/tx/eip4844.go | 2 +- testing/files/entrypoint.sh | 6 +- testing/quick/compare_test.go | 4 +- 643 files changed, 1607 insertions(+), 4918 deletions(-) rename {mod/async/pkg => async}/broker/assert.go (100%) rename {mod/async/pkg => async}/broker/broker.go (98%) rename {mod/async/pkg => async}/broker/constants.go (100%) rename {mod/async/pkg => async}/broker/errors.go (97%) rename {mod/async/pkg => async}/dispatcher/dispatcher.go (95%) rename {mod/async/pkg => async}/dispatcher/errors.go (94%) rename {mod/async/pkg => async}/dispatcher/options.go (88%) rename {mod/async/pkg => async}/types/broker.go (97%) rename {mod/async/pkg => async}/types/dispatcher.go (97%) rename {mod/beacon => beacon}/blockchain/errors.go (95%) rename {mod/beacon => beacon}/blockchain/execution_engine.go (94%) rename {mod/beacon => beacon}/blockchain/metrics.go (98%) rename {mod/beacon => beacon}/blockchain/payload.go (99%) rename {mod/beacon => beacon}/blockchain/process.go (97%) rename {mod/beacon => beacon}/blockchain/receive.go (94%) rename {mod/beacon => beacon}/blockchain/service.go (97%) rename {mod/beacon => beacon}/blockchain/types.go (95%) rename {mod/beacon => beacon}/payload-time/time.go (97%) rename {mod/beacon => beacon}/payload-time/time_test.go (96%) rename {mod/beacon => beacon}/validator/block_builder.go (94%) rename {mod/beacon => beacon}/validator/config.go (100%) rename {mod/beacon => beacon}/validator/errors.go (96%) rename {mod/beacon => beacon}/validator/metrics.go (97%) rename {mod/beacon => beacon}/validator/service.go (95%) rename {mod/beacon => beacon}/validator/types.go (94%) rename {mod/chain-spec/pkg => chain-spec}/chain/chain_spec.go (100%) rename {mod/chain-spec/pkg => chain-spec}/chain/data.go (100%) rename {mod/chain-spec/pkg => chain-spec}/chain/errors.go (96%) rename {mod/chain-spec/pkg => chain-spec}/chain/helpers.go (97%) rename {mod/chain-spec/pkg => chain-spec}/chain/helpers_test.go (97%) rename {mod/cli/pkg => cli}/builder/builder.go (88%) rename {mod/cli/pkg => cli}/builder/config.go (94%) rename {mod/cli/pkg => cli}/builder/options.go (91%) rename {mod/cli/pkg => cli}/commands/deposit/create.go (89%) rename {mod/cli/pkg => cli}/commands/deposit/deposit.go (91%) rename {mod/cli/pkg => cli}/commands/deposit/errors.go (100%) rename {mod/cli/pkg => cli}/commands/deposit/flags.go (100%) rename {mod/cli/pkg => cli}/commands/errors.go (95%) rename {mod/cli/pkg => cli}/commands/genesis/collect.go (94%) rename {mod/cli/pkg => cli}/commands/genesis/deposit.go (87%) rename {mod/cli/pkg => cli}/commands/genesis/flags.go (100%) rename {mod/cli/pkg => cli}/commands/genesis/genesis.go (96%) rename {mod/cli/pkg => cli}/commands/genesis/payload.go (89%) rename {mod/cli/pkg => cli}/commands/genesis/root.go (87%) rename {mod/cli/pkg => cli}/commands/genesis/types/validators.go (93%) rename {mod/cli/pkg => cli}/commands/genesis/types/validators.ssz.go (97%) rename {mod/cli/pkg => cli}/commands/jwt/errors.go (95%) rename {mod/cli/pkg => cli}/commands/jwt/jwt.go (96%) rename {mod/cli/pkg => cli}/commands/jwt/jwt_test.go (98%) rename {mod/cli/pkg => cli}/commands/root.go (95%) rename {mod/cli/pkg => cli}/commands/server/cmd/execute.go (100%) rename {mod/cli/pkg => cli}/commands/server/pruning.go (96%) rename {mod/cli/pkg => cli}/commands/server/rollback.go (92%) rename {mod/cli/pkg => cli}/commands/server/start.go (95%) rename {mod/cli/pkg => cli}/commands/server/types/app.go (97%) rename {mod/cli/pkg => cli}/commands/setup.go (72%) rename {mod/cli/pkg => cli}/commands/types.go (100%) rename {mod/cli/pkg => cli}/components/client_context.go (97%) rename {mod/cli/pkg => cli}/components/defaults.go (100%) rename {mod/cli/pkg => cli}/components/logger.go (94%) rename {mod/cli/pkg => cli}/config/app.go (98%) rename {mod/cli/pkg => cli}/config/client.go (100%) rename {mod/cli/pkg => cli}/config/comet.go (100%) rename {mod/cli/pkg => cli}/config/errors.go (100%) rename {mod/cli/pkg => cli}/config/server.go (96%) rename {mod/cli/pkg => cli}/context/cmd.go (95%) rename {mod/cli/pkg => cli}/context/keys.go (100%) rename {mod/cli/pkg => cli}/flags/flags.go (99%) rename {mod/cli/pkg => cli}/utils/parser/errors.go (100%) rename {mod/cli/pkg => cli}/utils/parser/validator.go (90%) rename {mod/cli/pkg => cli}/utils/yap/yap.go (100%) rename {beacond/cmd => cmd/beacond}/defaults.go (99%) rename {beacond/cmd => cmd/beacond}/main.go (88%) rename {beacond/cmd => cmd/beacond}/types.go (83%) rename {mod/config => config}/config.go (86%) rename {mod/config/pkg => config}/config/config.go (100%) rename {mod/config/pkg => config}/config/config.toml.tpl (100%) rename {mod/config/pkg => config}/config/toml.go (100%) rename {mod/config/pkg => config}/mapstructure/parser.go (94%) rename {mod/config/pkg => config}/spec/base.go (94%) rename {mod/config/pkg => config}/spec/betnet.go (87%) rename {mod/config/pkg => config}/spec/boonet.go (91%) rename {mod/config/pkg => config}/spec/chain_ids.go (100%) rename {mod/config/pkg => config}/spec/devnet.go (91%) rename {mod/config/pkg => config}/spec/special_cases.go (100%) rename {mod/config/pkg => config}/spec/testnet.go (87%) rename {mod/config/pkg => config}/template/template.go (100%) rename {mod/config/pkg => config}/viper/parser.go (94%) rename {mod/consensus-types/pkg => consensus-types}/types/attestation_data.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/attestation_data_test.go (95%) rename {mod/consensus-types/pkg => consensus-types}/types/block.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/block_test.go (93%) rename {mod/consensus-types/pkg => consensus-types}/types/body.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/body_test.go (91%) rename {mod/consensus-types/pkg => consensus-types}/types/deposit.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/deposit_message.go (95%) rename {mod/consensus-types/pkg => consensus-types}/types/deposit_message_test.go (91%) rename {mod/consensus-types/pkg => consensus-types}/types/deposit_test.go (94%) rename {mod/consensus-types/pkg => consensus-types}/types/deposits.go (94%) rename {mod/consensus-types/pkg => consensus-types}/types/errors.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/eth1data.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/eth1data_test.go (95%) rename {mod/consensus-types/pkg => consensus-types}/types/fork.go (95%) rename {mod/consensus-types/pkg => consensus-types}/types/fork_data.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/fork_data_test.go (94%) rename {mod/consensus-types/pkg => consensus-types}/types/fork_test.go (93%) rename {mod/consensus-types/pkg => consensus-types}/types/genesis.go (90%) rename {mod/consensus-types/pkg => consensus-types}/types/genesis_test.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/header.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/header_test.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/payload.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/payload_header.go (98%) rename {mod/consensus-types/pkg => consensus-types}/types/payload_header_test.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/payload_test.go (95%) rename {mod/consensus-types/pkg => consensus-types}/types/signing_data.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/signing_data_test.go (93%) rename {mod/consensus-types/pkg => consensus-types}/types/slashing_info.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/slashing_info_test.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/state.go (98%) rename {mod/consensus-types/pkg => consensus-types}/types/state_test.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/validator.go (97%) rename {mod/consensus-types/pkg => consensus-types}/types/validator_test.go (98%) rename {mod/consensus-types/pkg => consensus-types}/types/validators.go (96%) rename {mod/consensus-types/pkg => consensus-types}/types/withdrawal_credentials.go (98%) rename {mod/consensus-types/pkg => consensus-types}/types/withdrawal_credentials_test.go (98%) rename {mod/consensus/pkg => consensus}/cometbft/cli/commands.go (87%) rename {mod/consensus/pkg => consensus}/cometbft/mod.go (100%) rename {mod/consensus/pkg => consensus}/cometbft/service/abci.go (97%) rename {mod/consensus/pkg => consensus}/cometbft/service/encoding/encoding.go (98%) rename {mod/consensus/pkg => consensus}/cometbft/service/encoding/errors.go (97%) rename {mod/consensus/pkg => consensus}/cometbft/service/encoding/types.go (95%) rename {mod/consensus/pkg => consensus}/cometbft/service/genesis.go (95%) rename {mod/consensus/pkg => consensus}/cometbft/service/log/cmt_logger.go (97%) rename {mod/consensus/pkg => consensus}/cometbft/service/log/sdk_logger.go (97%) rename {mod/consensus/pkg => consensus}/cometbft/service/middleware/abci.go (96%) rename {mod/consensus/pkg => consensus}/cometbft/service/middleware/constants.go (100%) rename {mod/consensus/pkg => consensus}/cometbft/service/middleware/errors.go (97%) rename {mod/consensus/pkg => consensus}/cometbft/service/middleware/metrics.go (100%) rename {mod/consensus/pkg => consensus}/cometbft/service/middleware/middleware.go (94%) rename {mod/consensus/pkg => consensus}/cometbft/service/middleware/types.go (92%) rename {mod/consensus/pkg => consensus}/cometbft/service/noops.go (100%) rename {mod/consensus/pkg => consensus}/cometbft/service/options.go (98%) rename {mod/consensus/pkg => consensus}/cometbft/service/params/consensus.go (96%) rename {mod/consensus/pkg => consensus}/cometbft/service/service.go (93%) rename {mod/consensus/pkg => consensus}/cometbft/service/state.go (100%) rename {mod/consensus/pkg => consensus}/cometbft/service/state/state.go (100%) rename {mod/consensus/pkg => consensus}/cometbft/service/types.go (88%) rename {mod/consensus/pkg => consensus}/types/common.go (96%) rename {mod/consensus/pkg => consensus}/types/consensus_block.go (96%) rename {mod/consensus/pkg => consensus}/types/consensus_sidecars.go (100%) rename {mod/consensus/pkg => consensus}/types/slot_data.go (98%) rename {mod/da/pkg => da}/blob/factory.go (93%) rename {mod/da/pkg => da}/blob/factory_metrics.go (97%) rename {mod/da/pkg => da}/blob/factory_test.go (100%) rename {mod/da/pkg => da}/blob/processor.go (95%) rename {mod/da/pkg => da}/blob/processor_metrics.go (97%) rename {mod/da/pkg => da}/blob/types.go (94%) rename {mod/da/pkg => da}/blob/verifier.go (97%) rename {mod/da/pkg => da}/blob/verifier_metrics.go (97%) rename {mod/da/pkg => da}/da/service.go (97%) rename {mod/da/pkg => da}/da/types.go (100%) rename {mod/da/pkg => da}/kzg/ckzg/ckzg.go (96%) rename {mod/da/pkg => da}/kzg/ckzg/ckzg_cgo.go (95%) rename {mod/da/pkg => da}/kzg/ckzg/ckzg_cgo_test.go (95%) rename {mod/da/pkg => da}/kzg/ckzg/ckzg_no_cgo.go (92%) rename {mod/da/pkg => da}/kzg/ckzg/ckzg_no_cgo_test.go (96%) rename {mod/da/pkg => da}/kzg/ckzg/errors.go (96%) rename {mod/da/pkg => da}/kzg/ckzg/helpers_test.go (92%) rename {mod/da/pkg => da}/kzg/config.go (100%) rename {mod/da/pkg => da}/kzg/config_test.go (96%) rename {mod/da/pkg => da}/kzg/errors.go (95%) rename {mod/da/pkg => da}/kzg/gokzg/gokzg.go (95%) rename {mod/da/pkg => da}/kzg/gokzg/gokzg_test.go (94%) rename {mod/da/pkg => da}/kzg/noop/noop.go (92%) rename {mod/da/pkg => da}/kzg/noop/noop_test.go (90%) rename {mod/da/pkg => da}/kzg/proof.go (91%) rename {mod/da/pkg => da}/kzg/proof_test.go (89%) rename {mod/da/pkg => da}/kzg/types/args.go (96%) rename {mod/da/pkg => da}/store/errors.go (96%) rename {mod/da/pkg => da}/store/pruner.go (91%) rename {mod/da/pkg => da}/store/pruner_test.go (90%) rename {mod/da/pkg => da}/store/store.go (92%) rename {mod/da/pkg => da}/store/types.go (90%) rename {mod/da/pkg => da}/types/errors.go (96%) rename {mod/da/pkg => da}/types/sidecar.go (93%) rename {mod/da/pkg => da}/types/sidecar_test.go (93%) rename {mod/da/pkg => da}/types/sidecars.go (98%) rename {mod/da/pkg => da}/types/sidecars_test.go (90%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/attributes.go (94%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/attributes_test.go (93%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/blobs_bundle.go (100%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/blobs_bundle_test.go (94%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/engine.go (97%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/engine_test.go (92%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/errors.go (97%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/mocks/blobs_bundle.mock.go (97%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/mocks/built_execution_payload_env.mock.go (98%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/mocks/payload_attributer.mock.go (98%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/payload_env.go (94%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/payload_env_test.go (94%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/requests.go (96%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/requests_test.go (93%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/transactions.go (95%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/transactions_test.go (95%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/withdrawal.go (97%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/withdrawal_ssz_test.go (96%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/withdrawal_test.go (93%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/withdrawals.go (94%) rename {mod/engine-primitives/pkg => engine-primitives}/engine-primitives/withdrawals_test.go (93%) rename {mod/engine-primitives/pkg => engine-primitives}/errors/errors.go (98%) rename {mod/errors => errors}/mod.go (100%) delete mode 100644 examples/berad/cmd/main.go delete mode 100644 examples/berad/pkg/chain-spec/berachain.go delete mode 100644 examples/berad/pkg/consensus-types/state.go delete mode 100644 examples/berad/pkg/consensus-types/validator.go delete mode 100644 examples/berad/pkg/state-transition/errors.go delete mode 100644 examples/berad/pkg/state-transition/interfaces.go delete mode 100644 examples/berad/pkg/state-transition/state_processor.go delete mode 100644 examples/berad/pkg/state-transition/state_processor_committee.go delete mode 100644 examples/berad/pkg/state-transition/state_processor_genesis.go delete mode 100644 examples/berad/pkg/state-transition/state_processor_payload.go delete mode 100644 examples/berad/pkg/state-transition/state_processor_randao.go delete mode 100644 examples/berad/pkg/state-transition/state_processor_slashing.go delete mode 100644 examples/berad/pkg/state-transition/state_processor_staking.go delete mode 100644 examples/berad/pkg/state-transition/types.go delete mode 100644 examples/berad/pkg/storage/history.go delete mode 100644 examples/berad/pkg/storage/index/validator.go delete mode 100644 examples/berad/pkg/storage/keys/keys.go delete mode 100644 examples/berad/pkg/storage/kvstore.go delete mode 100644 examples/berad/pkg/storage/randao.go delete mode 100644 examples/berad/pkg/storage/registry.go delete mode 100644 examples/berad/pkg/storage/staking.go delete mode 100644 examples/berad/pkg/storage/types.go delete mode 100644 examples/berad/pkg/storage/versioning.go rename {mod/execution => execution}/README.md (83%) rename {mod/execution/pkg => execution}/client/client.go (92%) rename {mod/execution/pkg => execution}/client/config.go (97%) rename {mod/execution/pkg => execution}/client/engine.go (94%) rename {mod/execution/pkg => execution}/client/errors.go (93%) rename {mod/execution/pkg => execution}/client/ethclient/constants.go (100%) rename {mod/execution/pkg => execution}/client/ethclient/engine.go (95%) rename {mod/execution/pkg => execution}/client/ethclient/errors.go (96%) rename {mod/execution/pkg => execution}/client/ethclient/eth.go (94%) rename {mod/execution/pkg => execution}/client/ethclient/ethclient.go (91%) rename {mod/execution/pkg => execution}/client/ethclient/rpc/client.go (96%) rename {mod/execution/pkg => execution}/client/ethclient/rpc/errors.go (100%) rename {mod/execution/pkg => execution}/client/ethclient/rpc/header.go (100%) rename {mod/execution/pkg => execution}/client/ethclient/rpc/options.go (95%) rename {mod/execution/pkg => execution}/client/ethclient/rpc/types.go (96%) rename {mod/execution/pkg => execution}/client/helpers.go (90%) rename {mod/execution/pkg => execution}/client/metrics.go (99%) rename {mod/execution/pkg => execution}/client/types.go (96%) rename {mod/execution/pkg => execution}/deposit/contract.go (89%) rename {mod/execution/pkg => execution}/deposit/metrics.go (96%) rename {mod/execution/pkg => execution}/deposit/pruner.go (90%) rename {mod/execution/pkg => execution}/deposit/service.go (95%) rename {mod/execution/pkg => execution}/deposit/sync.go (96%) rename {mod/execution/pkg => execution}/deposit/types.go (94%) rename {mod/execution/pkg => execution}/engine/engine.go (95%) rename {mod/execution/pkg => execution}/engine/errors.go (96%) rename {mod/execution/pkg => execution}/engine/metrics.go (97%) rename {mod/execution/pkg => execution}/engine/types.go (87%) rename {mod/geth-primitives/pkg => geth-primitives}/bind/bind.go (100%) rename {mod/geth-primitives/pkg => geth-primitives}/deposit/contract.abigen.go (100%) rename {mod/geth-primitives/pkg => geth-primitives}/deposit/contract.go (79%) rename {mod/geth-primitives/pkg => geth-primitives}/ethclient/ethclient.go (100%) rename {mod/geth-primitives => geth-primitives}/execution.go (100%) rename {mod/geth-primitives/pkg => geth-primitives}/rpc/rpc.go (100%) rename {mod/log => log}/mod.go (100%) rename {mod/log/pkg => log}/noop/noop.go (97%) rename {mod/log/pkg => log}/noop/noop_test.go (97%) rename {mod/log/pkg => log}/phuslu/buffer.go (100%) rename {mod/log/pkg => log}/phuslu/config.go (100%) rename {mod/log/pkg => log}/phuslu/formatter.go (100%) rename {mod/log/pkg => log}/phuslu/logger.go (100%) rename {mod/log/pkg => log}/phuslu/style.go (97%) rename {mod/log/pkg => log}/phuslu/time.go (100%) delete mode 100644 mod/storage/README.md rename {mod/node-api => node-api}/backend/backend.go (98%) rename {mod/node-api => node-api}/backend/block.go (92%) rename {mod/node-api => node-api}/backend/genesis.go (91%) rename {mod/node-api => node-api}/backend/genesis_test.go (100%) rename {mod/node-api => node-api}/backend/mocks/availability_store.mock.go (98%) rename {mod/node-api => node-api}/backend/mocks/beacon_block_header.mock.go (99%) rename {mod/node-api => node-api}/backend/mocks/beacon_state.mock.go (99%) rename {mod/node-api => node-api}/backend/mocks/block_store.mock.go (98%) rename {mod/node-api => node-api}/backend/mocks/deposit_store.mock.go (100%) rename {mod/node-api => node-api}/backend/mocks/node.mock.go (100%) rename {mod/node-api => node-api}/backend/mocks/state_processor.mock.go (95%) rename {mod/node-api => node-api}/backend/mocks/storage_backend.mock.go (100%) rename {mod/node-api => node-api}/backend/mocks/validator.mock.go (98%) rename {mod/node-api => node-api}/backend/mocks/withdrawal.mock.go (95%) rename {mod/node-api => node-api}/backend/mocks/withdrawal_credentials.mock.go (97%) rename {mod/node-api => node-api}/backend/randao.go (92%) rename {mod/node-api => node-api}/backend/state.go (94%) rename {mod/node-api => node-api}/backend/types.go (94%) rename {mod/node-api => node-api}/backend/utils/validator.go (92%) rename {mod/node-api => node-api}/backend/validator.go (94%) rename {mod/node-api => node-api}/block_store/config.go (100%) rename {mod/node-api => node-api}/block_store/service.go (95%) rename {mod/node-api => node-api}/block_store/types.go (90%) rename {mod/node-api => node-api}/engines/echo/engine.go (95%) rename {mod/node-api => node-api}/engines/echo/middleware.go (93%) rename {mod/node-api => node-api}/engines/echo/types.go (100%) rename {mod/node-api => node-api}/engines/echo/vaildator.go (96%) rename {mod/node-api => node-api}/handlers/beacon/backend.go (93%) rename {mod/node-api => node-api}/handlers/beacon/block.go (91%) rename {mod/node-api => node-api}/handlers/beacon/genesis.go (87%) rename {mod/node-api => node-api}/handlers/beacon/handler.go (90%) rename {mod/node-api => node-api}/handlers/beacon/header.go (92%) rename {mod/node-api => node-api}/handlers/beacon/historical.go (91%) rename {mod/node-api => node-api}/handlers/beacon/randao.go (89%) rename {mod/node-api => node-api}/handlers/beacon/routes.go (98%) rename {mod/node-api => node-api}/handlers/beacon/types/request.go (98%) rename {mod/node-api => node-api}/handlers/beacon/types/response.go (95%) rename {mod/node-api => node-api}/handlers/beacon/types/types.go (94%) rename {mod/node-api => node-api}/handlers/beacon/validators.go (95%) rename {mod/node-api => node-api}/handlers/builder/handler.go (91%) rename {mod/node-api => node-api}/handlers/builder/routes.go (92%) rename {mod/node-api => node-api}/handlers/config/handler.go (91%) rename {mod/node-api => node-api}/handlers/config/routes.go (93%) rename {mod/node-api => node-api}/handlers/debug/handler.go (91%) rename {mod/node-api => node-api}/handlers/debug/routes.go (93%) rename {mod/node-api => node-api}/handlers/events/handler.go (91%) rename {mod/node-api => node-api}/handlers/events/routes.go (92%) rename {mod/node-api => node-api}/handlers/handlers.go (96%) rename {mod/node-api => node-api}/handlers/node/handler.go (91%) rename {mod/node-api => node-api}/handlers/node/placeholders.go (100%) rename {mod/node-api => node-api}/handlers/node/routes.go (94%) rename {mod/node-api => node-api}/handlers/proof/backend.go (96%) rename {mod/node-api => node-api}/handlers/proof/block_proposer.go (92%) rename {mod/node-api => node-api}/handlers/proof/execution_fee_recipient.go (92%) rename {mod/node-api => node-api}/handlers/proof/execution_number.go (91%) rename {mod/node-api => node-api}/handlers/proof/handler.go (90%) rename {mod/node-api => node-api}/handlers/proof/merkle/beacon_state.go (90%) rename {mod/node-api => node-api}/handlers/proof/merkle/beacon_state_test.go (90%) rename {mod/node-api => node-api}/handlers/proof/merkle/block_proposer_index.go (91%) rename {mod/node-api => node-api}/handlers/proof/merkle/block_proposer_index_test.go (90%) rename {mod/node-api => node-api}/handlers/proof/merkle/block_proposer_pubkey.go (93%) rename {mod/node-api => node-api}/handlers/proof/merkle/block_proposer_pubkey_test.go (88%) rename {mod/node-api => node-api}/handlers/proof/merkle/constants.go (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/constants_test.go (95%) rename {mod/node-api => node-api}/handlers/proof/merkle/execution_fee_recipient.go (94%) rename {mod/node-api => node-api}/handlers/proof/merkle/execution_fee_recipient_test.go (89%) rename {mod/node-api => node-api}/handlers/proof/merkle/execution_number.go (94%) rename {mod/node-api => node-api}/handlers/proof/merkle/execution_number_test.go (89%) rename {mod/node-api => node-api}/handlers/proof/merkle/merkle_test.go (95%) rename {mod/node-api => node-api}/handlers/proof/merkle/mock/beacon_state.go (93%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/empty_execution_number_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/empty_fee_recipient_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/empty_state_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/many_validators_proposer_index_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/many_validators_proposer_pubkey_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/non_empty_execution_number_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/non_empty_fee_recipient_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/non_empty_state_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/one_validator_proposer_index_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/merkle/testdata/one_validator_proposer_pubkey_proof.json (100%) rename {mod/node-api => node-api}/handlers/proof/routes.go (94%) rename {mod/node-api => node-api}/handlers/proof/types/request.go (95%) rename {mod/node-api => node-api}/handlers/proof/types/response.go (95%) rename {mod/node-api => node-api}/handlers/proof/types/types.go (91%) rename {mod/node-api => node-api}/handlers/routes.go (97%) rename {mod/node-api => node-api}/handlers/types/errors.go (100%) rename {mod/node-api => node-api}/handlers/types/request.go (100%) rename {mod/node-api => node-api}/handlers/types/response.go (100%) rename {mod/node-api => node-api}/handlers/utils/constants.go (94%) rename {mod/node-api => node-api}/handlers/utils/context.go (89%) rename {mod/node-api => node-api}/handlers/utils/id.go (96%) rename {mod/node-api => node-api}/server/config.go (100%) rename {mod/node-api => node-api}/server/context/context.go (100%) rename {mod/node-api => node-api}/server/server.go (91%) rename {mod/node-api => node-api}/server/types.go (87%) rename {mod/node-core/pkg => node-core}/builder/baseapp_options.go (92%) rename {mod/node-core/pkg => node-core}/builder/builder.go (91%) rename {mod/node-core/pkg => node-core}/builder/options.go (94%) rename {mod/node-core/pkg => node-core}/components/api.go (91%) rename {mod/node-core/pkg => node-core}/components/api_handlers.go (90%) rename {mod/node-core/pkg => node-core}/components/attributes_factory.go (86%) rename {mod/node-core/pkg => node-core}/components/availability_store.go (88%) rename {mod/node-core/pkg => node-core}/components/backend.go (94%) rename {mod/node-core/pkg => node-core}/components/blobs.go (89%) rename {mod/node-core/pkg => node-core}/components/block_store.go (90%) rename {mod/node-core/pkg => node-core}/components/block_store_service.go (92%) rename {mod/node-core/pkg => node-core}/components/chain_service.go (88%) rename {mod/node-core/pkg => node-core}/components/chain_spec.go (94%) rename {mod/node-core/pkg => node-core}/components/cometbft_service.go (84%) rename {mod/node-core/pkg => node-core}/components/config.go (96%) rename {mod/node-core/pkg => node-core}/components/config_server.go (94%) rename {mod/node-core/pkg => node-core}/components/db_manager.go (91%) rename {mod/node-core/pkg => node-core}/components/depinject.go (100%) rename {mod/node-core/pkg => node-core}/components/deposit_contract.go (89%) rename {mod/node-core/pkg => node-core}/components/deposit_service.go (87%) rename {mod/node-core/pkg => node-core}/components/deposit_store.go (86%) rename {mod/node-core/pkg => node-core}/components/dispatcher.go (93%) rename {mod/node-core/pkg => node-core}/components/engine.go (87%) rename {mod/node-core/pkg => node-core}/components/interfaces.go (98%) rename {mod/node-core/pkg => node-core}/components/jwt_secret.go (91%) rename {mod/node-core/pkg => node-core}/components/metrics/sink.go (100%) rename {mod/node-core/pkg => node-core}/components/middleware.go (89%) rename {mod/node-core/pkg => node-core}/components/node.go (82%) rename {mod/node-core/pkg => node-core}/components/payload_builder.go (86%) rename {mod/node-core/pkg => node-core}/components/reporting_service.go (86%) rename {mod/node-core/pkg => node-core}/components/service_registry.go (86%) rename {mod/node-core/pkg => node-core}/components/sidecars.go (88%) rename {mod/node-core/pkg => node-core}/components/signer.go (90%) rename {mod/node-core/pkg => node-core}/components/signer/errors.go (100%) rename {mod/node-core/pkg => node-core}/components/signer/legacy.go (95%) rename {mod/node-core/pkg => node-core}/components/signer/signer.go (94%) rename {mod/node-core/pkg => node-core}/components/state_processor.go (89%) rename {mod/node-core/pkg => node-core}/components/storage/provider.go (100%) rename {mod/node-core/pkg => node-core}/components/storage/storage.go (98%) rename {mod/node-core/pkg => node-core}/components/storage/types.go (95%) rename {mod/node-core/pkg => node-core}/components/store.go (93%) rename {mod/node-core/pkg => node-core}/components/telemetry_service.go (90%) rename {mod/node-core/pkg => node-core}/components/telemetry_sink.go (93%) rename {mod/node-core/pkg => node-core}/components/trusted_setup.go (92%) rename {mod/node-core/pkg => node-core}/components/types.go (88%) rename {mod/node-core/pkg => node-core}/components/validator_service.go (92%) rename {mod/node-core/pkg => node-core}/node/node.go (94%) rename {mod/node-core/pkg => node-core}/services/registry/errors.go (96%) rename {mod/node-core/pkg => node-core}/services/registry/mocks/basic.mock.go (100%) rename {mod/node-core/pkg => node-core}/services/registry/mocks/dispatcher.mock.go (100%) rename {mod/node-core/pkg => node-core}/services/registry/mocks/registry_option.mock.go (96%) rename {mod/node-core/pkg => node-core}/services/registry/options.go (97%) rename {mod/node-core/pkg => node-core}/services/registry/registry.go (98%) rename {mod/node-core/pkg => node-core}/services/registry/registry_test.go (92%) rename {mod/node-core/pkg => node-core}/services/version/types.go (100%) rename {mod/node-core/pkg => node-core}/services/version/version.go (94%) rename {mod/node-core/pkg => node-core}/types/node.go (100%) rename {mod/observability/pkg => observability}/telemetry/service.go (100%) rename {mod/payload => payload}/README.md (100%) rename {mod/payload/pkg => payload}/attributes/factory.go (95%) rename {mod/payload/pkg => payload}/attributes/types.go (91%) rename {mod/payload/pkg => payload}/builder/builder.go (95%) rename {mod/payload/pkg => payload}/builder/config.go (97%) rename {mod/payload/pkg => payload}/builder/errors.go (96%) rename {mod/payload/pkg => payload}/builder/payload.go (97%) rename {mod/payload/pkg => payload}/builder/types.go (92%) rename {mod/payload/pkg => payload}/cache/payload_id.go (100%) rename {mod/payload/pkg => payload}/cache/payload_id_fuzz_test.go (98%) rename {mod/payload/pkg => payload}/cache/payload_id_test.go (98%) rename {mod/primitives/pkg => primitives}/async/chan.go (100%) rename {mod/primitives/pkg => primitives}/async/event.go (100%) rename {mod/primitives/pkg => primitives}/async/id.go (100%) rename {mod/primitives/pkg => primitives}/bytes/b.go (96%) rename {mod/primitives/pkg => primitives}/bytes/b20.go (97%) rename {mod/primitives/pkg => primitives}/bytes/b20_test.go (99%) rename {mod/primitives/pkg => primitives}/bytes/b256.go (98%) rename {mod/primitives/pkg => primitives}/bytes/b32.go (97%) rename {mod/primitives/pkg => primitives}/bytes/b32_test.go (99%) rename {mod/primitives/pkg => primitives}/bytes/b4.go (97%) rename {mod/primitives/pkg => primitives}/bytes/b48.go (98%) rename {mod/primitives/pkg => primitives}/bytes/b48_test.go (98%) rename {mod/primitives/pkg => primitives}/bytes/b4_test.go (98%) rename {mod/primitives/pkg => primitives}/bytes/b8.go (97%) rename {mod/primitives/pkg => primitives}/bytes/b8_test.go (98%) rename {mod/primitives/pkg => primitives}/bytes/b96.go (98%) rename {mod/primitives/pkg => primitives}/bytes/b96_test.go (97%) rename {mod/primitives/pkg => primitives}/bytes/b_test.go (98%) rename {mod/primitives/pkg => primitives}/bytes/buffer/buffer.go (100%) rename {mod/primitives/pkg => primitives}/bytes/buffer/buffer_test.go (95%) rename {mod/primitives/pkg => primitives}/bytes/utils.go (96%) rename {mod/primitives/pkg => primitives}/common/consensus.go (92%) rename {mod/primitives/pkg => primitives}/common/consensus_test.go (91%) rename {mod/primitives/pkg => primitives}/common/execution.go (97%) rename {mod/primitives/pkg => primitives}/common/execution_test.go (93%) rename {mod/primitives/pkg => primitives}/constants/bls12_381.go (100%) rename {mod/primitives/pkg => primitives}/constants/constants.go (100%) rename {mod/primitives/pkg => primitives}/constants/domain.go (100%) rename {mod/primitives/pkg => primitives}/constants/eip4844.go (100%) rename {mod/primitives/pkg => primitives}/constants/misc.go (100%) rename {mod/primitives/pkg => primitives}/constants/payload.go (100%) rename {mod/primitives/pkg => primitives}/constraints/basic.go (100%) rename {mod/primitives/pkg => primitives}/constraints/encoding.go (94%) rename {mod/primitives/pkg => primitives}/constraints/ssz.go (100%) rename {mod/primitives/pkg => primitives}/crypto/bls.go (97%) rename {mod/primitives/pkg => primitives}/crypto/mocks/bls_signer.mock.go (98%) rename {mod/primitives/pkg => primitives}/crypto/sha256/sha256.go (100%) rename {mod/primitives/pkg => primitives}/eip4844/blob.go (95%) rename {mod/primitives/pkg => primitives}/eip4844/blob_test.go (98%) rename {mod/primitives/pkg => primitives}/eip4844/kzg_commitment.go (92%) rename {mod/primitives/pkg => primitives}/eip4844/kzg_commitment_test.go (97%) rename {mod/primitives/pkg => primitives}/eip4844/kzg_proof.go (94%) rename {mod/primitives/pkg => primitives}/encoding/hex/big_int.go (100%) rename {mod/primitives/pkg => primitives}/encoding/hex/bit_int_test.go (97%) rename {mod/primitives/pkg => primitives}/encoding/hex/bytes.go (98%) rename {mod/primitives/pkg => primitives}/encoding/hex/bytes_test.go (98%) rename {mod/primitives/pkg => primitives}/encoding/hex/const.go (100%) rename {mod/primitives/pkg => primitives}/encoding/hex/errors.go (100%) rename {mod/primitives/pkg => primitives}/encoding/hex/format.go (100%) rename {mod/primitives/pkg => primitives}/encoding/hex/format_test.go (96%) rename {mod/primitives/pkg => primitives}/encoding/hex/nibble.go (100%) rename {mod/primitives/pkg => primitives}/encoding/hex/u64.go (100%) rename {mod/primitives/pkg => primitives}/encoding/hex/u64_test.go (97%) rename {mod/primitives/pkg => primitives}/encoding/json/json.go (100%) rename {mod/primitives/pkg => primitives}/encoding/ssz/constants/constants.go (100%) rename {mod/primitives/pkg => primitives}/encoding/ssz/db/node.go (94%) rename {mod/primitives/pkg => primitives}/encoding/ssz/db/node_test.go (95%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/errors.go (100%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/index.go (97%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/index_test.go (98%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/object_path.go (96%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/object_path_test.go (95%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/proof.go (93%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/tree.go (97%) rename {mod/primitives/pkg => primitives}/encoding/ssz/merkle/tree_test.go (98%) rename {mod/primitives/pkg => primitives}/encoding/ssz/schema/common.go (97%) rename {mod/primitives/pkg => primitives}/encoding/ssz/schema/definitions.go (98%) rename {mod/primitives/pkg => primitives}/encoding/ssz/schema/field.go (100%) rename {mod/primitives/pkg => primitives}/encoding/ssz/schema/id.go (98%) rename {mod/primitives/pkg => primitives}/math/constants.go (100%) rename {mod/primitives/pkg => primitives}/math/errors.go (96%) rename {mod/primitives/pkg => primitives}/math/log/log.go (100%) rename {mod/primitives/pkg => primitives}/math/log/log_test.go (96%) rename {mod/primitives/pkg => primitives}/math/pow/pow.go (100%) rename {mod/primitives/pkg => primitives}/math/pow/pow_test.go (96%) rename {mod/primitives/pkg => primitives}/math/u256.go (100%) rename {mod/primitives/pkg => primitives}/math/u64.go (95%) rename {mod/primitives/pkg => primitives}/math/u64_test.go (98%) rename {mod/primitives/pkg => primitives}/merkle/errors.go (98%) rename {mod/primitives/pkg => primitives}/merkle/hasher.go (100%) rename {mod/primitives/pkg => primitives}/merkle/hasher_fuzz_test.go (96%) rename {mod/primitives/pkg => primitives}/merkle/hasher_test.go (98%) rename {mod/primitives/pkg => primitives}/merkle/proof.go (97%) rename {mod/primitives/pkg => primitives}/merkle/root_hasher.go (96%) rename {mod/primitives/pkg => primitives}/merkle/root_hasher_test.go (96%) rename {mod/primitives/pkg => primitives}/merkle/tree.go (95%) rename {mod/primitives/pkg => primitives}/merkle/tree_fuzz_test.go (95%) rename {mod/primitives/pkg => primitives}/merkle/tree_test.go (98%) rename {mod/primitives/pkg => primitives}/merkle/utils.go (97%) rename {mod/primitives/pkg => primitives}/merkle/zero/zero.go (95%) rename {mod/primitives/pkg => primitives}/net/http/errors.go (100%) rename {mod/primitives/pkg => primitives}/net/json-rpc/errors.go (98%) rename {mod/primitives/pkg => primitives}/net/jwt/errors.go (96%) rename {mod/primitives/pkg => primitives}/net/jwt/jwt.go (96%) rename {mod/primitives/pkg => primitives}/net/jwt/jwt_test.go (98%) rename {mod/primitives/pkg => primitives}/net/url/url.go (100%) rename {mod/primitives/pkg => primitives}/transition/context.go (98%) rename {mod/primitives/pkg => primitives}/transition/validator_update.go (95%) rename {mod/primitives/pkg => primitives}/transition/validator_update_test.go (94%) rename {mod/primitives/pkg => primitives}/version/version.go (100%) rename {mod/primitives/pkg => primitives}/version/version_test.go (98%) rename {build/scripts => scripts/build}/build.mk (98%) rename {build/scripts => scripts/build}/codegen.mk (100%) rename {build/scripts => scripts/build}/constants.mk (100%) rename {build/scripts => scripts/build}/devtools.mk (98%) rename {build/scripts => scripts/build}/golines.sh (100%) rename {build/scripts => scripts/build}/help.mk (100%) rename {build/scripts => scripts/build}/linting.mk (91%) rename {build/scripts => scripts/build}/proto_generate_pulsar.sh (94%) rename {build/scripts => scripts/build}/protobuf.mk (79%) rename {build/scripts => scripts/build}/release.mk (100%) rename {build/scripts => scripts/build}/testing.mk (94%) rename {mod/state-transition/pkg => state-transition}/core/README.md (100%) rename {mod/state-transition/pkg => state-transition}/core/core_test.go (85%) rename {mod/state-transition/pkg => state-transition}/core/errors.go (98%) rename {mod/state-transition/pkg => state-transition}/core/interfaces.go (96%) rename {mod/state-transition/pkg => state-transition}/core/metrics.go (100%) rename {mod/state-transition/pkg => state-transition}/core/mocks/execution_engine.mock.go (96%) rename {mod/state-transition/pkg => state-transition}/core/state/constants.go (100%) rename {mod/state-transition/pkg => state-transition}/core/state/interfaces.go (97%) rename {mod/state-transition/pkg => state-transition}/core/state/statedb.go (98%) rename {mod/state-transition/pkg => state-transition}/core/state/types.go (94%) rename {mod/state-transition/pkg => state-transition}/core/state/upgrade.go (92%) rename {mod/state-transition/pkg => state-transition}/core/state_processor.go (96%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_genesis.go (90%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_genesis_test.go (94%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_payload.go (94%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_randao.go (91%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_slashing.go (98%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_staking.go (97%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_staking_test.go (98%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_validators.go (95%) rename {mod/state-transition/pkg => state-transition}/core/state_processor_withdrawals.go (97%) rename {mod/state-transition/pkg => state-transition}/core/types.go (95%) rename {mod/state-transition/pkg => state-transition}/core/validation_deposits.go (96%) rename {mod/storage/pkg => storage}/beacondb/eth1.go (100%) rename {mod/storage/pkg => storage}/beacondb/fork.go (100%) rename {mod/storage/pkg => storage}/beacondb/history.go (97%) rename {mod/storage/pkg => storage}/beacondb/index/validator.go (95%) rename {mod/storage/pkg => storage}/beacondb/index/validator_test.go (100%) rename {mod/storage/pkg => storage}/beacondb/keys/keys.go (100%) rename {mod/storage/pkg => storage}/beacondb/kvstore.go (97%) rename {mod/storage/pkg => storage}/beacondb/randao.go (96%) rename {mod/storage/pkg => storage}/beacondb/registry.go (98%) rename {mod/storage/pkg => storage}/beacondb/registry_test.go (94%) rename {mod/storage/pkg => storage}/beacondb/slashing.go (96%) rename {mod/storage/pkg => storage}/beacondb/staking_test.go (100%) rename {mod/storage/pkg => storage}/beacondb/types.go (88%) rename {mod/storage/pkg => storage}/beacondb/versioning.go (94%) rename {mod/storage/pkg => storage}/beacondb/withdrawals.go (97%) rename {mod/storage/pkg => storage}/block/store.go (94%) rename {mod/storage/pkg => storage}/block/store_test.go (91%) rename {mod/storage/pkg => storage}/block/types.go (91%) rename {mod/storage/pkg => storage}/db/db.go (100%) rename {mod/storage/pkg => storage}/deposit/store.go (95%) rename {mod/storage/pkg => storage}/deposit/types.go (90%) rename {mod/storage/pkg => storage}/encoding/ssz.go (98%) rename {mod/storage/pkg => storage}/encoding/u64.go (95%) rename {mod/storage/pkg => storage}/filedb/db.go (97%) rename {mod/storage/pkg => storage}/filedb/db_options.go (97%) rename {mod/storage/pkg => storage}/filedb/db_test.go (98%) rename {mod/storage/pkg => storage}/filedb/range_db.go (95%) rename {mod/storage/pkg => storage}/filedb/range_db_test.go (98%) rename {mod/storage/pkg => storage}/interfaces/db.go (100%) rename {mod/storage/pkg => storage}/interfaces/mocks/db.mock.go (100%) rename {mod/storage/pkg => storage}/manager/manager.go (94%) rename {mod/storage/pkg => storage}/manager/manager_test.go (89%) rename {mod/storage/pkg => storage}/manager/names.go (100%) rename {mod/storage/pkg => storage}/manager/types.go (92%) rename {mod/storage/pkg => storage}/pruner/mocks/beacon_block.mock.go (96%) rename {mod/storage/pkg => storage}/pruner/mocks/block_event.mock.go (97%) rename {mod/storage/pkg => storage}/pruner/mocks/prunable.mock.go (100%) rename {mod/storage/pkg => storage}/pruner/mocks/pruner.mock.go (97%) rename {mod/storage/pkg => storage}/pruner/pruner.go (96%) rename {mod/storage/pkg => storage}/pruner/pruner_test.go (93%) rename {mod/storage/pkg => storage}/pruner/types.go (94%) diff --git a/.dockerignore b/.dockerignore index 9b0cf5269a..a0377b0233 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,3 +11,6 @@ testing/ .git/ .vscode/ *.md +contracts/ +docs/ +scripts/ diff --git a/.gitignore b/.gitignore index 939643fc63..bc97033da0 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ tmp/ *.out # Dependency directories (remove the comment below to include it) -go.work.sum +go.work.sum ########## # Linux # diff --git a/.mockery.yaml b/.mockery.yaml index 6006c28598..bf9f3cb61a 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -30,7 +30,7 @@ outpkg: "mocks" resolve-type-alias: False # see https://vektra.github.io/mockery/latest/deprecations/#resolve-type-alias issue-845-fix: True # see https://vektra.github.io/mockery/latest/deprecations/#issue-845-fix packages: - github.com/berachain/beacon-kit/mod/execution/pkg/client/ethclient: + github.com/berachain/beacon-kit/mod/execution/client/ethclient: config: recursive: True with-expecter: true @@ -40,37 +40,37 @@ packages: recursive: True with-expecter: true all: True - github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry: + github.com/berachain/beacon-kit/mod/node-core/services/registry: config: recursive: True with-expecter: true all: True - github.com/berachain/beacon-kit/mod/storage/pkg/interfaces: + github.com/berachain/beacon-kit/mod/storage/interfaces: config: recursive: False with-expecter: true all: True - github.com/berachain/beacon-kit/mod/consensus-types/pkg/types: + github.com/berachain/beacon-kit/mod/consensus-types/types: config: recursive: False with-expecter: true all: True - github.com/berachain/beacon-kit/mod/storage/pkg/pruner: + github.com/berachain/beacon-kit/mod/storage/pruner: config: recursive: False with-expecter: true all: True - github.com/berachain/beacon-kit/mod/primitives/pkg/crypto: + github.com/berachain/beacon-kit/mod/primitives/crypto: config: recursive: False with-expecter: true all: True - github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives: + github.com/berachain/beacon-kit/mod/engine-primitives/engine-primitives: config: recursive: False with-expecter: true all: True - github.com/berachain/beacon-kit/mod/state-transition/pkg/core: + github.com/berachain/beacon-kit/mod/state-transition/core: config: recursive: False with-expecter: true diff --git a/Dockerfile b/Dockerfile index 4cbc2bb93b..623a4d1f18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ ARG BUILD_TAGS="netgo,muslc,blst,bls12381,pebbledb" ARG NAME=beacond ARG APP_NAME=beacond ARG DB_BACKEND=pebbledb -ARG CMD_PATH=./beacond/cmd +ARG CMD_PATH=./cmd/beacond ####################################################### ### Stage 1 - Cache Go Modules ### @@ -63,10 +63,8 @@ RUN apk add --no-cache --update \ # Copy the dependencies from the cache stage COPY --from=mod-cache /go/pkg /go/pkg -# Copy the rest of the source code -COPY ./go.mod ./go.sum ./ -COPY ./mod ./mod -COPY ./beacond ./beacond +# Copy all the source code (this will ignore files/dirs in .dockerignore) +COPY ./ ./ # Build args ARG NAME diff --git a/Makefile b/Makefile index 86fc054848..753073db88 100755 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ #!/usr/bin/make -f -include build/scripts/build.mk -include build/scripts/codegen.mk -include build/scripts/constants.mk -include build/scripts/devtools.mk -include build/scripts/linting.mk -include build/scripts/protobuf.mk -include build/scripts/release.mk -include build/scripts/testing.mk +include scripts/build/build.mk +include scripts/build/codegen.mk +include scripts/build/constants.mk +include scripts/build/devtools.mk +include scripts/build/linting.mk +include scripts/build/protobuf.mk +include scripts/build/release.mk +include scripts/build/testing.mk include contracts/Makefile include kurtosis/Makefile -include build/scripts/help.mk +include scripts/build/help.mk include testing/forge-script/Makefile # Specify the default target if none is provided diff --git a/mod/async/pkg/broker/assert.go b/async/broker/assert.go similarity index 100% rename from mod/async/pkg/broker/assert.go rename to async/broker/assert.go diff --git a/mod/async/pkg/broker/broker.go b/async/broker/broker.go similarity index 98% rename from mod/async/pkg/broker/broker.go rename to async/broker/broker.go index 401ac73458..0e4c476943 100644 --- a/mod/async/pkg/broker/broker.go +++ b/async/broker/broker.go @@ -24,7 +24,7 @@ import ( "context" "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/primitives/async" ) // Broker is the unique publisher for broadcasting all events corresponding diff --git a/mod/async/pkg/broker/constants.go b/async/broker/constants.go similarity index 100% rename from mod/async/pkg/broker/constants.go rename to async/broker/constants.go diff --git a/mod/async/pkg/broker/errors.go b/async/broker/errors.go similarity index 97% rename from mod/async/pkg/broker/errors.go rename to async/broker/errors.go index cc9e565cfd..5e503df5a4 100644 --- a/mod/async/pkg/broker/errors.go +++ b/async/broker/errors.go @@ -21,7 +21,7 @@ package broker import ( - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) // errTimeout is the error returned when a dispatch operation timed out. diff --git a/mod/async/pkg/dispatcher/dispatcher.go b/async/dispatcher/dispatcher.go similarity index 95% rename from mod/async/pkg/dispatcher/dispatcher.go rename to async/dispatcher/dispatcher.go index 3a48deddc7..cb3beb8b18 100644 --- a/mod/async/pkg/dispatcher/dispatcher.go +++ b/async/dispatcher/dispatcher.go @@ -23,9 +23,9 @@ package dispatcher import ( "context" - "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" ) var _ types.Dispatcher = (*Dispatcher)(nil) diff --git a/mod/async/pkg/dispatcher/errors.go b/async/dispatcher/errors.go similarity index 94% rename from mod/async/pkg/dispatcher/errors.go rename to async/dispatcher/errors.go index 4f18881204..83064e0c8b 100644 --- a/mod/async/pkg/dispatcher/errors.go +++ b/async/dispatcher/errors.go @@ -21,8 +21,8 @@ package dispatcher import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/async" ) //nolint:gochecknoglobals // errors diff --git a/mod/async/pkg/dispatcher/options.go b/async/dispatcher/options.go similarity index 88% rename from mod/async/pkg/dispatcher/options.go rename to async/dispatcher/options.go index 21878c02f4..d4cc022f02 100644 --- a/mod/async/pkg/dispatcher/options.go +++ b/async/dispatcher/options.go @@ -21,9 +21,9 @@ package dispatcher import ( - "github.com/berachain/beacon-kit/mod/async/pkg/broker" - "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/async/broker" + "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/primitives/async" ) // Opt is a type that defines a function that modifies NodeBuilder. diff --git a/mod/async/pkg/types/broker.go b/async/types/broker.go similarity index 97% rename from mod/async/pkg/types/broker.go rename to async/types/broker.go index 77996dc4cc..5dc7e4bf26 100644 --- a/mod/async/pkg/types/broker.go +++ b/async/types/broker.go @@ -23,7 +23,7 @@ package types import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/primitives/async" ) // Broker is the unique publisher for broadcasting all events corresponding diff --git a/mod/async/pkg/types/dispatcher.go b/async/types/dispatcher.go similarity index 97% rename from mod/async/pkg/types/dispatcher.go rename to async/types/dispatcher.go index 7a160ab5ae..c50e4c2df4 100644 --- a/mod/async/pkg/types/dispatcher.go +++ b/async/types/dispatcher.go @@ -23,7 +23,7 @@ package types import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/primitives/async" ) // Dispatcher is the maximal interface for a dispatcher that facilitates the diff --git a/mod/beacon/blockchain/errors.go b/beacon/blockchain/errors.go similarity index 95% rename from mod/beacon/blockchain/errors.go rename to beacon/blockchain/errors.go index 3ad3d28a70..f1e2005d40 100644 --- a/mod/beacon/blockchain/errors.go +++ b/beacon/blockchain/errors.go @@ -20,7 +20,7 @@ package blockchain -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrNilBlk is an error for when the beacon block is nil. diff --git a/mod/beacon/blockchain/execution_engine.go b/beacon/blockchain/execution_engine.go similarity index 94% rename from mod/beacon/blockchain/execution_engine.go rename to beacon/blockchain/execution_engine.go index 9d06ddfbfe..8f90befe82 100644 --- a/mod/beacon/blockchain/execution_engine.go +++ b/beacon/blockchain/execution_engine.go @@ -24,9 +24,9 @@ import ( "context" "time" - payloadtime "github.com/berachain/beacon-kit/mod/beacon/payload-time" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + payloadtime "github.com/berachain/beacon-kit/beacon/payload-time" + "github.com/berachain/beacon-kit/config/spec" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" ) // sendPostBlockFCU sends a forkchoice update to the execution client. diff --git a/mod/beacon/blockchain/metrics.go b/beacon/blockchain/metrics.go similarity index 98% rename from mod/beacon/blockchain/metrics.go rename to beacon/blockchain/metrics.go index 6f69d73f05..2a8e76c40f 100644 --- a/mod/beacon/blockchain/metrics.go +++ b/beacon/blockchain/metrics.go @@ -23,7 +23,7 @@ package blockchain import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // chainMetrics is a struct that contains metrics for the chain. diff --git a/mod/beacon/blockchain/payload.go b/beacon/blockchain/payload.go similarity index 99% rename from mod/beacon/blockchain/payload.go rename to beacon/blockchain/payload.go index 2398f07a26..c15ca739b6 100644 --- a/mod/beacon/blockchain/payload.go +++ b/beacon/blockchain/payload.go @@ -23,7 +23,7 @@ package blockchain import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // forceStartupHead sends a force head FCU to the execution client. diff --git a/mod/beacon/blockchain/process.go b/beacon/blockchain/process.go similarity index 97% rename from mod/beacon/blockchain/process.go rename to beacon/blockchain/process.go index 8c60e33975..f1634895f6 100644 --- a/mod/beacon/blockchain/process.go +++ b/beacon/blockchain/process.go @@ -24,8 +24,8 @@ import ( "context" "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/transition" ) // ProcessGenesisData processes the genesis state and initializes the beacon diff --git a/mod/beacon/blockchain/receive.go b/beacon/blockchain/receive.go similarity index 94% rename from mod/beacon/blockchain/receive.go rename to beacon/blockchain/receive.go index e0b88db85d..6fb0d0e8b0 100644 --- a/mod/beacon/blockchain/receive.go +++ b/beacon/blockchain/receive.go @@ -24,10 +24,10 @@ import ( "context" "time" - payloadtime "github.com/berachain/beacon-kit/mod/beacon/payload-time" - engineerrors "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/errors" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + payloadtime "github.com/berachain/beacon-kit/beacon/payload-time" + engineerrors "github.com/berachain/beacon-kit/engine-primitives/errors" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/transition" ) // VerifyIncomingBlock verifies the state root of an incoming block diff --git a/mod/beacon/blockchain/service.go b/beacon/blockchain/service.go similarity index 97% rename from mod/beacon/blockchain/service.go rename to beacon/blockchain/service.go index c340eecdff..0a3a9e44a9 100644 --- a/mod/beacon/blockchain/service.go +++ b/beacon/blockchain/service.go @@ -24,11 +24,11 @@ import ( "context" "sync" - asynctypes "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + asynctypes "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/transition" ) // Service is the blockchain service. diff --git a/mod/beacon/blockchain/types.go b/beacon/blockchain/types.go similarity index 95% rename from mod/beacon/blockchain/types.go rename to beacon/blockchain/types.go index 0338c68f70..b8b9f99bba 100644 --- a/mod/beacon/blockchain/types.go +++ b/beacon/blockchain/types.go @@ -24,11 +24,11 @@ import ( "context" "time" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" ) // AvailabilityStore interface is responsible for validating and storing diff --git a/mod/beacon/payload-time/time.go b/beacon/payload-time/time.go similarity index 97% rename from mod/beacon/payload-time/time.go rename to beacon/payload-time/time.go index 737871768e..b04b766206 100644 --- a/mod/beacon/payload-time/time.go +++ b/beacon/payload-time/time.go @@ -24,7 +24,7 @@ import ( "errors" "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // ErrTooFarInTheFuture is returned when the payload timestamp diff --git a/mod/beacon/payload-time/time_test.go b/beacon/payload-time/time_test.go similarity index 96% rename from mod/beacon/payload-time/time_test.go rename to beacon/payload-time/time_test.go index 38ffd8e5ff..ef6f84d927 100644 --- a/mod/beacon/payload-time/time_test.go +++ b/beacon/payload-time/time_test.go @@ -24,8 +24,8 @@ import ( "testing" "time" - payloadtime "github.com/berachain/beacon-kit/mod/beacon/payload-time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + payloadtime "github.com/berachain/beacon-kit/beacon/payload-time" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/beacon/validator/block_builder.go b/beacon/validator/block_builder.go similarity index 94% rename from mod/beacon/validator/block_builder.go rename to beacon/validator/block_builder.go index 520ea87898..9ef5767e52 100644 --- a/mod/beacon/validator/block_builder.go +++ b/beacon/validator/block_builder.go @@ -25,15 +25,15 @@ import ( "fmt" "time" - payloadtime "github.com/berachain/beacon-kit/mod/beacon/payload-time" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + payloadtime "github.com/berachain/beacon-kit/beacon/payload-time" + "github.com/berachain/beacon-kit/config/spec" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/primitives/version" "golang.org/x/sync/errgroup" ) diff --git a/mod/beacon/validator/config.go b/beacon/validator/config.go similarity index 100% rename from mod/beacon/validator/config.go rename to beacon/validator/config.go diff --git a/mod/beacon/validator/errors.go b/beacon/validator/errors.go similarity index 96% rename from mod/beacon/validator/errors.go rename to beacon/validator/errors.go index a728e84089..e04d459a83 100644 --- a/mod/beacon/validator/errors.go +++ b/beacon/validator/errors.go @@ -20,7 +20,7 @@ package validator -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( diff --git a/mod/beacon/validator/metrics.go b/beacon/validator/metrics.go similarity index 97% rename from mod/beacon/validator/metrics.go rename to beacon/validator/metrics.go index b4dc4db667..ba737ff870 100644 --- a/mod/beacon/validator/metrics.go +++ b/beacon/validator/metrics.go @@ -23,7 +23,7 @@ package validator import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // validatorMetrics is a struct that contains metrics for the chain. diff --git a/mod/beacon/validator/service.go b/beacon/validator/service.go similarity index 95% rename from mod/beacon/validator/service.go rename to beacon/validator/service.go index caa461b3f1..07b3ba0f69 100644 --- a/mod/beacon/validator/service.go +++ b/beacon/validator/service.go @@ -23,12 +23,12 @@ package validator import ( "context" - asynctypes "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + asynctypes "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/transition" ) // Service is responsible for building beacon blocks and sidecars. diff --git a/mod/beacon/validator/types.go b/beacon/validator/types.go similarity index 94% rename from mod/beacon/validator/types.go rename to beacon/validator/types.go index 33bce5597e..7c55453c12 100644 --- a/mod/beacon/validator/types.go +++ b/beacon/validator/types.go @@ -24,13 +24,13 @@ import ( "context" "time" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" ) // BeaconBlock represents a beacon block interface. diff --git a/build/tools/tools.go b/build/tools/tools.go index c3a0018b9f..ca6bd7441d 100644 --- a/build/tools/tools.go +++ b/build/tools/tools.go @@ -33,11 +33,7 @@ import ( _ "github.com/bufbuild/buf/cmd/buf" _ "github.com/cosmos/gosec/v2/cmd/gosec" _ "github.com/ethereum/go-ethereum/cmd/abigen" - _ "github.com/ferranbt/fastssz/sszgen" - _ "github.com/fjl/gencodec" _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/google/addlicense" - _ "github.com/segmentio/golines" - _ "github.com/vektra/mockery/v2" _ "go.uber.org/nilaway/cmd/nilaway" ) diff --git a/mod/chain-spec/pkg/chain/chain_spec.go b/chain-spec/chain/chain_spec.go similarity index 100% rename from mod/chain-spec/pkg/chain/chain_spec.go rename to chain-spec/chain/chain_spec.go diff --git a/mod/chain-spec/pkg/chain/data.go b/chain-spec/chain/data.go similarity index 100% rename from mod/chain-spec/pkg/chain/data.go rename to chain-spec/chain/data.go diff --git a/mod/chain-spec/pkg/chain/errors.go b/chain-spec/chain/errors.go similarity index 96% rename from mod/chain-spec/pkg/chain/errors.go rename to chain-spec/chain/errors.go index 8efa26bc5f..e0722c00ef 100644 --- a/mod/chain-spec/pkg/chain/errors.go +++ b/chain-spec/chain/errors.go @@ -20,7 +20,7 @@ package chain -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrInsufficientMaxWithdrawalsPerPayload is returned when the max diff --git a/mod/chain-spec/pkg/chain/helpers.go b/chain-spec/chain/helpers.go similarity index 97% rename from mod/chain-spec/pkg/chain/helpers.go rename to chain-spec/chain/helpers.go index 041e3a4bbd..ecdcae3d9c 100644 --- a/mod/chain-spec/pkg/chain/helpers.go +++ b/chain-spec/chain/helpers.go @@ -21,7 +21,7 @@ package chain import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/primitives/version" ) // ActiveForkVersionForSlot returns the active fork version for a given slot. diff --git a/mod/chain-spec/pkg/chain/helpers_test.go b/chain-spec/chain/helpers_test.go similarity index 97% rename from mod/chain-spec/pkg/chain/helpers_test.go rename to chain-spec/chain/helpers_test.go index 1de79f616c..9518d98e42 100644 --- a/mod/chain-spec/pkg/chain/helpers_test.go +++ b/chain-spec/chain/helpers_test.go @@ -23,8 +23,8 @@ package chain_test import ( "testing" - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/cli/pkg/builder/builder.go b/cli/builder/builder.go similarity index 88% rename from mod/cli/pkg/builder/builder.go rename to cli/builder/builder.go index 7f0491b7b9..4d11933579 100644 --- a/mod/cli/pkg/builder/builder.go +++ b/cli/builder/builder.go @@ -24,14 +24,14 @@ import ( "os" "cosmossdk.io/depinject" - cmdlib "github.com/berachain/beacon-kit/mod/cli/pkg/commands" - servertypes "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - "github.com/berachain/beacon-kit/mod/cli/pkg/config" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + cmdlib "github.com/berachain/beacon-kit/cli/commands" + servertypes "github.com/berachain/beacon-kit/cli/commands/server/types" + "github.com/berachain/beacon-kit/cli/config" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" cmtcfg "github.com/cometbft/cometbft/config" "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" diff --git a/mod/cli/pkg/builder/config.go b/cli/builder/config.go similarity index 94% rename from mod/cli/pkg/builder/config.go rename to cli/builder/config.go index dde4deccdd..487f9d7628 100644 --- a/mod/cli/pkg/builder/config.go +++ b/cli/builder/config.go @@ -23,9 +23,9 @@ package builder import ( "time" - "github.com/berachain/beacon-kit/mod/config" - serverconfig "github.com/berachain/beacon-kit/mod/config/pkg/config" - "github.com/berachain/beacon-kit/mod/config/pkg/template" + "github.com/berachain/beacon-kit/config" + serverconfig "github.com/berachain/beacon-kit/config/config" + "github.com/berachain/beacon-kit/config/template" cmtcfg "github.com/cometbft/cometbft/config" ) diff --git a/mod/cli/pkg/builder/options.go b/cli/builder/options.go similarity index 91% rename from mod/cli/pkg/builder/options.go rename to cli/builder/options.go index b9aa488ece..c19879c0fd 100644 --- a/mod/cli/pkg/builder/options.go +++ b/cli/builder/options.go @@ -21,10 +21,10 @@ package builder import ( - servertypes "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + servertypes "github.com/berachain/beacon-kit/cli/commands/server/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/types" + "github.com/berachain/beacon-kit/primitives/constraints" ) // Opt is a type that defines a function that modifies CLIBuilder. diff --git a/mod/cli/pkg/commands/deposit/create.go b/cli/commands/deposit/create.go similarity index 89% rename from mod/cli/pkg/commands/deposit/create.go rename to cli/commands/deposit/create.go index 048bb7faab..471b3cc2c4 100644 --- a/mod/cli/pkg/commands/deposit/create.go +++ b/cli/commands/deposit/create.go @@ -24,14 +24,14 @@ import ( "os" "cosmossdk.io/log" - clicontext "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/cli/pkg/utils/parser" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/signer" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + clicontext "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/cli/utils/parser" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-core/components" + "github.com/berachain/beacon-kit/node-core/components/signer" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" "github.com/spf13/cobra" ) @@ -44,7 +44,7 @@ func NewCreateValidator[ cmd := &cobra.Command{ Use: "create-validator", Short: "Creates a validator deposit", - Long: `Creates a validator deposit with the necessary credentials. The + Long: `Creates a validator deposit with the necessary credentials. The arguments are expected in the order of withdrawal credentials, deposit amount, current version, and genesis validator root. If the broadcast flag is set to true, a private key must be provided to sign the transaction.`, diff --git a/mod/cli/pkg/commands/deposit/deposit.go b/cli/commands/deposit/deposit.go similarity index 91% rename from mod/cli/pkg/commands/deposit/deposit.go rename to cli/commands/deposit/deposit.go index 3be682ef98..c519567c29 100644 --- a/mod/cli/pkg/commands/deposit/deposit.go +++ b/cli/commands/deposit/deposit.go @@ -21,11 +21,11 @@ package deposit import ( - "github.com/berachain/beacon-kit/mod/cli/pkg/utils/parser" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/signer" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/cli/utils/parser" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-core/components/signer" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" ) diff --git a/mod/cli/pkg/commands/deposit/errors.go b/cli/commands/deposit/errors.go similarity index 100% rename from mod/cli/pkg/commands/deposit/errors.go rename to cli/commands/deposit/errors.go diff --git a/mod/cli/pkg/commands/deposit/flags.go b/cli/commands/deposit/flags.go similarity index 100% rename from mod/cli/pkg/commands/deposit/flags.go rename to cli/commands/deposit/flags.go diff --git a/mod/cli/pkg/commands/errors.go b/cli/commands/errors.go similarity index 95% rename from mod/cli/pkg/commands/errors.go rename to cli/commands/errors.go index 99ee0f3a87..8251adab6d 100644 --- a/mod/cli/pkg/commands/errors.go +++ b/cli/commands/errors.go @@ -20,7 +20,7 @@ package commands -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrNoClientCtx indicates that the client context was not found. diff --git a/mod/cli/pkg/commands/genesis/collect.go b/cli/commands/genesis/collect.go similarity index 94% rename from mod/cli/pkg/commands/genesis/collect.go rename to cli/commands/genesis/collect.go index d11b4b13ae..68c2e8152b 100644 --- a/mod/cli/pkg/commands/genesis/collect.go +++ b/cli/commands/genesis/collect.go @@ -25,10 +25,10 @@ import ( "path/filepath" "strings" - "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/encoding/json" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/afero" diff --git a/mod/cli/pkg/commands/genesis/deposit.go b/cli/commands/genesis/deposit.go similarity index 87% rename from mod/cli/pkg/commands/genesis/deposit.go rename to cli/commands/genesis/deposit.go index bef7984ca7..1eba53b125 100644 --- a/mod/cli/pkg/commands/genesis/deposit.go +++ b/cli/commands/genesis/deposit.go @@ -25,17 +25,17 @@ import ( "os" "path/filepath" - "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/cli/pkg/utils/parser" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/signer" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/cli/utils/parser" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-core/components" + "github.com/berachain/beacon-kit/node-core/components/signer" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/spf13/afero" diff --git a/mod/cli/pkg/commands/genesis/flags.go b/cli/commands/genesis/flags.go similarity index 100% rename from mod/cli/pkg/commands/genesis/flags.go rename to cli/commands/genesis/flags.go diff --git a/mod/cli/pkg/commands/genesis/genesis.go b/cli/commands/genesis/genesis.go similarity index 96% rename from mod/cli/pkg/commands/genesis/genesis.go rename to cli/commands/genesis/genesis.go index 1899efcd8d..73697beaa5 100644 --- a/mod/cli/pkg/commands/genesis/genesis.go +++ b/cli/commands/genesis/genesis.go @@ -21,7 +21,7 @@ package genesis import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" ) diff --git a/mod/cli/pkg/commands/genesis/payload.go b/cli/commands/genesis/payload.go similarity index 89% rename from mod/cli/pkg/commands/genesis/payload.go rename to cli/commands/genesis/payload.go index 32caa6cde3..9dad01ac82 100644 --- a/mod/cli/pkg/commands/genesis/payload.go +++ b/cli/commands/genesis/payload.go @@ -24,16 +24,16 @@ import ( "fmt" "unsafe" - "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/errors" - gethprimitives "github.com/berachain/beacon-kit/mod/geth-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/consensus-types/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/errors" + gethprimitives "github.com/berachain/beacon-kit/geth-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/afero" diff --git a/mod/cli/pkg/commands/genesis/root.go b/cli/commands/genesis/root.go similarity index 87% rename from mod/cli/pkg/commands/genesis/root.go rename to cli/commands/genesis/root.go index 66da4123b3..461c86b6dc 100644 --- a/mod/cli/pkg/commands/genesis/root.go +++ b/cli/commands/genesis/root.go @@ -21,12 +21,12 @@ package genesis import ( - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" "github.com/spf13/afero" "github.com/spf13/cobra" ) diff --git a/mod/cli/pkg/commands/genesis/types/validators.go b/cli/commands/genesis/types/validators.go similarity index 93% rename from mod/cli/pkg/commands/genesis/types/validators.go rename to cli/commands/genesis/types/validators.go index 15701d4c73..ee4ab7bd73 100644 --- a/mod/cli/pkg/commands/genesis/types/validators.go +++ b/cli/commands/genesis/types/validators.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" +import "github.com/berachain/beacon-kit/consensus-types/types" type ValidatorsMarshaling struct { Validators []*types.Validator `json:"validators" ssz-max:"1099511627776"` diff --git a/mod/cli/pkg/commands/genesis/types/validators.ssz.go b/cli/commands/genesis/types/validators.ssz.go similarity index 97% rename from mod/cli/pkg/commands/genesis/types/validators.ssz.go rename to cli/commands/genesis/types/validators.ssz.go index 7020e2112f..ea3a808272 100644 --- a/mod/cli/pkg/commands/genesis/types/validators.ssz.go +++ b/cli/commands/genesis/types/validators.ssz.go @@ -4,7 +4,7 @@ package types import ( - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" + "github.com/berachain/beacon-kit/consensus-types/types" ssz "github.com/ferranbt/fastssz" ) diff --git a/mod/cli/pkg/commands/jwt/errors.go b/cli/commands/jwt/errors.go similarity index 95% rename from mod/cli/pkg/commands/jwt/errors.go rename to cli/commands/jwt/errors.go index 79dcfe028b..534ee59206 100644 --- a/mod/cli/pkg/commands/jwt/errors.go +++ b/cli/commands/jwt/errors.go @@ -20,7 +20,7 @@ package jwt -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrNoClientCtx indicates that the client context was not found. diff --git a/mod/cli/pkg/commands/jwt/jwt.go b/cli/commands/jwt/jwt.go similarity index 96% rename from mod/cli/pkg/commands/jwt/jwt.go rename to cli/commands/jwt/jwt.go index bc1a02c45d..1551044c79 100644 --- a/mod/cli/pkg/commands/jwt/jwt.go +++ b/cli/commands/jwt/jwt.go @@ -24,8 +24,8 @@ import ( "os" "path/filepath" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/node-core/components" + "github.com/berachain/beacon-kit/primitives/net/jwt" "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/afero" "github.com/spf13/cobra" @@ -61,8 +61,8 @@ func NewGenerateJWTCommand() *cobra.Command { cmd := &cobra.Command{ Use: "generate", Short: "Generates a new JWT authentication secret", - Long: `This command generates a new JWT authentication secret and -writes it to a file. If no output file path is specified, it uses the default + Long: `This command generates a new JWT authentication secret and +writes it to a file. If no output file path is specified, it uses the default file name "jwt.hex" in the current directory.`, RunE: func(cmd *cobra.Command, _ []string) error { // Get the file path from the command flags. @@ -85,7 +85,7 @@ func NewValidateJWTCommand() *cobra.Command { Use: "validate", Short: "Validates a JWT secret conforms to Engine-RPC requirements", Long: `This command validates a JWT secret by checking if the JWT secret -is formatted properly. If no output file path is specified, it uses the default +is formatted properly. If no output file path is specified, it uses the default file name "jwt.hex" in the current directory.`, RunE: func(cmd *cobra.Command, _ []string) error { // Get the file path from the command flags. diff --git a/mod/cli/pkg/commands/jwt/jwt_test.go b/cli/commands/jwt/jwt_test.go similarity index 98% rename from mod/cli/pkg/commands/jwt/jwt_test.go rename to cli/commands/jwt/jwt_test.go index 0b6270f992..b0b9cf7ebe 100644 --- a/mod/cli/pkg/commands/jwt/jwt_test.go +++ b/cli/commands/jwt/jwt_test.go @@ -26,7 +26,7 @@ import ( "path/filepath" "testing" - jwt "github.com/berachain/beacon-kit/mod/cli/pkg/commands/jwt" + jwt "github.com/berachain/beacon-kit/cli/commands/jwt" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/mod/cli/pkg/commands/root.go b/cli/commands/root.go similarity index 95% rename from mod/cli/pkg/commands/root.go rename to cli/commands/root.go index 12ee0f0da4..c9319a61f5 100644 --- a/mod/cli/pkg/commands/root.go +++ b/cli/commands/root.go @@ -21,8 +21,8 @@ package commands import ( - svrcmd "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/cmd" - "github.com/berachain/beacon-kit/mod/cli/pkg/config" + svrcmd "github.com/berachain/beacon-kit/cli/commands/server/cmd" + "github.com/berachain/beacon-kit/cli/config" sdkclient "github.com/cosmos/cosmos-sdk/client" sdkconfig "github.com/cosmos/cosmos-sdk/client/config" "github.com/spf13/cobra" diff --git a/mod/cli/pkg/commands/server/cmd/execute.go b/cli/commands/server/cmd/execute.go similarity index 100% rename from mod/cli/pkg/commands/server/cmd/execute.go rename to cli/commands/server/cmd/execute.go diff --git a/mod/cli/pkg/commands/server/pruning.go b/cli/commands/server/pruning.go similarity index 96% rename from mod/cli/pkg/commands/server/pruning.go rename to cli/commands/server/pruning.go index 0f3b0971e2..40aae19daf 100644 --- a/mod/cli/pkg/commands/server/pruning.go +++ b/cli/commands/server/pruning.go @@ -25,7 +25,7 @@ import ( "strings" pruningtypes "cosmossdk.io/store/pruning/types" - "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" + "github.com/berachain/beacon-kit/cli/commands/server/types" "github.com/spf13/cast" ) diff --git a/mod/cli/pkg/commands/server/rollback.go b/cli/commands/server/rollback.go similarity index 92% rename from mod/cli/pkg/commands/server/rollback.go rename to cli/commands/server/rollback.go index d79cc31d57..515d53265f 100644 --- a/mod/cli/pkg/commands/server/rollback.go +++ b/cli/commands/server/rollback.go @@ -25,10 +25,10 @@ import ( "fmt" "cosmossdk.io/store" - types "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - clicontext "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/db" + types "github.com/berachain/beacon-kit/cli/commands/server/types" + clicontext "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/db" cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" diff --git a/mod/cli/pkg/commands/server/start.go b/cli/commands/server/start.go similarity index 95% rename from mod/cli/pkg/commands/server/start.go rename to cli/commands/server/start.go index ee880139ae..13c02ab5d1 100644 --- a/mod/cli/pkg/commands/server/start.go +++ b/cli/commands/server/start.go @@ -25,10 +25,10 @@ import ( "context" pruningtypes "cosmossdk.io/store/pruning/types" - types "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - clicontext "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/db" + types "github.com/berachain/beacon-kit/cli/commands/server/types" + clicontext "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/db" cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" diff --git a/mod/cli/pkg/commands/server/types/app.go b/cli/commands/server/types/app.go similarity index 97% rename from mod/cli/pkg/commands/server/types/app.go rename to cli/commands/server/types/app.go index 385571ae5b..c3525176b7 100644 --- a/mod/cli/pkg/commands/server/types/app.go +++ b/cli/commands/server/types/app.go @@ -24,7 +24,7 @@ import ( "context" "io" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" ) diff --git a/mod/cli/pkg/commands/setup.go b/cli/commands/setup.go similarity index 72% rename from mod/cli/pkg/commands/setup.go rename to cli/commands/setup.go index 140b153673..5b834faecc 100644 --- a/mod/cli/pkg/commands/setup.go +++ b/cli/commands/setup.go @@ -21,18 +21,18 @@ package commands import ( - "github.com/berachain/beacon-kit/mod/cli/pkg/commands/deposit" - "github.com/berachain/beacon-kit/mod/cli/pkg/commands/genesis" - "github.com/berachain/beacon-kit/mod/cli/pkg/commands/jwt" - "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server" - servertypes "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - "github.com/berachain/beacon-kit/mod/cli/pkg/flags" - cmtcli "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/cli" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/cli/commands/deposit" + "github.com/berachain/beacon-kit/cli/commands/genesis" + "github.com/berachain/beacon-kit/cli/commands/jwt" + "github.com/berachain/beacon-kit/cli/commands/server" + servertypes "github.com/berachain/beacon-kit/cli/commands/server/types" + "github.com/berachain/beacon-kit/cli/flags" + cmtcli "github.com/berachain/beacon-kit/consensus/cometbft/cli" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" "github.com/cosmos/cosmos-sdk/version" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" ) diff --git a/mod/cli/pkg/commands/types.go b/cli/commands/types.go similarity index 100% rename from mod/cli/pkg/commands/types.go rename to cli/commands/types.go diff --git a/mod/cli/pkg/components/client_context.go b/cli/components/client_context.go similarity index 97% rename from mod/cli/pkg/components/client_context.go rename to cli/components/client_context.go index 797b0dc70c..b139aadb96 100644 --- a/mod/cli/pkg/components/client_context.go +++ b/cli/components/client_context.go @@ -24,7 +24,7 @@ import ( "os" "path/filepath" - "github.com/berachain/beacon-kit/mod/cli/pkg/config" + "github.com/berachain/beacon-kit/cli/config" "github.com/cosmos/cosmos-sdk/client" sdkconfig "github.com/cosmos/cosmos-sdk/client/config" ) diff --git a/mod/cli/pkg/components/defaults.go b/cli/components/defaults.go similarity index 100% rename from mod/cli/pkg/components/defaults.go rename to cli/components/defaults.go diff --git a/mod/cli/pkg/components/logger.go b/cli/components/logger.go similarity index 94% rename from mod/cli/pkg/components/logger.go rename to cli/components/logger.go index 29ffc2196e..55ad0341d1 100644 --- a/mod/cli/pkg/components/logger.go +++ b/cli/components/logger.go @@ -24,8 +24,8 @@ import ( "io" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/log/pkg/phuslu" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/log/phuslu" ) type LoggerInput struct { diff --git a/mod/cli/pkg/config/app.go b/cli/config/app.go similarity index 98% rename from mod/cli/pkg/config/app.go rename to cli/config/app.go index c439a58bc3..e7eaa2d442 100644 --- a/mod/cli/pkg/config/app.go +++ b/cli/config/app.go @@ -26,7 +26,7 @@ import ( "os" "path/filepath" - "github.com/berachain/beacon-kit/mod/config/pkg/config" + "github.com/berachain/beacon-kit/config/config" "github.com/spf13/viper" ) diff --git a/mod/cli/pkg/config/client.go b/cli/config/client.go similarity index 100% rename from mod/cli/pkg/config/client.go rename to cli/config/client.go diff --git a/mod/cli/pkg/config/comet.go b/cli/config/comet.go similarity index 100% rename from mod/cli/pkg/config/comet.go rename to cli/config/comet.go diff --git a/mod/cli/pkg/config/errors.go b/cli/config/errors.go similarity index 100% rename from mod/cli/pkg/config/errors.go rename to cli/config/errors.go diff --git a/mod/cli/pkg/config/server.go b/cli/config/server.go similarity index 96% rename from mod/cli/pkg/config/server.go rename to cli/config/server.go index 4df591a9f3..4485148bf9 100644 --- a/mod/cli/pkg/config/server.go +++ b/cli/config/server.go @@ -28,9 +28,9 @@ import ( "path/filepath" "strings" - clicontext "github.com/berachain/beacon-kit/mod/cli/pkg/context" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" + clicontext "github.com/berachain/beacon-kit/cli/context" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" cmtcfg "github.com/cometbft/cometbft/config" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" diff --git a/mod/cli/pkg/context/cmd.go b/cli/context/cmd.go similarity index 95% rename from mod/cli/pkg/context/cmd.go rename to cli/context/cmd.go index 58803fb6e1..b08cb2f4bf 100644 --- a/mod/cli/pkg/context/cmd.go +++ b/cli/context/cmd.go @@ -21,8 +21,8 @@ package context import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/log/pkg/phuslu" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/log/phuslu" cmtcfg "github.com/cometbft/cometbft/config" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" diff --git a/mod/cli/pkg/context/keys.go b/cli/context/keys.go similarity index 100% rename from mod/cli/pkg/context/keys.go rename to cli/context/keys.go diff --git a/mod/cli/pkg/flags/flags.go b/cli/flags/flags.go similarity index 99% rename from mod/cli/pkg/flags/flags.go rename to cli/flags/flags.go index dbc43491b3..1377a75265 100644 --- a/mod/cli/pkg/flags/flags.go +++ b/cli/flags/flags.go @@ -21,7 +21,7 @@ package flags import ( - "github.com/berachain/beacon-kit/mod/config" + "github.com/berachain/beacon-kit/config" "github.com/spf13/cobra" ) diff --git a/mod/cli/pkg/utils/parser/errors.go b/cli/utils/parser/errors.go similarity index 100% rename from mod/cli/pkg/utils/parser/errors.go rename to cli/utils/parser/errors.go diff --git a/mod/cli/pkg/utils/parser/validator.go b/cli/utils/parser/validator.go similarity index 90% rename from mod/cli/pkg/utils/parser/validator.go rename to cli/utils/parser/validator.go index 49cd6266cb..895a297fee 100644 --- a/mod/cli/pkg/utils/parser/validator.go +++ b/cli/utils/parser/validator.go @@ -23,12 +23,12 @@ package parser import ( "math/big" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/math" ) // ConvertPubkey converts a string to a public key. diff --git a/mod/cli/pkg/utils/yap/yap.go b/cli/utils/yap/yap.go similarity index 100% rename from mod/cli/pkg/utils/yap/yap.go rename to cli/utils/yap/yap.go diff --git a/beacond/cmd/defaults.go b/cmd/beacond/defaults.go similarity index 99% rename from beacond/cmd/defaults.go rename to cmd/beacond/defaults.go index 7bc4196700..674048185f 100644 --- a/beacond/cmd/defaults.go +++ b/cmd/beacond/defaults.go @@ -21,7 +21,7 @@ package main import ( - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" + "github.com/berachain/beacon-kit/node-core/components" ) //nolint:funlen // happens diff --git a/beacond/cmd/main.go b/cmd/beacond/main.go similarity index 88% rename from beacond/cmd/main.go rename to cmd/beacond/main.go index d30d80302a..1f00dd504b 100644 --- a/beacond/cmd/main.go +++ b/cmd/beacond/main.go @@ -24,11 +24,11 @@ import ( "log/slog" "os" - clibuilder "github.com/berachain/beacon-kit/mod/cli/pkg/builder" - clicomponents "github.com/berachain/beacon-kit/mod/cli/pkg/components" - nodebuilder "github.com/berachain/beacon-kit/mod/node-core/pkg/builder" - nodecomponents "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - nodetypes "github.com/berachain/beacon-kit/mod/node-core/pkg/types" + clibuilder "github.com/berachain/beacon-kit/cli/builder" + clicomponents "github.com/berachain/beacon-kit/cli/components" + nodebuilder "github.com/berachain/beacon-kit/node-core/builder" + nodecomponents "github.com/berachain/beacon-kit/node-core/components" + nodetypes "github.com/berachain/beacon-kit/node-core/types" "go.uber.org/automaxprocs/maxprocs" ) diff --git a/beacond/cmd/types.go b/cmd/beacond/types.go similarity index 83% rename from beacond/cmd/types.go rename to cmd/beacond/types.go index e20e866cf8..920fee86a0 100644 --- a/beacond/cmd/types.go +++ b/cmd/beacond/types.go @@ -22,38 +22,38 @@ package main import ( "cosmossdk.io/core/appmodule/v2" - "github.com/berachain/beacon-kit/mod/beacon/blockchain" - "github.com/berachain/beacon-kit/mod/beacon/validator" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - consruntimetypes "github.com/berachain/beacon-kit/mod/consensus/pkg/types" - dablob "github.com/berachain/beacon-kit/mod/da/pkg/blob" - "github.com/berachain/beacon-kit/mod/da/pkg/da" - dastore "github.com/berachain/beacon-kit/mod/da/pkg/store" - datypes "github.com/berachain/beacon-kit/mod/da/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - engineclient "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/deposit" - execution "github.com/berachain/beacon-kit/mod/execution/pkg/engine" - "github.com/berachain/beacon-kit/mod/log/pkg/phuslu" - "github.com/berachain/beacon-kit/mod/node-api/backend" - blockstore "github.com/berachain/beacon-kit/mod/node-api/block_store" - "github.com/berachain/beacon-kit/mod/node-api/engines/echo" - "github.com/berachain/beacon-kit/mod/node-api/server" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/signer" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/storage" - "github.com/berachain/beacon-kit/mod/node-core/pkg/services/version" - "github.com/berachain/beacon-kit/mod/payload/pkg/attributes" - payloadbuilder "github.com/berachain/beacon-kit/mod/payload/pkg/builder" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" - statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" - "github.com/berachain/beacon-kit/mod/storage/pkg/block" - depositdb "github.com/berachain/beacon-kit/mod/storage/pkg/deposit" - "github.com/berachain/beacon-kit/mod/storage/pkg/filedb" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/beacon/blockchain" + "github.com/berachain/beacon-kit/beacon/validator" + "github.com/berachain/beacon-kit/consensus-types/types" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + consruntimetypes "github.com/berachain/beacon-kit/consensus/types" + dablob "github.com/berachain/beacon-kit/da/blob" + "github.com/berachain/beacon-kit/da/da" + dastore "github.com/berachain/beacon-kit/da/store" + datypes "github.com/berachain/beacon-kit/da/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + engineclient "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/deposit" + execution "github.com/berachain/beacon-kit/execution/engine" + "github.com/berachain/beacon-kit/log/phuslu" + "github.com/berachain/beacon-kit/node-api/backend" + blockstore "github.com/berachain/beacon-kit/node-api/block_store" + "github.com/berachain/beacon-kit/node-api/engines/echo" + "github.com/berachain/beacon-kit/node-api/server" + "github.com/berachain/beacon-kit/node-core/components/signer" + "github.com/berachain/beacon-kit/node-core/components/storage" + "github.com/berachain/beacon-kit/node-core/services/version" + "github.com/berachain/beacon-kit/payload/attributes" + payloadbuilder "github.com/berachain/beacon-kit/payload/builder" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/state-transition/core" + statedb "github.com/berachain/beacon-kit/state-transition/core/state" + "github.com/berachain/beacon-kit/storage/beacondb" + "github.com/berachain/beacon-kit/storage/block" + depositdb "github.com/berachain/beacon-kit/storage/deposit" + "github.com/berachain/beacon-kit/storage/filedb" + "github.com/berachain/beacon-kit/storage/manager" + "github.com/berachain/beacon-kit/storage/pruner" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/mod/config/config.go b/config/config.go similarity index 86% rename from mod/config/config.go rename to config/config.go index 1fbea33008..427df30e26 100644 --- a/mod/config/config.go +++ b/config/config.go @@ -21,16 +21,16 @@ package config import ( - "github.com/berachain/beacon-kit/mod/beacon/validator" - "github.com/berachain/beacon-kit/mod/config/pkg/template" - viperlib "github.com/berachain/beacon-kit/mod/config/pkg/viper" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg" - "github.com/berachain/beacon-kit/mod/errors" - engineclient "github.com/berachain/beacon-kit/mod/execution/pkg/client" - log "github.com/berachain/beacon-kit/mod/log/pkg/phuslu" - blockstore "github.com/berachain/beacon-kit/mod/node-api/block_store" - "github.com/berachain/beacon-kit/mod/node-api/server" - "github.com/berachain/beacon-kit/mod/payload/pkg/builder" + "github.com/berachain/beacon-kit/beacon/validator" + "github.com/berachain/beacon-kit/config/template" + viperlib "github.com/berachain/beacon-kit/config/viper" + "github.com/berachain/beacon-kit/da/kzg" + "github.com/berachain/beacon-kit/errors" + engineclient "github.com/berachain/beacon-kit/execution/client" + log "github.com/berachain/beacon-kit/log/phuslu" + blockstore "github.com/berachain/beacon-kit/node-api/block_store" + "github.com/berachain/beacon-kit/node-api/server" + "github.com/berachain/beacon-kit/payload/builder" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" ) diff --git a/mod/config/pkg/config/config.go b/config/config/config.go similarity index 100% rename from mod/config/pkg/config/config.go rename to config/config/config.go diff --git a/mod/config/pkg/config/config.toml.tpl b/config/config/config.toml.tpl similarity index 100% rename from mod/config/pkg/config/config.toml.tpl rename to config/config/config.toml.tpl diff --git a/mod/config/pkg/config/toml.go b/config/config/toml.go similarity index 100% rename from mod/config/pkg/config/toml.go rename to config/config/toml.go diff --git a/mod/config/pkg/mapstructure/parser.go b/config/mapstructure/parser.go similarity index 94% rename from mod/config/pkg/mapstructure/parser.go rename to config/mapstructure/parser.go index 8f19de902c..41b0e666a0 100644 --- a/mod/config/pkg/mapstructure/parser.go +++ b/config/mapstructure/parser.go @@ -24,8 +24,8 @@ import ( "net/url" "reflect" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - beaconurl "github.com/berachain/beacon-kit/mod/primitives/pkg/net/url" + "github.com/berachain/beacon-kit/primitives/common" + beaconurl "github.com/berachain/beacon-kit/primitives/net/url" "github.com/mitchellh/mapstructure" ) diff --git a/mod/config/pkg/spec/base.go b/config/spec/base.go similarity index 94% rename from mod/config/pkg/spec/base.go rename to config/spec/base.go index b834bb7063..f33d8f12a9 100644 --- a/mod/config/pkg/spec/base.go +++ b/config/spec/base.go @@ -21,10 +21,10 @@ package spec import ( - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" cmttypes "github.com/cometbft/cometbft/types" ) diff --git a/mod/config/pkg/spec/betnet.go b/config/spec/betnet.go similarity index 87% rename from mod/config/pkg/spec/betnet.go rename to config/spec/betnet.go index 289b663ca6..4ce5c3bdd5 100644 --- a/mod/config/pkg/spec/betnet.go +++ b/config/spec/betnet.go @@ -21,9 +21,9 @@ package spec import ( - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // BetnetChainSpec is the ChainSpec for the localnet. diff --git a/mod/config/pkg/spec/boonet.go b/config/spec/boonet.go similarity index 91% rename from mod/config/pkg/spec/boonet.go rename to config/spec/boonet.go index d46601a38e..f9d9dce3e1 100644 --- a/mod/config/pkg/spec/boonet.go +++ b/config/spec/boonet.go @@ -21,9 +21,9 @@ package spec import ( - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // BoonetChainSpec is the ChainSpec for the localnet. diff --git a/mod/config/pkg/spec/chain_ids.go b/config/spec/chain_ids.go similarity index 100% rename from mod/config/pkg/spec/chain_ids.go rename to config/spec/chain_ids.go diff --git a/mod/config/pkg/spec/devnet.go b/config/spec/devnet.go similarity index 91% rename from mod/config/pkg/spec/devnet.go rename to config/spec/devnet.go index 66c575ea2c..c94ef61052 100644 --- a/mod/config/pkg/spec/devnet.go +++ b/config/spec/devnet.go @@ -21,9 +21,9 @@ package spec import ( - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) const ( diff --git a/mod/config/pkg/spec/special_cases.go b/config/spec/special_cases.go similarity index 100% rename from mod/config/pkg/spec/special_cases.go rename to config/spec/special_cases.go diff --git a/mod/config/pkg/spec/testnet.go b/config/spec/testnet.go similarity index 87% rename from mod/config/pkg/spec/testnet.go rename to config/spec/testnet.go index aca8c25f8e..5a8172399d 100644 --- a/mod/config/pkg/spec/testnet.go +++ b/config/spec/testnet.go @@ -21,9 +21,9 @@ package spec import ( - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // TestnetChainSpec is the ChainSpec for the bArtio testnet. diff --git a/mod/config/pkg/template/template.go b/config/template/template.go similarity index 100% rename from mod/config/pkg/template/template.go rename to config/template/template.go diff --git a/mod/config/pkg/viper/parser.go b/config/viper/parser.go similarity index 94% rename from mod/config/pkg/viper/parser.go rename to config/viper/parser.go index cca41eaba6..1e6e344f12 100644 --- a/mod/config/pkg/viper/parser.go +++ b/config/viper/parser.go @@ -24,8 +24,8 @@ import ( "net/url" "reflect" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - beaconurl "github.com/berachain/beacon-kit/mod/primitives/pkg/net/url" + "github.com/berachain/beacon-kit/primitives/common" + beaconurl "github.com/berachain/beacon-kit/primitives/net/url" "github.com/mitchellh/mapstructure" ) diff --git a/mod/consensus-types/pkg/types/attestation_data.go b/consensus-types/types/attestation_data.go similarity index 96% rename from mod/consensus-types/pkg/types/attestation_data.go rename to consensus-types/types/attestation_data.go index 10ca6d4c5b..4715dbc5f4 100644 --- a/mod/consensus-types/pkg/types/attestation_data.go +++ b/consensus-types/types/attestation_data.go @@ -26,9 +26,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/attestation_data_test.go b/consensus-types/types/attestation_data_test.go similarity index 95% rename from mod/consensus-types/pkg/types/attestation_data_test.go rename to consensus-types/types/attestation_data_test.go index 55cb46f9ef..439a6fbab6 100644 --- a/mod/consensus-types/pkg/types/attestation_data_test.go +++ b/consensus-types/types/attestation_data_test.go @@ -24,9 +24,9 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/block.go b/consensus-types/types/block.go similarity index 96% rename from mod/consensus-types/pkg/types/block.go rename to consensus-types/types/block.go index 80e1577d4b..02bcd44de2 100644 --- a/mod/consensus-types/pkg/types/block.go +++ b/consensus-types/types/block.go @@ -23,10 +23,10 @@ package types import ( "fmt" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/block_test.go b/consensus-types/types/block_test.go similarity index 93% rename from mod/consensus-types/pkg/types/block_test.go rename to consensus-types/types/block_test.go index ad4ba20ad1..c886702d18 100644 --- a/mod/consensus-types/pkg/types/block_test.go +++ b/consensus-types/types/block_test.go @@ -23,12 +23,12 @@ package types_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/consensus-types/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/body.go b/consensus-types/types/body.go similarity index 97% rename from mod/consensus-types/pkg/types/body.go rename to consensus-types/types/body.go index fd35dd85d6..f5ca65d508 100644 --- a/mod/consensus-types/pkg/types/body.go +++ b/consensus-types/types/body.go @@ -26,11 +26,11 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/body_test.go b/consensus-types/types/body_test.go similarity index 91% rename from mod/consensus-types/pkg/types/body_test.go rename to consensus-types/types/body_test.go index b96046531f..d12c0548d4 100644 --- a/mod/consensus-types/pkg/types/body_test.go +++ b/consensus-types/types/body_test.go @@ -23,13 +23,13 @@ package types_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/deposit.go b/consensus-types/types/deposit.go similarity index 96% rename from mod/consensus-types/pkg/types/deposit.go rename to consensus-types/types/deposit.go index 0bc80bedf9..d695c54f85 100644 --- a/mod/consensus-types/pkg/types/deposit.go +++ b/consensus-types/types/deposit.go @@ -21,10 +21,10 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/deposit_message.go b/consensus-types/types/deposit_message.go similarity index 95% rename from mod/consensus-types/pkg/types/deposit_message.go rename to consensus-types/types/deposit_message.go index f4c9c49ccf..496395b6a6 100644 --- a/mod/consensus-types/pkg/types/deposit_message.go +++ b/consensus-types/types/deposit_message.go @@ -21,10 +21,10 @@ package types import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/deposit_message_test.go b/consensus-types/types/deposit_message_test.go similarity index 91% rename from mod/consensus-types/pkg/types/deposit_message_test.go rename to consensus-types/types/deposit_message_test.go index 4f95c1bda9..659e0d23cf 100644 --- a/mod/consensus-types/pkg/types/deposit_message_test.go +++ b/consensus-types/types/deposit_message_test.go @@ -24,12 +24,12 @@ import ( "io" "testing" - types "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + types "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/crypto/mocks" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/mod/consensus-types/pkg/types/deposit_test.go b/consensus-types/types/deposit_test.go similarity index 94% rename from mod/consensus-types/pkg/types/deposit_test.go rename to consensus-types/types/deposit_test.go index 2a88806057..ece4adffd5 100644 --- a/mod/consensus-types/pkg/types/deposit_test.go +++ b/consensus-types/types/deposit_test.go @@ -24,10 +24,10 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ssz "github.com/ferranbt/fastssz" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" diff --git a/mod/consensus-types/pkg/types/deposits.go b/consensus-types/types/deposits.go similarity index 94% rename from mod/consensus-types/pkg/types/deposits.go rename to consensus-types/types/deposits.go index a4f5302f60..85e41ff823 100644 --- a/mod/consensus-types/pkg/types/deposits.go +++ b/consensus-types/types/deposits.go @@ -21,8 +21,8 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/errors.go b/consensus-types/types/errors.go similarity index 96% rename from mod/consensus-types/pkg/types/errors.go rename to consensus-types/types/errors.go index 6c97c405d0..95574e9d49 100644 --- a/mod/consensus-types/pkg/types/errors.go +++ b/consensus-types/types/errors.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrDepositMessage is an error for when the deposit signature doesn't diff --git a/mod/consensus-types/pkg/types/eth1data.go b/consensus-types/types/eth1data.go similarity index 96% rename from mod/consensus-types/pkg/types/eth1data.go rename to consensus-types/types/eth1data.go index 38613854a5..8a8c065014 100644 --- a/mod/consensus-types/pkg/types/eth1data.go +++ b/consensus-types/types/eth1data.go @@ -21,9 +21,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/eth1data_test.go b/consensus-types/types/eth1data_test.go similarity index 95% rename from mod/consensus-types/pkg/types/eth1data_test.go rename to consensus-types/types/eth1data_test.go index 7171e159b3..dc4fe1327b 100644 --- a/mod/consensus-types/pkg/types/eth1data_test.go +++ b/consensus-types/types/eth1data_test.go @@ -24,8 +24,8 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/fork.go b/consensus-types/types/fork.go similarity index 95% rename from mod/consensus-types/pkg/types/fork.go rename to consensus-types/types/fork.go index 224172807c..205e0e96cf 100644 --- a/mod/consensus-types/pkg/types/fork.go +++ b/consensus-types/types/fork.go @@ -21,9 +21,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/fork_data.go b/consensus-types/types/fork_data.go similarity index 96% rename from mod/consensus-types/pkg/types/fork_data.go rename to consensus-types/types/fork_data.go index 07e21253a5..6b40117a52 100644 --- a/mod/consensus-types/pkg/types/fork_data.go +++ b/consensus-types/types/fork_data.go @@ -21,8 +21,8 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/fork_data_test.go b/consensus-types/types/fork_data_test.go similarity index 94% rename from mod/consensus-types/pkg/types/fork_data_test.go rename to consensus-types/types/fork_data_test.go index 7ba4e355bd..3a8078941d 100644 --- a/mod/consensus-types/pkg/types/fork_data_test.go +++ b/consensus-types/types/fork_data_test.go @@ -24,9 +24,9 @@ import ( "io" "testing" - types "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + types "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/fork_test.go b/consensus-types/types/fork_test.go similarity index 93% rename from mod/consensus-types/pkg/types/fork_test.go rename to consensus-types/types/fork_test.go index 2662679ad6..ff3d5c3ca2 100644 --- a/mod/consensus-types/pkg/types/fork_test.go +++ b/consensus-types/types/fork_test.go @@ -24,9 +24,9 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/genesis.go b/consensus-types/types/genesis.go similarity index 90% rename from mod/consensus-types/pkg/types/genesis.go rename to consensus-types/types/genesis.go index 8132091874..f77361f4f4 100644 --- a/mod/consensus-types/pkg/types/genesis.go +++ b/consensus-types/types/genesis.go @@ -24,14 +24,14 @@ import ( "fmt" "math/big" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - byteslib "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + byteslib "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" ) const ( diff --git a/mod/consensus-types/pkg/types/genesis_test.go b/consensus-types/types/genesis_test.go similarity index 96% rename from mod/consensus-types/pkg/types/genesis_test.go rename to consensus-types/types/genesis_test.go index 9fb61423ff..af27ce3ebf 100644 --- a/mod/consensus-types/pkg/types/genesis_test.go +++ b/consensus-types/types/genesis_test.go @@ -24,11 +24,11 @@ package types_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/header.go b/consensus-types/types/header.go similarity index 97% rename from mod/consensus-types/pkg/types/header.go rename to consensus-types/types/header.go index 8ba0807bd0..ad9cd21799 100644 --- a/mod/consensus-types/pkg/types/header.go +++ b/consensus-types/types/header.go @@ -21,9 +21,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/header_test.go b/consensus-types/types/header_test.go similarity index 97% rename from mod/consensus-types/pkg/types/header_test.go rename to consensus-types/types/header_test.go index 7c7382aed0..b6ce344b4c 100644 --- a/mod/consensus-types/pkg/types/header_test.go +++ b/consensus-types/types/header_test.go @@ -24,9 +24,9 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/payload.go b/consensus-types/types/payload.go similarity index 97% rename from mod/consensus-types/pkg/types/payload.go rename to consensus-types/types/payload.go index 68a88c4317..adf899a91f 100644 --- a/mod/consensus-types/pkg/types/payload.go +++ b/consensus-types/types/payload.go @@ -21,14 +21,14 @@ package types import ( - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/payload_header.go b/consensus-types/types/payload_header.go similarity index 98% rename from mod/consensus-types/pkg/types/payload_header.go rename to consensus-types/types/payload_header.go index 65b89983c4..63021ce807 100644 --- a/mod/consensus-types/pkg/types/payload_header.go +++ b/consensus-types/types/payload_header.go @@ -21,12 +21,12 @@ package types import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" fastssz "github.com/ferranbt/fastssz" "github.com/holiman/uint256" "github.com/karalabe/ssz" diff --git a/mod/consensus-types/pkg/types/payload_header_test.go b/consensus-types/types/payload_header_test.go similarity index 97% rename from mod/consensus-types/pkg/types/payload_header_test.go rename to consensus-types/types/payload_header_test.go index 18b9607592..7426d36d6a 100644 --- a/mod/consensus-types/pkg/types/payload_header_test.go +++ b/consensus-types/types/payload_header_test.go @@ -24,13 +24,13 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" ssz "github.com/ferranbt/fastssz" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" diff --git a/mod/consensus-types/pkg/types/payload_test.go b/consensus-types/types/payload_test.go similarity index 95% rename from mod/consensus-types/pkg/types/payload_test.go rename to consensus-types/types/payload_test.go index 3bee021175..d7a362a2b7 100644 --- a/mod/consensus-types/pkg/types/payload_test.go +++ b/consensus-types/types/payload_test.go @@ -24,13 +24,13 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/consensus-types/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/signing_data.go b/consensus-types/types/signing_data.go similarity index 96% rename from mod/consensus-types/pkg/types/signing_data.go rename to consensus-types/types/signing_data.go index 15b023cc47..02ab22202e 100644 --- a/mod/consensus-types/pkg/types/signing_data.go +++ b/consensus-types/types/signing_data.go @@ -23,8 +23,8 @@ package types import ( "encoding/binary" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/signing_data_test.go b/consensus-types/types/signing_data_test.go similarity index 93% rename from mod/consensus-types/pkg/types/signing_data_test.go rename to consensus-types/types/signing_data_test.go index cd6db76e58..b3f58adbf4 100644 --- a/mod/consensus-types/pkg/types/signing_data_test.go +++ b/consensus-types/types/signing_data_test.go @@ -24,9 +24,9 @@ import ( "io" "testing" - types "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + types "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/slashing_info.go b/consensus-types/types/slashing_info.go similarity index 96% rename from mod/consensus-types/pkg/types/slashing_info.go rename to consensus-types/types/slashing_info.go index e8ec194ffc..f9cfe25566 100644 --- a/mod/consensus-types/pkg/types/slashing_info.go +++ b/consensus-types/types/slashing_info.go @@ -26,9 +26,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/slashing_info_test.go b/consensus-types/types/slashing_info_test.go similarity index 96% rename from mod/consensus-types/pkg/types/slashing_info_test.go rename to consensus-types/types/slashing_info_test.go index 9e56ee7630..109173d75d 100644 --- a/mod/consensus-types/pkg/types/slashing_info_test.go +++ b/consensus-types/types/slashing_info_test.go @@ -24,8 +24,8 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/state.go b/consensus-types/types/state.go similarity index 98% rename from mod/consensus-types/pkg/types/state.go rename to consensus-types/types/state.go index c9dfd39750..1687fae7c2 100644 --- a/mod/consensus-types/pkg/types/state.go +++ b/consensus-types/types/state.go @@ -21,9 +21,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/state_test.go b/consensus-types/types/state_test.go similarity index 97% rename from mod/consensus-types/pkg/types/state_test.go rename to consensus-types/types/state_test.go index c4ef1ab192..9d5ba1840d 100644 --- a/mod/consensus-types/pkg/types/state_test.go +++ b/consensus-types/types/state_test.go @@ -30,9 +30,9 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/validator.go b/consensus-types/types/validator.go similarity index 97% rename from mod/consensus-types/pkg/types/validator.go rename to consensus-types/types/validator.go index 5bb1a92ca2..89996ae6f9 100644 --- a/mod/consensus-types/pkg/types/validator.go +++ b/consensus-types/types/validator.go @@ -21,11 +21,11 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/validator_test.go b/consensus-types/types/validator_test.go similarity index 98% rename from mod/consensus-types/pkg/types/validator_test.go rename to consensus-types/types/validator_test.go index b8adf23ca5..72b44b9b58 100644 --- a/mod/consensus-types/pkg/types/validator_test.go +++ b/consensus-types/types/validator_test.go @@ -24,11 +24,11 @@ import ( "io" "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ssz "github.com/ferranbt/fastssz" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus-types/pkg/types/validators.go b/consensus-types/types/validators.go similarity index 96% rename from mod/consensus-types/pkg/types/validators.go rename to consensus-types/types/validators.go index 5ef3b75478..8a0ab3b0e6 100644 --- a/mod/consensus-types/pkg/types/validators.go +++ b/consensus-types/types/validators.go @@ -21,7 +21,7 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" "github.com/karalabe/ssz" ) diff --git a/mod/consensus-types/pkg/types/withdrawal_credentials.go b/consensus-types/types/withdrawal_credentials.go similarity index 98% rename from mod/consensus-types/pkg/types/withdrawal_credentials.go rename to consensus-types/types/withdrawal_credentials.go index 1956de94c6..2ec181d0f7 100644 --- a/mod/consensus-types/pkg/types/withdrawal_credentials.go +++ b/consensus-types/types/withdrawal_credentials.go @@ -26,7 +26,7 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" ) // EthSecp256k1CredentialPrefix is the prefix for an Ethereum secp256k1. diff --git a/mod/consensus-types/pkg/types/withdrawal_credentials_test.go b/consensus-types/types/withdrawal_credentials_test.go similarity index 98% rename from mod/consensus-types/pkg/types/withdrawal_credentials_test.go rename to consensus-types/types/withdrawal_credentials_test.go index c99bbfc6e1..0f67f01087 100644 --- a/mod/consensus-types/pkg/types/withdrawal_credentials_test.go +++ b/consensus-types/types/withdrawal_credentials_test.go @@ -23,8 +23,8 @@ package types_test import ( "testing" - types "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + types "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" "github.com/stretchr/testify/require" ) diff --git a/mod/consensus/pkg/cometbft/cli/commands.go b/consensus/cometbft/cli/commands.go similarity index 87% rename from mod/consensus/pkg/cometbft/cli/commands.go rename to consensus/cometbft/cli/commands.go index 2173b08df2..73e0c60b91 100644 --- a/mod/consensus/pkg/cometbft/cli/commands.go +++ b/consensus/cometbft/cli/commands.go @@ -24,11 +24,11 @@ import ( "context" "cosmossdk.io/store" - types "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - clicontext "github.com/berachain/beacon-kit/mod/cli/pkg/context" - service "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/db" + types "github.com/berachain/beacon-kit/cli/commands/server/types" + clicontext "github.com/berachain/beacon-kit/cli/context" + service "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/db" cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands" cmtcfg "github.com/cometbft/cometbft/config" cmtjson "github.com/cometbft/cometbft/libs/json" @@ -123,7 +123,7 @@ func ShowNodeIDCmd() *cobra.Command { return &cobra.Command{ Use: "show-node-id", Short: "Show this node's ID", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { cfg := clicontext.GetConfigFromCmd(cmd) nodeKey, err := p2p.LoadNodeKey(cfg.NodeKeyFile()) if err != nil { @@ -141,7 +141,7 @@ func ShowValidatorCmd() *cobra.Command { cmd := cobra.Command{ Use: "show-validator", Short: "Show this node's CometBFT validator info", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { cfg := clicontext.GetConfigFromCmd(cmd) privValidator := pvm.LoadFilePV( cfg.PrivValidatorKeyFile(), @@ -176,7 +176,7 @@ func ShowAddressCmd() *cobra.Command { cmd := &cobra.Command{ Use: "show-address", Short: "Shows this node's CometBFT validator consensus address", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { cfg := clicontext.GetConfigFromCmd(cmd) privValidator := pvm.LoadFilePV( cfg.PrivValidatorKeyFile(), @@ -198,8 +198,9 @@ func VersionCmd() *cobra.Command { return &cobra.Command{ Use: "version", Short: "Print CometBFT libraries' version", - Long: "Print protocols' and libraries' version numbers against which this app has been compiled.", - RunE: func(cmd *cobra.Command, args []string) error { + Long: `Print protocols' and libraries' version numbers against +which this app has been compiled.`, + RunE: func(cmd *cobra.Command, _ []string) error { bs, err := yaml.Marshal(&struct { CometBFT string ABCI string @@ -228,10 +229,11 @@ func BootstrapStateCmd[T interface { appCreator types.AppCreator[T, LoggerT], ) *cobra.Command { cmd := &cobra.Command{ - Use: "bootstrap-state", - Short: "Bootstrap CometBFT state at an arbitrary block height using a light client", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + Use: "bootstrap-state", + Short: `Bootstrap CometBFT state at an arbitrary block height +using a light client`, + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) error { logger := clicontext.GetLoggerFromCmd[LoggerT](cmd) cfg := clicontext.GetConfigFromCmd(cmd) v := clicontext.GetViperFromCmd(cmd) @@ -265,7 +267,8 @@ func BootstrapStateCmd[T interface { } cmd.Flags(). - Int64("height", 0, "Block height to bootstrap state at, if not provided it uses the latest block height in app state") + Int64("height", 0, `Block height to bootstrap state at, if not provided +it uses the latest block height in app state`) return cmd } diff --git a/mod/consensus/pkg/cometbft/mod.go b/consensus/cometbft/mod.go similarity index 100% rename from mod/consensus/pkg/cometbft/mod.go rename to consensus/cometbft/mod.go diff --git a/mod/consensus/pkg/cometbft/service/abci.go b/consensus/cometbft/service/abci.go similarity index 97% rename from mod/consensus/pkg/cometbft/service/abci.go rename to consensus/cometbft/service/abci.go index 9e65a59e92..4298ce7dd4 100644 --- a/mod/consensus/pkg/cometbft/service/abci.go +++ b/consensus/cometbft/service/abci.go @@ -29,12 +29,12 @@ import ( "sort" "cosmossdk.io/store/rootmulti" - ctypes "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - servercmtlog "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/log" - "github.com/berachain/beacon-kit/mod/consensus/pkg/types" - errorsmod "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + ctypes "github.com/berachain/beacon-kit/consensus-types/types" + servercmtlog "github.com/berachain/beacon-kit/consensus/cometbft/service/log" + "github.com/berachain/beacon-kit/consensus/types" + errorsmod "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/encoding/json" + math "github.com/berachain/beacon-kit/primitives/math" cmtabci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/mod/consensus/pkg/cometbft/service/encoding/encoding.go b/consensus/cometbft/service/encoding/encoding.go similarity index 98% rename from mod/consensus/pkg/cometbft/service/encoding/encoding.go rename to consensus/cometbft/service/encoding/encoding.go index e89f8dfa68..dfc0c0c754 100644 --- a/mod/consensus/pkg/cometbft/service/encoding/encoding.go +++ b/consensus/cometbft/service/encoding/encoding.go @@ -21,7 +21,7 @@ package encoding import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/primitives/constraints" ) // ExtractBlobsAndBlockFromRequest extracts the blobs and block from an ABCI diff --git a/mod/consensus/pkg/cometbft/service/encoding/errors.go b/consensus/cometbft/service/encoding/errors.go similarity index 97% rename from mod/consensus/pkg/cometbft/service/encoding/errors.go rename to consensus/cometbft/service/encoding/errors.go index aa75cec540..21b6673259 100644 --- a/mod/consensus/pkg/cometbft/service/encoding/errors.go +++ b/consensus/cometbft/service/encoding/errors.go @@ -20,7 +20,7 @@ package encoding -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrNilBeaconBlockInRequest is an error for when diff --git a/mod/consensus/pkg/cometbft/service/encoding/types.go b/consensus/cometbft/service/encoding/types.go similarity index 95% rename from mod/consensus/pkg/cometbft/service/encoding/types.go rename to consensus/cometbft/service/encoding/types.go index 4c5ea8ce40..e5781be2ab 100644 --- a/mod/consensus/pkg/cometbft/service/encoding/types.go +++ b/consensus/cometbft/service/encoding/types.go @@ -23,7 +23,7 @@ package encoding import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/primitives/constraints" ) // ABCIRequest represents the interface for an ABCI request. diff --git a/mod/consensus/pkg/cometbft/service/genesis.go b/consensus/cometbft/service/genesis.go similarity index 95% rename from mod/consensus/pkg/cometbft/service/genesis.go rename to consensus/cometbft/service/genesis.go index 8c149c62be..a5869bc3d9 100644 --- a/mod/consensus/pkg/cometbft/service/genesis.go +++ b/consensus/cometbft/service/genesis.go @@ -23,8 +23,8 @@ package cometbft import ( "crypto/sha256" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/encoding/json" cmtcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/node" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" diff --git a/mod/consensus/pkg/cometbft/service/log/cmt_logger.go b/consensus/cometbft/service/log/cmt_logger.go similarity index 97% rename from mod/consensus/pkg/cometbft/service/log/cmt_logger.go rename to consensus/cometbft/service/log/cmt_logger.go index 8b8a94ebda..84a65ac537 100644 --- a/mod/consensus/pkg/cometbft/service/log/cmt_logger.go +++ b/consensus/cometbft/service/log/cmt_logger.go @@ -21,7 +21,7 @@ package log import ( - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" cmtlog "github.com/cometbft/cometbft/libs/log" ) diff --git a/mod/consensus/pkg/cometbft/service/log/sdk_logger.go b/consensus/cometbft/service/log/sdk_logger.go similarity index 97% rename from mod/consensus/pkg/cometbft/service/log/sdk_logger.go rename to consensus/cometbft/service/log/sdk_logger.go index c7658d2dc7..7657e88228 100644 --- a/mod/consensus/pkg/cometbft/service/log/sdk_logger.go +++ b/consensus/cometbft/service/log/sdk_logger.go @@ -22,7 +22,7 @@ package log import ( sdklog "cosmossdk.io/log" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" ) type SDKLogger[LoggerT log.AdvancedLogger[LoggerT]] struct { diff --git a/mod/consensus/pkg/cometbft/service/middleware/abci.go b/consensus/cometbft/service/middleware/abci.go similarity index 96% rename from mod/consensus/pkg/cometbft/service/middleware/abci.go rename to consensus/cometbft/service/middleware/abci.go index b31ae16189..1da9a8979f 100644 --- a/mod/consensus/pkg/cometbft/service/middleware/abci.go +++ b/consensus/cometbft/service/middleware/abci.go @@ -24,13 +24,13 @@ import ( "context" "time" - "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/encoding" - "github.com/berachain/beacon-kit/mod/consensus/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/consensus/cometbft/service/encoding" + "github.com/berachain/beacon-kit/consensus/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" cmtabci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/mod/consensus/pkg/cometbft/service/middleware/constants.go b/consensus/cometbft/service/middleware/constants.go similarity index 100% rename from mod/consensus/pkg/cometbft/service/middleware/constants.go rename to consensus/cometbft/service/middleware/constants.go diff --git a/mod/consensus/pkg/cometbft/service/middleware/errors.go b/consensus/cometbft/service/middleware/errors.go similarity index 97% rename from mod/consensus/pkg/cometbft/service/middleware/errors.go rename to consensus/cometbft/service/middleware/errors.go index 8a953e270e..97e95d917b 100644 --- a/mod/consensus/pkg/cometbft/service/middleware/errors.go +++ b/consensus/cometbft/service/middleware/errors.go @@ -20,7 +20,7 @@ package middleware -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" //nolint:gochecknoglobals // errors var ( diff --git a/mod/consensus/pkg/cometbft/service/middleware/metrics.go b/consensus/cometbft/service/middleware/metrics.go similarity index 100% rename from mod/consensus/pkg/cometbft/service/middleware/metrics.go rename to consensus/cometbft/service/middleware/metrics.go diff --git a/mod/consensus/pkg/cometbft/service/middleware/middleware.go b/consensus/cometbft/service/middleware/middleware.go similarity index 94% rename from mod/consensus/pkg/cometbft/service/middleware/middleware.go rename to consensus/cometbft/service/middleware/middleware.go index a323ec063e..b65e7182ea 100644 --- a/mod/consensus/pkg/cometbft/service/middleware/middleware.go +++ b/consensus/cometbft/service/middleware/middleware.go @@ -23,11 +23,11 @@ package middleware import ( "context" - "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" ) // ABCIMiddleware is a middleware between ABCI and the validator logic. diff --git a/mod/consensus/pkg/cometbft/service/middleware/types.go b/consensus/cometbft/service/middleware/types.go similarity index 92% rename from mod/consensus/pkg/cometbft/service/middleware/types.go rename to consensus/cometbft/service/middleware/types.go index c79e6333db..43634c097b 100644 --- a/mod/consensus/pkg/cometbft/service/middleware/types.go +++ b/consensus/cometbft/service/middleware/types.go @@ -23,8 +23,8 @@ package middleware import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/transition" ) // BeaconBlock is an interface for accessing the beacon block. diff --git a/mod/consensus/pkg/cometbft/service/noops.go b/consensus/cometbft/service/noops.go similarity index 100% rename from mod/consensus/pkg/cometbft/service/noops.go rename to consensus/cometbft/service/noops.go diff --git a/mod/consensus/pkg/cometbft/service/options.go b/consensus/cometbft/service/options.go similarity index 98% rename from mod/consensus/pkg/cometbft/service/options.go rename to consensus/cometbft/service/options.go index 753eea21f5..6b3337f1b9 100644 --- a/mod/consensus/pkg/cometbft/service/options.go +++ b/consensus/cometbft/service/options.go @@ -23,7 +23,7 @@ package cometbft import ( pruningtypes "cosmossdk.io/store/pruning/types" storetypes "cosmossdk.io/store/types" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" ) // File for storing in-package cometbft optional functions, diff --git a/mod/consensus/pkg/cometbft/service/params/consensus.go b/consensus/cometbft/service/params/consensus.go similarity index 96% rename from mod/consensus/pkg/cometbft/service/params/consensus.go rename to consensus/cometbft/service/params/consensus.go index 0fe2c41608..c20a7d748d 100644 --- a/mod/consensus/pkg/cometbft/service/params/consensus.go +++ b/consensus/cometbft/service/params/consensus.go @@ -21,7 +21,7 @@ package params import ( - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + math "github.com/berachain/beacon-kit/primitives/math" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmttypes "github.com/cometbft/cometbft/types" ) diff --git a/mod/consensus/pkg/cometbft/service/service.go b/consensus/cometbft/service/service.go similarity index 93% rename from mod/consensus/pkg/cometbft/service/service.go rename to consensus/cometbft/service/service.go index f86f2b5117..2dd315cc34 100644 --- a/mod/consensus/pkg/cometbft/service/service.go +++ b/consensus/cometbft/service/service.go @@ -25,13 +25,13 @@ import ( "errors" storetypes "cosmossdk.io/store/types" - servercmtlog "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/log" - "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/params" - statem "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/state" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + servercmtlog "github.com/berachain/beacon-kit/consensus/cometbft/service/log" + "github.com/berachain/beacon-kit/consensus/cometbft/service/params" + statem "github.com/berachain/beacon-kit/consensus/cometbft/service/state" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/transition" abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtcfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/node" diff --git a/mod/consensus/pkg/cometbft/service/state.go b/consensus/cometbft/service/state.go similarity index 100% rename from mod/consensus/pkg/cometbft/service/state.go rename to consensus/cometbft/service/state.go diff --git a/mod/consensus/pkg/cometbft/service/state/state.go b/consensus/cometbft/service/state/state.go similarity index 100% rename from mod/consensus/pkg/cometbft/service/state/state.go rename to consensus/cometbft/service/state/state.go diff --git a/mod/consensus/pkg/cometbft/service/types.go b/consensus/cometbft/service/types.go similarity index 88% rename from mod/consensus/pkg/cometbft/service/types.go rename to consensus/cometbft/service/types.go index a0404e5886..f8cc51f128 100644 --- a/mod/consensus/pkg/cometbft/service/types.go +++ b/consensus/cometbft/service/types.go @@ -21,9 +21,9 @@ package cometbft import ( - ctypes "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/consensus/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + ctypes "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/consensus/types" + "github.com/berachain/beacon-kit/primitives/transition" cmtabci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/mod/consensus/pkg/types/common.go b/consensus/types/common.go similarity index 96% rename from mod/consensus/pkg/types/common.go rename to consensus/types/common.go index b56df0591f..e8b79341ba 100644 --- a/mod/consensus/pkg/types/common.go +++ b/consensus/types/common.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/primitives/pkg/math" +import "github.com/berachain/beacon-kit/primitives/math" type commonConsensusData struct { // use to verify block builder diff --git a/mod/consensus/pkg/types/consensus_block.go b/consensus/types/consensus_block.go similarity index 96% rename from mod/consensus/pkg/types/consensus_block.go rename to consensus/types/consensus_block.go index 1ca6dc98c2..300bfca4a5 100644 --- a/mod/consensus/pkg/types/consensus_block.go +++ b/consensus/types/consensus_block.go @@ -23,7 +23,7 @@ package types import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) type ConsensusBlock[BeaconBlockT any] struct { diff --git a/mod/consensus/pkg/types/consensus_sidecars.go b/consensus/types/consensus_sidecars.go similarity index 100% rename from mod/consensus/pkg/types/consensus_sidecars.go rename to consensus/types/consensus_sidecars.go diff --git a/mod/consensus/pkg/types/slot_data.go b/consensus/types/slot_data.go similarity index 98% rename from mod/consensus/pkg/types/slot_data.go rename to consensus/types/slot_data.go index 0018b6e8cc..e92a39eb75 100644 --- a/mod/consensus/pkg/types/slot_data.go +++ b/consensus/types/slot_data.go @@ -23,7 +23,7 @@ package types import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // SlotData represents the data to be used to propose a block. diff --git a/mod/da/pkg/blob/factory.go b/da/blob/factory.go similarity index 93% rename from mod/da/pkg/blob/factory.go rename to da/blob/factory.go index 016d6aa399..dc0ee1639d 100644 --- a/mod/da/pkg/blob/factory.go +++ b/da/blob/factory.go @@ -23,11 +23,11 @@ package blob import ( "time" - "github.com/berachain/beacon-kit/mod/da/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" + "github.com/berachain/beacon-kit/da/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/merkle" "golang.org/x/sync/errgroup" ) diff --git a/mod/da/pkg/blob/factory_metrics.go b/da/blob/factory_metrics.go similarity index 97% rename from mod/da/pkg/blob/factory_metrics.go rename to da/blob/factory_metrics.go index ce2c2dedd9..173ee5c986 100644 --- a/mod/da/pkg/blob/factory_metrics.go +++ b/da/blob/factory_metrics.go @@ -23,7 +23,7 @@ package blob import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // factoryMetrics is a struct that contains metrics for the factory. diff --git a/mod/da/pkg/blob/factory_test.go b/da/blob/factory_test.go similarity index 100% rename from mod/da/pkg/blob/factory_test.go rename to da/blob/factory_test.go diff --git a/mod/da/pkg/blob/processor.go b/da/blob/processor.go similarity index 95% rename from mod/da/pkg/blob/processor.go rename to da/blob/processor.go index 38695937b3..d647f19cdd 100644 --- a/mod/da/pkg/blob/processor.go +++ b/da/blob/processor.go @@ -23,10 +23,10 @@ package blob import ( "time" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/da/kzg" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // Processor is the blob processor that handles the processing and verification diff --git a/mod/da/pkg/blob/processor_metrics.go b/da/blob/processor_metrics.go similarity index 97% rename from mod/da/pkg/blob/processor_metrics.go rename to da/blob/processor_metrics.go index 3c1e78b331..b51adc1e55 100644 --- a/mod/da/pkg/blob/processor_metrics.go +++ b/da/blob/processor_metrics.go @@ -23,7 +23,7 @@ package blob import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // processorMetrics is a struct that contains metrics for the processor. diff --git a/mod/da/pkg/blob/types.go b/da/blob/types.go similarity index 94% rename from mod/da/pkg/blob/types.go rename to da/blob/types.go index 7577bbca66..de6f61c285 100644 --- a/mod/da/pkg/blob/types.go +++ b/da/blob/types.go @@ -24,9 +24,9 @@ import ( "context" "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" ) // The AvailabilityStore interface is responsible for validating and storing diff --git a/mod/da/pkg/blob/verifier.go b/da/blob/verifier.go similarity index 97% rename from mod/da/pkg/blob/verifier.go rename to da/blob/verifier.go index fa0acde3fd..9da3a625d4 100644 --- a/mod/da/pkg/blob/verifier.go +++ b/da/blob/verifier.go @@ -25,8 +25,8 @@ import ( "fmt" "time" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/da/kzg" + "github.com/berachain/beacon-kit/primitives/math" "golang.org/x/sync/errgroup" ) diff --git a/mod/da/pkg/blob/verifier_metrics.go b/da/blob/verifier_metrics.go similarity index 97% rename from mod/da/pkg/blob/verifier_metrics.go rename to da/blob/verifier_metrics.go index 8c0300218c..472f50ad2d 100644 --- a/mod/da/pkg/blob/verifier_metrics.go +++ b/da/blob/verifier_metrics.go @@ -23,7 +23,7 @@ package blob import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // verifierMetrics is a struct that contains metrics for the verifier. diff --git a/mod/da/pkg/da/service.go b/da/da/service.go similarity index 97% rename from mod/da/pkg/da/service.go rename to da/da/service.go index 35d0c074f5..bb4e6b0ef5 100644 --- a/mod/da/pkg/da/service.go +++ b/da/da/service.go @@ -23,9 +23,9 @@ package da import ( "context" - asynctypes "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + asynctypes "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" ) // The Data Availability service is responsible for verifying and processing diff --git a/mod/da/pkg/da/types.go b/da/da/types.go similarity index 100% rename from mod/da/pkg/da/types.go rename to da/da/types.go diff --git a/mod/da/pkg/kzg/ckzg/ckzg.go b/da/kzg/ckzg/ckzg.go similarity index 96% rename from mod/da/pkg/kzg/ckzg/ckzg.go rename to da/kzg/ckzg/ckzg.go index aa5c66f6d6..33f81558ee 100644 --- a/mod/da/pkg/kzg/ckzg/ckzg.go +++ b/da/kzg/ckzg/ckzg.go @@ -21,7 +21,7 @@ package ckzg import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" gokzg4844 "github.com/crate-crypto/go-kzg-4844" ckzg4844 "github.com/ethereum/c-kzg-4844/bindings/go" ) diff --git a/mod/da/pkg/kzg/ckzg/ckzg_cgo.go b/da/kzg/ckzg/ckzg_cgo.go similarity index 95% rename from mod/da/pkg/kzg/ckzg/ckzg_cgo.go rename to da/kzg/ckzg/ckzg_cgo.go index 63d5f9df98..aa309ab491 100644 --- a/mod/da/pkg/kzg/ckzg/ckzg_cgo.go +++ b/da/kzg/ckzg/ckzg_cgo.go @@ -25,8 +25,8 @@ package ckzg import ( "unsafe" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" ckzg4844 "github.com/ethereum/c-kzg-4844/bindings/go" ) diff --git a/mod/da/pkg/kzg/ckzg/ckzg_cgo_test.go b/da/kzg/ckzg/ckzg_cgo_test.go similarity index 95% rename from mod/da/pkg/kzg/ckzg/ckzg_cgo_test.go rename to da/kzg/ckzg/ckzg_cgo_test.go index b33cf6dee8..9ea2234cac 100644 --- a/mod/da/pkg/kzg/ckzg/ckzg_cgo_test.go +++ b/da/kzg/ckzg/ckzg_cgo_test.go @@ -26,10 +26,10 @@ import ( "path/filepath" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/encoding/json" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/mod/da/pkg/kzg/ckzg/ckzg_no_cgo.go b/da/kzg/ckzg/ckzg_no_cgo.go similarity index 92% rename from mod/da/pkg/kzg/ckzg/ckzg_no_cgo.go rename to da/kzg/ckzg/ckzg_no_cgo.go index deacc25fc2..cc09551d91 100644 --- a/mod/da/pkg/kzg/ckzg/ckzg_no_cgo.go +++ b/da/kzg/ckzg/ckzg_no_cgo.go @@ -23,8 +23,8 @@ package ckzg import ( - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" ) // VerifyBlobProof will error since cgo is not enabled. diff --git a/mod/da/pkg/kzg/ckzg/ckzg_no_cgo_test.go b/da/kzg/ckzg/ckzg_no_cgo_test.go similarity index 96% rename from mod/da/pkg/kzg/ckzg/ckzg_no_cgo_test.go rename to da/kzg/ckzg/ckzg_no_cgo_test.go index 1e167cb600..cd0961f960 100644 --- a/mod/da/pkg/kzg/ckzg/ckzg_no_cgo_test.go +++ b/da/kzg/ckzg/ckzg_no_cgo_test.go @@ -26,9 +26,9 @@ import ( "path/filepath" "testing" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/encoding/json" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/mod/da/pkg/kzg/ckzg/errors.go b/da/kzg/ckzg/errors.go similarity index 96% rename from mod/da/pkg/kzg/ckzg/errors.go rename to da/kzg/ckzg/errors.go index 7ffe0b8a6a..94c299b72f 100644 --- a/mod/da/pkg/kzg/ckzg/errors.go +++ b/da/kzg/ckzg/errors.go @@ -20,7 +20,7 @@ package ckzg -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrInvalidProof is returned when a proof is invalid. diff --git a/mod/da/pkg/kzg/ckzg/helpers_test.go b/da/kzg/ckzg/helpers_test.go similarity index 92% rename from mod/da/pkg/kzg/ckzg/helpers_test.go rename to da/kzg/ckzg/helpers_test.go index 349a28ec6a..9bac931b8c 100644 --- a/mod/da/pkg/kzg/ckzg/helpers_test.go +++ b/da/kzg/ckzg/helpers_test.go @@ -26,9 +26,9 @@ import ( "path/filepath" "testing" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/ckzg" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/da/kzg/ckzg" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/encoding/json" gokzg4844 "github.com/crate-crypto/go-kzg-4844" "github.com/spf13/afero" "github.com/stretchr/testify/require" @@ -36,7 +36,7 @@ import ( var globalVerifier *ckzg.Verifier -var baseDir = "../../../../../testing/files/" +var baseDir = "../../../testing/files/" func TestMain(m *testing.M) { var err error diff --git a/mod/da/pkg/kzg/config.go b/da/kzg/config.go similarity index 100% rename from mod/da/pkg/kzg/config.go rename to da/kzg/config.go diff --git a/mod/da/pkg/kzg/config_test.go b/da/kzg/config_test.go similarity index 96% rename from mod/da/pkg/kzg/config_test.go rename to da/kzg/config_test.go index 39c952ed28..8c54186a0c 100644 --- a/mod/da/pkg/kzg/config_test.go +++ b/da/kzg/config_test.go @@ -23,7 +23,7 @@ package kzg_test import ( "testing" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg" + "github.com/berachain/beacon-kit/da/kzg" "github.com/stretchr/testify/require" ) diff --git a/mod/da/pkg/kzg/errors.go b/da/kzg/errors.go similarity index 95% rename from mod/da/pkg/kzg/errors.go rename to da/kzg/errors.go index 9ce8a3ce5d..6b3db9851f 100644 --- a/mod/da/pkg/kzg/errors.go +++ b/da/kzg/errors.go @@ -20,7 +20,7 @@ package kzg -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrUnsupportedKzgImplementation is returned when an unsupported KZG diff --git a/mod/da/pkg/kzg/gokzg/gokzg.go b/da/kzg/gokzg/gokzg.go similarity index 95% rename from mod/da/pkg/kzg/gokzg/gokzg.go rename to da/kzg/gokzg/gokzg.go index 59656fcb15..bf47cc5ab6 100644 --- a/mod/da/pkg/kzg/gokzg/gokzg.go +++ b/da/kzg/gokzg/gokzg.go @@ -23,8 +23,8 @@ package gokzg import ( "unsafe" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" gokzg4844 "github.com/crate-crypto/go-kzg-4844" ) diff --git a/mod/da/pkg/kzg/gokzg/gokzg_test.go b/da/kzg/gokzg/gokzg_test.go similarity index 94% rename from mod/da/pkg/kzg/gokzg/gokzg_test.go rename to da/kzg/gokzg/gokzg_test.go index 4e5433a1cb..a3f13cc421 100644 --- a/mod/da/pkg/kzg/gokzg/gokzg_test.go +++ b/da/kzg/gokzg/gokzg_test.go @@ -24,16 +24,16 @@ import ( "path/filepath" "testing" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/gokzg" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/da/kzg/gokzg" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/encoding/json" gokzg4844 "github.com/crate-crypto/go-kzg-4844" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) -var baseDir = "../../../../../testing/files/" +var baseDir = "../../../testing/files/" func TestVerifyBlobProof(t *testing.T) { verifier, err := setupVerifier() diff --git a/mod/da/pkg/kzg/noop/noop.go b/da/kzg/noop/noop.go similarity index 92% rename from mod/da/pkg/kzg/noop/noop.go rename to da/kzg/noop/noop.go index b56f2dabe6..c70f31ecd2 100644 --- a/mod/da/pkg/kzg/noop/noop.go +++ b/da/kzg/noop/noop.go @@ -21,8 +21,8 @@ package noop import ( - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" ) // Verifier is a no-op KZG proof verifier. diff --git a/mod/da/pkg/kzg/noop/noop_test.go b/da/kzg/noop/noop_test.go similarity index 90% rename from mod/da/pkg/kzg/noop/noop_test.go rename to da/kzg/noop/noop_test.go index 3a3906ceba..cb81bd4f87 100644 --- a/mod/da/pkg/kzg/noop/noop_test.go +++ b/da/kzg/noop/noop_test.go @@ -23,9 +23,9 @@ package noop_test import ( "testing" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/noop" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/noop" + "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/primitives/eip4844" ) func TestVerifyBlobProof(t *testing.T) { diff --git a/mod/da/pkg/kzg/proof.go b/da/kzg/proof.go similarity index 91% rename from mod/da/pkg/kzg/proof.go rename to da/kzg/proof.go index cbacdb48e7..7b546cf977 100644 --- a/mod/da/pkg/kzg/proof.go +++ b/da/kzg/proof.go @@ -21,11 +21,11 @@ package kzg import ( - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/ckzg" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/gokzg" - kzgtypes "github.com/berachain/beacon-kit/mod/da/pkg/kzg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/da/kzg/ckzg" + "github.com/berachain/beacon-kit/da/kzg/gokzg" + kzgtypes "github.com/berachain/beacon-kit/da/kzg/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/eip4844" gokzg4844 "github.com/crate-crypto/go-kzg-4844" ) diff --git a/mod/da/pkg/kzg/proof_test.go b/da/kzg/proof_test.go similarity index 89% rename from mod/da/pkg/kzg/proof_test.go rename to da/kzg/proof_test.go index 16a3de4a17..717ca84774 100644 --- a/mod/da/pkg/kzg/proof_test.go +++ b/da/kzg/proof_test.go @@ -25,18 +25,18 @@ import ( "path/filepath" "testing" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/ckzg" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg/gokzg" - "github.com/berachain/beacon-kit/mod/da/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/da/kzg" + "github.com/berachain/beacon-kit/da/kzg/ckzg" + "github.com/berachain/beacon-kit/da/kzg/gokzg" + "github.com/berachain/beacon-kit/da/types" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/encoding/json" gokzg4844 "github.com/crate-crypto/go-kzg-4844" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) -var baseDir = "../../../../testing/files/" +var baseDir = "../../testing/files/" func TestNewBlobProofVerifier_KzgImpl(t *testing.T) { ts, err := loadTrustedSetupFromFile() diff --git a/mod/da/pkg/kzg/types/args.go b/da/kzg/types/args.go similarity index 96% rename from mod/da/pkg/kzg/types/args.go rename to da/kzg/types/args.go index 8112a1b5d6..5888427a41 100644 --- a/mod/da/pkg/kzg/types/args.go +++ b/da/kzg/types/args.go @@ -21,7 +21,7 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/primitives/eip4844" ) type BlobSidecar interface { diff --git a/mod/da/pkg/store/errors.go b/da/store/errors.go similarity index 96% rename from mod/da/pkg/store/errors.go rename to da/store/errors.go index 3b2dede4e3..bb662a975c 100644 --- a/mod/da/pkg/store/errors.go +++ b/da/store/errors.go @@ -20,7 +20,7 @@ package store -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrAttemptedToStoreNilSidecar is returned when an attempt is made to diff --git a/mod/da/pkg/store/pruner.go b/da/store/pruner.go similarity index 91% rename from mod/da/pkg/store/pruner.go rename to da/store/pruner.go index a88a0a298e..cf7235a6d1 100644 --- a/mod/da/pkg/store/pruner.go +++ b/da/store/pruner.go @@ -21,8 +21,8 @@ package store import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" ) func BuildPruneRangeFn[BeaconBlockT BeaconBlock]( diff --git a/mod/da/pkg/store/pruner_test.go b/da/store/pruner_test.go similarity index 90% rename from mod/da/pkg/store/pruner_test.go rename to da/store/pruner_test.go index 506b041780..ff2f60edbb 100644 --- a/mod/da/pkg/store/pruner_test.go +++ b/da/store/pruner_test.go @@ -24,12 +24,12 @@ import ( "context" "testing" - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/da/pkg/store" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/da/store" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/da/pkg/store/store.go b/da/store/store.go similarity index 92% rename from mod/da/pkg/store/store.go rename to da/store/store.go index 0b7f5d7858..4ebf02a4c5 100644 --- a/mod/da/pkg/store/store.go +++ b/da/store/store.go @@ -23,11 +23,11 @@ package store import ( "context" - "github.com/berachain/beacon-kit/mod/da/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/da/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/sourcegraph/conc/iter" ) diff --git a/mod/da/pkg/store/types.go b/da/store/types.go similarity index 90% rename from mod/da/pkg/store/types.go rename to da/store/types.go index b02a5b3de4..f248a98a16 100644 --- a/mod/da/pkg/store/types.go +++ b/da/store/types.go @@ -21,9 +21,9 @@ package store import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconBlock is an interface for beacon blocks. diff --git a/mod/da/pkg/types/errors.go b/da/types/errors.go similarity index 96% rename from mod/da/pkg/types/errors.go rename to da/types/errors.go index 96aa9b6975..5e295d4347 100644 --- a/mod/da/pkg/types/errors.go +++ b/da/types/errors.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrSidecarContainsDifferingBlockRoots is returned when a sidecar contains diff --git a/mod/da/pkg/types/sidecar.go b/da/types/sidecar.go similarity index 93% rename from mod/da/pkg/types/sidecar.go rename to da/types/sidecar.go index 5f673350d1..490a237cbe 100644 --- a/mod/da/pkg/types/sidecar.go +++ b/da/types/sidecar.go @@ -21,11 +21,11 @@ package types import ( - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/merkle" "github.com/karalabe/ssz" ) diff --git a/mod/da/pkg/types/sidecar_test.go b/da/types/sidecar_test.go similarity index 93% rename from mod/da/pkg/types/sidecar_test.go rename to da/types/sidecar_test.go index e1bac893e9..20d0cf64b5 100644 --- a/mod/da/pkg/types/sidecar_test.go +++ b/da/types/sidecar_test.go @@ -24,12 +24,12 @@ import ( "strconv" "testing" - ctypes "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/da/pkg/types" - byteslib "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + ctypes "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/da/types" + byteslib "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/mod/da/pkg/types/sidecars.go b/da/types/sidecars.go similarity index 98% rename from mod/da/pkg/types/sidecars.go rename to da/types/sidecars.go index aa3520f7c5..59ab055ffe 100644 --- a/mod/da/pkg/types/sidecars.go +++ b/da/types/sidecars.go @@ -22,7 +22,7 @@ package types import ( - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" "github.com/karalabe/ssz" "github.com/sourcegraph/conc/iter" ) diff --git a/mod/da/pkg/types/sidecars_test.go b/da/types/sidecars_test.go similarity index 90% rename from mod/da/pkg/types/sidecars_test.go rename to da/types/sidecars_test.go index bfd2b2bc2a..3d0d9b895c 100644 --- a/mod/da/pkg/types/sidecars_test.go +++ b/da/types/sidecars_test.go @@ -24,12 +24,12 @@ import ( "strconv" "testing" - ctypes "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/da/pkg/types" - byteslib "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + ctypes "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/da/types" + byteslib "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/attributes.go b/engine-primitives/engine-primitives/attributes.go similarity index 94% rename from mod/engine-primitives/pkg/engine-primitives/attributes.go rename to engine-primitives/engine-primitives/attributes.go index 47398e66ca..ecca69b1d1 100644 --- a/mod/engine-primitives/pkg/engine-primitives/attributes.go +++ b/engine-primitives/engine-primitives/attributes.go @@ -21,10 +21,10 @@ package engineprimitives import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" ) // PayloadAttributer represents payload attributes of a block. diff --git a/mod/engine-primitives/pkg/engine-primitives/attributes_test.go b/engine-primitives/engine-primitives/attributes_test.go similarity index 93% rename from mod/engine-primitives/pkg/engine-primitives/attributes_test.go rename to engine-primitives/engine-primitives/attributes_test.go index c5bef2b981..d1110b0a49 100644 --- a/mod/engine-primitives/pkg/engine-primitives/attributes_test.go +++ b/engine-primitives/engine-primitives/attributes_test.go @@ -23,9 +23,9 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/blobs_bundle.go b/engine-primitives/engine-primitives/blobs_bundle.go similarity index 100% rename from mod/engine-primitives/pkg/engine-primitives/blobs_bundle.go rename to engine-primitives/engine-primitives/blobs_bundle.go diff --git a/mod/engine-primitives/pkg/engine-primitives/blobs_bundle_test.go b/engine-primitives/engine-primitives/blobs_bundle_test.go similarity index 94% rename from mod/engine-primitives/pkg/engine-primitives/blobs_bundle_test.go rename to engine-primitives/engine-primitives/blobs_bundle_test.go index a6fbedd253..a678de29aa 100644 --- a/mod/engine-primitives/pkg/engine-primitives/blobs_bundle_test.go +++ b/engine-primitives/engine-primitives/blobs_bundle_test.go @@ -23,7 +23,7 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/engine.go b/engine-primitives/engine-primitives/engine.go similarity index 97% rename from mod/engine-primitives/pkg/engine-primitives/engine.go rename to engine-primitives/engine-primitives/engine.go index da6d3ec96d..072e07d30a 100644 --- a/mod/engine-primitives/pkg/engine-primitives/engine.go +++ b/engine-primitives/engine-primitives/engine.go @@ -24,8 +24,8 @@ package engineprimitives import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" ) // ClientVersionV1 contains information which identifies a client diff --git a/mod/engine-primitives/pkg/engine-primitives/engine_test.go b/engine-primitives/engine-primitives/engine_test.go similarity index 92% rename from mod/engine-primitives/pkg/engine-primitives/engine_test.go rename to engine-primitives/engine-primitives/engine_test.go index 0a74b3a18b..8588437888 100644 --- a/mod/engine-primitives/pkg/engine-primitives/engine_test.go +++ b/engine-primitives/engine-primitives/engine_test.go @@ -23,9 +23,9 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/errors.go b/engine-primitives/engine-primitives/errors.go similarity index 97% rename from mod/engine-primitives/pkg/engine-primitives/errors.go rename to engine-primitives/engine-primitives/errors.go index 0840c33513..8b47bb74db 100644 --- a/mod/engine-primitives/pkg/engine-primitives/errors.go +++ b/engine-primitives/engine-primitives/errors.go @@ -20,7 +20,7 @@ package engineprimitives -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrInvalidTimestamp indicates that the provided timestamp is not valid. diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go b/engine-primitives/engine-primitives/mocks/blobs_bundle.mock.go similarity index 97% rename from mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go rename to engine-primitives/engine-primitives/mocks/blobs_bundle.mock.go index a9755a8c7a..9b74afcfbd 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/blobs_bundle.mock.go +++ b/engine-primitives/engine-primitives/mocks/blobs_bundle.mock.go @@ -3,8 +3,8 @@ package mocks import ( - bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - eip4844 "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + bytes "github.com/berachain/beacon-kit/primitives/bytes" + eip4844 "github.com/berachain/beacon-kit/primitives/eip4844" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go b/engine-primitives/engine-primitives/mocks/built_execution_payload_env.mock.go similarity index 98% rename from mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go rename to engine-primitives/engine-primitives/mocks/built_execution_payload_env.mock.go index 2eb2e63c66..9981a1761e 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/built_execution_payload_env.mock.go +++ b/engine-primitives/engine-primitives/mocks/built_execution_payload_env.mock.go @@ -3,7 +3,7 @@ package mocks import ( - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" mock "github.com/stretchr/testify/mock" uint256 "github.com/holiman/uint256" diff --git a/mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go b/engine-primitives/engine-primitives/mocks/payload_attributer.mock.go similarity index 98% rename from mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go rename to engine-primitives/engine-primitives/mocks/payload_attributer.mock.go index ce712b7f28..9fd4141ee8 100644 --- a/mod/engine-primitives/pkg/engine-primitives/mocks/payload_attributer.mock.go +++ b/engine-primitives/engine-primitives/mocks/payload_attributer.mock.go @@ -3,7 +3,7 @@ package mocks import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + common "github.com/berachain/beacon-kit/primitives/common" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/payload_env.go b/engine-primitives/engine-primitives/payload_env.go similarity index 94% rename from mod/engine-primitives/pkg/engine-primitives/payload_env.go rename to engine-primitives/engine-primitives/payload_env.go index 5b6abccf68..83772bc941 100644 --- a/mod/engine-primitives/pkg/engine-primitives/payload_env.go +++ b/engine-primitives/engine-primitives/payload_env.go @@ -21,9 +21,9 @@ package engineprimitives import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" ) // BuiltExecutionPayloadEnv is an interface for the execution payload envelope. diff --git a/mod/engine-primitives/pkg/engine-primitives/payload_env_test.go b/engine-primitives/engine-primitives/payload_env_test.go similarity index 94% rename from mod/engine-primitives/pkg/engine-primitives/payload_env_test.go rename to engine-primitives/engine-primitives/payload_env_test.go index abe7c1c378..bdf709d1e3 100644 --- a/mod/engine-primitives/pkg/engine-primitives/payload_env_test.go +++ b/engine-primitives/engine-primitives/payload_env_test.go @@ -21,7 +21,7 @@ package engineprimitives_test import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/encoding/json" ) type MockExecutionPayloadT struct { diff --git a/mod/engine-primitives/pkg/engine-primitives/requests.go b/engine-primitives/engine-primitives/requests.go similarity index 96% rename from mod/engine-primitives/pkg/engine-primitives/requests.go rename to engine-primitives/engine-primitives/requests.go index 31f964d922..d4e55e120f 100644 --- a/mod/engine-primitives/pkg/engine-primitives/requests.go +++ b/engine-primitives/engine-primitives/requests.go @@ -25,12 +25,12 @@ import ( "math/big" "unsafe" - "github.com/berachain/beacon-kit/mod/errors" - gethprimitives "github.com/berachain/beacon-kit/mod/geth-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + gethprimitives "github.com/berachain/beacon-kit/geth-primitives" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" ) // NewPayloadRequest as per the Ethereum 2.0 specification: diff --git a/mod/engine-primitives/pkg/engine-primitives/requests_test.go b/engine-primitives/engine-primitives/requests_test.go similarity index 93% rename from mod/engine-primitives/pkg/engine-primitives/requests_test.go rename to engine-primitives/engine-primitives/requests_test.go index e328abf8eb..e10921ad1a 100644 --- a/mod/engine-primitives/pkg/engine-primitives/requests_test.go +++ b/engine-primitives/engine-primitives/requests_test.go @@ -23,11 +23,11 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives/mocks" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/engine-primitives/engine-primitives/mocks" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/transactions.go b/engine-primitives/engine-primitives/transactions.go similarity index 95% rename from mod/engine-primitives/pkg/engine-primitives/transactions.go rename to engine-primitives/engine-primitives/transactions.go index 5ac84682a4..f4f4ae6bcb 100644 --- a/mod/engine-primitives/pkg/engine-primitives/transactions.go +++ b/engine-primitives/engine-primitives/transactions.go @@ -21,8 +21,8 @@ package engineprimitives import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" "github.com/karalabe/ssz" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/transactions_test.go b/engine-primitives/engine-primitives/transactions_test.go similarity index 95% rename from mod/engine-primitives/pkg/engine-primitives/transactions_test.go rename to engine-primitives/engine-primitives/transactions_test.go index c59f60dcd6..3cf339fef8 100644 --- a/mod/engine-primitives/pkg/engine-primitives/transactions_test.go +++ b/engine-primitives/engine-primitives/transactions_test.go @@ -23,8 +23,8 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/constants" ) // Tests consistency of our HashTreeRoot implementation with Prysm's. diff --git a/mod/engine-primitives/pkg/engine-primitives/withdrawal.go b/engine-primitives/engine-primitives/withdrawal.go similarity index 97% rename from mod/engine-primitives/pkg/engine-primitives/withdrawal.go rename to engine-primitives/engine-primitives/withdrawal.go index a1c5858c6b..4895834aae 100644 --- a/mod/engine-primitives/pkg/engine-primitives/withdrawal.go +++ b/engine-primitives/engine-primitives/withdrawal.go @@ -23,9 +23,9 @@ package engineprimitives import ( "io" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" fastrlp "github.com/umbracle/fastrlp" diff --git a/mod/engine-primitives/pkg/engine-primitives/withdrawal_ssz_test.go b/engine-primitives/engine-primitives/withdrawal_ssz_test.go similarity index 96% rename from mod/engine-primitives/pkg/engine-primitives/withdrawal_ssz_test.go rename to engine-primitives/engine-primitives/withdrawal_ssz_test.go index e0dec20260..03eafeda6e 100644 --- a/mod/engine-primitives/pkg/engine-primitives/withdrawal_ssz_test.go +++ b/engine-primitives/engine-primitives/withdrawal_ssz_test.go @@ -23,8 +23,8 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/withdrawal_test.go b/engine-primitives/engine-primitives/withdrawal_test.go similarity index 93% rename from mod/engine-primitives/pkg/engine-primitives/withdrawal_test.go rename to engine-primitives/engine-primitives/withdrawal_test.go index ee05b499f9..eb8c7b7c07 100644 --- a/mod/engine-primitives/pkg/engine-primitives/withdrawal_test.go +++ b/engine-primitives/engine-primitives/withdrawal_test.go @@ -23,9 +23,9 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/withdrawals.go b/engine-primitives/engine-primitives/withdrawals.go similarity index 94% rename from mod/engine-primitives/pkg/engine-primitives/withdrawals.go rename to engine-primitives/engine-primitives/withdrawals.go index a1b71e5e96..c83ef657e7 100644 --- a/mod/engine-primitives/pkg/engine-primitives/withdrawals.go +++ b/engine-primitives/engine-primitives/withdrawals.go @@ -23,9 +23,9 @@ package engineprimitives import ( "bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/constraints" "github.com/karalabe/ssz" ) diff --git a/mod/engine-primitives/pkg/engine-primitives/withdrawals_test.go b/engine-primitives/engine-primitives/withdrawals_test.go similarity index 93% rename from mod/engine-primitives/pkg/engine-primitives/withdrawals_test.go rename to engine-primitives/engine-primitives/withdrawals_test.go index 11e7754721..49d3a533d1 100644 --- a/mod/engine-primitives/pkg/engine-primitives/withdrawals_test.go +++ b/engine-primitives/engine-primitives/withdrawals_test.go @@ -23,9 +23,9 @@ package engineprimitives_test import ( "testing" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" karalabessz "github.com/karalabe/ssz" "github.com/stretchr/testify/require" ) diff --git a/mod/engine-primitives/pkg/errors/errors.go b/engine-primitives/errors/errors.go similarity index 98% rename from mod/engine-primitives/pkg/errors/errors.go rename to engine-primitives/errors/errors.go index bb952c7955..89df0c1e9c 100644 --- a/mod/engine-primitives/pkg/errors/errors.go +++ b/engine-primitives/errors/errors.go @@ -21,7 +21,7 @@ package errors import ( - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) var ( diff --git a/mod/errors/mod.go b/errors/mod.go similarity index 100% rename from mod/errors/mod.go rename to errors/mod.go diff --git a/examples/berad/cmd/main.go b/examples/berad/cmd/main.go deleted file mode 100644 index 797ccb592e..0000000000 --- a/examples/berad/cmd/main.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package main diff --git a/examples/berad/pkg/chain-spec/berachain.go b/examples/berad/pkg/chain-spec/berachain.go deleted file mode 100644 index 7488daab34..0000000000 --- a/examples/berad/pkg/chain-spec/berachain.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package chainspec - -import "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - -type BeraChainSpec struct { - // SpecData is the underlying data structure for chain-specific parameters. - chain.Spec[ - [4]byte, - uint64, - [20]byte, - uint64, - any, - ] - // BGTContractAddress is the address of the BGT contract. - BGTContractAddress [20]byte `mapstructure:"bgt-contract-address"` - // MaxCommitteeSize is the maximum size of the committee. - MaxCommitteeSize uint64 `mapstructure:"max-committee-size"` -} diff --git a/examples/berad/pkg/consensus-types/state.go b/examples/berad/pkg/consensus-types/state.go deleted file mode 100644 index a55c3f4de8..0000000000 --- a/examples/berad/pkg/consensus-types/state.go +++ /dev/null @@ -1,292 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package consensustypes - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - fastssz "github.com/ferranbt/fastssz" - "github.com/karalabe/ssz" -) - -// BeaconState represents the entire state of the beacon chain. -type BeaconState[ - BeaconBlockHeaderT constraints. - StaticSSZField[BeaconBlockHeaderT, B], - ExecutionPayloadHeaderT constraints. - DynamicSSZField[ExecutionPayloadHeaderT, P], - ForkT constraints. - StaticSSZField[ForkT, F], - ValidatorT constraints. - StaticSSZField[ValidatorT, V], - B, E, P, F, V any, -] struct { - // Versioning - GenesisValidatorsRoot common.Root - Slot math.Slot - Fork ForkT - - // History - LatestBlockHeader BeaconBlockHeaderT - BlockRoots []common.Root - StateRoots []common.Root - - // Eth1 - Eth1DepositIndex uint64 - LatestExecutionPayloadHeader ExecutionPayloadHeaderT - - // Registry - Validators []ValidatorT - Balances []uint64 - - // Randomness - RandaoMixes []common.Bytes32 - - // Withdrawals - NextWithdrawalIndex uint64 - NextWithdrawalValidatorIndex math.ValidatorIndex -} - -/* -------------------------------------------------------------------------- */ -/* SSZ */ -/* -------------------------------------------------------------------------- */ - -// SizeSSZ returns the ssz encoded size in bytes for the BeaconState object. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) SizeSSZ(siz *ssz.Sizer, fixed bool) uint32 { - var size uint32 = 276 - if fixed { - return size - } - - // Dynamic size fields - size += ssz.SizeSliceOfStaticBytes(siz, st.BlockRoots) - size += ssz.SizeSliceOfStaticBytes(siz, st.StateRoots) - size += ssz.SizeDynamicObject(siz, st.LatestExecutionPayloadHeader) - size += ssz.SizeSliceOfStaticObjects(siz, st.Validators) - size += ssz.SizeSliceOfUint64s(siz, st.Balances) - size += ssz.SizeSliceOfStaticBytes(siz, st.RandaoMixes) - - return size -} - -// DefineSSZ defines the SSZ encoding for the BeaconState object. -// -//nolint:mnd // todo fix. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) DefineSSZ(codec *ssz.Codec) { - // Versioning - ssz.DefineStaticBytes(codec, &st.GenesisValidatorsRoot) - ssz.DefineUint64(codec, &st.Slot) - ssz.DefineStaticObject(codec, &st.Fork) - - // History - ssz.DefineStaticObject(codec, &st.LatestBlockHeader) - ssz.DefineSliceOfStaticBytesOffset(codec, &st.BlockRoots, 8192) - ssz.DefineSliceOfStaticBytesOffset(codec, &st.StateRoots, 8192) - - // Registry - ssz.DefineSliceOfStaticObjectsOffset(codec, &st.Validators, 1099511627776) - ssz.DefineSliceOfUint64sOffset(codec, &st.Balances, 1099511627776) - - // Randomness - ssz.DefineSliceOfStaticBytesOffset(codec, &st.RandaoMixes, 65536) - - // Withdrawals - ssz.DefineUint64(codec, &st.NextWithdrawalIndex) - ssz.DefineUint64(codec, &st.NextWithdrawalValidatorIndex) - - // Dynamic content - ssz.DefineSliceOfStaticBytesContent(codec, &st.BlockRoots, 8192) - ssz.DefineSliceOfStaticBytesContent(codec, &st.StateRoots, 8192) - ssz.DefineDynamicObjectContent(codec, &st.LatestExecutionPayloadHeader) - ssz.DefineSliceOfStaticObjectsContent(codec, &st.Validators, 1099511627776) - ssz.DefineSliceOfUint64sContent(codec, &st.Balances, 1099511627776) - ssz.DefineSliceOfStaticBytesContent(codec, &st.RandaoMixes, 65536) -} - -// MarshalSSZ marshals the BeaconState into SSZ format. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) MarshalSSZ() ([]byte, error) { - buf := make([]byte, ssz.Size(st)) - return buf, ssz.EncodeToBytes(buf, st) -} - -// UnmarshalSSZ unmarshals the BeaconState from SSZ format. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) UnmarshalSSZ(buf []byte) error { - return ssz.DecodeFromBytes(buf, st) -} - -// HashTreeRoot computes the Merkleization of the BeaconState. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) HashTreeRoot() common.Root { - return ssz.HashConcurrent(st) -} - -/* -------------------------------------------------------------------------- */ -/* FastSSZ */ -/* -------------------------------------------------------------------------- */ - -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) MarshalSSZTo( - dst []byte, -) ([]byte, error) { - bz, err := st.MarshalSSZ() - if err != nil { - return nil, err - } - dst = append(dst, bz...) - return dst, nil -} - -// HashTreeRootWith ssz hashes the BeaconState object with a hasher. -// -//nolint:mnd,funlen // todo fix. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) HashTreeRootWith( - hh fastssz.HashWalker, -) error { - indx := hh.Index() - - // Field (0) 'GenesisValidatorsRoot' - hh.PutBytes(st.GenesisValidatorsRoot[:]) - - // Field (1) 'Slot' - hh.PutUint64(uint64(st.Slot)) - - // Field (2) 'Fork' - if st.Fork == nil { - st.Fork = st.Fork.Empty() - } - if err := st.Fork.HashTreeRootWith(hh); err != nil { - return err - } - - // Field (3) 'LatestBlockHeader' - if st.LatestBlockHeader == nil { - st.LatestBlockHeader = st.LatestBlockHeader.Empty() - } - if err := st.LatestBlockHeader.HashTreeRootWith(hh); err != nil { - return err - } - - // Field (4) 'BlockRoots' - if size := len(st.BlockRoots); size > 8192 { - return fastssz.ErrListTooBigFn("BeaconState.BlockRoots", size, 8192) - } - subIndx := hh.Index() - for _, i := range st.BlockRoots { - hh.Append(i[:]) - } - numItems := uint64(len(st.BlockRoots)) - hh.MerkleizeWithMixin(subIndx, numItems, 8192) - - // Field (5) 'StateRoots' - if size := len(st.StateRoots); size > 8192 { - return fastssz.ErrListTooBigFn("BeaconState.StateRoots", size, 8192) - } - subIndx = hh.Index() - for _, i := range st.StateRoots { - hh.Append(i[:]) - } - numItems = uint64(len(st.StateRoots)) - hh.MerkleizeWithMixin(subIndx, numItems, 8192) - - // Field (6) 'Eth1DepositIndex' - hh.PutUint64(st.Eth1DepositIndex) - - // Field (7) 'LatestExecutionPayloadHeader' - if st.LatestExecutionPayloadHeader == nil { - st.LatestExecutionPayloadHeader = st.LatestExecutionPayloadHeader.Empty() - } - if err := st.LatestExecutionPayloadHeader.HashTreeRootWith(hh); err != nil { - return err - } - - // Field (8) 'Validators' - subIndx = hh.Index() - num := uint64(len(st.Validators)) - if num > 1099511627776 { - return fastssz.ErrIncorrectListSize - } - for _, elem := range st.Validators { - if err := elem.HashTreeRootWith(hh); err != nil { - return err - } - } - hh.MerkleizeWithMixin(subIndx, num, 1099511627776) - - // Field (9) 'Balances' - if size := len(st.Balances); size > 1099511627776 { - return fastssz.ErrListTooBigFn( - "BeaconState.Balances", - size, - 1099511627776, - ) - } - subIndx = hh.Index() - for _, i := range st.Balances { - hh.AppendUint64(i) - } - hh.FillUpTo32() - numItems = uint64(len(st.Balances)) - hh.MerkleizeWithMixin( - subIndx, - numItems, - fastssz.CalculateLimit(1099511627776, numItems, 8), - ) - - // Field (10) 'RandaoMixes' - if size := len(st.RandaoMixes); size > 65536 { - return fastssz.ErrListTooBigFn("BeaconState.RandaoMixes", size, 65536) - } - subIndx = hh.Index() - for _, i := range st.RandaoMixes { - hh.Append(i[:]) - } - numItems = uint64(len(st.RandaoMixes)) - hh.MerkleizeWithMixin(subIndx, numItems, 65536) - - // Field (11) 'NextWithdrawalIndex' - hh.PutUint64(st.NextWithdrawalIndex) - - // Field (12) 'NextWithdrawalValidatorIndex' - hh.PutUint64(uint64(st.NextWithdrawalValidatorIndex)) - - hh.Merkleize(indx) - return nil -} - -// GetTree ssz hashes the BeaconState object. -func (st *BeaconState[ - _, _, _, _, _, _, _, _, _, -]) GetTree() (*fastssz.Node, error) { - return fastssz.ProofTree(st) -} diff --git a/examples/berad/pkg/consensus-types/validator.go b/examples/berad/pkg/consensus-types/validator.go deleted file mode 100644 index a1c67f15b5..0000000000 --- a/examples/berad/pkg/consensus-types/validator.go +++ /dev/null @@ -1,235 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package consensustypes - -import ( - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - fastssz "github.com/ferranbt/fastssz" - "github.com/karalabe/ssz" -) - -// Validator is the custom Validator struct used -// in Berachain. -// -//nolint:lll // long withdrawal credentials -type Validator struct { - // Pubkey is the validator's 48-byte BLS public key. - Pubkey crypto.BLSPubkey `json:"pubkey"` - // WithdrawalCredentials are an address that controls the validator. - WithdrawalCredentials types.WithdrawalCredentials `json:"withdrawalCredentials"` - // EffectiveBalance is the validator's current effective balance in gwei. - EffectiveBalance math.Gwei `json:"effectiveBalance"` - // ActivationEpoch is the epoch in which the validator activated. - ActivationEpoch math.Epoch `json:"activationEpoch"` - // ExitEpoch is the epoch in which the validator exited. - ExitEpoch math.Epoch `json:"exitEpoch"` - // WithdrawableEpoch is the epoch in which the validator can withdraw. - WithdrawableEpoch math.Epoch `json:"withdrawableEpoch"` -} - -/* -------------------------------------------------------------------------- */ -/* Constructor */ -/* -------------------------------------------------------------------------- */ - -func NewValidatorFromDeposit( - pubkey crypto.BLSPubkey, - withdrawalCredentials types.WithdrawalCredentials, - effectiveBalance math.Gwei, - activationEpoch math.Epoch, -) *Validator { - return &Validator{ - Pubkey: pubkey, - WithdrawalCredentials: withdrawalCredentials, - EffectiveBalance: effectiveBalance, - ActivationEpoch: activationEpoch, - } -} - -// Empty creates an empty Validator. -func (*Validator) Empty() *Validator { - return &Validator{} -} - -// New creates a new Validator with the given public key, withdrawal -// credentials,. -func (v *Validator) New( - pubkey crypto.BLSPubkey, - withdrawalCredentials types.WithdrawalCredentials, - amount math.Gwei, - effectiveBalanceIncrement math.Gwei, - _ math.Gwei, -) *Validator { - return NewValidatorFromDeposit( - pubkey, - withdrawalCredentials, - amount, - effectiveBalanceIncrement, - ) -} - -/* -------------------------------------------------------------------------- */ -/* SSZ */ -/* -------------------------------------------------------------------------- */ - -// ValidatorSize is the size of the Validator struct in bytes. -const ValidatorSize = 112 - -// SizeSSZ returns the size of the Validator object in SSZ encoding. -func (*Validator) SizeSSZ(*ssz.Sizer) uint32 { - return ValidatorSize -} - -// DefineSSZ defines the SSZ encoding for the Validator object. -func (v *Validator) DefineSSZ(codec *ssz.Codec) { - ssz.DefineStaticBytes(codec, &v.Pubkey) - ssz.DefineStaticBytes(codec, &v.WithdrawalCredentials) - ssz.DefineUint64(codec, &v.EffectiveBalance) - ssz.DefineUint64(codec, &v.ActivationEpoch) - ssz.DefineUint64(codec, &v.ExitEpoch) - ssz.DefineUint64(codec, &v.WithdrawableEpoch) -} - -// HashTreeRoot computes the SSZ hash tree root of the Validator object. -func (v *Validator) HashTreeRoot() common.Root { - return ssz.HashSequential(v) -} - -// MarshalSSZ marshals the Validator object to SSZ format. -func (v *Validator) MarshalSSZ() ([]byte, error) { - buf := make([]byte, ssz.Size(v)) - return buf, ssz.EncodeToBytes(buf, v) -} - -// UnmarshalSSZ unmarshals the Validator object from SSZ format. -func (v *Validator) UnmarshalSSZ(buf []byte) error { - return ssz.DecodeFromBytes(buf, v) -} - -// HashTreeRootWith ssz hashes the Validator object with a hasher. -func (v *Validator) HashTreeRootWith(hh fastssz.HashWalker) error { - indx := hh.Index() - - // Field (0) 'Pubkey' - hh.PutBytes(v.Pubkey[:]) - - // Field (1) 'WithdrawalCredentials' - hh.PutBytes(v.WithdrawalCredentials[:]) - - // Field (2) 'EffectiveBalance' - hh.PutUint64(uint64(v.EffectiveBalance)) - - // Field (3) 'ActivationEpoch' - hh.PutUint64(uint64(v.ActivationEpoch)) - - // Field (4) 'ExitEpoch' - hh.PutUint64(uint64(v.ExitEpoch)) - - // Field (5) 'WithdrawableEpoch' - hh.PutUint64(uint64(v.WithdrawableEpoch)) - - hh.Merkleize(indx) - return nil -} - -// GetTree ssz hashes the Validator object. -func (v *Validator) GetTree() (*fastssz.Node, error) { - return fastssz.ProofTree(v) -} - -/* -------------------------------------------------------------------------- */ -/* Getters and Setters */ -/* -------------------------------------------------------------------------- */ - -// GetPubkey returns the public key of the validator. -func (v *Validator) GetPubkey() crypto.BLSPubkey { - return v.Pubkey -} - -// GetEffectiveBalance returns the effective balance of the validator. -func (v *Validator) GetEffectiveBalance() math.Gwei { - return v.EffectiveBalance -} - -// IsActive as defined in the Ethereum 2.0 Spec -// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#is_active_validator -// -//nolint:lll -func (v Validator) IsActive(epoch math.Epoch) bool { - return v.ActivationEpoch <= epoch && epoch < v.ExitEpoch -} - -// IsFullyWithdrawable as defined in the Ethereum 2.0 specification: -// https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#is_fully_withdrawable_validator -// -//nolint:lll -func (v Validator) IsFullyWithdrawable( - balance math.Gwei, - epoch math.Epoch, -) bool { - return v.HasEth1WithdrawalCredentials() && v.WithdrawableEpoch <= epoch && - balance > 0 -} - -// IsPartiallyWithdrawable as defined in the Ethereum 2.0 specification: -// https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#is_partially_withdrawable_validator -// -//nolint:lll -func (v Validator) IsPartiallyWithdrawable( - balance, maxEffectiveBalance math.Gwei, -) bool { - hasExcessBalance := balance > maxEffectiveBalance - return v.HasEth1WithdrawalCredentials() && - v.HasMaxEffectiveBalance(maxEffectiveBalance) && hasExcessBalance -} - -// HasEth1WithdrawalCredentials as defined in the Ethereum 2.0 specification: -// https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#has_eth1_withdrawal_credential -// -//nolint:lll -func (v Validator) HasEth1WithdrawalCredentials() bool { - return v.WithdrawalCredentials[0] == types.EthSecp256k1CredentialPrefix -} - -// HasMaxEffectiveBalance determines if the validator has the maximum effective -// balance. -func (v Validator) HasMaxEffectiveBalance( - maxEffectiveBalance math.Gwei, -) bool { - return v.EffectiveBalance == maxEffectiveBalance -} - -// SetEffectiveBalance sets the effective balance of the validator. -func (v *Validator) SetEffectiveBalance(balance math.Gwei) { - v.EffectiveBalance = balance -} - -// GetWithdrawableEpoch returns the epoch when the validator can withdraw. -func (v Validator) GetWithdrawableEpoch() math.Epoch { - return v.WithdrawableEpoch -} - -// GetWithdrawalCredentials returns the withdrawal credentials of the validator. -func (v Validator) GetWithdrawalCredentials() types.WithdrawalCredentials { - return v.WithdrawalCredentials -} diff --git a/examples/berad/pkg/state-transition/errors.go b/examples/berad/pkg/state-transition/errors.go deleted file mode 100644 index d26398bfd8..0000000000 --- a/examples/berad/pkg/state-transition/errors.go +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import "github.com/berachain/beacon-kit/mod/errors" - -var ( - // ErrBlockSlotTooLow is returned when the block slot is too low. - ErrBlockSlotTooLow = errors.New("block slot too low") - - // ErrSlotMismatch is returned when the slot in a block header does not - // match the expected value. - ErrSlotMismatch = errors.New("slot mismatch") - - // ErrParentRootMismatch is returned when the parent root in an execution - // payload does not match the expected value. - ErrParentRootMismatch = errors.New("parent root mismatch") - - // ErrParentPayloadHashMismatch is returned when the parent hash of an - // execution payload does not match the expected value. - ErrParentPayloadHashMismatch = errors.New("payload parent hash mismatch") - - // ErrRandaoMixMismatch is returned when the randao mix in an execution - // payload does not match the expected value. - ErrRandaoMixMismatch = errors.New("randao mix mismatch") - - // ErrExceedsBlockDepositLimit is returned when the block exceeds the - // deposit limit. - ErrExceedsBlockDepositLimit = errors.New("block exceeds deposit limit") - - // ErrRewardsLengthMismatch is returned when the length of the rewards - // in a block does not match the expected value. - ErrRewardsLengthMismatch = errors.New("rewards length mismatch") - - // ErrPenaltiesLengthMismatch is returned when the length of the penalties - // in a block does not match the expected value. - ErrPenaltiesLengthMismatch = errors.New("penalties length mismatch") - - // ErrExceedsBlockBlobLimit is returned when the block exceeds the blob - // limit. - ErrExceedsBlockBlobLimit = errors.New("block exceeds blob limit") - - // ErrSlashedProposer is returned when a block is processed in which - // the proposer is slashed. - ErrSlashedProposer = errors.New( - "attempted to process a block with a slashed proposer") - - // ErrStateRootMismatch is returned when the state root in a block header - // does not match the expected value. - ErrStateRootMismatch = errors.New("state root mismatch") - - // ErrExceedMaximumWithdrawals is returned when the number of withdrawals - // in a block exceeds the maximum allowed. - ErrExceedMaximumWithdrawals = errors.New("exceeds maximum withdrawals") - - // ErrNumWithdrawalsMismatch is returned when the number of withdrawals - // in a block does not match the expected value. - ErrNumWithdrawalsMismatch = errors.New("number of withdrawals mismatch") -) diff --git a/examples/berad/pkg/state-transition/interfaces.go b/examples/berad/pkg/state-transition/interfaces.go deleted file mode 100644 index a05be4fae7..0000000000 --- a/examples/berad/pkg/state-transition/interfaces.go +++ /dev/null @@ -1,159 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "context" - - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" -) - -// BeaconState is the interface for the beacon state. It -// is a combination of the read-only and write-only beacon state types. -type BeaconState[ - T any, - BeaconBlockHeaderT BeaconBlockHeader[BeaconBlockHeaderT], - ExecutionPayloadHeaderT, - ForkT, - KVStoreT any, - ValidatorT Validator[ValidatorT, WithdrawalCredentialsT], - ValidatorsT, - WithdrawalT, - WithdrawalsT any, - WithdrawalCredentialsT interface { - ~[32]byte - ToExecutionAddress() (common.ExecutionAddress, error) - }, -] interface { - NewFromDB( - bdb KVStoreT, - cs common.ChainSpec, - ) T - Copy() T - Save() - Context() context.Context - HashTreeRoot() common.Root - ReadOnlyBeaconState[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, - ] - WriteOnlyBeaconState[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, WithdrawalT, WithdrawalsT, - ] -} - -// ReadOnlyBeaconState is the interface for a read-only beacon state. -type ReadOnlyBeaconState[ - BeaconBlockHeaderT BeaconBlockHeader[BeaconBlockHeaderT], - ExecutionPayloadHeaderT, ForkT, - ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT any, -] interface { - ReadOnlyRandaoMixes - ReadOnlyStateRoots - ReadOnlyValidators[ValidatorT] - - GetBlockRootAtIndex(uint64) (common.Root, error) - GetEth1DepositIndex() (uint64, error) - GetFork() (ForkT, error) - GetGenesisValidatorsRoot() (common.Root, error) - GetLatestBlockHeader() (BeaconBlockHeaderT, error) - GetLatestExecutionPayloadHeader() ( - ExecutionPayloadHeaderT, error, - ) - GetSlot() (math.Slot, error) - GetTotalActiveBalances(uint64) (math.Gwei, error) - GetTotalValidators() (uint64, error) - GetValidators() (ValidatorsT, error) - GetValidatorsByEffectiveBalance() ([]ValidatorT, error) - GetWithdrawals() (WithdrawalsT, error) - ValidatorIndexByCometBFTAddress( - cometBFTAddress []byte, - ) (math.ValidatorIndex, error) -} - -// WriteOnlyBeaconState is the interface for a write-only beacon state. -type WriteOnlyBeaconState[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, WithdrawalT, WithdrawalsT any, -] interface { - WriteOnlyRandaoMixes - WriteOnlyStateRoots - WriteOnlyValidators[ValidatorT] - - SetEth1DepositIndex(uint64) error - SetFork(ForkT) error - SetGenesisValidatorsRoot(root common.Root) error - SetLatestBlockHeader(BeaconBlockHeaderT) error - SetLatestExecutionPayloadHeader( - ExecutionPayloadHeaderT, - ) error - SetSlot(math.Slot) error - SetWithdrawals(WithdrawalsT) error - UpdateBlockRootAtIndex(uint64, common.Root) error -} - -// WriteOnlyStateRoots defines a struct which only has write access to state -// roots methods. -type WriteOnlyStateRoots interface { - UpdateStateRootAtIndex(uint64, common.Root) error -} - -// ReadOnlyStateRoots defines a struct which only has read access to state roots -// methods. -type ReadOnlyStateRoots interface { - StateRootAtIndex(uint64) (common.Root, error) -} - -// WriteOnlyRandaoMixes defines a struct which only has write access to randao -// mixes methods. -type WriteOnlyRandaoMixes interface { - UpdateRandaoMixAtIndex(uint64, common.Bytes32) error -} - -// ReadOnlyRandaoMixes defines a struct which only has read access to randao -// mixes methods. -type ReadOnlyRandaoMixes interface { - GetRandaoMixAtIndex(uint64) (common.Bytes32, error) -} - -// WriteOnlyValidators has write access to validator methods. -type WriteOnlyValidators[ValidatorT any] interface { - UpdateValidatorAtIndex( - math.ValidatorIndex, - ValidatorT, - ) error - - AddValidator(ValidatorT) error -} - -// ReadOnlyValidators has read access to validator methods. -type ReadOnlyValidators[ValidatorT any] interface { - ValidatorIndexByPubkey( - crypto.BLSPubkey, - ) (math.ValidatorIndex, error) - - ValidatorByIndex( - math.ValidatorIndex, - ) (ValidatorT, error) -} diff --git a/examples/berad/pkg/state-transition/state_processor.go b/examples/berad/pkg/state-transition/state_processor.go deleted file mode 100644 index 74a8023d59..0000000000 --- a/examples/berad/pkg/state-transition/state_processor.go +++ /dev/null @@ -1,530 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "bytes" - - chainspec "github.com/berachain/beacon-kit/examples/berad/pkg/chain-spec" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" -) - -// StateProcessor is a basic Processor, which takes care of the -// main state transition for the beacon chain. -type StateProcessor[ - BeaconBlockT BeaconBlock[ - DepositT, BeaconBlockBodyT, - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - BeaconBlockBodyT BeaconBlockBody[ - BeaconBlockBodyT, DepositT, - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - BeaconBlockHeaderT BeaconBlockHeader[BeaconBlockHeaderT], - BeaconStateT BeaconState[ - BeaconStateT, - BeaconBlockHeaderT, - ExecutionPayloadHeaderT, ForkT, KVStoreT, - ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, WithdrawalCredentialsT, - ], - ContextT Context, - DepositT Deposit[ForkDataT, WithdrawalCredentialsT], - ExecutionPayloadT ExecutionPayload[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - ExecutionPayloadHeaderT ExecutionPayloadHeader, - ForkT interface { - New(common.Version, common.Version, math.Epoch) ForkT - }, - ForkDataT ForkData[ForkDataT], - KVStoreT any, - ValidatorT Validator[ValidatorT, WithdrawalCredentialsT], - ValidatorsT interface { - ~[]ValidatorT - HashTreeRoot() common.Root - }, - WithdrawalT Withdrawal[WithdrawalT], - WithdrawalsT interface { - ~[]WithdrawalT - Len() int - EncodeIndex(int, *bytes.Buffer) - }, - WithdrawalCredentialsT interface { - ~[32]byte - ToExecutionAddress() (common.ExecutionAddress, error) - }, -] struct { - // cs is the chain specification for the beacon chain. - cs chainspec.BeraChainSpec - // signer is the BLS signer used for cryptographic operations. - signer crypto.BLSSigner - // executionEngine is the engine responsible for executing transactions. - executionEngine ExecutionEngine[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ] -} - -// NewStateProcessor creates a new state processor. -func NewStateProcessor[ - BeaconBlockT BeaconBlock[ - DepositT, BeaconBlockBodyT, - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - BeaconBlockBodyT BeaconBlockBody[ - BeaconBlockBodyT, DepositT, - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - BeaconBlockHeaderT BeaconBlockHeader[BeaconBlockHeaderT], - BeaconStateT BeaconState[ - BeaconStateT, - BeaconBlockHeaderT, ExecutionPayloadHeaderT, ForkT, KVStoreT, - ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, WithdrawalCredentialsT, - ], - ContextT Context, - DepositT Deposit[ForkDataT, WithdrawalCredentialsT], - ExecutionPayloadT ExecutionPayload[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - ExecutionPayloadHeaderT ExecutionPayloadHeader, - ForkT interface { - New(common.Version, common.Version, math.Epoch) ForkT - }, - ForkDataT ForkData[ForkDataT], - KVStoreT any, - ValidatorT Validator[ValidatorT, WithdrawalCredentialsT], - ValidatorsT interface { - ~[]ValidatorT - HashTreeRoot() common.Root - }, - WithdrawalT Withdrawal[WithdrawalT], - WithdrawalsT interface { - ~[]WithdrawalT - Len() int - EncodeIndex(int, *bytes.Buffer) - }, - WithdrawalCredentialsT interface { - ~[32]byte - ToExecutionAddress() (common.ExecutionAddress, error) - }, -]( - cs chainspec.BeraChainSpec, - executionEngine ExecutionEngine[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - signer crypto.BLSSigner, -) *StateProcessor[ - BeaconBlockT, BeaconBlockBodyT, BeaconBlockHeaderT, - BeaconStateT, ContextT, DepositT, ExecutionPayloadT, - ExecutionPayloadHeaderT, ForkT, ForkDataT, KVStoreT, ValidatorT, - ValidatorsT, WithdrawalT, WithdrawalsT, WithdrawalCredentialsT, -] { - return &StateProcessor[ - BeaconBlockT, BeaconBlockBodyT, BeaconBlockHeaderT, - BeaconStateT, ContextT, DepositT, ExecutionPayloadT, - ExecutionPayloadHeaderT, ForkT, ForkDataT, KVStoreT, ValidatorT, - ValidatorsT, WithdrawalT, WithdrawalsT, WithdrawalCredentialsT, - ]{ - cs: cs, - executionEngine: executionEngine, - signer: signer, - } -} - -// Transition is the main function for processing a state transition. -func (sp *StateProcessor[ - BeaconBlockT, _, _, BeaconStateT, ContextT, - _, _, _, _, _, _, _, _, _, _, _, -]) Transition( - ctx ContextT, - st BeaconStateT, - blk BeaconBlockT, -) (transition.ValidatorUpdates, error) { - if blk.IsNil() { - return nil, nil - } - - // Process the slots. - validatorUpdates, err := sp.ProcessSlots(st, blk.GetSlot()) - if err != nil { - return nil, err - } - - // Process the block. - if err = sp.ProcessBlock(ctx, st, blk); err != nil { - return nil, err - } - - // We only want to persist state changes if we successfully - // processed the block. - st.Save() - return validatorUpdates, nil -} - -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) ProcessSlots( - st BeaconStateT, slot math.Slot, -) (transition.ValidatorUpdates, error) { - var ( - validatorUpdates transition.ValidatorUpdates - epochValidatorUpdates transition.ValidatorUpdates - ) - - stateSlot, err := st.GetSlot() - if err != nil { - return nil, err - } - - // Iterate until we are "caught up". - for ; stateSlot < slot; stateSlot++ { - // Process the slot - if err = sp.processSlot(st); err != nil { - return nil, err - } - - // Process the Epoch Boundary. - boundary := (stateSlot.Unwrap() + 1) == 0 - if boundary { - if epochValidatorUpdates, err = - sp.processEpoch(st); err != nil { - return nil, err - } - validatorUpdates = append( - validatorUpdates, - epochValidatorUpdates..., - ) - } - - // We update on the state because we need to - // update the state for calls within processSlot/Epoch(). - if err = st.SetSlot(stateSlot + 1); err != nil { - return nil, err - } - } - - return validatorUpdates, nil -} - -// processSlot is run when a slot is missed. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processSlot( - st BeaconStateT, -) error { - stateSlot, err := st.GetSlot() - if err != nil { - return err - } - - // Before we make any changes, we calculate the previous state root. - prevStateRoot := st.HashTreeRoot() - if err = st.UpdateStateRootAtIndex( - stateSlot.Unwrap()%sp.cs.SlotsPerHistoricalRoot(), prevStateRoot, - ); err != nil { - return err - } - - // We get the latest block header, this will not have - // a state root on it. - latestHeader, err := st.GetLatestBlockHeader() - if err != nil { - return err - } - - // We set the "rawHeader" in the StateProcessor, but cannot fill in - // the StateRoot until the following block. - if (latestHeader.GetStateRoot() == common.Root{}) { - latestHeader.SetStateRoot(prevStateRoot) - if err = st.SetLatestBlockHeader(latestHeader); err != nil { - return err - } - } - - // We update the block root. - return st.UpdateBlockRootAtIndex( - stateSlot.Unwrap()%sp.cs.SlotsPerHistoricalRoot(), - latestHeader.HashTreeRoot(), - ) -} - -// ProcessBlock processes the block, it optionally verifies the -// state root. -func (sp *StateProcessor[ - BeaconBlockT, _, _, BeaconStateT, ContextT, _, _, _, _, _, _, _, _, _, _, _, -]) ProcessBlock( - ctx ContextT, - st BeaconStateT, - blk BeaconBlockT, -) error { - // process the freshly created header. - if err := sp.processBlockHeader(st, blk); err != nil { - return err - } - - // process the execution payload. - if err := sp.processExecutionPayload( - ctx, st, blk, - ); err != nil { - return err - } - - // process the withdrawals. - if err := sp.processWithdrawals( - st, blk.GetBody(), - ); err != nil { - return err - } - - // process the randao reveal. - if err := sp.processRandaoReveal( - st, blk, ctx.GetSkipValidateRandao(), - ); err != nil { - return err - } - - // process the operations of whats on the block body. - if err := sp.processOperations(st, blk); err != nil { - return err - } - - // If we are skipping validate, we can skip calculating the state - // root to save compute. - if ctx.GetSkipValidateResult() { - return nil - } - - // Ensure the calculated state root matches the state root on - // the block. - stateRoot := st.HashTreeRoot() - if blk.GetStateRoot() != stateRoot { - return errors.Wrapf( - ErrStateRootMismatch, "expected %s, got %s", - stateRoot, blk.GetStateRoot(), - ) - } - - return nil -} - -// processEpoch processes the epoch and ensures it matches the local state. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processEpoch( - st BeaconStateT, -) (transition.ValidatorUpdates, error) { - if err := sp.processRewardsAndPenalties(st); err != nil { - return nil, err - } else if err = sp.processSlashingsReset(st); err != nil { - return nil, err - } else if err = sp.processRandaoMixesReset(st); err != nil { - return nil, err - } - valUpdates, err := sp.processSyncCommitteeUpdates(st) - if err != nil { - return nil, err - } - if err = sp.processForcedWithdrawals(st, valUpdates); err != nil { - return nil, err - } - return valUpdates, nil -} - -// processBlockHeader processes the header and ensures it matches the local -// state. -func (sp *StateProcessor[ - BeaconBlockT, _, BeaconBlockHeaderT, BeaconStateT, - _, _, _, _, _, _, _, ValidatorT, _, _, _, _, -]) processBlockHeader( - st BeaconStateT, - blk BeaconBlockT, -) error { - var ( - slot math.Slot - err error - latestBlockHeader BeaconBlockHeaderT - - proposer ValidatorT - ) - - // Ensure the block slot matches the state slot. - if slot, err = st.GetSlot(); err != nil { - return err - } else if blk.GetSlot() != slot { - return errors.Wrapf( - ErrSlotMismatch, - "expected: %d, got: %d", - slot, blk.GetSlot(), - ) - } - - // Verify the parent block root is correct. - if latestBlockHeader, err = st.GetLatestBlockHeader(); err != nil { - return err - } else if blk.GetSlot() <= latestBlockHeader.GetSlot() { - return errors.Wrapf( - ErrBlockSlotTooLow, "expected: > %d, got: %d", - latestBlockHeader.GetSlot(), blk.GetSlot(), - ) - } - - if parentBlockRoot := latestBlockHeader. - HashTreeRoot(); parentBlockRoot != blk.GetParentBlockRoot() { - return errors.Wrapf(ErrParentRootMismatch, - "expected: %s, got: %s", - parentBlockRoot.String(), blk.GetParentBlockRoot().String(), - ) - } - - // Ensure the block is within the acceptable range. - // TODO: move this is in the wrong spot. - deposits := blk.GetBody().GetDeposits() - if uint64(len(deposits)) > sp.cs.MaxDepositsPerBlock() { - return errors.Wrapf(ErrExceedsBlockDepositLimit, - "expected: %d, got: %d", - sp.cs.MaxDepositsPerBlock(), len(deposits), - ) - } - - // Calculate the body root to place on the header. - var lbh BeaconBlockHeaderT - bodyRoot := blk.GetBody().HashTreeRoot() - if err = st.SetLatestBlockHeader( - lbh.New( - blk.GetSlot(), - blk.GetProposerIndex(), - blk.GetParentBlockRoot(), - // state_root is zeroed and overwritten - // in the next `process_slot` call. - common.Root{}, - bodyRoot, - ), - ); err != nil { - return err - } - - // Check to make sure the proposer isn't slashed. - if proposer, err = st.ValidatorByIndex(blk.GetProposerIndex()); err != nil { - return err - } else if proposer.IsSlashed() { - return errors.Wrapf( - ErrSlashedProposer, "index: %d", blk.GetProposerIndex(), - ) - } - return nil -} - -// processOperations processes the operations and ensures they match the -// local state. -func (sp *StateProcessor[ - BeaconBlockT, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processOperations( - st BeaconStateT, - blk BeaconBlockT, -) error { - // TODO: process attestations as well - deposits := blk.GetBody().GetDeposits() - return sp.processDeposits(st, deposits) -} - -// getAttestationDeltas as defined in the Ethereum 2.0 specification. -// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#get_attestation_deltas -// -//nolint:lll -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) getAttestationDeltas( - st BeaconStateT, -) ([]math.Gwei, []math.Gwei, error) { - // TODO: implement this function forreal - validators, err := st.GetValidators() - if err != nil { - return nil, nil, err - } - placeholder := make([]math.Gwei, len(validators)) - return placeholder, placeholder, nil -} - -// processRewardsAndPenalties as defined in the Ethereum 2.0 specification. -// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#process_rewards_and_penalties -// -//nolint:lll -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processRewardsAndPenalties( - st BeaconStateT, -) error { - slot, err := st.GetSlot() - if err != nil { - return err - } - - if sp.cs.SlotToEpoch(slot.Unwrap()) == constants.GenesisEpoch { - return nil - } - - rewards, penalties, err := sp.getAttestationDeltas(st) - if err != nil { - return err - } - - validators, err := st.GetValidators() - if err != nil { - return err - } - - if len(validators) != len(rewards) { - return errors.Wrapf( - ErrRewardsLengthMismatch, "expected: %d, got: %d", - len(validators), len(rewards), - ) - } else if len(validators) != len(penalties) { - return errors.Wrapf( - ErrPenaltiesLengthMismatch, "expected: %d, got: %d", - len(validators), len(penalties), - ) - } - - // TODO: deviating from spec here. - // for i := range validators { - // // Increase the balance of the validator. - // if err = st.IncreaseBalance( - // math.ValidatorIndex(i), - // rewards[i], - // ); err != nil { - // return err - // } - - // // Decrease the balance of the validator. - // if err = st.DecreaseBalance( - // math.ValidatorIndex(i), - // penalties[i], - // ); err != nil { - // return err - // } - // } - - return nil -} diff --git a/examples/berad/pkg/state-transition/state_processor_committee.go b/examples/berad/pkg/state-transition/state_processor_committee.go deleted file mode 100644 index 4de86dbc26..0000000000 --- a/examples/berad/pkg/state-transition/state_processor_committee.go +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" -) - -// processSyncCommitteeUpdates processes the sync committee updates. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processSyncCommitteeUpdates( - st BeaconStateT, -) (transition.ValidatorUpdates, error) { - vals, err := st.GetValidatorsByEffectiveBalance() - if err != nil { - return nil, err - } - - // Initialize the validator updates slice. - validatorUpdates := make(transition.ValidatorUpdates, len(vals)) - - // Process the first sp.cs.MaxCommitteeSize validators. - for i, val := range vals { - //#nosec G701 // If this overflows, your valset is too big anyways. - if i < int(sp.cs.MaxCommitteeSize) { - validatorUpdates[i] = &transition.ValidatorUpdate{ - Pubkey: val.GetPubkey(), - EffectiveBalance: val.GetEffectiveBalance(), - } - } else { - // For extra validators, set the effective balance to 0. - validatorUpdates[i] = &transition.ValidatorUpdate{ - Pubkey: val.GetPubkey(), - EffectiveBalance: 0, - } - } - } - - return validatorUpdates, nil -} diff --git a/examples/berad/pkg/state-transition/state_processor_genesis.go b/examples/berad/pkg/state-transition/state_processor_genesis.go deleted file mode 100644 index e99eac25ca..0000000000 --- a/examples/berad/pkg/state-transition/state_processor_genesis.go +++ /dev/null @@ -1,125 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" -) - -// InitializePreminedBeaconStateFromEth1 initializes the beacon state. -// - -func (sp *StateProcessor[ - _, BeaconBlockBodyT, BeaconBlockHeaderT, BeaconStateT, _, DepositT, - _, ExecutionPayloadHeaderT, ForkT, _, _, _, _, _, _, _, -]) InitializePreminedBeaconStateFromEth1( - st BeaconStateT, - deposits []DepositT, - executionPayloadHeader ExecutionPayloadHeaderT, - genesisVersion common.Version, -) (transition.ValidatorUpdates, error) { - var ( - blkHeader BeaconBlockHeaderT - blkBody BeaconBlockBodyT - fork ForkT - ) - fork = fork.New( - genesisVersion, - genesisVersion, - math.U64(constants.GenesisEpoch), - ) - - if err := st.SetSlot(0); err != nil { - return nil, err - } - - if err := st.SetFork(fork); err != nil { - return nil, err - } - - if err := st.SetEth1DepositIndex(0); err != nil { - return nil, err - } - - // TODO: we need to handle common.Version vs - // uint32 better. - bodyRoot := blkBody.Empty( - version.ToUint32(genesisVersion)).HashTreeRoot() - if err := st.SetLatestBlockHeader(blkHeader.New( - 0, 0, common.Root{}, common.Root{}, bodyRoot, - )); err != nil { - return nil, err - } - - for i := range sp.cs.EpochsPerHistoricalVector() { - if err := st.UpdateRandaoMixAtIndex( - i, - common.Bytes32(executionPayloadHeader.GetBlockHash()), - ); err != nil { - return nil, err - } - } - - for _, deposit := range deposits { - if err := sp.processDeposit(st, deposit); err != nil { - return nil, err - } - } - - // TODO: process activations. - validators, err := st.GetValidators() - if err != nil { - return nil, err - } - - if err = st.SetGenesisValidatorsRoot(validators.HashTreeRoot()); err != nil { - return nil, err - } - - if err = st.SetLatestExecutionPayloadHeader( - executionPayloadHeader, - ); err != nil { - return nil, err - } - - // Setup a bunch of 0s to prime the DB. - for i := range sp.cs.HistoricalRootsLimit() { - //#nosec:G701 // won't overflow in practice. - if err = st.UpdateBlockRootAtIndex(i, common.Root{}); err != nil { - return nil, err - } - if err = st.UpdateStateRootAtIndex(i, common.Root{}); err != nil { - return nil, err - } - } - - var updates transition.ValidatorUpdates - updates, err = sp.processSyncCommitteeUpdates(st) - if err != nil { - return nil, err - } - st.Save() - return updates, nil -} diff --git a/examples/berad/pkg/state-transition/state_processor_payload.go b/examples/berad/pkg/state-transition/state_processor_payload.go deleted file mode 100644 index 090e1e8145..0000000000 --- a/examples/berad/pkg/state-transition/state_processor_payload.go +++ /dev/null @@ -1,179 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "context" - - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/errors" - "golang.org/x/sync/errgroup" -) - -// processExecutionPayload processes the execution payload and ensures it -// matches the local state. -func (sp *StateProcessor[ - BeaconBlockT, _, _, BeaconStateT, ContextT, - _, _, ExecutionPayloadHeaderT, _, _, _, _, _, _, _, _, -]) processExecutionPayload( - ctx ContextT, - st BeaconStateT, - blk BeaconBlockT, -) error { - var ( - body = blk.GetBody() - payload = body.GetExecutionPayload() - header ExecutionPayloadHeaderT - g, gCtx = errgroup.WithContext(context.Background()) - ) - - // Skip payload verification if the context is configured as such. - if !ctx.GetSkipPayloadVerification() { - g.Go(func() error { - return sp.validateExecutionPayload( - gCtx, st, blk, ctx.GetOptimisticEngine(), - ) - }) - } - - // Get the execution payload header. TODO: This is live on bArtio with a bug - // and needs to be hardforked off of. We check for version and convert to - // header based on that version as a temporary solution to avoid breaking - // changes. - g.Go(func() error { - var err error - header, err = payload.ToHeader() - return err - }) - - if err := g.Wait(); err != nil { - return err - } - - // Set the latest execution payload header. - return st.SetLatestExecutionPayloadHeader(header) -} - -// validateExecutionPayload validates the execution payload against both local -// state -// and the execution engine. -func (sp *StateProcessor[ - BeaconBlockT, _, _, BeaconStateT, - _, _, _, _, _, _, _, _, _, _, _, _, -]) validateExecutionPayload( - ctx context.Context, - st BeaconStateT, - blk BeaconBlockT, - optimisticEngine bool, -) error { - body := blk.GetBody() - payload := body.GetExecutionPayload() - - lph, err := st.GetLatestExecutionPayloadHeader() - if err != nil { - return err - } - - // We want to check to ensure the chain is canonical with respect to the - // parent hash before we let the execution client know about the - // payload, - // this is to prevent Polygon style re-orgs from being triggered by a - // malicious actor who tries to force clients to accept a non-canonical - // block that passes block validity checks. - if safeHash := lph.GetBlockHash(); safeHash != payload.GetParentHash() { - return errors.Wrapf( - ErrParentPayloadHashMismatch, - "parent block with hash %x is not finalized, expected finalized hash %x", - payload.GetParentHash(), - safeHash, - ) - } - - parentBeaconBlockRoot := blk.GetParentBlockRoot() - if err = sp.executionEngine.VerifyAndNotifyNewPayload( - ctx, engineprimitives.BuildNewPayloadRequest( - payload, - body.GetBlobKzgCommitments().ToVersionedHashes(), - &parentBeaconBlockRoot, - optimisticEngine, - ), - ); err != nil { - return err - } - - // Get the current epoch. - slot, err := st.GetSlot() - if err != nil { - return err - } - - // When we are verifying a payload we expect that it was produced by - // the proposer for the slot that it is for. - expectedMix, err := st.GetRandaoMixAtIndex( - sp.cs.SlotToEpoch(slot.Unwrap()) % sp.cs.EpochsPerHistoricalVector()) - if err != nil { - return err - } - - // Ensure the prev randao matches the local state. - if payload.GetPrevRandao() != expectedMix { - return errors.Wrapf( - ErrRandaoMixMismatch, - "prev randao does not match, expected: %x, got: %x", - expectedMix, payload.GetPrevRandao(), - ) - } - - // TODO: Verify timestamp data once Clock is done. - // if expectedTime, err := spec.TimeAtSlot(slot, genesisTime); err != - // nil { return errors.Newf("slot or genesis time in state is corrupt, - // cannot - // compute time: %v", err) - // } else if payload.Timestamp != expectedTime { - // return errors.Newf("state at slot %d, genesis time %d, expected - // execution - // payload time %d, but got %d", - // slot, genesisTime, expectedTime, payload.Timestamp) - // } - - // Verify the number of blobs. - blobKzgCommitments := body.GetBlobKzgCommitments() - if uint64(len(blobKzgCommitments)) > sp.cs.MaxBlobsPerBlock() { - return errors.Wrapf( - ErrExceedsBlockBlobLimit, - "expected: %d, got: %d", - sp.cs.MaxBlobsPerBlock(), len(blobKzgCommitments), - ) - } - - // Verify the number of withdrawals. - // TODO: This is in the wrong spot I think. - if withdrawals := payload.GetWithdrawals(); uint64( - len(payload.GetWithdrawals()), - ) > sp.cs.MaxWithdrawalsPerPayload() { - return errors.Wrapf( - ErrExceedMaximumWithdrawals, - "too many withdrawals, expected: %d, got: %d", - sp.cs.MaxWithdrawalsPerPayload(), len(withdrawals), - ) - } - return nil -} diff --git a/examples/berad/pkg/state-transition/state_processor_randao.go b/examples/berad/pkg/state-transition/state_processor_randao.go deleted file mode 100644 index 724cc6f7ca..0000000000 --- a/examples/berad/pkg/state-transition/state_processor_randao.go +++ /dev/null @@ -1,139 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" - "github.com/go-faster/xor" -) - -// processRandaoReveal processes the randao reveal and -// ensures it matches the local state. -func (sp *StateProcessor[ - BeaconBlockT, _, _, BeaconStateT, - _, _, _, _, _, ForkDataT, _, _, _, _, _, _, -]) processRandaoReveal( - st BeaconStateT, - blk BeaconBlockT, - skipVerification bool, -) error { - slot, err := st.GetSlot() - if err != nil { - return err - } - - // Ensure the proposer index is valid. - proposer, err := st.ValidatorByIndex(blk.GetProposerIndex()) - if err != nil { - return err - } - - genesisValidatorsRoot, err := st.GetGenesisValidatorsRoot() - if err != nil { - return err - } - - epoch := sp.cs.SlotToEpoch(slot.Unwrap()) - body := blk.GetBody() - - var fd ForkDataT - fd = fd.New( - version.FromUint32[common.Version]( - sp.cs.ActiveForkVersionForEpoch(epoch), - ), genesisValidatorsRoot, - ) - - if !skipVerification { - signingRoot := fd.ComputeRandaoSigningRoot( - sp.cs.DomainTypeRandao(), math.U64(epoch), - ) - reveal := body.GetRandaoReveal() - if err = sp.signer.VerifySignature( - proposer.GetPubkey(), - signingRoot[:], - reveal, - ); err != nil { - return err - } - } - - prevMix, err := st.GetRandaoMixAtIndex( - epoch % sp.cs.EpochsPerHistoricalVector(), - ) - if err != nil { - return err - } - - return st.UpdateRandaoMixAtIndex( - epoch%sp.cs.EpochsPerHistoricalVector(), - sp.buildRandaoMix(prevMix, body.GetRandaoReveal()), - ) -} - -// processRandaoMixesReset as defined in the Ethereum 2.0 specification. -// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#randao-mixes-updates -// -//nolint:lll -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processRandaoMixesReset( - st BeaconStateT, -) error { - slot, err := st.GetSlot() - if err != nil { - return err - } - - epoch := sp.cs.SlotToEpoch(slot.Unwrap()) - mix, err := st.GetRandaoMixAtIndex( - epoch % sp.cs.EpochsPerHistoricalVector(), - ) - if err != nil { - return err - } - return st.UpdateRandaoMixAtIndex( - (epoch+1)%sp.cs.EpochsPerHistoricalVector(), - mix, - ) -} - -// buildRandaoMix as defined in the Ethereum 2.0 specification. -func (sp *StateProcessor[ - _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, -]) buildRandaoMix( - mix common.Bytes32, - reveal crypto.BLSSignature, -) common.Bytes32 { - newMix := make([]byte, constants.RootLength) - revealHash := sha256.Hash(reveal[:]) - // Apparently this library giga fast? Good project? lmeow. - // It is safe to ignore this error, since it is guaranteed that - // mix[:] and revealHash[:] are both Bytes32. - _ = xor.Bytes( - newMix, mix[:], revealHash[:], - ) - return common.Bytes32(newMix) -} diff --git a/examples/berad/pkg/state-transition/state_processor_slashing.go b/examples/berad/pkg/state-transition/state_processor_slashing.go deleted file mode 100644 index 445007cb69..0000000000 --- a/examples/berad/pkg/state-transition/state_processor_slashing.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -// processSlashingsReset as defined in the Ethereum 2.0 specification. -// https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md#slashings-balances-updates -// -//nolint:lll -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processSlashingsReset( - _ BeaconStateT, -) error { - return nil -} diff --git a/examples/berad/pkg/state-transition/state_processor_staking.go b/examples/berad/pkg/state-transition/state_processor_staking.go deleted file mode 100644 index 2555fce941..0000000000 --- a/examples/berad/pkg/state-transition/state_processor_staking.go +++ /dev/null @@ -1,196 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" -) - -// processDeposits processes the deposits and ensures they match the -// local state. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, DepositT, _, _, _, _, _, _, _, _, _, _, -]) processDeposits( - st BeaconStateT, - deposits []DepositT, -) error { - // Ensure the deposits match the local state. - for _, dep := range deposits { - if err := sp.processDeposit(st, dep); err != nil { - return err - } - } - return nil -} - -// processDeposit processes the deposit and ensures it matches the local state. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, DepositT, _, _, _, _, _, _, _, _, _, _, -]) processDeposit( - st BeaconStateT, - dep DepositT, -) error { - depositIndex, err := st.GetEth1DepositIndex() - if err != nil { - return err - } - - if err = st.SetEth1DepositIndex( - depositIndex + 1, - ); err != nil { - return err - } - - return sp.applyDeposit(st, dep) -} - -// applyDeposit processes the deposit and ensures it matches the local state. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, DepositT, _, _, _, _, _, ValidatorT, _, _, _, _, -]) applyDeposit( - st BeaconStateT, - dep DepositT, -) error { - idx, err := st.ValidatorIndexByPubkey(dep.GetPubkey()) - // If the validator already exists, we update the balance. - if err == nil { - var val ValidatorT - val, err = st.ValidatorByIndex(idx) - if err != nil { - return err - } - - // TODO: Modify balance here and then effective balance once per epoch. - val.SetEffectiveBalance(min(val.GetEffectiveBalance()+dep.GetAmount(), - math.Gwei(sp.cs.MaxEffectiveBalance()))) - return st.UpdateValidatorAtIndex(idx, val) - } - - // If the validator does not exist, we add the validator. - // Add the validator to the registry. - return sp.createValidator(st, dep) -} - -// createValidator creates a validator if the deposit is valid. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, DepositT, _, _, _, ForkDataT, _, _, _, _, _, _, -]) createValidator( - st BeaconStateT, - dep DepositT, -) error { - var ( - genesisValidatorsRoot common.Root - epoch uint64 - err error - ) - - // Get the current slot. - slot, err := st.GetSlot() - if err != nil { - return err - } - - // At genesis, the validators sign over an empty root. - if slot == 0 { - genesisValidatorsRoot = common.Root{} - } else { - // Get the genesis validators root to be used to find fork data later. - genesisValidatorsRoot, err = st.GetGenesisValidatorsRoot() - if err != nil { - return err - } - } - - // Get the current epoch. - epoch = sp.cs.SlotToEpoch(slot.Unwrap()) - - // Verify that the message was signed correctly. - var d ForkDataT - if err = dep.VerifySignature( - d.New( - version.FromUint32[common.Version]( - sp.cs.ActiveForkVersionForEpoch(epoch), - ), genesisValidatorsRoot, - ), - sp.cs.DomainTypeDeposit(), - sp.signer.VerifySignature, - ); err != nil { - return err - } - - // Add the validator to the registry. - return sp.addValidatorToRegistry(st, dep) -} - -// addValidatorToRegistry adds a validator to the registry. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, DepositT, _, _, _, _, _, ValidatorT, _, _, _, _, -]) addValidatorToRegistry( - st BeaconStateT, - dep DepositT, -) error { - var val ValidatorT - val = val.New( - dep.GetPubkey(), - dep.GetWithdrawalCredentials(), - dep.GetAmount(), - math.Gwei(sp.cs.EffectiveBalanceIncrement()), - math.Gwei(sp.cs.MaxEffectiveBalance()), - ) - - return st.AddValidator(val) -} - -// processWithdrawals as per the Ethereum 2.0 specification. -// https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#new-process_withdrawals -// -//nolint:lll -func (sp *StateProcessor[ - _, BeaconBlockBodyT, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processWithdrawals( - _ BeaconStateT, - _ BeaconBlockBodyT, -) error { - // TODO: implement - return nil -} - -// processForcedWithdrawals is a helper function to process forced withdrawals. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, _, _, _, _, _, _, _, _, _, -]) processForcedWithdrawals( - _ BeaconStateT, - _ transition.ValidatorUpdates, -) error { - // TODO: Implement this function. - return nil -} - -// ExpectedWithdrawals retrieves the expected withdrawals. -func (sp *StateProcessor[ - _, _, _, BeaconStateT, _, _, _, - _, _, _, _, _, _, _, WithdrawalsT, _, -]) ExpectedWithdrawals(st BeaconStateT) (WithdrawalsT, error) { - return st.GetWithdrawals() -} diff --git a/examples/berad/pkg/state-transition/types.go b/examples/berad/pkg/state-transition/types.go deleted file mode 100644 index 4aaafad94c..0000000000 --- a/examples/berad/pkg/state-transition/types.go +++ /dev/null @@ -1,263 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package transition - -import ( - stdbytes "bytes" - "context" - - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" -) - -// BeaconBlock represents a generic interface for a beacon block. -type BeaconBlock[ - DepositT any, - BeaconBlockBodyT BeaconBlockBody[ - BeaconBlockBodyT, DepositT, - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - ExecutionPayloadT ExecutionPayload[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT, - ], - ExecutionPayloadHeaderT ExecutionPayloadHeader, - WithdrawalsT any, -] interface { - IsNil() bool - // GetProposerIndex returns the index of the proposer. - GetProposerIndex() math.ValidatorIndex - // GetSlot returns the slot number of the block. - GetSlot() math.Slot - // GetBody returns the body of the block. - GetBody() BeaconBlockBodyT - // GetParentBlockRoot returns the root of the parent block. - GetParentBlockRoot() common.Root - // GetStateRoot returns the state root of the block. - GetStateRoot() common.Root -} - -// BeaconBlockBody represents a generic interface for the body of a beacon -// block. -type BeaconBlockBody[ - BeaconBlockBodyT any, - DepositT any, - ExecutionPayloadT ExecutionPayload[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalT, - ], - ExecutionPayloadHeaderT ExecutionPayloadHeader, - WithdrawalT any, -] interface { - constraints.EmptyWithVersion[BeaconBlockBodyT] - // GetRandaoReveal returns the RANDAO reveal signature. - GetRandaoReveal() crypto.BLSSignature - // GetExecutionPayload returns the execution payload. - GetExecutionPayload() ExecutionPayloadT - // GetDeposits returns the list of deposits. - GetDeposits() []DepositT - // HashTreeRoot returns the hash tree root of the block body. - HashTreeRoot() common.Root - // GetBlobKzgCommitments returns the KZG commitments for the blobs. - GetBlobKzgCommitments() eip4844.KZGCommitments[common.ExecutionHash] -} - -// BeaconBlockHeader is the interface for a beacon block header. -type BeaconBlockHeader[BeaconBlockHeaderT any] interface { - New( - slot math.Slot, - proposerIndex math.ValidatorIndex, - parentBlockRoot common.Root, - stateRoot common.Root, - bodyRoot common.Root, - ) BeaconBlockHeaderT - HashTreeRoot() common.Root - GetSlot() math.Slot - GetProposerIndex() math.ValidatorIndex - GetParentBlockRoot() common.Root - GetStateRoot() common.Root - GetBodyRoot() common.Root - SetStateRoot(common.Root) -} - -// Context defines an interface for managing state transition context. -type Context interface { - context.Context - // GetOptimisticEngine returns whether to optimistically assume the - // execution client has the correct state when certain errors are returned - // by the execution engine. - GetOptimisticEngine() bool - // GetSkipPayloadVerification returns whether to skip verifying the payload - // if - // it already exists on the execution client. - GetSkipPayloadVerification() bool - // GetSkipValidateRandao returns whether to skip validating the RANDAO - // reveal. - GetSkipValidateRandao() bool - // GetSkipValidateResult returns whether to validate the result of the state - // transition. - GetSkipValidateResult() bool -} - -// Deposit is the interface for a deposit. -type Deposit[ - ForkDataT any, - WithdrawlCredentialsT ~[32]byte, -] interface { - // GetAmount returns the amount of the deposit. - GetAmount() math.Gwei - // GetPubkey returns the public key of the validator. - GetPubkey() crypto.BLSPubkey - // GetWithdrawalCredentials returns the withdrawal credentials. - GetWithdrawalCredentials() WithdrawlCredentialsT - // VerifySignature verifies the deposit and creates a validator. - VerifySignature( - forkData ForkDataT, - domainType common.DomainType, - signatureVerificationFn func( - pubkey crypto.BLSPubkey, - message []byte, signature crypto.BLSSignature, - ) error, - ) error -} - -type ExecutionPayload[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT any, -] interface { - constraints.EngineType[ExecutionPayloadT] - GetTransactions() engineprimitives.Transactions - GetParentHash() common.ExecutionHash - GetBlockHash() common.ExecutionHash - GetPrevRandao() common.Bytes32 - GetWithdrawals() WithdrawalsT - GetFeeRecipient() common.ExecutionAddress - GetStateRoot() common.Bytes32 - GetReceiptsRoot() common.Bytes32 - GetLogsBloom() bytes.B256 - GetNumber() math.U64 - GetGasLimit() math.U64 - GetTimestamp() math.U64 - GetGasUsed() math.U64 - GetExtraData() []byte - GetBaseFeePerGas() *math.U256 - GetBlobGasUsed() math.U64 - GetExcessBlobGas() math.U64 - ToHeader() (ExecutionPayloadHeaderT, error) -} - -type ExecutionPayloadHeader interface { - GetBlockHash() common.ExecutionHash -} - -// ExecutionEngine is the interface for the execution engine. -type ExecutionEngine[ - ExecutionPayloadT ExecutionPayload[ - ExecutionPayloadT, ExecutionPayloadHeaderT, WithdrawalsT], - ExecutionPayloadHeaderT any, - WithdrawalsT interface { - Len() int - EncodeIndex(int, *stdbytes.Buffer) - }, -] interface { - // VerifyAndNotifyNewPayload verifies the new payload and notifies the - // execution client. - VerifyAndNotifyNewPayload( - ctx context.Context, - req *engineprimitives.NewPayloadRequest[ExecutionPayloadT, WithdrawalsT], - ) error -} - -// ForkData is the interface for the fork data. -type ForkData[ForkDataT any] interface { - // New creates a new fork data object. - New(common.Version, common.Root) ForkDataT - // ComputeRandaoSigningRoot returns the signing root for the fork data. - ComputeRandaoSigningRoot( - domainType common.DomainType, - epoch math.Epoch, - ) common.Root -} - -// Validator represents an interface for a validator with generic type -// ValidatorT. -type Validator[ - ValidatorT any, - WithdrawalCredentialsT interface { - ~[32]byte - ToExecutionAddress() (common.ExecutionAddress, error) - }, -] interface { - constraints.SSZMarshallableRootable - // New creates a new validator with the given parameters. - New( - pubkey crypto.BLSPubkey, - withdrawalCredentials WithdrawalCredentialsT, - amount math.Gwei, - effectiveBalanceIncrement math.Gwei, - maxEffectiveBalance math.Gwei, - ) ValidatorT - // IsSlashed returns true if the validator is slashed. - IsSlashed() bool - // GetPubkey returns the public key of the validator. - GetPubkey() crypto.BLSPubkey - // GetEffectiveBalance returns the effective balance of the validator in - // Gwei. - GetEffectiveBalance() math.Gwei - // SetEffectiveBalance sets the effective balance of the validator in Gwei. - SetEffectiveBalance(math.Gwei) - // GetWithdrawableEpoch returns the epoch when the validator can withdraw. - GetWithdrawableEpoch() math.Epoch - // GetWithdrawalCredentials returns the withdrawal credentials. - GetWithdrawalCredentials() WithdrawalCredentialsT - // IsFullyWithdrawable returns true if the validator can withdraw the - // balance. - IsFullyWithdrawable(balance math.Gwei, epoch math.Epoch) bool - // IsPartiallyWithdrawable returns true if the validator can withdraw the - // balance partially. - IsPartiallyWithdrawable(balance math.Gwei, epoch math.Epoch) bool -} - -type Validators interface { - HashTreeRoot() common.Root -} - -// Withdrawal is the interface for a withdrawal. -type Withdrawal[WithdrawalT any] interface { - New( - index math.U64, - validatorIndex math.ValidatorIndex, - address common.ExecutionAddress, - amount math.Gwei, - ) WithdrawalT - // Equals returns true if the withdrawal is equal to the other. - Equals(WithdrawalT) bool - // GetAmount returns the amount of the withdrawal. - GetAmount() math.Gwei - // GetIndex returns the public key of the validator. - GetIndex() math.U64 - // GetValidatorIndex returns the index of the validator. - GetValidatorIndex() math.ValidatorIndex - // GetAddress returns the address of the withdrawal. - GetAddress() common.ExecutionAddress -} diff --git a/examples/berad/pkg/storage/history.go b/examples/berad/pkg/storage/history.go deleted file mode 100644 index b85dcf6ad1..0000000000 --- a/examples/berad/pkg/storage/history.go +++ /dev/null @@ -1,127 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -import "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - -// UpdateBlockRootAtIndex sets a block root in the BeaconStore. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) UpdateBlockRootAtIndex( - index uint64, - root common.Root, -) error { - return kv.blockRoots.Set(kv.ctx, index, root[:]) -} - -// GetBlockRootAtIndex retrieves the block root from the BeaconStore. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetBlockRootAtIndex( - index uint64, -) (common.Root, error) { - bz, err := kv.blockRoots.Get(kv.ctx, index) - if err != nil { - return common.Root{}, err - } - return common.Root(bz), nil -} - -// SetLatestBlockHeader sets the latest block header in the BeaconStore. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetLatestBlockHeader( - header BeaconBlockHeaderT, -) error { - return kv.latestBlockHeader.Set(kv.ctx, header) -} - -// GetLatestBlockHeader retrieves the latest block header from the BeaconStore. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetLatestBlockHeader() ( - BeaconBlockHeaderT, error, -) { - return kv.latestBlockHeader.Get(kv.ctx) -} - -// UpdateStateRootAtIndex updates the state root at the given slot. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) UpdateStateRootAtIndex( - idx uint64, - stateRoot common.Root, -) error { - return kv.stateRoots.Set(kv.ctx, idx, stateRoot[:]) -} - -// StateRootAtIndex returns the state root at the given slot. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) StateRootAtIndex( - idx uint64, -) (common.Root, error) { - bz, err := kv.stateRoots.Get(kv.ctx, idx) - if err != nil { - return common.Root{}, err - } - return common.Root(bz), nil -} - -// GetLatestExecutionPayloadHeader retrieves the latest execution payload -// header from the BeaconStore. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetLatestExecutionPayloadHeader() ( - ExecutionPayloadHeaderT, error, -) { - forkVersion, err := kv.latestExecutionPayloadVersion.Get(kv.ctx) - if err != nil { - var t ExecutionPayloadHeaderT - return t, err - } - kv.latestExecutionPayloadCodec.SetActiveForkVersion(forkVersion) - return kv.latestExecutionPayloadHeader.Get(kv.ctx) -} - -// SetLatestExecutionPayloadHeader sets the latest execution payload header in -// the BeaconStore. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetLatestExecutionPayloadHeader( - payloadHeader ExecutionPayloadHeaderT, -) error { - if err := kv.latestExecutionPayloadVersion.Set( - kv.ctx, payloadHeader.Version(), - ); err != nil { - return err - } - kv.latestExecutionPayloadCodec.SetActiveForkVersion(payloadHeader.Version()) - return kv.latestExecutionPayloadHeader.Set(kv.ctx, payloadHeader) -} diff --git a/examples/berad/pkg/storage/index/validator.go b/examples/berad/pkg/storage/index/validator.go deleted file mode 100644 index 7b845b63e1..0000000000 --- a/examples/berad/pkg/storage/index/validator.go +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package index - -import ( - sdkcollections "cosmossdk.io/collections" - "cosmossdk.io/collections/indexes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - cmtcrypto "github.com/cometbft/cometbft/crypto" -) - -// Collection prefixes. -const ( - validatorByIndexPrefix = "val_idx_to_pk" - validatorPubkeyToIndexPrefix = "val_pk_to_idx" - validatorConsAddrToIndexPrefix = "val_cons_addr_to_idx" - validatorEffectiveBalanceToIndexPrefix = "val_eff_bal_to_idx" -) - -// Validator is an interface that combines the ssz.Marshaler and -// ssz.Unmarshaler interfaces. -type Validator interface { - constraints.SSZMarshallable - // GetPubkey returns the public key of the validator. - GetPubkey() crypto.BLSPubkey - // GetEffectiveBalance returns the effective balance of the validator. - GetEffectiveBalance() math.Gwei -} - -// ValidatorsIndex is a struct that holds a unique index for validators based -// on their public key. -type ValidatorsIndex[ValidatorT Validator] struct { - // Pubkey is a unique index mapping a validator's public key to their - // numeric ID and vice versa. - Pubkey *indexes.Unique[[]byte, uint64, ValidatorT] - // EffectiveBalance is a multi-index mapping a validator's effective balance - // to their numeric ID. - EffectiveBalance *indexes.Multi[uint64, uint64, ValidatorT] - // CometBFTAddress is a unique index mapping a validator's Comet BFT address - // to their numeric ID. - CometBFTAddress *indexes.Unique[[]byte, uint64, ValidatorT] -} - -// IndexesList returns a list of all indexes associated with the -// validatorsIndex. -func (a ValidatorsIndex[ValidatorT]) IndexesList() []sdkcollections.Index[ - uint64, ValidatorT, -] { - return []sdkcollections.Index[uint64, ValidatorT]{ - a.Pubkey, - a.EffectiveBalance, - a.CometBFTAddress, - } -} - -// NewValidatorsIndex creates a new validatorsIndex with a unique index for -// validator public keys. -func NewValidatorsIndex[ValidatorT Validator]( - sb *sdkcollections.SchemaBuilder, -) ValidatorsIndex[ValidatorT] { - return ValidatorsIndex[ValidatorT]{ - Pubkey: indexes.NewUnique( - sb, - sdkcollections.NewPrefix(validatorPubkeyToIndexPrefix), - validatorPubkeyToIndexPrefix, - sdkcollections.BytesKey, - sdkcollections.Uint64Key, - func(_ uint64, validator ValidatorT) ([]byte, error) { - pk := validator.GetPubkey() - return pk[:], nil - }, - ), - EffectiveBalance: indexes.NewMulti( - sb, - sdkcollections.NewPrefix(validatorEffectiveBalanceToIndexPrefix), - validatorEffectiveBalanceToIndexPrefix, - sdkcollections.Uint64Key, - sdkcollections.Uint64Key, - func(_ uint64, validator ValidatorT) (uint64, error) { - return validator.GetEffectiveBalance().Unwrap(), nil - }, - ), - CometBFTAddress: indexes.NewUnique( - sb, - sdkcollections.NewPrefix(validatorConsAddrToIndexPrefix), - validatorConsAddrToIndexPrefix, - sdkcollections.BytesKey, - sdkcollections.Uint64Key, - func(_ uint64, validator ValidatorT) ([]byte, error) { - pk := validator.GetPubkey() - return cmtcrypto.AddressHash(pk[:]).Bytes(), nil - }, - ), - } -} diff --git a/examples/berad/pkg/storage/keys/keys.go b/examples/berad/pkg/storage/keys/keys.go deleted file mode 100644 index 3bd1deec78..0000000000 --- a/examples/berad/pkg/storage/keys/keys.go +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package keys - -const ( - RandaoMixPrefix byte = iota - ValidatorIndexPrefix - BlockRootsPrefix - StateRootsPrefix - ValidatorByIndexPrefix - LatestBeaconBlockHeaderPrefix - SlotPrefix - Eth1DepositIndexPrefix - LatestExecutionPayloadHeaderPrefix - LatestExecutionPayloadVersionPrefix - GenesisValidatorsRootPrefix - WithdrawalsPrefix - // NextWithdrawalIndexPrefix - // NextWithdrawalValidatorIndexPrefix. - ForkPrefix -) - -//nolint:lll -const ( - RandaoMixPrefixHumanReadable = "RandaoMixPrefix" - ValidatorIndexPrefixHumanReadable = "ValidatorIndexPrefix" - BlockRootsPrefixHumanReadable = "BlockRootsPrefix" - StateRootsPrefixHumanReadable = "StateRootsPrefix" - ValidatorByIndexPrefixHumanReadable = "ValidatorByIndexPrefix" - LatestBeaconBlockHeaderPrefixHumanReadable = "LatestBeaconBlockHeaderPrefix" - SlotPrefixHumanReadable = "SlotPrefix" - Eth1DepositIndexPrefixHumanReadable = "Eth1DepositIndexPrefix" - LatestExecutionPayloadHeaderPrefixHumanReadable = "LatestExecutionPayloadHeaderPrefix" - LatestExecutionPayloadVersionPrefixHumanReadable = "LatestExecutionPayloadVersionPrefix" - GenesisValidatorsRootPrefixHumanReadable = "GenesisValidatorsRootPrefix" - WithdrawalsPrefixHumanReadable = "WithdrawalsPrefix" - ForkPrefixHumanReadable = "ForkPrefix" -) diff --git a/examples/berad/pkg/storage/kvstore.go b/examples/berad/pkg/storage/kvstore.go deleted file mode 100644 index 8aafa03caf..0000000000 --- a/examples/berad/pkg/storage/kvstore.go +++ /dev/null @@ -1,269 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -import ( - "context" - - sdkcollections "cosmossdk.io/collections" - "cosmossdk.io/core/store" - "github.com/berachain/beacon-kit/examples/berad/pkg/storage/keys" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb/index" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// KVStore is a wrapper around an sdk.Context -// that provides access to all beacon related data. -type KVStore[ - BeaconBlockHeaderT interface { - constraints.Empty[BeaconBlockHeaderT] - constraints.SSZMarshallable - }, - ExecutionPayloadHeaderT interface { - constraints.SSZMarshallable - NewFromSSZ([]byte, uint32) (ExecutionPayloadHeaderT, error) - Version() uint32 - }, - ForkT interface { - constraints.Empty[ForkT] - constraints.SSZMarshallable - }, - ValidatorT Validator[ValidatorT], - ValidatorsT ~[]ValidatorT, - WithdrawalT any, - WithdrawalsT ~[]WithdrawalT, -] struct { - ctx context.Context - // Versioning - // genesisValidatorsRoot is the root of the genesis validators. - genesisValidatorsRoot sdkcollections.Item[[]byte] - // slot is the current slot. - slot sdkcollections.Item[uint64] - // fork is the current fork - fork sdkcollections.Item[ForkT] - // History - // latestBlockHeader stores the latest beacon block header. - latestBlockHeader sdkcollections.Item[BeaconBlockHeaderT] - // blockRoots stores the block roots for the current epoch. - blockRoots sdkcollections.Map[uint64, []byte] - // stateRoots stores the state roots for the current epoch. - stateRoots sdkcollections.Map[uint64, []byte] - // eth1DepositIndex is the index of the latest eth1 deposit. - eth1DepositIndex sdkcollections.Item[uint64] - // latestExecutionPayloadVersion stores the latest execution payload - // version. - latestExecutionPayloadVersion sdkcollections.Item[uint32] - // latestExecutionPayloadCodec is the codec for the latest execution - // payload, it allows us to update the codec with the latest version. - latestExecutionPayloadCodec *encoding. - SSZInterfaceCodec[ExecutionPayloadHeaderT] - // latestExecutionPayloadHeader stores the latest execution payload header. - latestExecutionPayloadHeader sdkcollections.Item[ExecutionPayloadHeaderT] - // Registry - // validatorIndex provides the next available index for a new validator. - validatorIndex sdkcollections.Sequence - // validators stores the list of validators. - validators *sdkcollections.IndexedMap[ - uint64, ValidatorT, index.ValidatorsIndex[ValidatorT], - ] - // Randomness - // randaoMix stores the randao mix for the current epoch. - randaoMix sdkcollections.Map[uint64, []byte] - // Staking - // withdrawals stores a list of initiated withdrawals. - withdrawals sdkcollections.Item[WithdrawalsT] -} - -// New creates a new instance of Store. -// -//nolint:funlen // its not overly complex. -func New[ - BeaconBlockHeaderT interface { - constraints.Empty[BeaconBlockHeaderT] - constraints.SSZMarshallable - }, - Eth1DataT interface { - constraints.Empty[Eth1DataT] - constraints.SSZMarshallable - }, - ExecutionPayloadHeaderT interface { - constraints.SSZMarshallable - NewFromSSZ([]byte, uint32) (ExecutionPayloadHeaderT, error) - Version() uint32 - }, - ForkT interface { - constraints.Empty[ForkT] - constraints.SSZMarshallable - }, - ValidatorT Validator[ValidatorT], - ValidatorsT ~[]ValidatorT, - WithdrawalT interface { - constraints.Empty[WithdrawalT] - constraints.SSZMarshallable - }, - WithdrawalsT interface { - ~[]WithdrawalT - constraints.Empty[WithdrawalsT] - constraints.SSZMarshallable - }, -]( - kss store.KVStoreService, - payloadCodec *encoding.SSZInterfaceCodec[ExecutionPayloadHeaderT], -) *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -] { - schemaBuilder := sdkcollections.NewSchemaBuilder(kss) - return &KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, - ]{ - ctx: nil, - genesisValidatorsRoot: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.GenesisValidatorsRootPrefix}), - keys.GenesisValidatorsRootPrefixHumanReadable, - sdkcollections.BytesValue, - ), - slot: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.SlotPrefix}), - keys.SlotPrefixHumanReadable, - sdkcollections.Uint64Value, - ), - fork: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.ForkPrefix}), - keys.ForkPrefixHumanReadable, - encoding.SSZValueCodec[ForkT]{}, - ), - blockRoots: sdkcollections.NewMap( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.BlockRootsPrefix}), - keys.BlockRootsPrefixHumanReadable, - sdkcollections.Uint64Key, - sdkcollections.BytesValue, - ), - stateRoots: sdkcollections.NewMap( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.StateRootsPrefix}), - keys.StateRootsPrefixHumanReadable, - sdkcollections.Uint64Key, - sdkcollections.BytesValue, - ), - eth1DepositIndex: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.Eth1DepositIndexPrefix}), - keys.Eth1DepositIndexPrefixHumanReadable, - sdkcollections.Uint64Value, - ), - latestExecutionPayloadVersion: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix( - []byte{keys.LatestExecutionPayloadVersionPrefix}, - ), - keys.LatestExecutionPayloadVersionPrefixHumanReadable, - sdkcollections.Uint32Value, - ), - latestExecutionPayloadCodec: payloadCodec, - latestExecutionPayloadHeader: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix( - []byte{keys.LatestExecutionPayloadHeaderPrefix}, - ), - keys.LatestExecutionPayloadHeaderPrefixHumanReadable, - payloadCodec, - ), - validatorIndex: sdkcollections.NewSequence( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.ValidatorIndexPrefix}), - keys.ValidatorIndexPrefixHumanReadable, - ), - validators: sdkcollections.NewIndexedMap( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.ValidatorByIndexPrefix}), - keys.ValidatorByIndexPrefixHumanReadable, - sdkcollections.Uint64Key, - encoding.SSZValueCodec[ValidatorT]{}, - index.NewValidatorsIndex[ValidatorT](schemaBuilder), - ), - randaoMix: sdkcollections.NewMap( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.RandaoMixPrefix}), - keys.RandaoMixPrefixHumanReadable, - sdkcollections.Uint64Key, - sdkcollections.BytesValue, - ), - latestBlockHeader: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix( - []byte{keys.LatestBeaconBlockHeaderPrefix}, - ), - keys.LatestBeaconBlockHeaderPrefixHumanReadable, - encoding.SSZValueCodec[BeaconBlockHeaderT]{}, - ), - withdrawals: sdkcollections.NewItem( - schemaBuilder, - sdkcollections.NewPrefix([]byte{keys.WithdrawalsPrefix}), - keys.WithdrawalsPrefixHumanReadable, - encoding.SSZValueCodec[WithdrawalsT]{}, - ), - } -} - -// Copy returns a copy of the Store. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) Copy() *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -] { - // TODO: Decouple the KVStore type from the Cosmos-SDK. - cctx, _ := sdk.UnwrapSDKContext(kv.ctx).CacheContext() - ss := kv.WithContext(cctx) - return ss -} - -// Context returns the context of the Store. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) Context() context.Context { - return kv.ctx -} - -// WithContext returns a copy of the Store with the given context. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) WithContext( - ctx context.Context, -) *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -] { - cpy := *kv - cpy.ctx = ctx - return &cpy -} diff --git a/examples/berad/pkg/storage/randao.go b/examples/berad/pkg/storage/randao.go deleted file mode 100644 index 43e5a443ea..0000000000 --- a/examples/berad/pkg/storage/randao.go +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -import "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - -// UpdateRandaoMixAtIndex sets the current RANDAO mix in the store. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) UpdateRandaoMixAtIndex( - index uint64, - mix common.Bytes32, -) error { - return kv.randaoMix.Set(kv.ctx, index, mix[:]) -} - -// GetRandaoMixAtIndex retrieves the current RANDAO mix from the store. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetRandaoMixAtIndex( - index uint64, -) (common.Bytes32, error) { - bz, err := kv.randaoMix.Get(kv.ctx, index) - if err != nil { - return common.Bytes32{}, err - } - return common.Bytes32(bz), nil -} diff --git a/examples/berad/pkg/storage/registry.go b/examples/berad/pkg/storage/registry.go deleted file mode 100644 index ed2db2451f..0000000000 --- a/examples/berad/pkg/storage/registry.go +++ /dev/null @@ -1,218 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -import ( - "cosmossdk.io/collections/indexes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" -) - -// AddValidator registers a new validator in the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) AddValidator(val ValidatorT) error { - // Get the next validator index from the sequence. - idx, err := kv.validatorIndex.Next(kv.ctx) - if err != nil { - return err - } - - // Push onto the validators list. - return kv.validators.Set(kv.ctx, idx, val) -} - -// UpdateValidatorAtIndex updates a validator at a specific index. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) UpdateValidatorAtIndex( - index math.ValidatorIndex, - val ValidatorT, -) error { - return kv.validators.Set(kv.ctx, index.Unwrap(), val) -} - -// ValidatorIndexByPubkey returns the validator address by index. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) ValidatorIndexByPubkey( - pubkey crypto.BLSPubkey, -) (math.ValidatorIndex, error) { - idx, err := kv.validators.Indexes.Pubkey.MatchExact( - kv.ctx, - pubkey[:], - ) - if err != nil { - return 0, err - } - return math.ValidatorIndex(idx), nil -} - -// ValidatorIndexByCometBFTAddress returns the validator address by index. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) ValidatorIndexByCometBFTAddress( - cometBFTAddress []byte, -) (math.ValidatorIndex, error) { - idx, err := kv.validators.Indexes.CometBFTAddress.MatchExact( - kv.ctx, - cometBFTAddress, - ) - if err != nil { - return 0, err - } - return math.ValidatorIndex(idx), nil -} - -// ValidatorByIndex returns the validator address by index. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) ValidatorByIndex( - index math.ValidatorIndex, -) (ValidatorT, error) { - val, err := kv.validators.Get(kv.ctx, index.Unwrap()) - if err != nil { - var t ValidatorT - return t, err - } - return val, err -} - -// GetValidators retrieves all validators from the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetValidators() ( - ValidatorsT, error, -) { - registrySize, err := kv.validatorIndex.Peek(kv.ctx) - if err != nil { - return nil, err - } - - var ( - vals = make([]ValidatorT, registrySize) - val ValidatorT - ) - - iter, err := kv.validators.Iterate(kv.ctx, nil) - if err != nil { - return nil, err - } - - i := 0 - for iter.Valid() { - val, err = iter.Value() - if err != nil { - return nil, err - } - vals[i] = val - iter.Next() - i++ - } - - return vals, nil -} - -// GetTotalValidators returns the total number of validators. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetTotalValidators() (uint64, error) { - validators, err := kv.GetValidators() - if err != nil { - return 0, err - } - return uint64(len(validators)), nil -} - -// GetValidatorsByEffectiveBalance retrieves all validators sorted by -// effective balance from the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetValidatorsByEffectiveBalance() ( - []ValidatorT, error, -) { - var ( - vals []ValidatorT - v ValidatorT - idx uint64 - ) - - iter, err := kv.validators.Indexes.EffectiveBalance.Iterate( - kv.ctx, - nil, - ) - if err != nil { - return nil, err - } - - // Iterate over all validators and collect them. - for ; iter.Valid(); iter.Next() { - idx, err = iter.PrimaryKey() - if err != nil { - return nil, err - } - if v, err = kv.validators.Get(kv.ctx, idx); err != nil { - return nil, err - } - vals = append(vals, v) - } - return vals, nil -} - -// GetTotalActiveBalances returns the total active balances of all validatorkv. -// TODO: unhood this and probably store this as just a value changed on writekv. -// TODO: this shouldn't live in KVStore -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetTotalActiveBalances( - slotsPerEpoch uint64, -) (math.Gwei, error) { - iter, err := kv.validators.Indexes.EffectiveBalance.Iterate(kv.ctx, nil) - if err != nil { - return 0, err - } - - slot, err := kv.slot.Get(kv.ctx) - if err != nil { - return 0, err - } - - totalActiveBalances := math.Gwei(0) - epoch := math.Epoch(slot / slotsPerEpoch) - return totalActiveBalances, indexes.ScanValues( - kv.ctx, kv.validators, iter, func(v ValidatorT, - ) bool { - if v.IsActive(epoch) { - totalActiveBalances += v.GetEffectiveBalance() - } - return false - }, - ) -} diff --git a/examples/berad/pkg/storage/staking.go b/examples/berad/pkg/storage/staking.go deleted file mode 100644 index 56f9b01284..0000000000 --- a/examples/berad/pkg/storage/staking.go +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -// GetEth1DepositIndex retrieves the eth1 deposit index from the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetEth1DepositIndex() (uint64, error) { - return kv.eth1DepositIndex.Get(kv.ctx) -} - -// SetEth1DepositIndex sets the eth1 deposit index in the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetEth1DepositIndex( - index uint64, -) error { - return kv.eth1DepositIndex.Set(kv.ctx, index) -} - -// GetWithdrawals retrieves the pending withdrawals from the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetWithdrawals() (WithdrawalsT, error) { - return kv.withdrawals.Get(kv.ctx) -} - -// SetWithdrawals overwrites the pending withdrawals from the beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetWithdrawals(withdrawals WithdrawalsT) error { - return kv.withdrawals.Set(kv.ctx, withdrawals) -} diff --git a/examples/berad/pkg/storage/types.go b/examples/berad/pkg/storage/types.go deleted file mode 100644 index cc401104de..0000000000 --- a/examples/berad/pkg/storage/types.go +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" -) - -// Validator represents an interface for a validator in the beacon chain. -type Validator[SelfT any] interface { - constraints.Empty[SelfT] - constraints.SSZMarshallable - // GetPubkey returns the BLS public key of the validator. - GetPubkey() crypto.BLSPubkey - // GetEffectiveBalance returns the effective balance of the validator in - // Gwei. - GetEffectiveBalance() math.Gwei - // IsActive checks if the validator is active at the given epoch. - IsActive(epoch math.Epoch) bool -} diff --git a/examples/berad/pkg/storage/versioning.go b/examples/berad/pkg/storage/versioning.go deleted file mode 100644 index 5d13b06522..0000000000 --- a/examples/berad/pkg/storage/versioning.go +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2024, Berachain Foundation. All rights reserved. -// Use of this software is governed by the Business Source License included -// in the LICENSE file of this repository and at www.mariadb.com/bsl11. -// -// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY -// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER -// VERSIONS OF THE LICENSED WORK. -// -// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF -// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF -// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). -// -// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -// TITLE. - -package beacondb - -import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" -) - -// SetGenesisValidatorsRoot sets the genesis validators root in the beacon -// state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetGenesisValidatorsRoot( - root common.Root, -) error { - return kv.genesisValidatorsRoot.Set(kv.ctx, root[:]) -} - -// GetGenesisValidatorsRoot retrieves the genesis validators root from the -// beacon state. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetGenesisValidatorsRoot() (common.Root, error) { - bz, err := kv.genesisValidatorsRoot.Get(kv.ctx) - if err != nil { - return common.Root{}, err - } - return common.Root(bz), nil -} - -// GetSlot returns the current slot. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetSlot() (math.Slot, error) { - slot, err := kv.slot.Get(kv.ctx) - return math.Slot(slot), err -} - -// SetSlot sets the current slot. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetSlot( - slot math.Slot, -) error { - return kv.slot.Set(kv.ctx, slot.Unwrap()) -} - -// SetFork sets the fork version for the given epoch. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) SetFork( - fork ForkT, -) error { - return kv.fork.Set(kv.ctx, fork) -} - -// GetFork gets the fork version for the given epoch. -func (kv *KVStore[ - BeaconBlockHeaderT, ExecutionPayloadHeaderT, - ForkT, ValidatorT, ValidatorsT, WithdrawalT, WithdrawalsT, -]) GetFork() (ForkT, error) { - return kv.fork.Get(kv.ctx) -} diff --git a/mod/execution/README.md b/execution/README.md similarity index 83% rename from mod/execution/README.md rename to execution/README.md index 4c35de7482..82e5aeaa4c 100644 --- a/mod/execution/README.md +++ b/execution/README.md @@ -3,4 +3,4 @@ The execution module is responsible for housing the `engineclient` which allows the consensus client to connect to the execution client. It also contains `engine` which implements the `ExecutionEngine` as -defined in the Ethereum 2.0 Specification. \ No newline at end of file +defined in the Ethereum 2.0 Specification. diff --git a/mod/execution/pkg/client/client.go b/execution/client/client.go similarity index 92% rename from mod/execution/pkg/client/client.go rename to execution/client/client.go index 8a54dd8ba3..e514d47ea8 100644 --- a/mod/execution/pkg/client/client.go +++ b/execution/client/client.go @@ -27,13 +27,13 @@ import ( "sync" "time" - "github.com/berachain/beacon-kit/mod/errors" - ethclient "github.com/berachain/beacon-kit/mod/execution/pkg/client/ethclient" - ethclientrpc "github.com/berachain/beacon-kit/mod/execution/pkg/client/ethclient/rpc" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/errors" + ethclient "github.com/berachain/beacon-kit/execution/client/ethclient" + ethclientrpc "github.com/berachain/beacon-kit/execution/client/ethclient/rpc" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/net/jwt" ) // EngineClient is a struct that holds a pointer to an Eth1Client. diff --git a/mod/execution/pkg/client/config.go b/execution/client/config.go similarity index 97% rename from mod/execution/pkg/client/config.go rename to execution/client/config.go index e50a03c12a..b49a16ca94 100644 --- a/mod/execution/pkg/client/config.go +++ b/execution/client/config.go @@ -23,7 +23,7 @@ package client import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/url" + "github.com/berachain/beacon-kit/primitives/net/url" ) const ( diff --git a/mod/execution/pkg/client/engine.go b/execution/client/engine.go similarity index 94% rename from mod/execution/pkg/client/engine.go rename to execution/client/engine.go index 2bcc0f8f53..3ad470b4f6 100644 --- a/mod/execution/pkg/client/engine.go +++ b/execution/client/engine.go @@ -24,11 +24,11 @@ import ( "context" "time" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - engineerrors "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/errors" - "github.com/berachain/beacon-kit/mod/errors" - ethclient "github.com/berachain/beacon-kit/mod/execution/pkg/client/ethclient" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + engineerrors "github.com/berachain/beacon-kit/engine-primitives/errors" + "github.com/berachain/beacon-kit/errors" + ethclient "github.com/berachain/beacon-kit/execution/client/ethclient" + "github.com/berachain/beacon-kit/primitives/common" ) /* -------------------------------------------------------------------------- */ diff --git a/mod/execution/pkg/client/errors.go b/execution/client/errors.go similarity index 93% rename from mod/execution/pkg/client/errors.go rename to execution/client/errors.go index c5a3af8abe..e94aa2969d 100644 --- a/mod/execution/pkg/client/errors.go +++ b/execution/client/errors.go @@ -21,10 +21,10 @@ package client import ( - engineerrors "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/errors" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/http" - jsonrpc "github.com/berachain/beacon-kit/mod/primitives/pkg/net/json-rpc" + engineerrors "github.com/berachain/beacon-kit/engine-primitives/errors" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/net/http" + jsonrpc "github.com/berachain/beacon-kit/primitives/net/json-rpc" ) // ErrUnauthenticatedConnection indicates that the connection is not @@ -32,8 +32,8 @@ import ( // //nolint:lll const ( - UnauthenticatedConnectionErrorStr = `could not verify execution chain ID as your - connection is not authenticated. If connecting to your execution client via HTTP, you + UnauthenticatedConnectionErrorStr = `could not verify execution chain ID as your + connection is not authenticated. If connecting to your execution client via HTTP, you will need to set up JWT authentication...` AuthErrMsg = "HTTP authentication to your execution client " + diff --git a/mod/execution/pkg/client/ethclient/constants.go b/execution/client/ethclient/constants.go similarity index 100% rename from mod/execution/pkg/client/ethclient/constants.go rename to execution/client/ethclient/constants.go diff --git a/mod/execution/pkg/client/ethclient/engine.go b/execution/client/ethclient/engine.go similarity index 95% rename from mod/execution/pkg/client/ethclient/engine.go rename to execution/client/ethclient/engine.go index 01b5e171f3..d42ad2849a 100644 --- a/mod/execution/pkg/client/ethclient/engine.go +++ b/execution/client/ethclient/engine.go @@ -23,10 +23,10 @@ package ethclient import ( "context" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/version" "github.com/ethereum/go-ethereum/beacon/engine" ) diff --git a/mod/execution/pkg/client/ethclient/errors.go b/execution/client/ethclient/errors.go similarity index 96% rename from mod/execution/pkg/client/ethclient/errors.go rename to execution/client/ethclient/errors.go index f5ed4bc9cc..19de175fdf 100644 --- a/mod/execution/pkg/client/ethclient/errors.go +++ b/execution/client/ethclient/errors.go @@ -20,7 +20,7 @@ package ethclient -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrNilResponse is an error that is returned when the response is nil. diff --git a/mod/execution/pkg/client/ethclient/eth.go b/execution/client/ethclient/eth.go similarity index 94% rename from mod/execution/pkg/client/ethclient/eth.go rename to execution/client/ethclient/eth.go index df92afe3a0..e5f5f83b07 100644 --- a/mod/execution/pkg/client/ethclient/eth.go +++ b/execution/client/ethclient/eth.go @@ -25,9 +25,9 @@ import ( "fmt" "math/big" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/geth-primitives/pkg/rpc" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/geth-primitives/rpc" + "github.com/berachain/beacon-kit/primitives/math" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" diff --git a/mod/execution/pkg/client/ethclient/ethclient.go b/execution/client/ethclient/ethclient.go similarity index 91% rename from mod/execution/pkg/client/ethclient/ethclient.go rename to execution/client/ethclient/ethclient.go index 3579a4c007..1c5ea871c0 100644 --- a/mod/execution/pkg/client/ethclient/ethclient.go +++ b/execution/client/ethclient/ethclient.go @@ -21,8 +21,8 @@ package ethclient import ( - "github.com/berachain/beacon-kit/mod/execution/pkg/client/ethclient/rpc" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/execution/client/ethclient/rpc" + "github.com/berachain/beacon-kit/primitives/constraints" ) // Client - Ethereum rpc client. diff --git a/mod/execution/pkg/client/ethclient/rpc/client.go b/execution/client/ethclient/rpc/client.go similarity index 96% rename from mod/execution/pkg/client/ethclient/rpc/client.go rename to execution/client/ethclient/rpc/client.go index 7517e64f31..cba06f5b7f 100644 --- a/mod/execution/pkg/client/ethclient/rpc/client.go +++ b/execution/client/ethclient/rpc/client.go @@ -28,8 +28,8 @@ import ( "sync" "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/net/jwt" ) // Client is an Ethereum RPC client that provides a diff --git a/mod/execution/pkg/client/ethclient/rpc/errors.go b/execution/client/ethclient/rpc/errors.go similarity index 100% rename from mod/execution/pkg/client/ethclient/rpc/errors.go rename to execution/client/ethclient/rpc/errors.go diff --git a/mod/execution/pkg/client/ethclient/rpc/header.go b/execution/client/ethclient/rpc/header.go similarity index 100% rename from mod/execution/pkg/client/ethclient/rpc/header.go rename to execution/client/ethclient/rpc/header.go diff --git a/mod/execution/pkg/client/ethclient/rpc/options.go b/execution/client/ethclient/rpc/options.go similarity index 95% rename from mod/execution/pkg/client/ethclient/rpc/options.go rename to execution/client/ethclient/rpc/options.go index af855fa958..e75d66f789 100644 --- a/mod/execution/pkg/client/ethclient/rpc/options.go +++ b/execution/client/ethclient/rpc/options.go @@ -23,7 +23,7 @@ package rpc import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/primitives/net/jwt" ) // WithJWTSecret sets the JWT secret for the RPC client. diff --git a/mod/execution/pkg/client/ethclient/rpc/types.go b/execution/client/ethclient/rpc/types.go similarity index 96% rename from mod/execution/pkg/client/ethclient/rpc/types.go rename to execution/client/ethclient/rpc/types.go index 26f9084215..a3fff0b6a3 100644 --- a/mod/execution/pkg/client/ethclient/rpc/types.go +++ b/execution/client/ethclient/rpc/types.go @@ -23,7 +23,7 @@ package rpc import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/encoding/json" ) // Request represents an Ethereum JSON-RPC request. diff --git a/mod/execution/pkg/client/helpers.go b/execution/client/helpers.go similarity index 90% rename from mod/execution/pkg/client/helpers.go rename to execution/client/helpers.go index 5834e741fe..7210084fd7 100644 --- a/mod/execution/pkg/client/helpers.go +++ b/execution/client/helpers.go @@ -24,9 +24,9 @@ import ( "context" "time" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - engineerrors "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + engineerrors "github.com/berachain/beacon-kit/engine-primitives/errors" + "github.com/berachain/beacon-kit/primitives/common" ) // createContextWithTimeout creates a context with a timeout and returns it diff --git a/mod/execution/pkg/client/metrics.go b/execution/client/metrics.go similarity index 99% rename from mod/execution/pkg/client/metrics.go rename to execution/client/metrics.go index 0a0f77a4a8..bf7e61c379 100644 --- a/mod/execution/pkg/client/metrics.go +++ b/execution/client/metrics.go @@ -23,7 +23,7 @@ package client import ( "time" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" ) // clientMetrics is a struct that contains metrics for the engine. diff --git a/mod/execution/pkg/client/types.go b/execution/client/types.go similarity index 96% rename from mod/execution/pkg/client/types.go rename to execution/client/types.go index abd8a82f5d..d9d2ffb9ca 100644 --- a/mod/execution/pkg/client/types.go +++ b/execution/client/types.go @@ -23,7 +23,7 @@ package client import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" ) type PayloadAttributes interface { diff --git a/mod/execution/pkg/deposit/contract.go b/execution/deposit/contract.go similarity index 89% rename from mod/execution/pkg/deposit/contract.go rename to execution/deposit/contract.go index 11f56f5dbe..fca8570569 100644 --- a/mod/execution/pkg/deposit/contract.go +++ b/execution/deposit/contract.go @@ -25,12 +25,12 @@ import ( "errors" "fmt" - gethprimitives "github.com/berachain/beacon-kit/mod/geth-primitives" - "github.com/berachain/beacon-kit/mod/geth-primitives/pkg/bind" - "github.com/berachain/beacon-kit/mod/geth-primitives/pkg/deposit" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + gethprimitives "github.com/berachain/beacon-kit/geth-primitives" + "github.com/berachain/beacon-kit/geth-primitives/bind" + "github.com/berachain/beacon-kit/geth-primitives/deposit" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // WrappedBeaconDepositContract is a struct that holds a pointer to an ABI. diff --git a/mod/execution/pkg/deposit/metrics.go b/execution/deposit/metrics.go similarity index 96% rename from mod/execution/pkg/deposit/metrics.go rename to execution/deposit/metrics.go index 7af10e3763..e096a9342f 100644 --- a/mod/execution/pkg/deposit/metrics.go +++ b/execution/deposit/metrics.go @@ -23,7 +23,7 @@ package deposit import ( "strconv" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // metrics is a struct that contains metrics for the deposit service. diff --git a/mod/execution/pkg/deposit/pruner.go b/execution/deposit/pruner.go similarity index 90% rename from mod/execution/pkg/deposit/pruner.go rename to execution/deposit/pruner.go index c0bc068864..e4f7206d3a 100644 --- a/mod/execution/pkg/deposit/pruner.go +++ b/execution/deposit/pruner.go @@ -21,9 +21,9 @@ package deposit import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) func BuildPruneRangeFn[ diff --git a/mod/execution/pkg/deposit/service.go b/execution/deposit/service.go similarity index 95% rename from mod/execution/pkg/deposit/service.go rename to execution/deposit/service.go index 59b15d0b79..4ca0aaf455 100644 --- a/mod/execution/pkg/deposit/service.go +++ b/execution/deposit/service.go @@ -26,10 +26,10 @@ import ( "slices" "sync" - asynctypes "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + asynctypes "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/math" ) // Service represents the deposit service that processes deposit events. diff --git a/mod/execution/pkg/deposit/sync.go b/execution/deposit/sync.go similarity index 96% rename from mod/execution/pkg/deposit/sync.go rename to execution/deposit/sync.go index 11397f8512..cef93c312f 100644 --- a/mod/execution/pkg/deposit/sync.go +++ b/execution/deposit/sync.go @@ -24,8 +24,8 @@ import ( "context" "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/math" ) // defaultRetryInterval processes a deposit event. diff --git a/mod/execution/pkg/deposit/types.go b/execution/deposit/types.go similarity index 94% rename from mod/execution/pkg/deposit/types.go rename to execution/deposit/types.go index 6988aef84c..78e5d4cd7e 100644 --- a/mod/execution/pkg/deposit/types.go +++ b/execution/deposit/types.go @@ -23,9 +23,9 @@ package deposit import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) type BeaconBlockBody[ diff --git a/mod/execution/pkg/engine/engine.go b/execution/engine/engine.go similarity index 95% rename from mod/execution/pkg/engine/engine.go rename to execution/engine/engine.go index 9d30c9f097..8aab220520 100644 --- a/mod/execution/pkg/engine/engine.go +++ b/execution/engine/engine.go @@ -24,13 +24,13 @@ import ( "bytes" "context" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - engineerrors "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/errors" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - jsonrpc "github.com/berachain/beacon-kit/mod/primitives/pkg/net/json-rpc" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + engineerrors "github.com/berachain/beacon-kit/engine-primitives/errors" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + jsonrpc "github.com/berachain/beacon-kit/primitives/net/json-rpc" ) // Engine is Beacon-Kit's implementation of the `ExecutionEngine` diff --git a/mod/execution/pkg/engine/errors.go b/execution/engine/errors.go similarity index 96% rename from mod/execution/pkg/engine/errors.go rename to execution/engine/errors.go index 146d3ed07d..c35e5e7f68 100644 --- a/mod/execution/pkg/engine/errors.go +++ b/execution/engine/errors.go @@ -20,7 +20,7 @@ package engine -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( diff --git a/mod/execution/pkg/engine/metrics.go b/execution/engine/metrics.go similarity index 97% rename from mod/execution/pkg/engine/metrics.go rename to execution/engine/metrics.go index af9accb2db..4248c4942a 100644 --- a/mod/execution/pkg/engine/metrics.go +++ b/execution/engine/metrics.go @@ -23,9 +23,9 @@ package engine import ( "strconv" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" ) // engineMetrics is a struct that contains metrics for the engine. diff --git a/mod/execution/pkg/engine/types.go b/execution/engine/types.go similarity index 87% rename from mod/execution/pkg/engine/types.go rename to execution/engine/types.go index 6ea17466e6..73dd3e1a23 100644 --- a/mod/execution/pkg/engine/types.go +++ b/execution/engine/types.go @@ -21,11 +21,11 @@ package engine import ( - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" ) // ExecutionPayload represents the payload of an execution block. diff --git a/mod/geth-primitives/pkg/bind/bind.go b/geth-primitives/bind/bind.go similarity index 100% rename from mod/geth-primitives/pkg/bind/bind.go rename to geth-primitives/bind/bind.go diff --git a/mod/geth-primitives/pkg/deposit/contract.abigen.go b/geth-primitives/deposit/contract.abigen.go similarity index 100% rename from mod/geth-primitives/pkg/deposit/contract.abigen.go rename to geth-primitives/deposit/contract.abigen.go diff --git a/mod/geth-primitives/pkg/deposit/contract.go b/geth-primitives/deposit/contract.go similarity index 79% rename from mod/geth-primitives/pkg/deposit/contract.go rename to geth-primitives/deposit/contract.go index e4e6da0f70..8dc19ccd7c 100644 --- a/mod/geth-primitives/pkg/deposit/contract.go +++ b/geth-primitives/deposit/contract.go @@ -22,4 +22,4 @@ package deposit // TODO: Remove ldflags=-checklinkname=0 override once fix is applied. // -//go:generate go run -ldflags=-checklinkname=0 github.com/ethereum/go-ethereum/cmd/abigen --abi=../../../../contracts/out/PermissionedDepositContract.sol/PermissionedDepositContract.abi.json --bin=../../../../contracts/out/PermissionedDepositContract.sol/PermissionedDepositContract.bin --pkg=deposit --type=BeaconDepositContract --out=contract.abigen.go +//go:generate go run -ldflags=-checklinkname=0 github.com/ethereum/go-ethereum/cmd/abigen --abi=../../contracts/out/PermissionedDepositContract.sol/PermissionedDepositContract.abi.json --bin=../../contracts/out/PermissionedDepositContract.sol/PermissionedDepositContract.bin --pkg=deposit --type=BeaconDepositContract --out=contract.abigen.go diff --git a/mod/geth-primitives/pkg/ethclient/ethclient.go b/geth-primitives/ethclient/ethclient.go similarity index 100% rename from mod/geth-primitives/pkg/ethclient/ethclient.go rename to geth-primitives/ethclient/ethclient.go diff --git a/mod/geth-primitives/execution.go b/geth-primitives/execution.go similarity index 100% rename from mod/geth-primitives/execution.go rename to geth-primitives/execution.go diff --git a/mod/geth-primitives/pkg/rpc/rpc.go b/geth-primitives/rpc/rpc.go similarity index 100% rename from mod/geth-primitives/pkg/rpc/rpc.go rename to geth-primitives/rpc/rpc.go diff --git a/go.mod b/go.mod index 66b417676e..6196db8b94 100644 --- a/go.mod +++ b/go.mod @@ -21,16 +21,21 @@ require ( cosmossdk.io/log v1.4.1 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc cosmossdk.io/store/v2 v2.0.0-20240821144902-e88c138760a3 + github.com/bazelbuild/buildtools v0.0.0-20241129155226-a0444eb13952 + github.com/bufbuild/buf v1.47.2 github.com/cometbft/cometbft v1.0.0-rc1.0.20240806094948-2c4293ef36c4 github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240806094948-2c4293ef36c4 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-sdk v0.53.0 + github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2 github.com/crate-crypto/go-kzg-4844 v1.1.0 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/ethereum/c-kzg-4844 v1.0.3 github.com/go-faster/xor v1.0.0 github.com/go-playground/validator/v10 v10.22.0 github.com/golang-jwt/jwt/v5 v5.2.1 + github.com/golangci/golangci-lint v1.60.1 + github.com/google/addlicense v1.1.1 github.com/hashicorp/go-metrics v0.5.3 github.com/hashicorp/golang-lru/v2 v2.0.7 github.com/holiman/uint256 v1.3.1 @@ -49,6 +54,7 @@ require ( github.com/spf13/viper v1.19.0 github.com/umbracle/fastrlp v0.1.0 go.uber.org/automaxprocs v1.6.0 + go.uber.org/nilaway v0.0.0-20241010202415-ba14292918d8 golang.org/x/crypto v0.29.0 golang.org/x/sync v0.9.0 sigs.k8s.io/yaml v1.4.0 @@ -57,32 +63,28 @@ require ( // build/test dependencies require ( github.com/attestantio/go-eth2-client v0.21.11 - github.com/bazelbuild/buildtools v0.0.0-20240606140350-80f1f6802857 - github.com/bufbuild/buf v1.34.0 - github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2 github.com/ethereum/go-ethereum v1.14.7 github.com/ferranbt/fastssz v0.1.5-0.20240903094032-455b54c08c81 - github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e - github.com/golangci/golangci-lint v1.60.1 - github.com/google/addlicense v1.1.1 github.com/kurtosis-tech/kurtosis/api/golang v1.1.0 github.com/protolambda/zrnt v0.32.2 github.com/protolambda/ztyp v0.2.2 github.com/rs/zerolog v1.33.0 - github.com/segmentio/golines v0.12.2 github.com/stretchr/testify v1.10.0 - github.com/vektra/mockery/v2 v2.43.2 - go.uber.org/nilaway v0.0.0-20240726232334-4f33d8c507ab ) require ( 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect 4d63.com/gochecknoglobals v0.2.1 // indirect + buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 // indirect buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 // indirect buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 // indirect buf.build/gen/go/bufbuild/registry/protocolbuffers/go v1.35.1-20241025140216-aa40f2c93090.1 // indirect buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect + buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 // indirect + buf.build/go/bufplugin v0.6.0 // indirect + buf.build/go/protoyaml v0.2.0 // indirect + buf.build/go/spdx v0.2.0 // indirect cel.dev/expr v0.18.0 // indirect connectrpc.com/connect v1.17.0 // indirect connectrpc.com/otelconnect v0.7.1 // indirect @@ -113,12 +115,11 @@ require ( github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect github.com/Masterminds/semver/v3 v3.3.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/Microsoft/hcsshim v0.12.9 // indirect github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/alecthomas/go-check-sumtype v0.1.4 // indirect - github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect - github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect github.com/alexkohler/nakedret/v2 v2.0.4 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/alingse/asasalint v0.0.11 // indirect @@ -138,7 +139,6 @@ require ( github.com/bufbuild/protocompile v0.14.1 // indirect github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a // indirect github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576 // indirect - github.com/bufbuild/protoyaml-go v0.1.9 // indirect github.com/butuzov/ireturn v0.3.0 // indirect github.com/butuzov/mirror v1.2.0 // indirect github.com/catenacyber/perfsprint v0.7.1 // indirect @@ -146,7 +146,6 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/charithe/durationcheck v0.0.10 // indirect github.com/chavacava/garif v0.1.0 // indirect - github.com/chigopher/pathlib v0.19.1 // indirect github.com/ckaznocha/intrange v0.2.1 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect @@ -157,8 +156,16 @@ require ( github.com/cometbft/cometbft-db v0.13.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.13.0 // indirect + github.com/containerd/cgroups/v3 v3.0.3 // indirect + github.com/containerd/containerd v1.7.23 // indirect github.com/containerd/continuity v0.4.4 // indirect + github.com/containerd/errdefs v1.0.0 // indirect + github.com/containerd/errdefs/pkg v0.3.0 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect + github.com/containerd/ttrpc v1.2.6 // indirect + github.com/containerd/typeurl/v2 v2.2.3 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/crypto v0.1.2 // indirect @@ -173,7 +180,6 @@ require ( github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/daixiang0/gci v0.13.5 // indirect github.com/danieljoos/wincred v1.2.1 // indirect - github.com/dave/dst v0.27.3 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/deepmap/oapi-codegen v1.6.0 // indirect @@ -202,7 +208,6 @@ require ( github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fzipp/gocyclo v0.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.6 // indirect - github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/getsentry/sentry-go v0.28.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -217,6 +222,7 @@ require ( github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-toolsmith/astcast v1.1.0 // indirect github.com/go-toolsmith/astcopy v1.1.0 // indirect github.com/go-toolsmith/astequal v1.2.0 // indirect @@ -232,7 +238,6 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect - github.com/gofrs/uuid/v5 v5.2.0 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect @@ -269,7 +274,6 @@ require ( github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/go-hclog v1.6.3 // indirect @@ -285,7 +289,6 @@ require ( github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/huandu/go-clone v1.6.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect - github.com/huandu/xstrings v1.4.0 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -295,8 +298,8 @@ require ( github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jdx/go-netrc v1.0.0 // indirect github.com/jgautheron/goconst v1.7.1 // indirect + github.com/jhump/protoreflect v1.16.0 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect - github.com/jinzhu/copier v0.3.5 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/jjti/go-spancheck v0.6.2 // indirect github.com/julz/importas v0.1.0 // indirect @@ -335,7 +338,6 @@ require ( github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/mgechev/revive v1.5.1 // indirect - github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/mholt/archiver v3.1.1+incompatible // indirect github.com/minio/highwayhash v1.0.3 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -343,6 +345,13 @@ require ( github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/locker v1.0.1 // indirect + github.com/moby/patternmatcher v0.6.0 // indirect + github.com/moby/sys/mount v0.3.4 // indirect + github.com/moby/sys/mountinfo v0.7.2 // indirect + github.com/moby/sys/sequential v0.6.0 // indirect + github.com/moby/sys/user v0.3.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/moricho/tparallel v0.3.2 // indirect github.com/morikuni/aec v1.0.0 // indirect @@ -360,7 +369,7 @@ require ( github.com/onsi/ginkgo/v2 v2.21.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect - github.com/opencontainers/runc v1.1.14 // indirect + github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect @@ -382,6 +391,8 @@ require ( github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect + github.com/quic-go/qpack v0.5.1 // indirect + github.com/quic-go/quic-go v0.48.1 // indirect github.com/r3labs/sse/v2 v2.10.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rivo/uniseg v0.4.7 // indirect @@ -398,6 +409,8 @@ require ( github.com/sashamelentyev/interfacebloat v1.1.0 // indirect github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect github.com/securego/gosec/v2 v2.21.4 // indirect + github.com/segmentio/asm v1.2.0 // indirect + github.com/segmentio/encoding v0.4.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.9.3 // indirect @@ -416,6 +429,7 @@ require ( github.com/tdakkota/asciicheck v0.2.0 // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tetafro/godot v1.4.18 // indirect + github.com/tetratelabs/wazero v1.8.1 // indirect github.com/tidwall/btree v1.7.0 // indirect github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect github.com/timonwong/loggercheck v0.10.1 // indirect @@ -432,7 +446,6 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vbatts/tar-split v0.11.6 // indirect - github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect github.com/xen0n/gosmopolitan v1.2.2 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect @@ -448,16 +461,19 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go-simpler.org/musttag v0.13.0 // indirect go-simpler.org/sloglint v0.7.2 // indirect + go.lsp.dev/jsonrpc2 v0.10.0 // indirect + go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 // indirect + go.lsp.dev/protocol v0.12.0 // indirect + go.lsp.dev/uri v0.3.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.32.0 // indirect - go.uber.org/atomic v1.11.0 // indirect + go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect + go.uber.org/zap/exp v0.3.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f // indirect golang.org/x/mod v0.22.0 // indirect @@ -474,7 +490,6 @@ require ( google.golang.org/grpc v1.68.0 // indirect google.golang.org/protobuf v1.35.1 // indirect gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect - gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect @@ -485,5 +500,6 @@ require ( mvdan.cc/gofumpt v0.7.0 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect pgregory.net/rapid v1.1.0 // indirect + pluginrpc.com/pluginrpc v0.5.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index baea22ee91..9e6cf3ed51 100644 --- a/go.sum +++ b/go.sum @@ -2,6 +2,8 @@ 4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= 4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= 4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1 h1:APVDdZ4VfUvERVIj//yDjCWV7WezEOiK7+b6gvJ+iAk= +buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/go v1.35.1-20241031151143-70f632351282.1/go.mod h1:rYPnjsUZ2lGpoQ/T322HWZQil9/MIZF2njP+/u/0GKg= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1 h1:9wP6ZZYWnF2Z0TxmII7m3XNykxnP4/w8oXeth6ekcRI= buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.35.1-20240920164238-5a7b106cbb87.1/go.mod h1:Duw/9JoXkXIydyASnLYIiufkzySThoqavOsF+IihqvM= buf.build/gen/go/bufbuild/registry/connectrpc/go v1.17.0-20241025140216-aa40f2c93090.1 h1:FHQXg3T7S2jp8yc7/bQJgqEH1yza/rrDHXITUK2Tm0g= @@ -12,6 +14,14 @@ buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fed buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2/go.mod h1:1+3gJj2NvZ1mTLAtHu+lMhOjGgQPiCKCeo+9MBww0Eo= buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 h1:b7EEYTUHmWSBEyISHlHvXbJPqtKiHRuUignL1tsHnNQ= buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2/go.mod h1:HqcXMSa5qnNuakaMUo+hWhF51mKbcrZxGl9Vp5EeJXc= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1 h1:rPi3qs3qpDIXIl5QW2IPOaYZhppRkvuVKwEZrfhpy78= +buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/go v1.35.1-20241007202033-cf42259fcbfc.1/go.mod h1:4IVMTaeh4JIjBYcGFLlTorfWpKVEXDjDfHAgKTeR0Ds= +buf.build/go/bufplugin v0.6.0 h1:3lhoh+0z+IUPS3ZajTPn/27LaLIkero2BDVnV7yXD1s= +buf.build/go/bufplugin v0.6.0/go.mod h1:hWCjxxv24xdR6F5pNlQavZV2oo0J3uF4Ff1XEoyV6vU= +buf.build/go/protoyaml v0.2.0 h1:2g3OHjtLDqXBREIOjpZGHmQ+U/4mkN1YiQjxNB68Ip8= +buf.build/go/protoyaml v0.2.0/go.mod h1:L/9QvTDkTWcDTzAL6HMfN+mYC6CmZRm2KnsUA054iL0= +buf.build/go/spdx v0.2.0 h1:IItqM0/cMxvFJJumcBuP8NrsIzMs/UYjp/6WSpq8LTw= +buf.build/go/spdx v0.2.0/go.mod h1:bXdwQFem9Si3nsbNy8aJKGPoaPi5DKwdeEp5/ArZ6w8= cel.dev/expr v0.18.0 h1:CJ6drgk+Hf96lkLikr4rFf19WrU0BOWEihyZnI2TAzo= cel.dev/expr v0.18.0/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -64,6 +74,8 @@ github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XB github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE= github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA= github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI= github.com/Antonboom/nilnil v1.0.0 h1:n+v+B12dsE5tbAqRODXmEKfZv9j2KcTBrp+LkoM4HZk= @@ -90,6 +102,8 @@ github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+ github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/Microsoft/hcsshim v0.12.9 h1:2zJy5KA+l0loz1HzEGqyNnjd3fyZA31ZBCGKacp6lLg= +github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEPuoIWYVvZ8Y= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= @@ -109,12 +123,9 @@ github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFop github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= -github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= @@ -132,8 +143,8 @@ github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5Fc github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/attestantio/go-eth2-client v0.21.11 h1:0ZYP69O8rJz41055WOf3n1C1NA4jNh2iME/NuTVfgmQ= github.com/attestantio/go-eth2-client v0.21.11/go.mod h1:d7ZPNrMX8jLfIgML5u7QZxFo2AukLM+5m08iMaLdqb8= -github.com/bazelbuild/buildtools v0.0.0-20240606140350-80f1f6802857 h1:3UwzfrfwoxlyGlPhbQR1O1HLOd4qNEyAwxHRSE+Yde4= -github.com/bazelbuild/buildtools v0.0.0-20240606140350-80f1f6802857/go.mod h1:689QdV3hBP7Vo9dJMmzhoYIyo/9iMhEmHkJcnaPRCbo= +github.com/bazelbuild/buildtools v0.0.0-20241129155226-a0444eb13952 h1:LoLtEph97OIJegT4bz5EnG+T7+ym/PzPULHw0kyadHQ= +github.com/bazelbuild/buildtools v0.0.0-20241129155226-a0444eb13952/go.mod h1:PLNUetjLa77TCCziPsz0EI8a6CUxgC+1jgmWv0H25tg= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -165,16 +176,14 @@ github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdi github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/bufbuild/buf v1.34.0 h1:rZSVfYS5SakOe6ds9PDjbHVwOc+vBGVWNW9Ei+Rg/+c= -github.com/bufbuild/buf v1.34.0/go.mod h1:Fj+KBmY2ODYD2Ld02w4LH9Y3WiRH2203IjGJbKYK5Hc= +github.com/bufbuild/buf v1.47.2 h1:fA5e2yVQGabxAz7W5aNbO7Fku1P6TpoHhjs1wER1pOc= +github.com/bufbuild/buf v1.47.2/go.mod h1:1Xd0QG0a1uCGk7cODUenpQ8E5l7bj2Ry9tnUfERm1YI= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a h1:l3RhVoG0RtC61h6TVWnkniGj4TgBebuyPQRdleFAmTg= github.com/bufbuild/protoplugin v0.0.0-20240911180120-7bb73e41a54a/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ= github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576 h1:A4TfjZJqApnAvGKDgxHqA1rG6BK1OswyNcTcnSrDbJc= github.com/bufbuild/protovalidate-go v0.7.3-0.20241015162221-1446f1e1d576/go.mod h1:R/UFeIPyFAh0eH7Ic/JJbO2ABdkxFuZZKDbzsI5UiwM= -github.com/bufbuild/protoyaml-go v0.1.9 h1:anV5UtF1Mlvkkgp4NWA6U/zOnJFng8Orq4Vf3ZUQHBU= -github.com/bufbuild/protoyaml-go v0.1.9/go.mod h1:KCBItkvZOK/zwGueLdH1Wx1RLyFn5rCH7YjQrdty2Wc= github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= github.com/butuzov/mirror v1.2.0 h1:9YVK1qIjNspaqWutSv8gsge2e/Xpq1eqEkslEUHy5cs= @@ -198,8 +207,6 @@ github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iy github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= -github.com/chigopher/pathlib v0.19.1 h1:RoLlUJc0CqBGwq239cilyhxPNLXTK+HXoASGyGznx5A= -github.com/chigopher/pathlib v0.19.1/go.mod h1:tzC1dZLW8o33UQpWkNkhvPwL5n4yyFRFm/jL1YGWFvY= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= @@ -245,12 +252,26 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.13.0 h1:VPULb/v6bbYELAPTDFINEVaMTTybV5GLxDdcjnS+4oc= github.com/consensys/gnark-crypto v0.13.0/go.mod h1:wKqwsieaKPThcFkHe0d0zMsbHEUWFmZcG7KBCse210o= +github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= +github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= +github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ= +github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII= github.com/containerd/continuity v0.4.4/go.mod h1:/lNJvtJKUQStBzpVQ1+rasXO1LAWtUQssk28EZvJ3nE= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151Xdx3ZPPE= +github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= +github.com/containerd/ttrpc v1.2.6 h1:zG+Kn5EZ6MUYCS1t2Hmt2J4tMVaLSFEJVOraDQwNPC4= +github.com/containerd/ttrpc v1.2.6/go.mod h1:YCXHsb32f+Sq5/72xHubdiJRQY9inL4a4ZQrAbN1q9o= +github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40= +github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= @@ -292,10 +313,6 @@ github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c= github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk= github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= -github.com/dave/dst v0.27.3 h1:P1HPoMza3cMEquVf9kKy8yXsFirry4zEnWOdYPOoIzY= -github.com/dave/dst v0.27.3/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= -github.com/dave/jennifer v1.7.0 h1:uRbSBH9UTS64yXbh4FrMHfgfY762RD+C7bUPKODpSJE= -github.com/dave/jennifer v1.7.0/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -374,8 +391,6 @@ github.com/ferranbt/fastssz v0.1.5-0.20240903094032-455b54c08c81 h1:SNHNj7UyVnQV github.com/ferranbt/fastssz v0.1.5-0.20240903094032-455b54c08c81/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= github.com/firefart/nonamedreturns v1.0.5 h1:tM+Me2ZaXs8tfdDw3X6DOX++wMCOqzYUho6tUTYIdRA= github.com/firefart/nonamedreturns v1.0.5/go.mod h1:gHJjDqhGM4WyPt639SOZs+G89Ko7QKH5R5BhnO6xJhw= -github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e h1:bBLctRc7kr01YGvaDfgLbTwjFNW5jdp5y5rj8XXBHfY= -github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -391,8 +406,6 @@ github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc= github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 h1:IZqZOB2fydHte3kUgxrzK5E1fW7RQGeDwE8F/ZZnUYc= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= @@ -448,7 +461,6 @@ github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaC github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= @@ -491,8 +503,6 @@ github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid/v5 v5.2.0 h1:qw1GMx6/y8vhVsx626ImfKMuS5CvJmhIKKtuyvfajMM= -github.com/gofrs/uuid/v5 v5.2.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= @@ -673,8 +683,6 @@ github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0X github.com/huandu/go-clone/generic v1.6.0/go.mod h1:xgd9ZebcMsBWWcBx5mVMCoqMX24gLWr5lQicr+nVXNs= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= -github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= -github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= @@ -698,10 +706,10 @@ github.com/jgautheron/goconst v1.7.1 h1:VpdAG7Ca7yvvJk5n8dMwQhfEZJh95kl/Hl9S1OI5 github.com/jgautheron/goconst v1.7.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+TBDg= github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2 h1:qZU+rEZUOYTz1Bnhi3xbwn+VxdXkLVeEpAeZzVXLY88= +github.com/jhump/protoreflect/v2 v2.0.0-beta.2/go.mod h1:4tnOYkB/mq7QTyS3YKtVtNrJv4Psqout8HA1U+hZtgM= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= -github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jjti/go-spancheck v0.6.2 h1:iYtoxqPMzHUPp7St+5yA8+cONdyXD3ug6KK15n7Pklk= @@ -824,8 +832,6 @@ github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgechev/revive v1.5.1 h1:hE+QPeq0/wIzJwOphdVyUJ82njdd8Khp4fUIHGZHW3M= github.com/mgechev/revive v1.5.1/go.mod h1:lC9AhkJIBs5zwx8wkudyHrU+IJkrEKmpCmGMnIJPk4o= -github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= -github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU= github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= @@ -846,6 +852,20 @@ github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqky github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/mount v0.3.4 h1:yn5jq4STPztkkzSKpZkLcmjue+bZJ0u2AuQY1iNI1Ww= +github.com/moby/sys/mount v0.3.4/go.mod h1:KcQJMbQdJHPlq5lcYT+/CjatWM4PuxKe+XLSVS4J6Os= +github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9KouLrg= +github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4= +github.com/moby/sys/sequential v0.6.0 h1:qrx7XFUd/5DxtqcoH1h438hF5TmOvzC/lspjy7zgvCU= +github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= +github.com/moby/sys/user v0.3.0 h1:9ni5DlcW5an3SvRSx4MouotOygvzaXbaSrc/wGDFWPo= +github.com/moby/sys/user v0.3.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85uoHjs= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -904,6 +924,10 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runc v1.1.14 h1:rgSuzbmgz5DUJjeSnw337TxDbRuqjs6iqQck/2weR6w= github.com/opencontainers/runc v1.1.14/go.mod h1:E4C2z+7BxR7GHXp0hAY53mek+x49X1LjPNeMTfRGvOA= +github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= +github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= +github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -989,6 +1013,10 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= +github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= +github.com/quic-go/quic-go v0.48.1 h1:y/8xmfWI9qmGTc+lBr4jKRUWLGSlSigv847ULJ4hYXA= +github.com/quic-go/quic-go v0.48.1/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= github.com/r3labs/sse/v2 v2.10.0 h1:hFEkLLFY4LDifoHdiCN/LlGBAdVJYsANaLqNYa1l/v0= github.com/r3labs/sse/v2 v2.10.0/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktEmkNJ7I= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= @@ -1027,10 +1055,10 @@ github.com/sashamelentyev/usestdlibvars v1.27.0 h1:t/3jZpSXtRPRf2xr0m63i32Zrusyu github.com/sashamelentyev/usestdlibvars v1.27.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/securego/gosec/v2 v2.21.4 h1:Le8MSj0PDmOnHJgUATjD96PaXRvCpKC+DGJvwyy0Mlk= github.com/securego/gosec/v2 v2.21.4/go.mod h1:Jtb/MwRQfRxCXyCm1rfM1BEiiiTfUOdyzzAhlr6lUTA= -github.com/segmentio/golines v0.12.2 h1:1aktcB7R/mJchuQePC50Sni6DOE8QqOwFsOoG9Wt9Ho= -github.com/segmentio/golines v0.12.2/go.mod h1:jrFsBVuqmgT8WKC7tgtkCQnHColYb1eesCef2Rrclg8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= -github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/segmentio/encoding v0.4.0 h1:MEBYvRqiUB2nfR2criEXWqwdY6HJOUrCn5hboVOVmy8= +github.com/segmentio/encoding v0.4.0/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= @@ -1105,6 +1133,8 @@ github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpR github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= github.com/tetafro/godot v1.4.18 h1:ouX3XGiziKDypbpXqShBfnNLTSjR8r3/HVzrtJ+bHlI= github.com/tetafro/godot v1.4.18/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= +github.com/tetratelabs/wazero v1.8.1 h1:NrcgVbWfkWvVc4UtT4LRLDf91PsOzDzefMdwhLfA550= +github.com/tetratelabs/wazero v1.8.1/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= @@ -1143,10 +1173,6 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs= github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI= -github.com/vektra/mockery/v2 v2.43.2 h1:OdivAsQL/uoQ55UnTt25tliRI8kaj5j6caHk9xaAUD0= -github.com/vektra/mockery/v2 v2.43.2/go.mod h1:XNTE9RIu3deGAGQRVjP1VZxGpQNm0YedZx4oDs3prr8= -github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= -github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= @@ -1186,6 +1212,14 @@ go-simpler.org/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE= go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM= go-simpler.org/sloglint v0.7.2 h1:Wc9Em/Zeuu7JYpl+oKoYOsQSy2X560aVueCW/m6IijY= go-simpler.org/sloglint v0.7.2/go.mod h1:US+9C80ppl7VsThQclkM7BkCHQAzuz8kHLsW3ppuluo= +go.lsp.dev/jsonrpc2 v0.10.0 h1:Pr/YcXJoEOTMc/b6OTmcR1DPJ3mSWl/SWiU1Cct6VmI= +go.lsp.dev/jsonrpc2 v0.10.0/go.mod h1:fmEzIdXPi/rf6d4uFcayi8HpFP1nBF99ERP1htC72Ac= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2 h1:hCzQgh6UcwbKgNSRurYWSqh8MufqRRPODRBblutn4TE= +go.lsp.dev/pkg v0.0.0-20210717090340-384b27a52fb2/go.mod h1:gtSHRuYfbCT0qnbLnovpie/WEmqyJ7T4n6VXiFMBtcw= +go.lsp.dev/protocol v0.12.0 h1:tNprUI9klQW5FAFVM4Sa+AbPFuVQByWhP1ttNUAjIWg= +go.lsp.dev/protocol v0.12.0/go.mod h1:Qb11/HgZQ72qQbeyPfJbu3hZBH23s1sr4st8czGeDMQ= +go.lsp.dev/uri v0.3.0 h1:KcZJmh6nFIBeJzTugn5JTU6OOyG0lDOo3R9KwTxTYbo= +go.lsp.dev/uri v0.3.0/go.mod h1:P5sbO1IQR+qySTWOCnhnK7phBx+W3zbLqSMDJNTw88I= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw= @@ -1194,8 +1228,8 @@ go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0 h1:Xw8U6u2f8DK2XAkGRFV7BBLENgnTGX9i4rQRxJf+/vs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.24.0/go.mod h1:6KW1Fm6R/s6Z3PGXwSJN2K4eT6wQB3vXX6CVnYX9NmM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= @@ -1205,25 +1239,26 @@ go.opentelemetry.io/otel/sdk/metric v1.19.0/go.mod h1:XjG0jQyFJrv2PbMvwND7LwCEhs go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= -go.starlark.net v0.0.0-20210223155950-e043a3d3c984/go.mod h1:t3mmBBPzAVvK0L0n1drDmrQsJ8FoIx4INCqVMTr/Zo0= +go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/nilaway v0.0.0-20240726232334-4f33d8c507ab h1:8DmGf048BQyfnRtHs1nQPRwxtPEcyq28qFm9zajC2/U= -go.uber.org/nilaway v0.0.0-20240726232334-4f33d8c507ab/go.mod h1:5Sxa/G3nuojeEZMlajqPGgCjpz+jAw+zc59IS+b9OFA= +go.uber.org/nilaway v0.0.0-20241010202415-ba14292918d8 h1:3mxcSin88plhfjoT2FW0IaDmdcZTvpMVrhXVnF4Abcc= +go.uber.org/nilaway v0.0.0-20241010202415-ba14292918d8/go.mod h1:zblyZlFADuRGKrmjHFrqfnBEUeE8QJZNeZRV8hnZnUw= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U= +go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1469,7 +1504,6 @@ google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFyt google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/Knetic/govaluate.v3 v3.0.0 h1:18mUyIt4ZlRlFZAAfVetz4/rzlJs9yhN+U02F4u1AOc= gopkg.in/Knetic/govaluate.v3 v3.0.0/go.mod h1:csKLBORsPbafmSCGTEh3U7Ozmsuq8ZSIlKk1bcqph0E= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= @@ -1511,6 +1545,8 @@ mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f h1:lMpcwN6GxNbWtbpI1+xzFLSW8 mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f/go.mod h1:RSLa7mKKCNeTTMHBw5Hsy2rfJmd6O2ivt9Dw9ZqCQpQ= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +pluginrpc.com/pluginrpc v0.5.0 h1:tOQj2D35hOmvHyPu8e7ohW2/QvAnEtKscy2IJYWQ2yo= +pluginrpc.com/pluginrpc v0.5.0/go.mod h1:UNWZ941hcVAoOZUn8YZsMmOZBzbUjQa3XMns8RQLp9o= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/kurtosis/Makefile b/kurtosis/Makefile index eda0903d9b..f7197fd28d 100644 --- a/kurtosis/Makefile +++ b/kurtosis/Makefile @@ -40,7 +40,7 @@ start-devnet-no-build: --enclave my-local-devnet --parallelism 200 # Starts a Kurtosis enclave containing a local devnet on GCP. -# --production flag is used to indicate that the enclave is +# --production flag is used to indicate that the enclave is # running in production mode to allow pod restarts when doing chaos testing. start-gcp-devnet-no-build: kurtosis run ./kurtosis --args-file ./kurtosis/beaconkit-base-gcp.yaml \ @@ -66,7 +66,7 @@ stop-devnet: # Stops and removes the specified Kurtosis enclave reset-devnet: $(MAKE) stop-devnet - kurtosis enclave rm my-local-devnet + kurtosis enclave rm my-local-devnet # Removes the specified Kurtosis enclave rm-devnet: diff --git a/mod/log/mod.go b/log/mod.go similarity index 100% rename from mod/log/mod.go rename to log/mod.go diff --git a/mod/log/pkg/noop/noop.go b/log/noop/noop.go similarity index 97% rename from mod/log/pkg/noop/noop.go rename to log/noop/noop.go index d6eae30867..df1675affe 100644 --- a/mod/log/pkg/noop/noop.go +++ b/log/noop/noop.go @@ -20,7 +20,7 @@ package noop -import "github.com/berachain/beacon-kit/mod/log" +import "github.com/berachain/beacon-kit/log" // Logger is a logger that performs no operations. It can be used in // environments where logging should be disabled. It implements the Logger diff --git a/mod/log/pkg/noop/noop_test.go b/log/noop/noop_test.go similarity index 97% rename from mod/log/pkg/noop/noop_test.go rename to log/noop/noop_test.go index 0b7bbcc333..4aa84f20f0 100644 --- a/mod/log/pkg/noop/noop_test.go +++ b/log/noop/noop_test.go @@ -23,7 +23,7 @@ package noop_test import ( "testing" - "github.com/berachain/beacon-kit/mod/log/pkg/noop" + "github.com/berachain/beacon-kit/log/noop" ) func TestNewLogger(t *testing.T) { diff --git a/mod/log/pkg/phuslu/buffer.go b/log/phuslu/buffer.go similarity index 100% rename from mod/log/pkg/phuslu/buffer.go rename to log/phuslu/buffer.go diff --git a/mod/log/pkg/phuslu/config.go b/log/phuslu/config.go similarity index 100% rename from mod/log/pkg/phuslu/config.go rename to log/phuslu/config.go diff --git a/mod/log/pkg/phuslu/formatter.go b/log/phuslu/formatter.go similarity index 100% rename from mod/log/pkg/phuslu/formatter.go rename to log/phuslu/formatter.go diff --git a/mod/log/pkg/phuslu/logger.go b/log/phuslu/logger.go similarity index 100% rename from mod/log/pkg/phuslu/logger.go rename to log/phuslu/logger.go diff --git a/mod/log/pkg/phuslu/style.go b/log/phuslu/style.go similarity index 97% rename from mod/log/pkg/phuslu/style.go rename to log/phuslu/style.go index 72731afa00..5f1fbc8c5e 100644 --- a/mod/log/pkg/phuslu/style.go +++ b/log/phuslu/style.go @@ -20,7 +20,7 @@ package phuslu -import "github.com/berachain/beacon-kit/mod/log" +import "github.com/berachain/beacon-kit/log" type Color = log.Color diff --git a/mod/log/pkg/phuslu/time.go b/log/phuslu/time.go similarity index 100% rename from mod/log/pkg/phuslu/time.go rename to log/phuslu/time.go diff --git a/mod/storage/README.md b/mod/storage/README.md deleted file mode 100644 index 5110470995..0000000000 --- a/mod/storage/README.md +++ /dev/null @@ -1 +0,0 @@ -# storage module \ No newline at end of file diff --git a/mod/node-api/backend/backend.go b/node-api/backend/backend.go similarity index 98% rename from mod/node-api/backend/backend.go rename to node-api/backend/backend.go index 3779cda072..c594b0a2f7 100644 --- a/mod/node-api/backend/backend.go +++ b/node-api/backend/backend.go @@ -23,8 +23,8 @@ package backend import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // Backend is the db access layer for the beacon node-api. diff --git a/mod/node-api/backend/block.go b/node-api/backend/block.go similarity index 92% rename from mod/node-api/backend/block.go rename to node-api/backend/block.go index c6087cc989..ad7ae02779 100644 --- a/mod/node-api/backend/block.go +++ b/node-api/backend/block.go @@ -21,9 +21,9 @@ package backend import ( - types "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + types "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // BlockHeader returns the block header at the given slot. diff --git a/mod/node-api/backend/genesis.go b/node-api/backend/genesis.go similarity index 91% rename from mod/node-api/backend/genesis.go rename to node-api/backend/genesis.go index 66aeaf5247..f7f3531c52 100644 --- a/mod/node-api/backend/genesis.go +++ b/node-api/backend/genesis.go @@ -21,8 +21,8 @@ package backend import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // GetGenesis returns the genesis state of the beacon chain. diff --git a/mod/node-api/backend/genesis_test.go b/node-api/backend/genesis_test.go similarity index 100% rename from mod/node-api/backend/genesis_test.go rename to node-api/backend/genesis_test.go diff --git a/mod/node-api/backend/mocks/availability_store.mock.go b/node-api/backend/mocks/availability_store.mock.go similarity index 98% rename from mod/node-api/backend/mocks/availability_store.mock.go rename to node-api/backend/mocks/availability_store.mock.go index 26ab51f6ca..073e3fdacf 100644 --- a/mod/node-api/backend/mocks/availability_store.mock.go +++ b/node-api/backend/mocks/availability_store.mock.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/mocks/beacon_block_header.mock.go b/node-api/backend/mocks/beacon_block_header.mock.go similarity index 99% rename from mod/node-api/backend/mocks/beacon_block_header.mock.go rename to node-api/backend/mocks/beacon_block_header.mock.go index db5cfc4192..fffa128169 100644 --- a/mod/node-api/backend/mocks/beacon_block_header.mock.go +++ b/node-api/backend/mocks/beacon_block_header.mock.go @@ -3,8 +3,8 @@ package mocks import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + common "github.com/berachain/beacon-kit/primitives/common" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/mocks/beacon_state.mock.go b/node-api/backend/mocks/beacon_state.mock.go similarity index 99% rename from mod/node-api/backend/mocks/beacon_state.mock.go rename to node-api/backend/mocks/beacon_state.mock.go index 99c0d2c4b9..5e3e39428e 100644 --- a/mod/node-api/backend/mocks/beacon_state.mock.go +++ b/node-api/backend/mocks/beacon_state.mock.go @@ -3,12 +3,12 @@ package mocks import ( - bytes "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + bytes "github.com/berachain/beacon-kit/primitives/bytes" + common "github.com/berachain/beacon-kit/primitives/common" - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + crypto "github.com/berachain/beacon-kit/primitives/crypto" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/mocks/block_store.mock.go b/node-api/backend/mocks/block_store.mock.go similarity index 98% rename from mod/node-api/backend/mocks/block_store.mock.go rename to node-api/backend/mocks/block_store.mock.go index c5bc5b8467..cba25b2384 100644 --- a/mod/node-api/backend/mocks/block_store.mock.go +++ b/node-api/backend/mocks/block_store.mock.go @@ -3,8 +3,8 @@ package mocks import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + common "github.com/berachain/beacon-kit/primitives/common" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/mocks/deposit_store.mock.go b/node-api/backend/mocks/deposit_store.mock.go similarity index 100% rename from mod/node-api/backend/mocks/deposit_store.mock.go rename to node-api/backend/mocks/deposit_store.mock.go diff --git a/mod/node-api/backend/mocks/node.mock.go b/node-api/backend/mocks/node.mock.go similarity index 100% rename from mod/node-api/backend/mocks/node.mock.go rename to node-api/backend/mocks/node.mock.go diff --git a/mod/node-api/backend/mocks/state_processor.mock.go b/node-api/backend/mocks/state_processor.mock.go similarity index 95% rename from mod/node-api/backend/mocks/state_processor.mock.go rename to node-api/backend/mocks/state_processor.mock.go index 0314009602..ae41842911 100644 --- a/mod/node-api/backend/mocks/state_processor.mock.go +++ b/node-api/backend/mocks/state_processor.mock.go @@ -3,10 +3,10 @@ package mocks import ( - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" - transition "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + transition "github.com/berachain/beacon-kit/primitives/transition" ) // StateProcessor is an autogenerated mock type for the StateProcessor type diff --git a/mod/node-api/backend/mocks/storage_backend.mock.go b/node-api/backend/mocks/storage_backend.mock.go similarity index 100% rename from mod/node-api/backend/mocks/storage_backend.mock.go rename to node-api/backend/mocks/storage_backend.mock.go diff --git a/mod/node-api/backend/mocks/validator.mock.go b/node-api/backend/mocks/validator.mock.go similarity index 98% rename from mod/node-api/backend/mocks/validator.mock.go rename to node-api/backend/mocks/validator.mock.go index 997eae07ac..113a320656 100644 --- a/mod/node-api/backend/mocks/validator.mock.go +++ b/node-api/backend/mocks/validator.mock.go @@ -3,8 +3,8 @@ package mocks import ( - backend "github.com/berachain/beacon-kit/mod/node-api/backend" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + backend "github.com/berachain/beacon-kit/node-api/backend" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/mocks/withdrawal.mock.go b/node-api/backend/mocks/withdrawal.mock.go similarity index 95% rename from mod/node-api/backend/mocks/withdrawal.mock.go rename to node-api/backend/mocks/withdrawal.mock.go index d0ef6cff94..e77e52b21d 100644 --- a/mod/node-api/backend/mocks/withdrawal.mock.go +++ b/node-api/backend/mocks/withdrawal.mock.go @@ -3,8 +3,8 @@ package mocks import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + common "github.com/berachain/beacon-kit/primitives/common" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/mocks/withdrawal_credentials.mock.go b/node-api/backend/mocks/withdrawal_credentials.mock.go similarity index 97% rename from mod/node-api/backend/mocks/withdrawal_credentials.mock.go rename to node-api/backend/mocks/withdrawal_credentials.mock.go index 6abab4521a..6a24fd2ca4 100644 --- a/mod/node-api/backend/mocks/withdrawal_credentials.mock.go +++ b/node-api/backend/mocks/withdrawal_credentials.mock.go @@ -3,7 +3,7 @@ package mocks import ( - common "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + common "github.com/berachain/beacon-kit/primitives/common" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-api/backend/randao.go b/node-api/backend/randao.go similarity index 92% rename from mod/node-api/backend/randao.go rename to node-api/backend/randao.go index 292ae5f939..ce8d207721 100644 --- a/mod/node-api/backend/randao.go +++ b/node-api/backend/randao.go @@ -21,8 +21,8 @@ package backend import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) func (b Backend[ diff --git a/mod/node-api/backend/state.go b/node-api/backend/state.go similarity index 94% rename from mod/node-api/backend/state.go rename to node-api/backend/state.go index 0a82d3371f..17dc2a9cfb 100644 --- a/mod/node-api/backend/state.go +++ b/node-api/backend/state.go @@ -21,8 +21,8 @@ package backend import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // StateFromSlotForProof returns the beacon state of the version that was used diff --git a/mod/node-api/backend/types.go b/node-api/backend/types.go similarity index 94% rename from mod/node-api/backend/types.go rename to node-api/backend/types.go index 44e26ff4f7..2423ee299e 100644 --- a/mod/node-api/backend/types.go +++ b/node-api/backend/types.go @@ -23,11 +23,11 @@ package backend import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/state-transition/core" ) // The AvailabilityStore interface is responsible for validating and storing diff --git a/mod/node-api/backend/utils/validator.go b/node-api/backend/utils/validator.go similarity index 92% rename from mod/node-api/backend/utils/validator.go rename to node-api/backend/utils/validator.go index a9c2fd286e..6eba6b9983 100644 --- a/mod/node-api/backend/utils/validator.go +++ b/node-api/backend/utils/validator.go @@ -23,8 +23,8 @@ package utils import ( "strconv" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // ValidatorIndexByID parses a validator index from a string. diff --git a/mod/node-api/backend/validator.go b/node-api/backend/validator.go similarity index 94% rename from mod/node-api/backend/validator.go rename to node-api/backend/validator.go index 9efcf61c56..08b92d5534 100644 --- a/mod/node-api/backend/validator.go +++ b/node-api/backend/validator.go @@ -21,9 +21,9 @@ package backend import ( - "github.com/berachain/beacon-kit/mod/node-api/backend/utils" - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/node-api/backend/utils" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/primitives/math" ) func (b Backend[ diff --git a/mod/node-api/block_store/config.go b/node-api/block_store/config.go similarity index 100% rename from mod/node-api/block_store/config.go rename to node-api/block_store/config.go diff --git a/mod/node-api/block_store/service.go b/node-api/block_store/service.go similarity index 95% rename from mod/node-api/block_store/service.go rename to node-api/block_store/service.go index 3390bc8456..6fec36b7d5 100644 --- a/mod/node-api/block_store/service.go +++ b/node-api/block_store/service.go @@ -23,9 +23,9 @@ package blockstore import ( "context" - asynctypes "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + asynctypes "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" ) // Service is a Service that listens for blocks and stores them in a KVStore. diff --git a/mod/node-api/block_store/types.go b/node-api/block_store/types.go similarity index 90% rename from mod/node-api/block_store/types.go rename to node-api/block_store/types.go index b722a43c52..58f91f1f45 100644 --- a/mod/node-api/block_store/types.go +++ b/node-api/block_store/types.go @@ -21,9 +21,9 @@ package blockstore import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconBlock is a generic interface for a beacon block. diff --git a/mod/node-api/engines/echo/engine.go b/node-api/engines/echo/engine.go similarity index 95% rename from mod/node-api/engines/echo/engine.go rename to node-api/engines/echo/engine.go index cb1c344e41..6c9ea7b907 100644 --- a/mod/node-api/engines/echo/engine.go +++ b/node-api/engines/echo/engine.go @@ -21,8 +21,8 @@ package echo import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" ) diff --git a/mod/node-api/engines/echo/middleware.go b/node-api/engines/echo/middleware.go similarity index 93% rename from mod/node-api/engines/echo/middleware.go rename to node-api/engines/echo/middleware.go index 7ceb228b85..d079bfa074 100644 --- a/mod/node-api/engines/echo/middleware.go +++ b/node-api/engines/echo/middleware.go @@ -23,9 +23,9 @@ package echo import ( "net/http" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/handlers/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/handlers/types" "github.com/labstack/echo/v4" ) diff --git a/mod/node-api/engines/echo/types.go b/node-api/engines/echo/types.go similarity index 100% rename from mod/node-api/engines/echo/types.go rename to node-api/engines/echo/types.go diff --git a/mod/node-api/engines/echo/vaildator.go b/node-api/engines/echo/vaildator.go similarity index 96% rename from mod/node-api/engines/echo/vaildator.go rename to node-api/engines/echo/vaildator.go index d7938a0a72..4e81a96a8c 100644 --- a/mod/node-api/engines/echo/vaildator.go +++ b/node-api/engines/echo/vaildator.go @@ -26,9 +26,9 @@ import ( "net/http" "strconv" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + "github.com/berachain/beacon-kit/node-api/handlers/utils" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" "github.com/go-playground/validator/v10" "github.com/labstack/echo/v4" ) diff --git a/mod/node-api/handlers/beacon/backend.go b/node-api/handlers/beacon/backend.go similarity index 93% rename from mod/node-api/handlers/beacon/backend.go rename to node-api/handlers/beacon/backend.go index f16b956482..84ec037a61 100644 --- a/mod/node-api/handlers/beacon/backend.go +++ b/node-api/handlers/beacon/backend.go @@ -21,9 +21,9 @@ package beacon import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // Backend is the interface for backend of the beacon API. diff --git a/mod/node-api/handlers/beacon/block.go b/node-api/handlers/beacon/block.go similarity index 91% rename from mod/node-api/handlers/beacon/block.go rename to node-api/handlers/beacon/block.go index dee3ef7912..fb18f16787 100644 --- a/mod/node-api/handlers/beacon/block.go +++ b/node-api/handlers/beacon/block.go @@ -21,8 +21,8 @@ package beacon import ( - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) func (h *Handler[_, ContextT, _, _]) GetBlockRewards(c ContextT) (any, error) { diff --git a/mod/node-api/handlers/beacon/genesis.go b/node-api/handlers/beacon/genesis.go similarity index 87% rename from mod/node-api/handlers/beacon/genesis.go rename to node-api/handlers/beacon/genesis.go index 1566eaaec9..0b2a1954d0 100644 --- a/mod/node-api/handlers/beacon/genesis.go +++ b/node-api/handlers/beacon/genesis.go @@ -21,9 +21,9 @@ package beacon import ( - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/handlers/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) func (h *Handler[_, ContextT, _, _]) GetGenesis(_ ContextT) (any, error) { diff --git a/mod/node-api/handlers/beacon/handler.go b/node-api/handlers/beacon/handler.go similarity index 90% rename from mod/node-api/handlers/beacon/handler.go rename to node-api/handlers/beacon/handler.go index 9677ec43e9..6932169aa5 100644 --- a/mod/node-api/handlers/beacon/handler.go +++ b/node-api/handlers/beacon/handler.go @@ -21,9 +21,9 @@ package beacon import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/server/context" ) // Handler is the handler for the beacon API. diff --git a/mod/node-api/handlers/beacon/header.go b/node-api/handlers/beacon/header.go similarity index 92% rename from mod/node-api/handlers/beacon/header.go rename to node-api/handlers/beacon/header.go index 9cba5a83b5..0aaebbe304 100644 --- a/mod/node-api/handlers/beacon/header.go +++ b/node-api/handlers/beacon/header.go @@ -21,9 +21,9 @@ package beacon import ( - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" + "github.com/berachain/beacon-kit/primitives/bytes" ) func (h *Handler[ diff --git a/mod/node-api/handlers/beacon/historical.go b/node-api/handlers/beacon/historical.go similarity index 91% rename from mod/node-api/handlers/beacon/historical.go rename to node-api/handlers/beacon/historical.go index b97e26f55b..bfcc3e92df 100644 --- a/mod/node-api/handlers/beacon/historical.go +++ b/node-api/handlers/beacon/historical.go @@ -21,9 +21,9 @@ package beacon import ( - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/handlers/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) func (h *Handler[_, ContextT, _, _]) GetStateRoot(c ContextT) (any, error) { diff --git a/mod/node-api/handlers/beacon/randao.go b/node-api/handlers/beacon/randao.go similarity index 89% rename from mod/node-api/handlers/beacon/randao.go rename to node-api/handlers/beacon/randao.go index 244453842d..9059f9aad9 100644 --- a/mod/node-api/handlers/beacon/randao.go +++ b/node-api/handlers/beacon/randao.go @@ -21,9 +21,9 @@ package beacon import ( - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" + "github.com/berachain/beacon-kit/primitives/math" ) func (h *Handler[_, ContextT, _, _]) GetRandao(c ContextT) (any, error) { diff --git a/mod/node-api/handlers/beacon/routes.go b/node-api/handlers/beacon/routes.go similarity index 98% rename from mod/node-api/handlers/beacon/routes.go rename to node-api/handlers/beacon/routes.go index f83debb1e3..8a35e428ff 100644 --- a/mod/node-api/handlers/beacon/routes.go +++ b/node-api/handlers/beacon/routes.go @@ -23,8 +23,8 @@ package beacon import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) //nolint:funlen // routes are long diff --git a/mod/node-api/handlers/beacon/types/request.go b/node-api/handlers/beacon/types/request.go similarity index 98% rename from mod/node-api/handlers/beacon/types/request.go rename to node-api/handlers/beacon/types/request.go index 56010908ce..3a1ddba5ad 100644 --- a/mod/node-api/handlers/beacon/types/request.go +++ b/node-api/handlers/beacon/types/request.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/node-api/handlers/types" +import "github.com/berachain/beacon-kit/node-api/handlers/types" type GetGenesisRequest struct{} diff --git a/mod/node-api/handlers/beacon/types/response.go b/node-api/handlers/beacon/types/response.go similarity index 95% rename from mod/node-api/handlers/beacon/types/response.go rename to node-api/handlers/beacon/types/response.go index 6bf3641d07..b918a6f844 100644 --- a/mod/node-api/handlers/beacon/types/response.go +++ b/node-api/handlers/beacon/types/response.go @@ -21,8 +21,8 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" ) type ValidatorResponse struct { diff --git a/mod/node-api/handlers/beacon/types/types.go b/node-api/handlers/beacon/types/types.go similarity index 94% rename from mod/node-api/handlers/beacon/types/types.go rename to node-api/handlers/beacon/types/types.go index 02c45a3d32..890af5ffe5 100644 --- a/mod/node-api/handlers/beacon/types/types.go +++ b/node-api/handlers/beacon/types/types.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/primitives/pkg/common" +import "github.com/berachain/beacon-kit/primitives/common" // BeaconBlockHeader is the interface for the beacon block header. type BeaconBlockHeader interface { diff --git a/mod/node-api/handlers/beacon/validators.go b/node-api/handlers/beacon/validators.go similarity index 95% rename from mod/node-api/handlers/beacon/validators.go rename to node-api/handlers/beacon/validators.go index f6379eeb8c..92570637cf 100644 --- a/mod/node-api/handlers/beacon/validators.go +++ b/node-api/handlers/beacon/validators.go @@ -21,9 +21,9 @@ package beacon import ( - beacontypes "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + beacontypes "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/node-api/handlers/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) func (h *Handler[_, ContextT, _, _]) GetStateValidators( diff --git a/mod/node-api/handlers/builder/handler.go b/node-api/handlers/builder/handler.go similarity index 91% rename from mod/node-api/handlers/builder/handler.go rename to node-api/handlers/builder/handler.go index 44de7bc422..440e0030e7 100644 --- a/mod/node-api/handlers/builder/handler.go +++ b/node-api/handlers/builder/handler.go @@ -21,8 +21,8 @@ package builder import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server/context" ) type Handler[ContextT context.Context] struct { diff --git a/mod/node-api/handlers/builder/routes.go b/node-api/handlers/builder/routes.go similarity index 92% rename from mod/node-api/handlers/builder/routes.go rename to node-api/handlers/builder/routes.go index 6f5492fdb9..5b74044d50 100644 --- a/mod/node-api/handlers/builder/routes.go +++ b/node-api/handlers/builder/routes.go @@ -23,8 +23,8 @@ package builder import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) func (h *Handler[ContextT]) RegisterRoutes( diff --git a/mod/node-api/handlers/config/handler.go b/node-api/handlers/config/handler.go similarity index 91% rename from mod/node-api/handlers/config/handler.go rename to node-api/handlers/config/handler.go index 2e87500ac1..fe3892bd4d 100644 --- a/mod/node-api/handlers/config/handler.go +++ b/node-api/handlers/config/handler.go @@ -21,8 +21,8 @@ package config import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server/context" ) type Handler[ContextT context.Context] struct { diff --git a/mod/node-api/handlers/config/routes.go b/node-api/handlers/config/routes.go similarity index 93% rename from mod/node-api/handlers/config/routes.go rename to node-api/handlers/config/routes.go index 2b065a0257..d0d09ca603 100644 --- a/mod/node-api/handlers/config/routes.go +++ b/node-api/handlers/config/routes.go @@ -23,8 +23,8 @@ package config import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) func (h *Handler[ContextT]) RegisterRoutes( diff --git a/mod/node-api/handlers/debug/handler.go b/node-api/handlers/debug/handler.go similarity index 91% rename from mod/node-api/handlers/debug/handler.go rename to node-api/handlers/debug/handler.go index b5a89afec4..35ff64c6c4 100644 --- a/mod/node-api/handlers/debug/handler.go +++ b/node-api/handlers/debug/handler.go @@ -21,8 +21,8 @@ package debug import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server/context" ) type Handler[ContextT context.Context] struct { diff --git a/mod/node-api/handlers/debug/routes.go b/node-api/handlers/debug/routes.go similarity index 93% rename from mod/node-api/handlers/debug/routes.go rename to node-api/handlers/debug/routes.go index cb410fd2cf..59e2a69362 100644 --- a/mod/node-api/handlers/debug/routes.go +++ b/node-api/handlers/debug/routes.go @@ -23,8 +23,8 @@ package debug import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) func (h *Handler[ContextT]) RegisterRoutes( diff --git a/mod/node-api/handlers/events/handler.go b/node-api/handlers/events/handler.go similarity index 91% rename from mod/node-api/handlers/events/handler.go rename to node-api/handlers/events/handler.go index c623876c9a..e8a2aa1c1e 100644 --- a/mod/node-api/handlers/events/handler.go +++ b/node-api/handlers/events/handler.go @@ -21,8 +21,8 @@ package events import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server/context" ) type Handler[ContextT context.Context] struct { diff --git a/mod/node-api/handlers/events/routes.go b/node-api/handlers/events/routes.go similarity index 92% rename from mod/node-api/handlers/events/routes.go rename to node-api/handlers/events/routes.go index 50b5203c71..cb9eac6127 100644 --- a/mod/node-api/handlers/events/routes.go +++ b/node-api/handlers/events/routes.go @@ -23,8 +23,8 @@ package events import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) func (h *Handler[ContextT]) RegisterRoutes( diff --git a/mod/node-api/handlers/handlers.go b/node-api/handlers/handlers.go similarity index 96% rename from mod/node-api/handlers/handlers.go rename to node-api/handlers/handlers.go index 9dab755a45..3456ba582b 100644 --- a/mod/node-api/handlers/handlers.go +++ b/node-api/handlers/handlers.go @@ -21,8 +21,8 @@ package handlers import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" ) // handlerFn enforces a signature for all handler functions. diff --git a/mod/node-api/handlers/node/handler.go b/node-api/handlers/node/handler.go similarity index 91% rename from mod/node-api/handlers/node/handler.go rename to node-api/handlers/node/handler.go index 6ad6c29a43..438eaa924a 100644 --- a/mod/node-api/handlers/node/handler.go +++ b/node-api/handlers/node/handler.go @@ -21,8 +21,8 @@ package node import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server/context" ) type Handler[ContextT context.Context] struct { diff --git a/mod/node-api/handlers/node/placeholders.go b/node-api/handlers/node/placeholders.go similarity index 100% rename from mod/node-api/handlers/node/placeholders.go rename to node-api/handlers/node/placeholders.go diff --git a/mod/node-api/handlers/node/routes.go b/node-api/handlers/node/routes.go similarity index 94% rename from mod/node-api/handlers/node/routes.go rename to node-api/handlers/node/routes.go index 071648d293..c345ddb1bc 100644 --- a/mod/node-api/handlers/node/routes.go +++ b/node-api/handlers/node/routes.go @@ -23,8 +23,8 @@ package node import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) func (h *Handler[ContextT]) RegisterRoutes( diff --git a/mod/node-api/handlers/proof/backend.go b/node-api/handlers/proof/backend.go similarity index 96% rename from mod/node-api/handlers/proof/backend.go rename to node-api/handlers/proof/backend.go index 7aaa90ecb3..31567335ec 100644 --- a/mod/node-api/handlers/proof/backend.go +++ b/node-api/handlers/proof/backend.go @@ -21,7 +21,7 @@ package proof import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // Backend is the interface for backend of the proof API. diff --git a/mod/node-api/handlers/proof/block_proposer.go b/node-api/handlers/proof/block_proposer.go similarity index 92% rename from mod/node-api/handlers/proof/block_proposer.go rename to node-api/handlers/proof/block_proposer.go index 848d84b025..fdd6322712 100644 --- a/mod/node-api/handlers/proof/block_proposer.go +++ b/node-api/handlers/proof/block_proposer.go @@ -21,9 +21,9 @@ package proof import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) // GetBlockProposer returns the block proposer pubkey for the given timestamp diff --git a/mod/node-api/handlers/proof/execution_fee_recipient.go b/node-api/handlers/proof/execution_fee_recipient.go similarity index 92% rename from mod/node-api/handlers/proof/execution_fee_recipient.go rename to node-api/handlers/proof/execution_fee_recipient.go index 1513d3a047..c0cb366f49 100644 --- a/mod/node-api/handlers/proof/execution_fee_recipient.go +++ b/node-api/handlers/proof/execution_fee_recipient.go @@ -21,9 +21,9 @@ package proof import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) // GetExecutionFeeRecipient returns the fee recipient from the latest execution diff --git a/mod/node-api/handlers/proof/execution_number.go b/node-api/handlers/proof/execution_number.go similarity index 91% rename from mod/node-api/handlers/proof/execution_number.go rename to node-api/handlers/proof/execution_number.go index 4c128de2cf..29d2e76cba 100644 --- a/mod/node-api/handlers/proof/execution_number.go +++ b/node-api/handlers/proof/execution_number.go @@ -21,9 +21,9 @@ package proof import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" ) // GetExecutionNumber returns the block number from the latest execution diff --git a/mod/node-api/handlers/proof/handler.go b/node-api/handlers/proof/handler.go similarity index 90% rename from mod/node-api/handlers/proof/handler.go rename to node-api/handlers/proof/handler.go index d96dfc8f0f..34a1b71590 100644 --- a/mod/node-api/handlers/proof/handler.go +++ b/node-api/handlers/proof/handler.go @@ -21,11 +21,11 @@ package proof import ( - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" - "github.com/berachain/beacon-kit/mod/node-api/server/context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/node-api/handlers/utils" + "github.com/berachain/beacon-kit/node-api/server/context" + "github.com/berachain/beacon-kit/primitives/math" ) // Handler is the handler for the proof API. diff --git a/mod/node-api/handlers/proof/merkle/beacon_state.go b/node-api/handlers/proof/merkle/beacon_state.go similarity index 90% rename from mod/node-api/handlers/proof/merkle/beacon_state.go rename to node-api/handlers/proof/merkle/beacon_state.go index 13b9cd3c73..c3e63e5b86 100644 --- a/mod/node-api/handlers/proof/merkle/beacon_state.go +++ b/node-api/handlers/proof/merkle/beacon_state.go @@ -21,10 +21,10 @@ package merkle import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" ) // ProveBeaconStateInBlock generates a proof for the beacon state in the diff --git a/mod/node-api/handlers/proof/merkle/beacon_state_test.go b/node-api/handlers/proof/merkle/beacon_state_test.go similarity index 90% rename from mod/node-api/handlers/proof/merkle/beacon_state_test.go rename to node-api/handlers/proof/merkle/beacon_state_test.go index 1595469521..bf689b4a18 100644 --- a/mod/node-api/handlers/proof/merkle/beacon_state_test.go +++ b/node-api/handlers/proof/merkle/beacon_state_test.go @@ -23,10 +23,10 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/node-api/handlers/proof/merkle/block_proposer_index.go b/node-api/handlers/proof/merkle/block_proposer_index.go similarity index 91% rename from mod/node-api/handlers/proof/merkle/block_proposer_index.go rename to node-api/handlers/proof/merkle/block_proposer_index.go index 19e0a1129c..2abeb0f026 100644 --- a/mod/node-api/handlers/proof/merkle/block_proposer_index.go +++ b/node-api/handlers/proof/merkle/block_proposer_index.go @@ -21,10 +21,10 @@ package merkle import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" ) // ProveProposerIndexInBlock generates a proof for the proposer index in the diff --git a/mod/node-api/handlers/proof/merkle/block_proposer_index_test.go b/node-api/handlers/proof/merkle/block_proposer_index_test.go similarity index 90% rename from mod/node-api/handlers/proof/merkle/block_proposer_index_test.go rename to node-api/handlers/proof/merkle/block_proposer_index_test.go index 5b8afcd159..02d489f01c 100644 --- a/mod/node-api/handlers/proof/merkle/block_proposer_index_test.go +++ b/node-api/handlers/proof/merkle/block_proposer_index_test.go @@ -23,10 +23,10 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/node-api/handlers/proof/merkle/block_proposer_pubkey.go b/node-api/handlers/proof/merkle/block_proposer_pubkey.go similarity index 93% rename from mod/node-api/handlers/proof/merkle/block_proposer_pubkey.go rename to node-api/handlers/proof/merkle/block_proposer_pubkey.go index 90a641b7de..d5e336b78e 100644 --- a/mod/node-api/handlers/proof/merkle/block_proposer_pubkey.go +++ b/node-api/handlers/proof/merkle/block_proposer_pubkey.go @@ -21,11 +21,11 @@ package merkle import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/math" ) // ProveProposerPubkeyInBlock generates a proof for the proposer pubkey in the diff --git a/mod/node-api/handlers/proof/merkle/block_proposer_pubkey_test.go b/node-api/handlers/proof/merkle/block_proposer_pubkey_test.go similarity index 88% rename from mod/node-api/handlers/proof/merkle/block_proposer_pubkey_test.go rename to node-api/handlers/proof/merkle/block_proposer_pubkey_test.go index 881398a3f3..954d6ac7d2 100644 --- a/mod/node-api/handlers/proof/merkle/block_proposer_pubkey_test.go +++ b/node-api/handlers/proof/merkle/block_proposer_pubkey_test.go @@ -23,12 +23,12 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle/mock" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle/mock" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/node-api/handlers/proof/merkle/constants.go b/node-api/handlers/proof/merkle/constants.go similarity index 100% rename from mod/node-api/handlers/proof/merkle/constants.go rename to node-api/handlers/proof/merkle/constants.go diff --git a/mod/node-api/handlers/proof/merkle/constants_test.go b/node-api/handlers/proof/merkle/constants_test.go similarity index 95% rename from mod/node-api/handlers/proof/merkle/constants_test.go rename to node-api/handlers/proof/merkle/constants_test.go index 32630d08fb..e3847428b3 100644 --- a/mod/node-api/handlers/proof/merkle/constants_test.go +++ b/node-api/handlers/proof/merkle/constants_test.go @@ -23,16 +23,16 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - mlib "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/schema" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + mlib "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/schema" "github.com/stretchr/testify/require" ) var ( // beaconStateSchema is the schema for the BeaconState struct defined in - // beacon-kit/mod/consensus-types/pkg/types/state.go. + // beacon-kit/mod/consensus-types/types/state.go. beaconStateSchema = schema.DefineContainer( schema.NewField("GenesisValidatorsRoot", schema.B32()), schema.NewField("Slot", schema.U64()), @@ -98,7 +98,7 @@ var ( ) // beaconHeaderSchema is the schema for the BeaconBlockHeader struct defined - // in beacon-kit/mod/consensus-types/pkg/types/header.go, with the SSZ + // in beacon-kit/mod/consensus-types/types/header.go, with the SSZ // expansion of StateRoot to use the BeaconState. beaconHeaderSchema = schema.DefineContainer( schema.NewField("Slot", schema.U64()), diff --git a/mod/node-api/handlers/proof/merkle/execution_fee_recipient.go b/node-api/handlers/proof/merkle/execution_fee_recipient.go similarity index 94% rename from mod/node-api/handlers/proof/merkle/execution_fee_recipient.go rename to node-api/handlers/proof/merkle/execution_fee_recipient.go index 1425fbdef3..25b6224074 100644 --- a/mod/node-api/handlers/proof/merkle/execution_fee_recipient.go +++ b/node-api/handlers/proof/merkle/execution_fee_recipient.go @@ -22,10 +22,10 @@ package merkle import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" ) // ProveExecutionFeeRecipientInBlock generates a proof for the fee recipient in diff --git a/mod/node-api/handlers/proof/merkle/execution_fee_recipient_test.go b/node-api/handlers/proof/merkle/execution_fee_recipient_test.go similarity index 89% rename from mod/node-api/handlers/proof/merkle/execution_fee_recipient_test.go rename to node-api/handlers/proof/merkle/execution_fee_recipient_test.go index 55fcaa0049..111334b3a7 100644 --- a/mod/node-api/handlers/proof/merkle/execution_fee_recipient_test.go +++ b/node-api/handlers/proof/merkle/execution_fee_recipient_test.go @@ -23,11 +23,11 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle/mock" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle/mock" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/node-api/handlers/proof/merkle/execution_number.go b/node-api/handlers/proof/merkle/execution_number.go similarity index 94% rename from mod/node-api/handlers/proof/merkle/execution_number.go rename to node-api/handlers/proof/merkle/execution_number.go index c98d69d1f2..635682a7eb 100644 --- a/mod/node-api/handlers/proof/merkle/execution_number.go +++ b/node-api/handlers/proof/merkle/execution_number.go @@ -22,10 +22,10 @@ package merkle import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" ) // ProveExecutionNumberInBlock generates a proof for the block number of the diff --git a/mod/node-api/handlers/proof/merkle/execution_number_test.go b/node-api/handlers/proof/merkle/execution_number_test.go similarity index 89% rename from mod/node-api/handlers/proof/merkle/execution_number_test.go rename to node-api/handlers/proof/merkle/execution_number_test.go index 41632db339..4a79cde123 100644 --- a/mod/node-api/handlers/proof/merkle/execution_number_test.go +++ b/node-api/handlers/proof/merkle/execution_number_test.go @@ -23,11 +23,11 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle" - "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/merkle/mock" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle" + "github.com/berachain/beacon-kit/node-api/handlers/proof/merkle/mock" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/node-api/handlers/proof/merkle/merkle_test.go b/node-api/handlers/proof/merkle/merkle_test.go similarity index 95% rename from mod/node-api/handlers/proof/merkle/merkle_test.go rename to node-api/handlers/proof/merkle/merkle_test.go index 332ae06d8a..0197f06d90 100644 --- a/mod/node-api/handlers/proof/merkle/merkle_test.go +++ b/node-api/handlers/proof/merkle/merkle_test.go @@ -26,7 +26,7 @@ import ( "path/filepath" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" "github.com/stretchr/testify/require" ) diff --git a/mod/node-api/handlers/proof/merkle/mock/beacon_state.go b/node-api/handlers/proof/merkle/mock/beacon_state.go similarity index 93% rename from mod/node-api/handlers/proof/merkle/mock/beacon_state.go rename to node-api/handlers/proof/merkle/mock/beacon_state.go index 5d50fcff22..a29f61582c 100644 --- a/mod/node-api/handlers/proof/merkle/mock/beacon_state.go +++ b/node-api/handlers/proof/merkle/mock/beacon_state.go @@ -23,10 +23,10 @@ package mock import ( "errors" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - ptypes "github.com/berachain/beacon-kit/mod/node-api/handlers/proof/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + ptypes "github.com/berachain/beacon-kit/node-api/handlers/proof/types" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // Compile time check to ensure BeaconState implements the methods diff --git a/mod/node-api/handlers/proof/merkle/testdata/empty_execution_number_proof.json b/node-api/handlers/proof/merkle/testdata/empty_execution_number_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/empty_execution_number_proof.json rename to node-api/handlers/proof/merkle/testdata/empty_execution_number_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/empty_fee_recipient_proof.json b/node-api/handlers/proof/merkle/testdata/empty_fee_recipient_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/empty_fee_recipient_proof.json rename to node-api/handlers/proof/merkle/testdata/empty_fee_recipient_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/empty_state_proof.json b/node-api/handlers/proof/merkle/testdata/empty_state_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/empty_state_proof.json rename to node-api/handlers/proof/merkle/testdata/empty_state_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/many_validators_proposer_index_proof.json b/node-api/handlers/proof/merkle/testdata/many_validators_proposer_index_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/many_validators_proposer_index_proof.json rename to node-api/handlers/proof/merkle/testdata/many_validators_proposer_index_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/many_validators_proposer_pubkey_proof.json b/node-api/handlers/proof/merkle/testdata/many_validators_proposer_pubkey_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/many_validators_proposer_pubkey_proof.json rename to node-api/handlers/proof/merkle/testdata/many_validators_proposer_pubkey_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/non_empty_execution_number_proof.json b/node-api/handlers/proof/merkle/testdata/non_empty_execution_number_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/non_empty_execution_number_proof.json rename to node-api/handlers/proof/merkle/testdata/non_empty_execution_number_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/non_empty_fee_recipient_proof.json b/node-api/handlers/proof/merkle/testdata/non_empty_fee_recipient_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/non_empty_fee_recipient_proof.json rename to node-api/handlers/proof/merkle/testdata/non_empty_fee_recipient_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/non_empty_state_proof.json b/node-api/handlers/proof/merkle/testdata/non_empty_state_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/non_empty_state_proof.json rename to node-api/handlers/proof/merkle/testdata/non_empty_state_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/one_validator_proposer_index_proof.json b/node-api/handlers/proof/merkle/testdata/one_validator_proposer_index_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/one_validator_proposer_index_proof.json rename to node-api/handlers/proof/merkle/testdata/one_validator_proposer_index_proof.json diff --git a/mod/node-api/handlers/proof/merkle/testdata/one_validator_proposer_pubkey_proof.json b/node-api/handlers/proof/merkle/testdata/one_validator_proposer_pubkey_proof.json similarity index 100% rename from mod/node-api/handlers/proof/merkle/testdata/one_validator_proposer_pubkey_proof.json rename to node-api/handlers/proof/merkle/testdata/one_validator_proposer_pubkey_proof.json diff --git a/mod/node-api/handlers/proof/routes.go b/node-api/handlers/proof/routes.go similarity index 94% rename from mod/node-api/handlers/proof/routes.go rename to node-api/handlers/proof/routes.go index 3b8aa838c5..b542babc47 100644 --- a/mod/node-api/handlers/proof/routes.go +++ b/node-api/handlers/proof/routes.go @@ -23,8 +23,8 @@ package proof import ( "net/http" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" ) func ( diff --git a/mod/node-api/handlers/proof/types/request.go b/node-api/handlers/proof/types/request.go similarity index 95% rename from mod/node-api/handlers/proof/types/request.go rename to node-api/handlers/proof/types/request.go index 649543c541..47f0bcc477 100644 --- a/mod/node-api/handlers/proof/types/request.go +++ b/node-api/handlers/proof/types/request.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/node-api/handlers/types" +import "github.com/berachain/beacon-kit/node-api/handlers/types" // BlockProposerRequest is the request for the // `/proof/block_proposer/{timestamp_id}` endpoint. diff --git a/mod/node-api/handlers/proof/types/response.go b/node-api/handlers/proof/types/response.go similarity index 95% rename from mod/node-api/handlers/proof/types/response.go rename to node-api/handlers/proof/types/response.go index ebe457ec0f..257b136f2f 100644 --- a/mod/node-api/handlers/proof/types/response.go +++ b/node-api/handlers/proof/types/response.go @@ -21,9 +21,9 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // BlockProposerResponse is the response for the diff --git a/mod/node-api/handlers/proof/types/types.go b/node-api/handlers/proof/types/types.go similarity index 91% rename from mod/node-api/handlers/proof/types/types.go rename to node-api/handlers/proof/types/types.go index e1c8c65b13..a6dcd71751 100644 --- a/mod/node-api/handlers/proof/types/types.go +++ b/node-api/handlers/proof/types/types.go @@ -21,10 +21,10 @@ package types import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" fastssz "github.com/ferranbt/fastssz" ) diff --git a/mod/node-api/handlers/routes.go b/node-api/handlers/routes.go similarity index 97% rename from mod/node-api/handlers/routes.go rename to node-api/handlers/routes.go index b3702d046f..767419eb29 100644 --- a/mod/node-api/handlers/routes.go +++ b/node-api/handlers/routes.go @@ -21,7 +21,7 @@ package handlers import ( - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" ) // Route is a route for the node API. diff --git a/mod/node-api/handlers/types/errors.go b/node-api/handlers/types/errors.go similarity index 100% rename from mod/node-api/handlers/types/errors.go rename to node-api/handlers/types/errors.go diff --git a/mod/node-api/handlers/types/request.go b/node-api/handlers/types/request.go similarity index 100% rename from mod/node-api/handlers/types/request.go rename to node-api/handlers/types/request.go diff --git a/mod/node-api/handlers/types/response.go b/node-api/handlers/types/response.go similarity index 100% rename from mod/node-api/handlers/types/response.go rename to node-api/handlers/types/response.go diff --git a/mod/node-api/handlers/utils/constants.go b/node-api/handlers/utils/constants.go similarity index 94% rename from mod/node-api/handlers/utils/constants.go rename to node-api/handlers/utils/constants.go index 63b5a91e6b..dba56e92d8 100644 --- a/mod/node-api/handlers/utils/constants.go +++ b/node-api/handlers/utils/constants.go @@ -20,7 +20,7 @@ package utils -import "github.com/berachain/beacon-kit/mod/primitives/pkg/math" +import "github.com/berachain/beacon-kit/primitives/math" const ( StateIDGenesis = "genesis" diff --git a/mod/node-api/handlers/utils/context.go b/node-api/handlers/utils/context.go similarity index 89% rename from mod/node-api/handlers/utils/context.go rename to node-api/handlers/utils/context.go index 0a990df4b9..15b4235a6e 100644 --- a/mod/node-api/handlers/utils/context.go +++ b/node-api/handlers/utils/context.go @@ -21,9 +21,9 @@ package utils import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers/types" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers/types" + "github.com/berachain/beacon-kit/node-api/server/context" ) // BindAndValidate binds the request to the context and validates it. diff --git a/mod/node-api/handlers/utils/id.go b/node-api/handlers/utils/id.go similarity index 96% rename from mod/node-api/handlers/utils/id.go rename to node-api/handlers/utils/id.go index a9ed206910..933ebf8157 100644 --- a/mod/node-api/handlers/utils/id.go +++ b/node-api/handlers/utils/id.go @@ -24,9 +24,9 @@ import ( "strconv" "strings" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // TODO: define unique types for each of the query-able IDs (state & block from diff --git a/mod/node-api/server/config.go b/node-api/server/config.go similarity index 100% rename from mod/node-api/server/config.go rename to node-api/server/config.go diff --git a/mod/node-api/server/context/context.go b/node-api/server/context/context.go similarity index 100% rename from mod/node-api/server/context/context.go rename to node-api/server/context/context.go diff --git a/mod/node-api/server/server.go b/node-api/server/server.go similarity index 91% rename from mod/node-api/server/server.go rename to node-api/server/server.go index dccc8d4ec5..d56d1296b7 100644 --- a/mod/node-api/server/server.go +++ b/node-api/server/server.go @@ -23,10 +23,10 @@ package server import ( "context" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/log/pkg/noop" - "github.com/berachain/beacon-kit/mod/node-api/handlers" - apicontext "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/log/noop" + "github.com/berachain/beacon-kit/node-api/handlers" + apicontext "github.com/berachain/beacon-kit/node-api/server/context" ) // Server is the API Server service. diff --git a/mod/node-api/server/types.go b/node-api/server/types.go similarity index 87% rename from mod/node-api/server/types.go rename to node-api/server/types.go index 29427ec15b..d23808eb34 100644 --- a/mod/node-api/server/types.go +++ b/node-api/server/types.go @@ -21,9 +21,9 @@ package server import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server/context" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server/context" ) // Engine is a generic interface for an API engine. diff --git a/mod/node-core/pkg/builder/baseapp_options.go b/node-core/builder/baseapp_options.go similarity index 92% rename from mod/node-core/pkg/builder/baseapp_options.go rename to node-core/builder/baseapp_options.go index a7ddcd2bae..7b75fc897d 100644 --- a/mod/node-core/pkg/builder/baseapp_options.go +++ b/node-core/builder/baseapp_options.go @@ -28,10 +28,10 @@ import ( "cosmossdk.io/store" storetypes "cosmossdk.io/store/types" - server "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server" - "github.com/berachain/beacon-kit/mod/config" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/log" + server "github.com/berachain/beacon-kit/cli/commands/server" + "github.com/berachain/beacon-kit/config" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/log" "github.com/cosmos/cosmos-sdk/client/flags" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" "github.com/spf13/cast" diff --git a/mod/node-core/pkg/builder/builder.go b/node-core/builder/builder.go similarity index 91% rename from mod/node-core/pkg/builder/builder.go rename to node-core/builder/builder.go index 02592ea598..8454ac8950 100644 --- a/mod/node-core/pkg/builder/builder.go +++ b/node-core/builder/builder.go @@ -24,11 +24,11 @@ import ( "io" "cosmossdk.io/depinject" - servertypes "github.com/berachain/beacon-kit/mod/cli/pkg/commands/server/types" - "github.com/berachain/beacon-kit/mod/config" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" + servertypes "github.com/berachain/beacon-kit/cli/commands/server/types" + "github.com/berachain/beacon-kit/config" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/types" cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" ) diff --git a/mod/node-core/pkg/builder/options.go b/node-core/builder/options.go similarity index 94% rename from mod/node-core/pkg/builder/options.go rename to node-core/builder/options.go index 44848cee59..2b859806be 100644 --- a/mod/node-core/pkg/builder/options.go +++ b/node-core/builder/options.go @@ -21,8 +21,8 @@ package builder import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/types" ) // Opt is a type that defines a function that modifies NodeBuilder. diff --git a/mod/node-core/pkg/components/api.go b/node-core/components/api.go similarity index 91% rename from mod/node-core/pkg/components/api.go rename to node-core/components/api.go index 436728b6a6..0885aeadda 100644 --- a/mod/node-core/pkg/components/api.go +++ b/node-core/components/api.go @@ -22,13 +22,13 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/backend" - "github.com/berachain/beacon-kit/mod/node-api/engines/echo" - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/server" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/backend" + "github.com/berachain/beacon-kit/node-api/engines/echo" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/server" + "github.com/berachain/beacon-kit/primitives/common" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/mod/node-core/pkg/components/api_handlers.go b/node-core/components/api_handlers.go similarity index 90% rename from mod/node-core/pkg/components/api_handlers.go rename to node-core/components/api_handlers.go index 83448ae897..8e2cff0234 100644 --- a/mod/node-core/pkg/components/api_handlers.go +++ b/node-core/components/api_handlers.go @@ -22,14 +22,14 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/node-api/handlers" - beaconapi "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon" - builderapi "github.com/berachain/beacon-kit/mod/node-api/handlers/builder" - configapi "github.com/berachain/beacon-kit/mod/node-api/handlers/config" - debugapi "github.com/berachain/beacon-kit/mod/node-api/handlers/debug" - eventsapi "github.com/berachain/beacon-kit/mod/node-api/handlers/events" - nodeapi "github.com/berachain/beacon-kit/mod/node-api/handlers/node" - proofapi "github.com/berachain/beacon-kit/mod/node-api/handlers/proof" + "github.com/berachain/beacon-kit/node-api/handlers" + beaconapi "github.com/berachain/beacon-kit/node-api/handlers/beacon" + builderapi "github.com/berachain/beacon-kit/node-api/handlers/builder" + configapi "github.com/berachain/beacon-kit/node-api/handlers/config" + debugapi "github.com/berachain/beacon-kit/node-api/handlers/debug" + eventsapi "github.com/berachain/beacon-kit/node-api/handlers/events" + nodeapi "github.com/berachain/beacon-kit/node-api/handlers/node" + proofapi "github.com/berachain/beacon-kit/node-api/handlers/proof" ) type NodeAPIHandlersInput[ diff --git a/mod/node-core/pkg/components/attributes_factory.go b/node-core/components/attributes_factory.go similarity index 86% rename from mod/node-core/pkg/components/attributes_factory.go rename to node-core/components/attributes_factory.go index a4676a5802..09d7c05996 100644 --- a/mod/node-core/pkg/components/attributes_factory.go +++ b/node-core/components/attributes_factory.go @@ -22,11 +22,11 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/payload/pkg/attributes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/config" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/payload/attributes" + "github.com/berachain/beacon-kit/primitives/common" ) type AttributesFactoryInput[LoggerT any] struct { diff --git a/mod/node-core/pkg/components/availability_store.go b/node-core/components/availability_store.go similarity index 88% rename from mod/node-core/pkg/components/availability_store.go rename to node-core/components/availability_store.go index d2aa68a74e..f064140a98 100644 --- a/mod/node-core/pkg/components/availability_store.go +++ b/node-core/components/availability_store.go @@ -24,15 +24,15 @@ import ( "os" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - dastore "github.com/berachain/beacon-kit/mod/da/pkg/store" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/storage/pkg/filedb" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/config" + dastore "github.com/berachain/beacon-kit/da/store" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/storage/filedb" + "github.com/berachain/beacon-kit/storage/manager" + "github.com/berachain/beacon-kit/storage/pruner" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cast" ) diff --git a/mod/node-core/pkg/components/backend.go b/node-core/components/backend.go similarity index 94% rename from mod/node-core/pkg/components/backend.go rename to node-core/components/backend.go index 56251464e6..fc318bfac1 100644 --- a/mod/node-core/pkg/components/backend.go +++ b/node-core/components/backend.go @@ -24,8 +24,8 @@ import ( "context" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/storage" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/node-core/components/storage" + "github.com/berachain/beacon-kit/primitives/common" ) // StorageBackendInput is the input for the ProvideStorageBackend function. diff --git a/mod/node-core/pkg/components/blobs.go b/node-core/components/blobs.go similarity index 89% rename from mod/node-core/pkg/components/blobs.go rename to node-core/components/blobs.go index 7fc97405fa..0488aaff6f 100644 --- a/mod/node-core/pkg/components/blobs.go +++ b/node-core/components/blobs.go @@ -22,15 +22,15 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/cli/pkg/flags" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - dablob "github.com/berachain/beacon-kit/mod/da/pkg/blob" - "github.com/berachain/beacon-kit/mod/da/pkg/da" - "github.com/berachain/beacon-kit/mod/da/pkg/kzg" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/cli/flags" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/consensus-types/types" + dablob "github.com/berachain/beacon-kit/da/blob" + "github.com/berachain/beacon-kit/da/da" + "github.com/berachain/beacon-kit/da/kzg" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" gokzg4844 "github.com/crate-crypto/go-kzg-4844" "github.com/spf13/cast" ) diff --git a/mod/node-core/pkg/components/block_store.go b/node-core/components/block_store.go similarity index 90% rename from mod/node-core/pkg/components/block_store.go rename to node-core/components/block_store.go index a3c8eb8f32..e5863945f1 100644 --- a/mod/node-core/pkg/components/block_store.go +++ b/node-core/components/block_store.go @@ -22,10 +22,10 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/block" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/block" + "github.com/berachain/beacon-kit/storage/manager" ) // BlockStoreInput is the input for the dep inject framework. diff --git a/mod/node-core/pkg/components/block_store_service.go b/node-core/components/block_store_service.go similarity index 92% rename from mod/node-core/pkg/components/block_store_service.go rename to node-core/components/block_store_service.go index d5e3d89775..433e746c8b 100644 --- a/mod/node-core/pkg/components/block_store_service.go +++ b/node-core/components/block_store_service.go @@ -22,9 +22,9 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/log" - blockstore "github.com/berachain/beacon-kit/mod/node-api/block_store" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/log" + blockstore "github.com/berachain/beacon-kit/node-api/block_store" ) // BlockServiceInput is the input for the block service. diff --git a/mod/node-core/pkg/components/chain_service.go b/node-core/components/chain_service.go similarity index 88% rename from mod/node-core/pkg/components/chain_service.go rename to node-core/components/chain_service.go index ca7e488876..416a287962 100644 --- a/mod/node-core/pkg/components/chain_service.go +++ b/node-core/components/chain_service.go @@ -22,15 +22,15 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/beacon/blockchain" - "github.com/berachain/beacon-kit/mod/config" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/engine" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + "github.com/berachain/beacon-kit/beacon/blockchain" + "github.com/berachain/beacon-kit/config" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/engine" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" ) // ChainServiceInput is the input for the chain service provider. diff --git a/mod/node-core/pkg/components/chain_spec.go b/node-core/components/chain_spec.go similarity index 94% rename from mod/node-core/pkg/components/chain_spec.go rename to node-core/components/chain_spec.go index 4bb7128ff8..c32e7f649a 100644 --- a/mod/node-core/pkg/components/chain_spec.go +++ b/node-core/components/chain_spec.go @@ -23,8 +23,8 @@ package components import ( "os" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/primitives/common" ) const ( diff --git a/mod/node-core/pkg/components/cometbft_service.go b/node-core/components/cometbft_service.go similarity index 84% rename from mod/node-core/pkg/components/cometbft_service.go rename to node-core/components/cometbft_service.go index 735ec1fdbe..05a7eb1321 100644 --- a/mod/node-core/pkg/components/cometbft_service.go +++ b/node-core/components/cometbft_service.go @@ -22,11 +22,11 @@ package components import ( storetypes "cosmossdk.io/store/types" - "github.com/berachain/beacon-kit/mod/config" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/builder" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/config" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/builder" + "github.com/berachain/beacon-kit/primitives/common" cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" ) diff --git a/mod/node-core/pkg/components/config.go b/node-core/components/config.go similarity index 96% rename from mod/node-core/pkg/components/config.go rename to node-core/components/config.go index dc59fbcc1f..92d5a3e393 100644 --- a/mod/node-core/pkg/components/config.go +++ b/node-core/components/config.go @@ -22,7 +22,7 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" + "github.com/berachain/beacon-kit/config" ) // ConfigInput is the input for the dependency injection framework. diff --git a/mod/node-core/pkg/components/config_server.go b/node-core/components/config_server.go similarity index 94% rename from mod/node-core/pkg/components/config_server.go rename to node-core/components/config_server.go index a3034d152f..b8822767b0 100644 --- a/mod/node-core/pkg/components/config_server.go +++ b/node-core/components/config_server.go @@ -24,8 +24,8 @@ import ( "errors" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - sdkconfig "github.com/berachain/beacon-kit/mod/config/pkg/config" + "github.com/berachain/beacon-kit/config" + sdkconfig "github.com/berachain/beacon-kit/config/config" "github.com/mitchellh/mapstructure" "github.com/spf13/viper" ) diff --git a/mod/node-core/pkg/components/db_manager.go b/node-core/components/db_manager.go similarity index 91% rename from mod/node-core/pkg/components/db_manager.go rename to node-core/components/db_manager.go index 074781c1c1..9b3b9a5669 100644 --- a/mod/node-core/pkg/components/db_manager.go +++ b/node-core/components/db_manager.go @@ -22,9 +22,9 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/manager" + "github.com/berachain/beacon-kit/storage/pruner" ) // DBManagerInput is the input for the dep inject framework. diff --git a/mod/node-core/pkg/components/depinject.go b/node-core/components/depinject.go similarity index 100% rename from mod/node-core/pkg/components/depinject.go rename to node-core/components/depinject.go diff --git a/mod/node-core/pkg/components/deposit_contract.go b/node-core/components/deposit_contract.go similarity index 89% rename from mod/node-core/pkg/components/deposit_contract.go rename to node-core/components/deposit_contract.go index 7aa575db7a..08387a3d1a 100644 --- a/mod/node-core/pkg/components/deposit_contract.go +++ b/node-core/components/deposit_contract.go @@ -22,10 +22,10 @@ package components import ( "cosmossdk.io/depinject" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/deposit" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/deposit" + "github.com/berachain/beacon-kit/primitives/common" ) // BeaconDepositContractInput is the input for the beacon deposit contract diff --git a/mod/node-core/pkg/components/deposit_service.go b/node-core/components/deposit_service.go similarity index 87% rename from mod/node-core/pkg/components/deposit_service.go rename to node-core/components/deposit_service.go index a54cb739d6..5a4a06266e 100644 --- a/mod/node-core/pkg/components/deposit_service.go +++ b/node-core/components/deposit_service.go @@ -22,13 +22,13 @@ package components import ( "cosmossdk.io/depinject" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/deposit" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/deposit" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // DepositServiceIn is the input for the deposit service. diff --git a/mod/node-core/pkg/components/deposit_store.go b/node-core/components/deposit_store.go similarity index 86% rename from mod/node-core/pkg/components/deposit_store.go rename to node-core/components/deposit_store.go index 5473bff087..c62292b579 100644 --- a/mod/node-core/pkg/components/deposit_store.go +++ b/node-core/components/deposit_store.go @@ -23,15 +23,15 @@ package components import ( "cosmossdk.io/depinject" storev2 "cosmossdk.io/store/v2/db" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/execution/pkg/deposit" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/storage" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - depositstore "github.com/berachain/beacon-kit/mod/storage/pkg/deposit" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/execution/deposit" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/storage" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/common" + depositstore "github.com/berachain/beacon-kit/storage/deposit" + "github.com/berachain/beacon-kit/storage/manager" + "github.com/berachain/beacon-kit/storage/pruner" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cast" ) diff --git a/mod/node-core/pkg/components/dispatcher.go b/node-core/components/dispatcher.go similarity index 93% rename from mod/node-core/pkg/components/dispatcher.go rename to node-core/components/dispatcher.go index 5ba612bca9..80350692ad 100644 --- a/mod/node-core/pkg/components/dispatcher.go +++ b/node-core/components/dispatcher.go @@ -22,9 +22,9 @@ package components import ( "cosmossdk.io/depinject" - dp "github.com/berachain/beacon-kit/mod/async/pkg/dispatcher" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + dp "github.com/berachain/beacon-kit/async/dispatcher" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" ) // DispatcherInput is the input for the Dispatcher. diff --git a/mod/node-core/pkg/components/engine.go b/node-core/components/engine.go similarity index 87% rename from mod/node-core/pkg/components/engine.go rename to node-core/components/engine.go index 07e472ebed..481687b3c8 100644 --- a/mod/node-core/pkg/components/engine.go +++ b/node-core/components/engine.go @@ -24,14 +24,14 @@ import ( "math/big" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/engine" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/config" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/engine" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/net/jwt" ) // EngineClientInputs is the input for the EngineClient. diff --git a/mod/node-core/pkg/components/interfaces.go b/node-core/components/interfaces.go similarity index 98% rename from mod/node-core/pkg/components/interfaces.go rename to node-core/components/interfaces.go index 6e7bfa811d..a10f8dc3dd 100644 --- a/mod/node-core/pkg/components/interfaces.go +++ b/node-core/components/interfaces.go @@ -25,17 +25,17 @@ import ( "context" "encoding/json" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-api/handlers" - "github.com/berachain/beacon-kit/mod/node-api/handlers/beacon/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-api/handlers" + "github.com/berachain/beacon-kit/node-api/handlers/beacon/types" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" sdk "github.com/cosmos/cosmos-sdk/types" fastssz "github.com/ferranbt/fastssz" diff --git a/mod/node-core/pkg/components/jwt_secret.go b/node-core/components/jwt_secret.go similarity index 91% rename from mod/node-core/pkg/components/jwt_secret.go rename to node-core/components/jwt_secret.go index 2dd0b97fb7..d5f2b2db32 100644 --- a/mod/node-core/pkg/components/jwt_secret.go +++ b/node-core/components/jwt_secret.go @@ -24,9 +24,9 @@ import ( "strings" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/cli/pkg/flags" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/cli/flags" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/primitives/net/jwt" "github.com/spf13/afero" "github.com/spf13/cast" ) diff --git a/mod/node-core/pkg/components/metrics/sink.go b/node-core/components/metrics/sink.go similarity index 100% rename from mod/node-core/pkg/components/metrics/sink.go rename to node-core/components/metrics/sink.go diff --git a/mod/node-core/pkg/components/middleware.go b/node-core/components/middleware.go similarity index 89% rename from mod/node-core/pkg/components/middleware.go rename to node-core/components/middleware.go index 6c8ad1d1fa..0057e623b2 100644 --- a/mod/node-core/pkg/components/middleware.go +++ b/node-core/components/middleware.go @@ -22,10 +22,10 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/middleware" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/consensus/cometbft/service/middleware" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" ) // ABCIMiddlewareInput is the input for the validator middleware provider. diff --git a/mod/node-core/pkg/components/node.go b/node-core/components/node.go similarity index 82% rename from mod/node-core/pkg/components/node.go rename to node-core/components/node.go index 4cb82c8ee1..da51b4e454 100644 --- a/mod/node-core/pkg/components/node.go +++ b/node-core/components/node.go @@ -21,10 +21,10 @@ package components import ( - "github.com/berachain/beacon-kit/mod/log/pkg/phuslu" - "github.com/berachain/beacon-kit/mod/node-core/pkg/node" - service "github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" + "github.com/berachain/beacon-kit/log/phuslu" + "github.com/berachain/beacon-kit/node-core/node" + service "github.com/berachain/beacon-kit/node-core/services/registry" + "github.com/berachain/beacon-kit/node-core/types" ) // ProvideNode is a function that provides the module to the. diff --git a/mod/node-core/pkg/components/payload_builder.go b/node-core/components/payload_builder.go similarity index 86% rename from mod/node-core/pkg/components/payload_builder.go rename to node-core/components/payload_builder.go index 24602fe49f..1e3eb2cbba 100644 --- a/mod/node-core/pkg/components/payload_builder.go +++ b/node-core/components/payload_builder.go @@ -22,14 +22,14 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/engine" - "github.com/berachain/beacon-kit/mod/log" - payloadbuilder "github.com/berachain/beacon-kit/mod/payload/pkg/builder" - "github.com/berachain/beacon-kit/mod/payload/pkg/cache" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/config" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/engine" + "github.com/berachain/beacon-kit/log" + payloadbuilder "github.com/berachain/beacon-kit/payload/builder" + "github.com/berachain/beacon-kit/payload/cache" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // LocalBuilderInput is an input for the dep inject framework. diff --git a/mod/node-core/pkg/components/reporting_service.go b/node-core/components/reporting_service.go similarity index 86% rename from mod/node-core/pkg/components/reporting_service.go rename to node-core/components/reporting_service.go index 3fb034d574..805519c1fe 100644 --- a/mod/node-core/pkg/components/reporting_service.go +++ b/node-core/components/reporting_service.go @@ -22,11 +22,11 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/node-core/pkg/services/version" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/node-core/services/version" + "github.com/berachain/beacon-kit/primitives/constraints" sdkversion "github.com/cosmos/cosmos-sdk/version" ) diff --git a/mod/node-core/pkg/components/service_registry.go b/node-core/components/service_registry.go similarity index 86% rename from mod/node-core/pkg/components/service_registry.go rename to node-core/components/service_registry.go index 7eff545f04..646603dfc4 100644 --- a/mod/node-core/pkg/components/service_registry.go +++ b/node-core/components/service_registry.go @@ -22,21 +22,21 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/beacon/blockchain" - "github.com/berachain/beacon-kit/mod/beacon/validator" - cometbft "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service" - "github.com/berachain/beacon-kit/mod/consensus/pkg/cometbft/service/middleware" - "github.com/berachain/beacon-kit/mod/da/pkg/da" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/deposit" - "github.com/berachain/beacon-kit/mod/log" - blockstore "github.com/berachain/beacon-kit/mod/node-api/block_store" - "github.com/berachain/beacon-kit/mod/node-api/server" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - service "github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry" - "github.com/berachain/beacon-kit/mod/node-core/pkg/services/version" - "github.com/berachain/beacon-kit/mod/observability/pkg/telemetry" + "github.com/berachain/beacon-kit/beacon/blockchain" + "github.com/berachain/beacon-kit/beacon/validator" + cometbft "github.com/berachain/beacon-kit/consensus/cometbft/service" + "github.com/berachain/beacon-kit/consensus/cometbft/service/middleware" + "github.com/berachain/beacon-kit/da/da" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/deposit" + "github.com/berachain/beacon-kit/log" + blockstore "github.com/berachain/beacon-kit/node-api/block_store" + "github.com/berachain/beacon-kit/node-api/server" + "github.com/berachain/beacon-kit/node-core/components/metrics" + service "github.com/berachain/beacon-kit/node-core/services/registry" + "github.com/berachain/beacon-kit/node-core/services/version" + "github.com/berachain/beacon-kit/observability/telemetry" ) // ServiceRegistryInput is the input for the service registry provider. diff --git a/mod/node-core/pkg/components/sidecars.go b/node-core/components/sidecars.go similarity index 88% rename from mod/node-core/pkg/components/sidecars.go rename to node-core/components/sidecars.go index 9b4cbfda3c..1506fa40b4 100644 --- a/mod/node-core/pkg/components/sidecars.go +++ b/node-core/components/sidecars.go @@ -22,10 +22,10 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - dablob "github.com/berachain/beacon-kit/mod/da/pkg/blob" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/consensus-types/types" + dablob "github.com/berachain/beacon-kit/da/blob" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" ) type SidecarFactoryInput struct { diff --git a/mod/node-core/pkg/components/signer.go b/node-core/components/signer.go similarity index 90% rename from mod/node-core/pkg/components/signer.go rename to node-core/components/signer.go index 8c4bc9785e..59b02cfd04 100644 --- a/mod/node-core/pkg/components/signer.go +++ b/node-core/components/signer.go @@ -24,10 +24,10 @@ import ( "path/filepath" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/signer" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/node-core/components/signer" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cast" ) diff --git a/mod/node-core/pkg/components/signer/errors.go b/node-core/components/signer/errors.go similarity index 100% rename from mod/node-core/pkg/components/signer/errors.go rename to node-core/components/signer/errors.go diff --git a/mod/node-core/pkg/components/signer/legacy.go b/node-core/components/signer/legacy.go similarity index 95% rename from mod/node-core/pkg/components/signer/legacy.go rename to node-core/components/signer/legacy.go index faa3069b06..da368c53ce 100644 --- a/mod/node-core/pkg/components/signer/legacy.go +++ b/node-core/components/signer/legacy.go @@ -23,8 +23,8 @@ package signer import ( "encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" "github.com/cometbft/cometbft/crypto/bls12381" ) diff --git a/mod/node-core/pkg/components/signer/signer.go b/node-core/components/signer/signer.go similarity index 94% rename from mod/node-core/pkg/components/signer/signer.go rename to node-core/components/signer/signer.go index f3e9d080f2..4b51792961 100644 --- a/mod/node-core/pkg/components/signer/signer.go +++ b/node-core/components/signer/signer.go @@ -21,9 +21,9 @@ package signer import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" "github.com/cometbft/cometbft/crypto/bls12381" "github.com/cometbft/cometbft/privval" "github.com/cometbft/cometbft/types" diff --git a/mod/node-core/pkg/components/state_processor.go b/node-core/components/state_processor.go similarity index 89% rename from mod/node-core/pkg/components/state_processor.go rename to node-core/components/state_processor.go index 978d0652f6..871fd8ef8b 100644 --- a/mod/node-core/pkg/components/state_processor.go +++ b/node-core/components/state_processor.go @@ -22,13 +22,13 @@ package components import ( "cosmossdk.io/depinject" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/execution/pkg/engine" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/execution/engine" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/state-transition/core" ) // StateProcessorInput is the input for the state processor for the depinject diff --git a/mod/node-core/pkg/components/storage/provider.go b/node-core/components/storage/provider.go similarity index 100% rename from mod/node-core/pkg/components/storage/provider.go rename to node-core/components/storage/provider.go diff --git a/mod/node-core/pkg/components/storage/storage.go b/node-core/components/storage/storage.go similarity index 98% rename from mod/node-core/pkg/components/storage/storage.go rename to node-core/components/storage/storage.go index ae633af5d7..5b8c3d4d66 100644 --- a/mod/node-core/pkg/components/storage/storage.go +++ b/node-core/components/storage/storage.go @@ -23,7 +23,7 @@ package storage import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" ) // Backend is a struct that holds the storage backend. It provides a simple diff --git a/mod/node-core/pkg/components/storage/types.go b/node-core/components/storage/types.go similarity index 95% rename from mod/node-core/pkg/components/storage/types.go rename to node-core/components/storage/types.go index 1440803fd2..a4ef8fe44e 100644 --- a/mod/node-core/pkg/components/storage/types.go +++ b/node-core/components/storage/types.go @@ -23,7 +23,7 @@ package storage import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" ) type BeaconState[T, KVStoreT any] interface { diff --git a/mod/node-core/pkg/components/store.go b/node-core/components/store.go similarity index 93% rename from mod/node-core/pkg/components/store.go rename to node-core/components/store.go index 4ab1bb03d1..f317b87d45 100644 --- a/mod/node-core/pkg/components/store.go +++ b/node-core/components/store.go @@ -23,8 +23,8 @@ package components import ( "cosmossdk.io/core/store" "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" + "github.com/berachain/beacon-kit/storage/beacondb" + "github.com/berachain/beacon-kit/storage/encoding" ) // KVStoreInput is the input for the ProvideKVStore function. diff --git a/mod/node-core/pkg/components/telemetry_service.go b/node-core/components/telemetry_service.go similarity index 90% rename from mod/node-core/pkg/components/telemetry_service.go rename to node-core/components/telemetry_service.go index 4798f47bef..20f3a23ae4 100644 --- a/mod/node-core/pkg/components/telemetry_service.go +++ b/node-core/components/telemetry_service.go @@ -21,8 +21,8 @@ package components import ( - "github.com/berachain/beacon-kit/mod/config/pkg/config" - "github.com/berachain/beacon-kit/mod/observability/pkg/telemetry" + "github.com/berachain/beacon-kit/config/config" + "github.com/berachain/beacon-kit/observability/telemetry" ) // ProvideTelemetryService is a function that provides a TelemetrySink. diff --git a/mod/node-core/pkg/components/telemetry_sink.go b/node-core/components/telemetry_sink.go similarity index 93% rename from mod/node-core/pkg/components/telemetry_sink.go rename to node-core/components/telemetry_sink.go index fad531b1b8..78c88e0804 100644 --- a/mod/node-core/pkg/components/telemetry_sink.go +++ b/node-core/components/telemetry_sink.go @@ -20,7 +20,7 @@ package components -import "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" +import "github.com/berachain/beacon-kit/node-core/components/metrics" // ProvideTelemetrySink is a function that provides a TelemetrySink. func ProvideTelemetrySink() *metrics.TelemetrySink { diff --git a/mod/node-core/pkg/components/trusted_setup.go b/node-core/components/trusted_setup.go similarity index 92% rename from mod/node-core/pkg/components/trusted_setup.go rename to node-core/components/trusted_setup.go index 122f944b42..caa40a65f8 100644 --- a/mod/node-core/pkg/components/trusted_setup.go +++ b/node-core/components/trusted_setup.go @@ -22,9 +22,9 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/cli/pkg/flags" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/cli/flags" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/primitives/encoding/json" gokzg4844 "github.com/crate-crypto/go-kzg-4844" "github.com/spf13/afero" "github.com/spf13/cast" diff --git a/mod/node-core/pkg/components/types.go b/node-core/components/types.go similarity index 88% rename from mod/node-core/pkg/components/types.go rename to node-core/components/types.go index cf3e95053e..7ac01db4bd 100644 --- a/mod/node-core/pkg/components/types.go +++ b/node-core/components/types.go @@ -22,14 +22,14 @@ package components import ( "cosmossdk.io/core/appmodule/v2" - asynctypes "github.com/berachain/beacon-kit/mod/async/pkg/types" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - consruntimetypes "github.com/berachain/beacon-kit/mod/consensus/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/signer" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" + asynctypes "github.com/berachain/beacon-kit/async/types" + "github.com/berachain/beacon-kit/consensus-types/types" + consruntimetypes "github.com/berachain/beacon-kit/consensus/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/node-core/components/signer" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/storage/manager" ) /* -------------------------------------------------------------------------- */ diff --git a/mod/node-core/pkg/components/validator_service.go b/node-core/components/validator_service.go similarity index 92% rename from mod/node-core/pkg/components/validator_service.go rename to node-core/components/validator_service.go index a69b86353d..494e6c8ea2 100644 --- a/mod/node-core/pkg/components/validator_service.go +++ b/node-core/components/validator_service.go @@ -22,12 +22,12 @@ package components import ( "cosmossdk.io/depinject" - "github.com/berachain/beacon-kit/mod/beacon/validator" - "github.com/berachain/beacon-kit/mod/config" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + "github.com/berachain/beacon-kit/beacon/validator" + "github.com/berachain/beacon-kit/config" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" ) // ValidatorServiceInput is the input for the validator service provider. diff --git a/mod/node-core/pkg/node/node.go b/node-core/node/node.go similarity index 94% rename from mod/node-core/pkg/node/node.go rename to node-core/node/node.go index 6b0e19ec1f..a9fe10300d 100644 --- a/mod/node-core/pkg/node/node.go +++ b/node-core/node/node.go @@ -26,9 +26,9 @@ import ( "os/signal" "syscall" - "github.com/berachain/beacon-kit/mod/log" - service "github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry" - "github.com/berachain/beacon-kit/mod/node-core/pkg/types" + "github.com/berachain/beacon-kit/log" + service "github.com/berachain/beacon-kit/node-core/services/registry" + "github.com/berachain/beacon-kit/node-core/types" "golang.org/x/sync/errgroup" ) diff --git a/mod/node-core/pkg/services/registry/errors.go b/node-core/services/registry/errors.go similarity index 96% rename from mod/node-core/pkg/services/registry/errors.go rename to node-core/services/registry/errors.go index 051aef3e99..3c43466541 100644 --- a/mod/node-core/pkg/services/registry/errors.go +++ b/node-core/services/registry/errors.go @@ -20,7 +20,7 @@ package service -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // errServiceAlreadyExists defines an error for when a service already diff --git a/mod/node-core/pkg/services/registry/mocks/basic.mock.go b/node-core/services/registry/mocks/basic.mock.go similarity index 100% rename from mod/node-core/pkg/services/registry/mocks/basic.mock.go rename to node-core/services/registry/mocks/basic.mock.go diff --git a/mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go b/node-core/services/registry/mocks/dispatcher.mock.go similarity index 100% rename from mod/node-core/pkg/services/registry/mocks/dispatcher.mock.go rename to node-core/services/registry/mocks/dispatcher.mock.go diff --git a/mod/node-core/pkg/services/registry/mocks/registry_option.mock.go b/node-core/services/registry/mocks/registry_option.mock.go similarity index 96% rename from mod/node-core/pkg/services/registry/mocks/registry_option.mock.go rename to node-core/services/registry/mocks/registry_option.mock.go index d0239c9f3d..9830454670 100644 --- a/mod/node-core/pkg/services/registry/mocks/registry_option.mock.go +++ b/node-core/services/registry/mocks/registry_option.mock.go @@ -3,7 +3,7 @@ package mocks import ( - service "github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry" + service "github.com/berachain/beacon-kit/node-core/services/registry" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/node-core/pkg/services/registry/options.go b/node-core/services/registry/options.go similarity index 97% rename from mod/node-core/pkg/services/registry/options.go rename to node-core/services/registry/options.go index d0ab340be0..126171ed34 100644 --- a/mod/node-core/pkg/services/registry/options.go +++ b/node-core/services/registry/options.go @@ -21,7 +21,7 @@ package service import ( - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" ) // RegistryOption is a functional option for the Registry. diff --git a/mod/node-core/pkg/services/registry/registry.go b/node-core/services/registry/registry.go similarity index 98% rename from mod/node-core/pkg/services/registry/registry.go rename to node-core/services/registry/registry.go index 946b009ef4..2e5f562512 100644 --- a/mod/node-core/pkg/services/registry/registry.go +++ b/node-core/services/registry/registry.go @@ -24,7 +24,7 @@ import ( "context" "reflect" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" ) // Basic is the minimal interface for a service. diff --git a/mod/node-core/pkg/services/registry/registry_test.go b/node-core/services/registry/registry_test.go similarity index 92% rename from mod/node-core/pkg/services/registry/registry_test.go rename to node-core/services/registry/registry_test.go index 485568db24..7709c5e2f3 100644 --- a/mod/node-core/pkg/services/registry/registry_test.go +++ b/node-core/services/registry/registry_test.go @@ -26,9 +26,9 @@ import ( "testing" "time" - "github.com/berachain/beacon-kit/mod/log/pkg/noop" - service "github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry" - "github.com/berachain/beacon-kit/mod/node-core/pkg/services/registry/mocks" + "github.com/berachain/beacon-kit/log/noop" + service "github.com/berachain/beacon-kit/node-core/services/registry" + "github.com/berachain/beacon-kit/node-core/services/registry/mocks" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/mod/node-core/pkg/services/version/types.go b/node-core/services/version/types.go similarity index 100% rename from mod/node-core/pkg/services/version/types.go rename to node-core/services/version/types.go diff --git a/mod/node-core/pkg/services/version/version.go b/node-core/services/version/version.go similarity index 94% rename from mod/node-core/pkg/services/version/version.go rename to node-core/services/version/version.go index 6c15e97167..1982bd0198 100644 --- a/mod/node-core/pkg/services/version/version.go +++ b/node-core/services/version/version.go @@ -26,12 +26,12 @@ import ( "runtime" "time" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/execution/pkg/client" - "github.com/berachain/beacon-kit/mod/execution/pkg/client/ethclient" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/execution/client" + "github.com/berachain/beacon-kit/execution/client/ethclient" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/constraints" ) // defaultReportingInterval is the default interval at which the version is diff --git a/mod/node-core/pkg/types/node.go b/node-core/types/node.go similarity index 100% rename from mod/node-core/pkg/types/node.go rename to node-core/types/node.go diff --git a/mod/observability/pkg/telemetry/service.go b/observability/telemetry/service.go similarity index 100% rename from mod/observability/pkg/telemetry/service.go rename to observability/telemetry/service.go diff --git a/mod/payload/README.md b/payload/README.md similarity index 100% rename from mod/payload/README.md rename to payload/README.md diff --git a/mod/payload/pkg/attributes/factory.go b/payload/attributes/factory.go similarity index 95% rename from mod/payload/pkg/attributes/factory.go rename to payload/attributes/factory.go index 865828fa0a..fe4ba9012d 100644 --- a/mod/payload/pkg/attributes/factory.go +++ b/payload/attributes/factory.go @@ -21,9 +21,9 @@ package attributes import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // Factory is a factory for creating payload attributes. diff --git a/mod/payload/pkg/attributes/types.go b/payload/attributes/types.go similarity index 91% rename from mod/payload/pkg/attributes/types.go rename to payload/attributes/types.go index 099c1e55e2..6188280262 100644 --- a/mod/payload/pkg/attributes/types.go +++ b/payload/attributes/types.go @@ -21,8 +21,8 @@ package attributes import ( - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" ) // BeaconState is an interface for accessing the beacon state. diff --git a/mod/payload/pkg/builder/builder.go b/payload/builder/builder.go similarity index 95% rename from mod/payload/pkg/builder/builder.go rename to payload/builder/builder.go index 0b213e6ed1..a41e02fce5 100644 --- a/mod/payload/pkg/builder/builder.go +++ b/payload/builder/builder.go @@ -21,9 +21,9 @@ package builder import ( - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // PayloadBuilder is used to build payloads on the diff --git a/mod/payload/pkg/builder/config.go b/payload/builder/config.go similarity index 97% rename from mod/payload/pkg/builder/config.go rename to payload/builder/config.go index 0a7e5a645a..4936ec624f 100644 --- a/mod/payload/pkg/builder/config.go +++ b/payload/builder/config.go @@ -23,7 +23,7 @@ package builder import ( "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/primitives/common" ) const ( diff --git a/mod/payload/pkg/builder/errors.go b/payload/builder/errors.go similarity index 96% rename from mod/payload/pkg/builder/errors.go rename to payload/builder/errors.go index ed2ffecd32..78164ff037 100644 --- a/mod/payload/pkg/builder/errors.go +++ b/payload/builder/errors.go @@ -20,7 +20,7 @@ package builder -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrPayloadBuilderDisabled is returned when the payload builder is diff --git a/mod/payload/pkg/builder/payload.go b/payload/builder/payload.go similarity index 97% rename from mod/payload/pkg/builder/payload.go rename to payload/builder/payload.go index 60ae90845c..729288abb8 100644 --- a/mod/payload/pkg/builder/payload.go +++ b/payload/builder/payload.go @@ -24,9 +24,9 @@ import ( "context" "time" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // RequestPayloadAsync builds a payload for the given slot and diff --git a/mod/payload/pkg/builder/types.go b/payload/builder/types.go similarity index 92% rename from mod/payload/pkg/builder/types.go rename to payload/builder/types.go index 1e784a9784..eca29756b5 100644 --- a/mod/payload/pkg/builder/types.go +++ b/payload/builder/types.go @@ -23,11 +23,11 @@ package builder import ( "context" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconState defines the interface for accessing various state-related data diff --git a/mod/payload/pkg/cache/payload_id.go b/payload/cache/payload_id.go similarity index 100% rename from mod/payload/pkg/cache/payload_id.go rename to payload/cache/payload_id.go diff --git a/mod/payload/pkg/cache/payload_id_fuzz_test.go b/payload/cache/payload_id_fuzz_test.go similarity index 98% rename from mod/payload/pkg/cache/payload_id_fuzz_test.go rename to payload/cache/payload_id_fuzz_test.go index a3837ec3b2..439a1f0f63 100644 --- a/mod/payload/pkg/cache/payload_id_fuzz_test.go +++ b/payload/cache/payload_id_fuzz_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "github.com/berachain/beacon-kit/mod/payload/pkg/cache" + "github.com/berachain/beacon-kit/payload/cache" "github.com/stretchr/testify/require" ) diff --git a/mod/payload/pkg/cache/payload_id_test.go b/payload/cache/payload_id_test.go similarity index 98% rename from mod/payload/pkg/cache/payload_id_test.go rename to payload/cache/payload_id_test.go index 7f28acc828..66cab800b0 100644 --- a/mod/payload/pkg/cache/payload_id_test.go +++ b/payload/cache/payload_id_test.go @@ -23,7 +23,7 @@ package cache_test import ( "testing" - "github.com/berachain/beacon-kit/mod/payload/pkg/cache" + "github.com/berachain/beacon-kit/payload/cache" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/async/chan.go b/primitives/async/chan.go similarity index 100% rename from mod/primitives/pkg/async/chan.go rename to primitives/async/chan.go diff --git a/mod/primitives/pkg/async/event.go b/primitives/async/event.go similarity index 100% rename from mod/primitives/pkg/async/event.go rename to primitives/async/event.go diff --git a/mod/primitives/pkg/async/id.go b/primitives/async/id.go similarity index 100% rename from mod/primitives/pkg/async/id.go rename to primitives/async/id.go diff --git a/mod/primitives/pkg/bytes/b.go b/primitives/bytes/b.go similarity index 96% rename from mod/primitives/pkg/bytes/b.go rename to primitives/bytes/b.go index 8c550115aa..6119aa13db 100644 --- a/mod/primitives/pkg/bytes/b.go +++ b/primitives/bytes/b.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" ) // Bytes marshals/unmarshals as a JSON string with 0x prefix. diff --git a/mod/primitives/pkg/bytes/b20.go b/primitives/bytes/b20.go similarity index 97% rename from mod/primitives/pkg/bytes/b20.go rename to primitives/bytes/b20.go index 022181713a..8a52646f4d 100644 --- a/mod/primitives/pkg/bytes/b20.go +++ b/primitives/bytes/b20.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" ) const ( diff --git a/mod/primitives/pkg/bytes/b20_test.go b/primitives/bytes/b20_test.go similarity index 99% rename from mod/primitives/pkg/bytes/b20_test.go rename to primitives/bytes/b20_test.go index bd6601145f..c61f868ddc 100644 --- a/mod/primitives/pkg/bytes/b20_test.go +++ b/primitives/bytes/b20_test.go @@ -23,7 +23,7 @@ package bytes_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/b256.go b/primitives/bytes/b256.go similarity index 98% rename from mod/primitives/pkg/bytes/b256.go rename to primitives/bytes/b256.go index 80daf08290..a6a4b04bdd 100644 --- a/mod/primitives/pkg/bytes/b256.go +++ b/primitives/bytes/b256.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/prysmaticlabs/gohashtree" ) diff --git a/mod/primitives/pkg/bytes/b32.go b/primitives/bytes/b32.go similarity index 97% rename from mod/primitives/pkg/bytes/b32.go rename to primitives/bytes/b32.go index 701c9822de..c045cb58f9 100644 --- a/mod/primitives/pkg/bytes/b32.go +++ b/primitives/bytes/b32.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" ) const ( diff --git a/mod/primitives/pkg/bytes/b32_test.go b/primitives/bytes/b32_test.go similarity index 99% rename from mod/primitives/pkg/bytes/b32_test.go rename to primitives/bytes/b32_test.go index 9844f1b9dd..5b9a2fa88c 100644 --- a/mod/primitives/pkg/bytes/b32_test.go +++ b/primitives/bytes/b32_test.go @@ -24,7 +24,7 @@ package bytes_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/b4.go b/primitives/bytes/b4.go similarity index 97% rename from mod/primitives/pkg/bytes/b4.go rename to primitives/bytes/b4.go index 44e26b71e0..5dfe1e1c13 100644 --- a/mod/primitives/pkg/bytes/b4.go +++ b/primitives/bytes/b4.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" ) const ( diff --git a/mod/primitives/pkg/bytes/b48.go b/primitives/bytes/b48.go similarity index 98% rename from mod/primitives/pkg/bytes/b48.go rename to primitives/bytes/b48.go index ddee763d1e..52b21028ea 100644 --- a/mod/primitives/pkg/bytes/b48.go +++ b/primitives/bytes/b48.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/prysmaticlabs/gohashtree" ) diff --git a/mod/primitives/pkg/bytes/b48_test.go b/primitives/bytes/b48_test.go similarity index 98% rename from mod/primitives/pkg/bytes/b48_test.go rename to primitives/bytes/b48_test.go index 56615d7a71..16a00b2954 100644 --- a/mod/primitives/pkg/bytes/b48_test.go +++ b/primitives/bytes/b48_test.go @@ -24,8 +24,8 @@ package bytes_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle/zero" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/merkle/zero" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/b4_test.go b/primitives/bytes/b4_test.go similarity index 98% rename from mod/primitives/pkg/bytes/b4_test.go rename to primitives/bytes/b4_test.go index 2fbb3d25ee..77c663ee24 100644 --- a/mod/primitives/pkg/bytes/b4_test.go +++ b/primitives/bytes/b4_test.go @@ -23,7 +23,7 @@ package bytes_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/b8.go b/primitives/bytes/b8.go similarity index 97% rename from mod/primitives/pkg/bytes/b8.go rename to primitives/bytes/b8.go index 14252bfeda..f7b8a5857d 100644 --- a/mod/primitives/pkg/bytes/b8.go +++ b/primitives/bytes/b8.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" ) const ( diff --git a/mod/primitives/pkg/bytes/b8_test.go b/primitives/bytes/b8_test.go similarity index 98% rename from mod/primitives/pkg/bytes/b8_test.go rename to primitives/bytes/b8_test.go index 91d49d7763..9c676014fd 100644 --- a/mod/primitives/pkg/bytes/b8_test.go +++ b/primitives/bytes/b8_test.go @@ -23,7 +23,7 @@ package bytes_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/b96.go b/primitives/bytes/b96.go similarity index 98% rename from mod/primitives/pkg/bytes/b96.go rename to primitives/bytes/b96.go index 5e7d313a95..4074922fdd 100644 --- a/mod/primitives/pkg/bytes/b96.go +++ b/primitives/bytes/b96.go @@ -24,7 +24,7 @@ package bytes import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/prysmaticlabs/gohashtree" ) diff --git a/mod/primitives/pkg/bytes/b96_test.go b/primitives/bytes/b96_test.go similarity index 97% rename from mod/primitives/pkg/bytes/b96_test.go rename to primitives/bytes/b96_test.go index 57c4144766..3b4e1f27c4 100644 --- a/mod/primitives/pkg/bytes/b96_test.go +++ b/primitives/bytes/b96_test.go @@ -26,9 +26,9 @@ import ( "strings" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle/zero" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/merkle/zero" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/b_test.go b/primitives/bytes/b_test.go similarity index 98% rename from mod/primitives/pkg/bytes/b_test.go rename to primitives/bytes/b_test.go index ab425b86ab..f472f1a47e 100644 --- a/mod/primitives/pkg/bytes/b_test.go +++ b/primitives/bytes/b_test.go @@ -25,8 +25,8 @@ import ( "reflect" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/bytes/buffer/buffer.go b/primitives/bytes/buffer/buffer.go similarity index 100% rename from mod/primitives/pkg/bytes/buffer/buffer.go rename to primitives/bytes/buffer/buffer.go diff --git a/mod/primitives/pkg/bytes/buffer/buffer_test.go b/primitives/bytes/buffer/buffer_test.go similarity index 95% rename from mod/primitives/pkg/bytes/buffer/buffer_test.go rename to primitives/bytes/buffer/buffer_test.go index b779aaed92..85d473fffd 100644 --- a/mod/primitives/pkg/bytes/buffer/buffer_test.go +++ b/primitives/bytes/buffer/buffer_test.go @@ -25,7 +25,7 @@ import ( "testing" "time" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes/buffer" + "github.com/berachain/beacon-kit/primitives/bytes/buffer" ) type bufferI interface { @@ -132,7 +132,7 @@ func TestSingleuseGet(t *testing.T) { // // goos: darwin // goarch: arm64 -// pkg: github.com/berachain/beacon-kit/mod/primitives/pkg/merkle +// pkg: github.com/berachain/beacon-kit/primitives/merkle // BenchmarkReusableGet-12 158002471 7.439 ns/op 0 B/op 0 allocs/op. func BenchmarkReusableGet(b *testing.B) { buffer := getBuffer("reusable") @@ -154,7 +154,7 @@ func BenchmarkReusableGet(b *testing.B) { // // goos: darwin // goarch: arm64 -// pkg: github.com/berachain/beacon-kit/mod/primitives/pkg/merkle +// pkg: github.com/berachain/beacon-kit/primitives/merkle // BenchmarkSingleuseGet-12 5388972 215.0 ns/op 1700 B/op 1 allocs/op. func BenchmarkSingleuseGet(b *testing.B) { buffer := getBuffer("singleuse") diff --git a/mod/primitives/pkg/bytes/utils.go b/primitives/bytes/utils.go similarity index 96% rename from mod/primitives/pkg/bytes/utils.go rename to primitives/bytes/utils.go index 8152014dbe..9c0f052a33 100644 --- a/mod/primitives/pkg/bytes/utils.go +++ b/primitives/bytes/utils.go @@ -21,8 +21,8 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/encoding/hex" ) var ErrIncorrectLength = errors.New("incorrect length") diff --git a/mod/primitives/pkg/common/consensus.go b/primitives/common/consensus.go similarity index 92% rename from mod/primitives/pkg/common/consensus.go rename to primitives/common/consensus.go index 50bbc0ed01..565a2bbf0e 100644 --- a/mod/primitives/pkg/common/consensus.go +++ b/primitives/common/consensus.go @@ -21,11 +21,11 @@ package common import ( - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/json" + "github.com/berachain/beacon-kit/primitives/math" ) //nolint:lll diff --git a/mod/primitives/pkg/common/consensus_test.go b/primitives/common/consensus_test.go similarity index 91% rename from mod/primitives/pkg/common/consensus_test.go rename to primitives/common/consensus_test.go index 1f2071391b..1eda2a41f9 100644 --- a/mod/primitives/pkg/common/consensus_test.go +++ b/primitives/common/consensus_test.go @@ -24,9 +24,9 @@ import ( "strings" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/common/execution.go b/primitives/common/execution.go similarity index 97% rename from mod/primitives/pkg/common/execution.go rename to primitives/common/execution.go index ece76afa56..b4998f6efa 100644 --- a/mod/primitives/pkg/common/execution.go +++ b/primitives/common/execution.go @@ -24,8 +24,8 @@ import ( "bytes" "encoding" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/json" "golang.org/x/crypto/sha3" ) diff --git a/mod/primitives/pkg/common/execution_test.go b/primitives/common/execution_test.go similarity index 93% rename from mod/primitives/pkg/common/execution_test.go rename to primitives/common/execution_test.go index 75644d4f2b..7d2532bc71 100644 --- a/mod/primitives/pkg/common/execution_test.go +++ b/primitives/common/execution_test.go @@ -24,8 +24,8 @@ import ( "encoding/json" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/constants/bls12_381.go b/primitives/constants/bls12_381.go similarity index 100% rename from mod/primitives/pkg/constants/bls12_381.go rename to primitives/constants/bls12_381.go diff --git a/mod/primitives/pkg/constants/constants.go b/primitives/constants/constants.go similarity index 100% rename from mod/primitives/pkg/constants/constants.go rename to primitives/constants/constants.go diff --git a/mod/primitives/pkg/constants/domain.go b/primitives/constants/domain.go similarity index 100% rename from mod/primitives/pkg/constants/domain.go rename to primitives/constants/domain.go diff --git a/mod/primitives/pkg/constants/eip4844.go b/primitives/constants/eip4844.go similarity index 100% rename from mod/primitives/pkg/constants/eip4844.go rename to primitives/constants/eip4844.go diff --git a/mod/primitives/pkg/constants/misc.go b/primitives/constants/misc.go similarity index 100% rename from mod/primitives/pkg/constants/misc.go rename to primitives/constants/misc.go diff --git a/mod/primitives/pkg/constants/payload.go b/primitives/constants/payload.go similarity index 100% rename from mod/primitives/pkg/constants/payload.go rename to primitives/constants/payload.go diff --git a/mod/primitives/pkg/constraints/basic.go b/primitives/constraints/basic.go similarity index 100% rename from mod/primitives/pkg/constraints/basic.go rename to primitives/constraints/basic.go diff --git a/mod/primitives/pkg/constraints/encoding.go b/primitives/constraints/encoding.go similarity index 94% rename from mod/primitives/pkg/constraints/encoding.go rename to primitives/constraints/encoding.go index 0d241aa14b..b3b6ceb297 100644 --- a/mod/primitives/pkg/constraints/encoding.go +++ b/primitives/constraints/encoding.go @@ -21,8 +21,8 @@ package constraints import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/encoding/json" ) // SSZMarshaler is an interface for objects that can be diff --git a/mod/primitives/pkg/constraints/ssz.go b/primitives/constraints/ssz.go similarity index 100% rename from mod/primitives/pkg/constraints/ssz.go rename to primitives/constraints/ssz.go diff --git a/mod/primitives/pkg/crypto/bls.go b/primitives/crypto/bls.go similarity index 97% rename from mod/primitives/pkg/crypto/bls.go rename to primitives/crypto/bls.go index a568de650f..763e284caa 100644 --- a/mod/primitives/pkg/crypto/bls.go +++ b/primitives/crypto/bls.go @@ -23,7 +23,7 @@ package crypto import ( "fmt" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" cometencoding "github.com/cometbft/cometbft/crypto/encoding" ) diff --git a/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go b/primitives/crypto/mocks/bls_signer.mock.go similarity index 98% rename from mod/primitives/pkg/crypto/mocks/bls_signer.mock.go rename to primitives/crypto/mocks/bls_signer.mock.go index fad1b08842..e136bb9cd9 100644 --- a/mod/primitives/pkg/crypto/mocks/bls_signer.mock.go +++ b/primitives/crypto/mocks/bls_signer.mock.go @@ -3,7 +3,7 @@ package mocks import ( - crypto "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" + crypto "github.com/berachain/beacon-kit/primitives/crypto" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/primitives/pkg/crypto/sha256/sha256.go b/primitives/crypto/sha256/sha256.go similarity index 100% rename from mod/primitives/pkg/crypto/sha256/sha256.go rename to primitives/crypto/sha256/sha256.go diff --git a/mod/primitives/pkg/eip4844/blob.go b/primitives/eip4844/blob.go similarity index 95% rename from mod/primitives/pkg/eip4844/blob.go rename to primitives/eip4844/blob.go index 6e4ab7f3e1..392e80c9d8 100644 --- a/mod/primitives/pkg/eip4844/blob.go +++ b/primitives/eip4844/blob.go @@ -21,7 +21,7 @@ package eip4844 import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" ) // Blob represents an EIP-4844 data blob. diff --git a/mod/primitives/pkg/eip4844/blob_test.go b/primitives/eip4844/blob_test.go similarity index 98% rename from mod/primitives/pkg/eip4844/blob_test.go rename to primitives/eip4844/blob_test.go index 5a4956c3a6..d119cad9b2 100644 --- a/mod/primitives/pkg/eip4844/blob_test.go +++ b/primitives/eip4844/blob_test.go @@ -24,7 +24,7 @@ import ( "encoding/hex" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/primitives/eip4844" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/eip4844/kzg_commitment.go b/primitives/eip4844/kzg_commitment.go similarity index 92% rename from mod/primitives/pkg/eip4844/kzg_commitment.go rename to primitives/eip4844/kzg_commitment.go index afe53bf9ae..27fdc9ec9b 100644 --- a/mod/primitives/pkg/eip4844/kzg_commitment.go +++ b/primitives/eip4844/kzg_commitment.go @@ -21,10 +21,10 @@ package eip4844 import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto/sha256" "github.com/prysmaticlabs/gohashtree" ) diff --git a/mod/primitives/pkg/eip4844/kzg_commitment_test.go b/primitives/eip4844/kzg_commitment_test.go similarity index 97% rename from mod/primitives/pkg/eip4844/kzg_commitment_test.go rename to primitives/eip4844/kzg_commitment_test.go index 0345b7cd8e..3f7790803e 100644 --- a/mod/primitives/pkg/eip4844/kzg_commitment_test.go +++ b/primitives/eip4844/kzg_commitment_test.go @@ -24,9 +24,9 @@ import ( "encoding/hex" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/eip4844" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/eip4844/kzg_proof.go b/primitives/eip4844/kzg_proof.go similarity index 94% rename from mod/primitives/pkg/eip4844/kzg_proof.go rename to primitives/eip4844/kzg_proof.go index 35beb05f69..77f9ec66e8 100644 --- a/mod/primitives/pkg/eip4844/kzg_proof.go +++ b/primitives/eip4844/kzg_proof.go @@ -21,7 +21,7 @@ package eip4844 import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" + "github.com/berachain/beacon-kit/primitives/bytes" ) // KZGProof represents a KZG proof, which is a 48-byte slice. diff --git a/mod/primitives/pkg/encoding/hex/big_int.go b/primitives/encoding/hex/big_int.go similarity index 100% rename from mod/primitives/pkg/encoding/hex/big_int.go rename to primitives/encoding/hex/big_int.go diff --git a/mod/primitives/pkg/encoding/hex/bit_int_test.go b/primitives/encoding/hex/bit_int_test.go similarity index 97% rename from mod/primitives/pkg/encoding/hex/bit_int_test.go rename to primitives/encoding/hex/bit_int_test.go index a82f1e7756..5a82dea89d 100644 --- a/mod/primitives/pkg/encoding/hex/bit_int_test.go +++ b/primitives/encoding/hex/bit_int_test.go @@ -26,7 +26,7 @@ import ( "math/big" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/hex/bytes.go b/primitives/encoding/hex/bytes.go similarity index 98% rename from mod/primitives/pkg/encoding/hex/bytes.go rename to primitives/encoding/hex/bytes.go index 0830a4f9fc..3be8c66ec3 100644 --- a/mod/primitives/pkg/encoding/hex/bytes.go +++ b/primitives/encoding/hex/bytes.go @@ -23,7 +23,7 @@ package hex import ( "encoding/hex" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) var ErrInvalidHexStringLength = errors.New("invalid hex string length") diff --git a/mod/primitives/pkg/encoding/hex/bytes_test.go b/primitives/encoding/hex/bytes_test.go similarity index 98% rename from mod/primitives/pkg/encoding/hex/bytes_test.go rename to primitives/encoding/hex/bytes_test.go index 9ace324214..b293d73a24 100644 --- a/mod/primitives/pkg/encoding/hex/bytes_test.go +++ b/primitives/encoding/hex/bytes_test.go @@ -25,7 +25,7 @@ import ( "strconv" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/hex/const.go b/primitives/encoding/hex/const.go similarity index 100% rename from mod/primitives/pkg/encoding/hex/const.go rename to primitives/encoding/hex/const.go diff --git a/mod/primitives/pkg/encoding/hex/errors.go b/primitives/encoding/hex/errors.go similarity index 100% rename from mod/primitives/pkg/encoding/hex/errors.go rename to primitives/encoding/hex/errors.go diff --git a/mod/primitives/pkg/encoding/hex/format.go b/primitives/encoding/hex/format.go similarity index 100% rename from mod/primitives/pkg/encoding/hex/format.go rename to primitives/encoding/hex/format.go diff --git a/mod/primitives/pkg/encoding/hex/format_test.go b/primitives/encoding/hex/format_test.go similarity index 96% rename from mod/primitives/pkg/encoding/hex/format_test.go rename to primitives/encoding/hex/format_test.go index 186c4d846a..09a4bfcfbb 100644 --- a/mod/primitives/pkg/encoding/hex/format_test.go +++ b/primitives/encoding/hex/format_test.go @@ -23,7 +23,7 @@ package hex_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/hex/nibble.go b/primitives/encoding/hex/nibble.go similarity index 100% rename from mod/primitives/pkg/encoding/hex/nibble.go rename to primitives/encoding/hex/nibble.go diff --git a/mod/primitives/pkg/encoding/hex/u64.go b/primitives/encoding/hex/u64.go similarity index 100% rename from mod/primitives/pkg/encoding/hex/u64.go rename to primitives/encoding/hex/u64.go diff --git a/mod/primitives/pkg/encoding/hex/u64_test.go b/primitives/encoding/hex/u64_test.go similarity index 97% rename from mod/primitives/pkg/encoding/hex/u64_test.go rename to primitives/encoding/hex/u64_test.go index 570b2f2ab9..a8f972d6c6 100644 --- a/mod/primitives/pkg/encoding/hex/u64_test.go +++ b/primitives/encoding/hex/u64_test.go @@ -23,7 +23,7 @@ package hex_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/primitives/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/json/json.go b/primitives/encoding/json/json.go similarity index 100% rename from mod/primitives/pkg/encoding/json/json.go rename to primitives/encoding/json/json.go diff --git a/mod/primitives/pkg/encoding/ssz/constants/constants.go b/primitives/encoding/ssz/constants/constants.go similarity index 100% rename from mod/primitives/pkg/encoding/ssz/constants/constants.go rename to primitives/encoding/ssz/constants/constants.go diff --git a/mod/primitives/pkg/encoding/ssz/db/node.go b/primitives/encoding/ssz/db/node.go similarity index 94% rename from mod/primitives/pkg/encoding/ssz/db/node.go rename to primitives/encoding/ssz/db/node.go index 705bcd837b..b522f9f430 100644 --- a/mod/primitives/pkg/encoding/ssz/db/node.go +++ b/primitives/encoding/ssz/db/node.go @@ -21,8 +21,8 @@ package db import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/schema" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/schema" ) // TODO: Figure out what the best way to do our DB types is? diff --git a/mod/primitives/pkg/encoding/ssz/db/node_test.go b/primitives/encoding/ssz/db/node_test.go similarity index 95% rename from mod/primitives/pkg/encoding/ssz/db/node_test.go rename to primitives/encoding/ssz/db/node_test.go index dd3fabec52..294a7a4651 100644 --- a/mod/primitives/pkg/encoding/ssz/db/node_test.go +++ b/primitives/encoding/ssz/db/node_test.go @@ -24,9 +24,9 @@ import ( "strings" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/db" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/schema" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/db" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/schema" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/ssz/merkle/errors.go b/primitives/encoding/ssz/merkle/errors.go similarity index 100% rename from mod/primitives/pkg/encoding/ssz/merkle/errors.go rename to primitives/encoding/ssz/merkle/errors.go diff --git a/mod/primitives/pkg/encoding/ssz/merkle/index.go b/primitives/encoding/ssz/merkle/index.go similarity index 97% rename from mod/primitives/pkg/encoding/ssz/merkle/index.go rename to primitives/encoding/ssz/merkle/index.go index 134e33189d..eed3a4368e 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/index.go +++ b/primitives/encoding/ssz/merkle/index.go @@ -23,8 +23,8 @@ package merkle import ( "slices" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/pow" + "github.com/berachain/beacon-kit/primitives/math/log" + "github.com/berachain/beacon-kit/primitives/math/pow" ) // Inspired by the Ethereum 2.0 spec: diff --git a/mod/primitives/pkg/encoding/ssz/merkle/index_test.go b/primitives/encoding/ssz/merkle/index_test.go similarity index 98% rename from mod/primitives/pkg/encoding/ssz/merkle/index_test.go rename to primitives/encoding/ssz/merkle/index_test.go index 44d10419fd..39b7e6c4dd 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/index_test.go +++ b/primitives/encoding/ssz/merkle/index_test.go @@ -23,7 +23,7 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/ssz/merkle/object_path.go b/primitives/encoding/ssz/merkle/object_path.go similarity index 96% rename from mod/primitives/pkg/encoding/ssz/merkle/object_path.go rename to primitives/encoding/ssz/merkle/object_path.go index 8823571504..9a2c1084fe 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/object_path.go +++ b/primitives/encoding/ssz/merkle/object_path.go @@ -24,8 +24,8 @@ import ( "errors" "strings" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/schema" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/pow" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/schema" + "github.com/berachain/beacon-kit/primitives/math/pow" ) // ObjectPath represents a path to an object in a Merkle tree. diff --git a/mod/primitives/pkg/encoding/ssz/merkle/object_path_test.go b/primitives/encoding/ssz/merkle/object_path_test.go similarity index 95% rename from mod/primitives/pkg/encoding/ssz/merkle/object_path_test.go rename to primitives/encoding/ssz/merkle/object_path_test.go index 9fc50aac81..cf4c78e61f 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/object_path_test.go +++ b/primitives/encoding/ssz/merkle/object_path_test.go @@ -24,8 +24,8 @@ import ( "strings" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/schema" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/schema" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/ssz/merkle/proof.go b/primitives/encoding/ssz/merkle/proof.go similarity index 93% rename from mod/primitives/pkg/encoding/ssz/merkle/proof.go rename to primitives/encoding/ssz/merkle/proof.go index 18afa2fa53..3cba2f2c2d 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/proof.go +++ b/primitives/encoding/ssz/merkle/proof.go @@ -21,10 +21,10 @@ package merkle import ( - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/pow" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/crypto/sha256" + "github.com/berachain/beacon-kit/primitives/math/log" + "github.com/berachain/beacon-kit/primitives/math/pow" ) // BuildProofFromLeaves builds a Merkle proof from the given leaves and the diff --git a/mod/primitives/pkg/encoding/ssz/merkle/tree.go b/primitives/encoding/ssz/merkle/tree.go similarity index 97% rename from mod/primitives/pkg/encoding/ssz/merkle/tree.go rename to primitives/encoding/ssz/merkle/tree.go index 6b50df6c59..9e4fd49cfb 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/tree.go +++ b/primitives/encoding/ssz/merkle/tree.go @@ -23,8 +23,8 @@ package merkle import ( "slices" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/crypto/sha256" ) // Inspired by the Ethereum 2.0 spec: diff --git a/mod/primitives/pkg/encoding/ssz/merkle/tree_test.go b/primitives/encoding/ssz/merkle/tree_test.go similarity index 98% rename from mod/primitives/pkg/encoding/ssz/merkle/tree_test.go rename to primitives/encoding/ssz/merkle/tree_test.go index bb97152400..65c45a85bc 100644 --- a/mod/primitives/pkg/encoding/ssz/merkle/tree_test.go +++ b/primitives/encoding/ssz/merkle/tree_test.go @@ -23,7 +23,7 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/merkle" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/merkle" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/encoding/ssz/schema/common.go b/primitives/encoding/ssz/schema/common.go similarity index 97% rename from mod/primitives/pkg/encoding/ssz/schema/common.go rename to primitives/encoding/ssz/schema/common.go index 86ffd3e88d..3dfd418c04 100644 --- a/mod/primitives/pkg/encoding/ssz/schema/common.go +++ b/primitives/encoding/ssz/schema/common.go @@ -20,7 +20,7 @@ package schema -import "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/constants" +import "github.com/berachain/beacon-kit/primitives/encoding/ssz/constants" const ( B4Size = 4 diff --git a/mod/primitives/pkg/encoding/ssz/schema/definitions.go b/primitives/encoding/ssz/schema/definitions.go similarity index 98% rename from mod/primitives/pkg/encoding/ssz/schema/definitions.go rename to primitives/encoding/ssz/schema/definitions.go index 72a80b0675..6bec5687a6 100644 --- a/mod/primitives/pkg/encoding/ssz/schema/definitions.go +++ b/primitives/encoding/ssz/schema/definitions.go @@ -25,7 +25,7 @@ import ( "fmt" "strconv" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/ssz/constants" + "github.com/berachain/beacon-kit/primitives/encoding/ssz/constants" ) /* -------------------------------------------------------------------------- */ diff --git a/mod/primitives/pkg/encoding/ssz/schema/field.go b/primitives/encoding/ssz/schema/field.go similarity index 100% rename from mod/primitives/pkg/encoding/ssz/schema/field.go rename to primitives/encoding/ssz/schema/field.go diff --git a/mod/primitives/pkg/encoding/ssz/schema/id.go b/primitives/encoding/ssz/schema/id.go similarity index 98% rename from mod/primitives/pkg/encoding/ssz/schema/id.go rename to primitives/encoding/ssz/schema/id.go index e3a8544d12..e203908287 100644 --- a/mod/primitives/pkg/encoding/ssz/schema/id.go +++ b/primitives/encoding/ssz/schema/id.go @@ -20,7 +20,7 @@ package schema -import "github.com/berachain/beacon-kit/mod/primitives/pkg/common" +import "github.com/berachain/beacon-kit/primitives/common" type ID uint8 diff --git a/mod/primitives/pkg/math/constants.go b/primitives/math/constants.go similarity index 100% rename from mod/primitives/pkg/math/constants.go rename to primitives/math/constants.go diff --git a/mod/primitives/pkg/math/errors.go b/primitives/math/errors.go similarity index 96% rename from mod/primitives/pkg/math/errors.go rename to primitives/math/errors.go index d624eaded2..70b04fc22e 100644 --- a/mod/primitives/pkg/math/errors.go +++ b/primitives/math/errors.go @@ -21,7 +21,7 @@ package math import ( - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) var ( diff --git a/mod/primitives/pkg/math/log/log.go b/primitives/math/log/log.go similarity index 100% rename from mod/primitives/pkg/math/log/log.go rename to primitives/math/log/log.go diff --git a/mod/primitives/pkg/math/log/log_test.go b/primitives/math/log/log_test.go similarity index 96% rename from mod/primitives/pkg/math/log/log_test.go rename to primitives/math/log/log_test.go index 13930585b3..188e344029 100644 --- a/mod/primitives/pkg/math/log/log_test.go +++ b/primitives/math/log/log_test.go @@ -23,7 +23,7 @@ package log_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/log" + "github.com/berachain/beacon-kit/primitives/math/log" ) func TestILog2Ceil(t *testing.T) { diff --git a/mod/primitives/pkg/math/pow/pow.go b/primitives/math/pow/pow.go similarity index 100% rename from mod/primitives/pkg/math/pow/pow.go rename to primitives/math/pow/pow.go diff --git a/mod/primitives/pkg/math/pow/pow_test.go b/primitives/math/pow/pow_test.go similarity index 96% rename from mod/primitives/pkg/math/pow/pow_test.go rename to primitives/math/pow/pow_test.go index 64aaf5dd24..a5bc3565fc 100644 --- a/mod/primitives/pkg/math/pow/pow_test.go +++ b/primitives/math/pow/pow_test.go @@ -23,7 +23,7 @@ package pow_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/pow" + "github.com/berachain/beacon-kit/primitives/math/pow" ) func TestPrevPowerOfTwo(t *testing.T) { diff --git a/mod/primitives/pkg/math/u256.go b/primitives/math/u256.go similarity index 100% rename from mod/primitives/pkg/math/u256.go rename to primitives/math/u256.go diff --git a/mod/primitives/pkg/math/u64.go b/primitives/math/u64.go similarity index 95% rename from mod/primitives/pkg/math/u64.go rename to primitives/math/u64.go index 19e5ace831..6d9c0ddf38 100644 --- a/mod/primitives/pkg/math/u64.go +++ b/primitives/math/u64.go @@ -24,10 +24,10 @@ import ( "math/big" "strconv" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math/pow" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/math/log" + "github.com/berachain/beacon-kit/primitives/math/pow" ) //nolint:lll diff --git a/mod/primitives/pkg/math/u64_test.go b/primitives/math/u64_test.go similarity index 98% rename from mod/primitives/pkg/math/u64_test.go rename to primitives/math/u64_test.go index 82ddd537e2..0596f64810 100644 --- a/mod/primitives/pkg/math/u64_test.go +++ b/primitives/math/u64_test.go @@ -24,8 +24,8 @@ import ( "math/big" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/math" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/merkle/errors.go b/primitives/merkle/errors.go similarity index 98% rename from mod/primitives/pkg/merkle/errors.go rename to primitives/merkle/errors.go index 82dac56b23..e2a6459a80 100644 --- a/mod/primitives/pkg/merkle/errors.go +++ b/primitives/merkle/errors.go @@ -20,7 +20,7 @@ package merkle -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrNegativeIndex indicates that a negative index was provided. diff --git a/mod/primitives/pkg/merkle/hasher.go b/primitives/merkle/hasher.go similarity index 100% rename from mod/primitives/pkg/merkle/hasher.go rename to primitives/merkle/hasher.go diff --git a/mod/primitives/pkg/merkle/hasher_fuzz_test.go b/primitives/merkle/hasher_fuzz_test.go similarity index 96% rename from mod/primitives/pkg/merkle/hasher_fuzz_test.go rename to primitives/merkle/hasher_fuzz_test.go index 6655763c58..b0903e184b 100644 --- a/mod/primitives/pkg/merkle/hasher_fuzz_test.go +++ b/primitives/merkle/hasher_fuzz_test.go @@ -23,8 +23,8 @@ package merkle_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/merkle" ) func FuzzHashTreeRoot(f *testing.F) { diff --git a/mod/primitives/pkg/merkle/hasher_test.go b/primitives/merkle/hasher_test.go similarity index 98% rename from mod/primitives/pkg/merkle/hasher_test.go rename to primitives/merkle/hasher_test.go index 6bac30ca58..3e8f9139b7 100644 --- a/mod/primitives/pkg/merkle/hasher_test.go +++ b/primitives/merkle/hasher_test.go @@ -24,7 +24,7 @@ import ( "crypto/md5" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" + "github.com/berachain/beacon-kit/primitives/merkle" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/merkle/proof.go b/primitives/merkle/proof.go similarity index 97% rename from mod/primitives/pkg/merkle/proof.go rename to primitives/merkle/proof.go index 5ae652926b..8f9546dd75 100644 --- a/mod/primitives/pkg/merkle/proof.go +++ b/primitives/merkle/proof.go @@ -20,7 +20,7 @@ package merkle -import "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" +import "github.com/berachain/beacon-kit/primitives/crypto/sha256" // VerifyProof given a tree root, a leaf, the generalized merkle index // of the leaf in the tree, and the proof itself. diff --git a/mod/primitives/pkg/merkle/root_hasher.go b/primitives/merkle/root_hasher.go similarity index 96% rename from mod/primitives/pkg/merkle/root_hasher.go rename to primitives/merkle/root_hasher.go index 693fd82a04..be245afad5 100644 --- a/mod/primitives/pkg/merkle/root_hasher.go +++ b/primitives/merkle/root_hasher.go @@ -24,10 +24,10 @@ import ( "runtime" "unsafe" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes/buffer" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle/zero" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/bytes/buffer" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/merkle/zero" "github.com/prysmaticlabs/gohashtree" "golang.org/x/sync/errgroup" ) diff --git a/mod/primitives/pkg/merkle/root_hasher_test.go b/primitives/merkle/root_hasher_test.go similarity index 96% rename from mod/primitives/pkg/merkle/root_hasher_test.go rename to primitives/merkle/root_hasher_test.go index 229393d0f3..a391b35c85 100644 --- a/mod/primitives/pkg/merkle/root_hasher_test.go +++ b/primitives/merkle/root_hasher_test.go @@ -26,11 +26,11 @@ import ( "testing" "time" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle/zero" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/crypto/sha256" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/merkle" + "github.com/berachain/beacon-kit/primitives/merkle/zero" "github.com/prysmaticlabs/gohashtree" "github.com/stretchr/testify/require" ) @@ -94,7 +94,7 @@ func TestNewRootWithMaxLeaves_OneLeaf(t *testing.T) { // goos: darwin // goarch: arm64 -// pkg: github.com/berachain/beacon-kit/mod/primitives/pkg/merkle +// pkg: github.com/berachain/beacon-kit/primitives/merkle // BenchmarkHasher-12 // 25684 34712 ns/op 0 B/op 0 allocs/op. func BenchmarkHasher(b *testing.B) { diff --git a/mod/primitives/pkg/merkle/tree.go b/primitives/merkle/tree.go similarity index 95% rename from mod/primitives/pkg/merkle/tree.go rename to primitives/merkle/tree.go index 4a2073deed..48e8a079a3 100644 --- a/mod/primitives/pkg/merkle/tree.go +++ b/primitives/merkle/tree.go @@ -24,11 +24,11 @@ import ( "encoding/binary" "fmt" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle/zero" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto/sha256" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/merkle/zero" ) const ( diff --git a/mod/primitives/pkg/merkle/tree_fuzz_test.go b/primitives/merkle/tree_fuzz_test.go similarity index 95% rename from mod/primitives/pkg/merkle/tree_fuzz_test.go rename to primitives/merkle/tree_fuzz_test.go index 7fce414d41..1fe7345e81 100644 --- a/mod/primitives/pkg/merkle/tree_fuzz_test.go +++ b/primitives/merkle/tree_fuzz_test.go @@ -23,8 +23,8 @@ package merkle_test import ( "testing" - byteslib "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" + byteslib "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/merkle" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/merkle/tree_test.go b/primitives/merkle/tree_test.go similarity index 98% rename from mod/primitives/pkg/merkle/tree_test.go rename to primitives/merkle/tree_test.go index 8f4bb0e5ec..ed22161226 100644 --- a/mod/primitives/pkg/merkle/tree_test.go +++ b/primitives/merkle/tree_test.go @@ -24,9 +24,9 @@ import ( "strconv" "testing" - byteslib "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/merkle" + byteslib "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/merkle" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/merkle/utils.go b/primitives/merkle/utils.go similarity index 97% rename from mod/primitives/pkg/merkle/utils.go rename to primitives/merkle/utils.go index 8bbe392e1d..b7a1a948f0 100644 --- a/mod/primitives/pkg/merkle/utils.go +++ b/primitives/merkle/utils.go @@ -23,7 +23,7 @@ package merkle import ( "fmt" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) // verifySufficientDepth ensures that the depth is sufficient to build a tree. diff --git a/mod/primitives/pkg/merkle/zero/zero.go b/primitives/merkle/zero/zero.go similarity index 95% rename from mod/primitives/pkg/merkle/zero/zero.go rename to primitives/merkle/zero/zero.go index 129afe1720..232666c3c2 100644 --- a/mod/primitives/pkg/merkle/zero/zero.go +++ b/primitives/merkle/zero/zero.go @@ -20,7 +20,7 @@ package zero -import "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" +import "github.com/berachain/beacon-kit/primitives/crypto/sha256" // NumZeroHashes is the number of pre-computed zero-hashes. const NumZeroHashes = 64 diff --git a/mod/primitives/pkg/net/http/errors.go b/primitives/net/http/errors.go similarity index 100% rename from mod/primitives/pkg/net/http/errors.go rename to primitives/net/http/errors.go diff --git a/mod/primitives/pkg/net/json-rpc/errors.go b/primitives/net/json-rpc/errors.go similarity index 98% rename from mod/primitives/pkg/net/json-rpc/errors.go rename to primitives/net/json-rpc/errors.go index c23ea079e3..b4c2b048a7 100644 --- a/mod/primitives/pkg/net/json-rpc/errors.go +++ b/primitives/net/json-rpc/errors.go @@ -23,7 +23,7 @@ package jsonrpc import ( "strings" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) // Error wraps RPC errors, which contain an error code in addition to the diff --git a/mod/primitives/pkg/net/jwt/errors.go b/primitives/net/jwt/errors.go similarity index 96% rename from mod/primitives/pkg/net/jwt/errors.go rename to primitives/net/jwt/errors.go index be72860c39..05b46a7439 100644 --- a/mod/primitives/pkg/net/jwt/errors.go +++ b/primitives/net/jwt/errors.go @@ -20,7 +20,7 @@ package jwt -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrLengthMismatch is returned when a JWT secret length is not as diff --git a/mod/primitives/pkg/net/jwt/jwt.go b/primitives/net/jwt/jwt.go similarity index 96% rename from mod/primitives/pkg/net/jwt/jwt.go rename to primitives/net/jwt/jwt.go index 8721a9342e..c226825606 100644 --- a/mod/primitives/pkg/net/jwt/jwt.go +++ b/primitives/net/jwt/jwt.go @@ -26,8 +26,8 @@ import ( "strings" "time" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/encoding/hex" gjwt "github.com/golang-jwt/jwt/v5" ) diff --git a/mod/primitives/pkg/net/jwt/jwt_test.go b/primitives/net/jwt/jwt_test.go similarity index 98% rename from mod/primitives/pkg/net/jwt/jwt_test.go rename to primitives/net/jwt/jwt_test.go index 2c5f9cc380..32f694f051 100644 --- a/mod/primitives/pkg/net/jwt/jwt_test.go +++ b/primitives/net/jwt/jwt_test.go @@ -25,8 +25,8 @@ import ( "strings" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/net/jwt" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/net/url/url.go b/primitives/net/url/url.go similarity index 100% rename from mod/primitives/pkg/net/url/url.go rename to primitives/net/url/url.go diff --git a/mod/primitives/pkg/transition/context.go b/primitives/transition/context.go similarity index 98% rename from mod/primitives/pkg/transition/context.go rename to primitives/transition/context.go index 8e8d23a2de..19718a0336 100644 --- a/mod/primitives/pkg/transition/context.go +++ b/primitives/transition/context.go @@ -23,7 +23,7 @@ package transition import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // Context is the context for the state transition. diff --git a/mod/primitives/pkg/transition/validator_update.go b/primitives/transition/validator_update.go similarity index 95% rename from mod/primitives/pkg/transition/validator_update.go rename to primitives/transition/validator_update.go index a5f752c9b2..981534adf2 100644 --- a/mod/primitives/pkg/transition/validator_update.go +++ b/primitives/transition/validator_update.go @@ -23,8 +23,8 @@ package transition import ( "sort" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // ValidatorUpdates is a list of validator updates. diff --git a/mod/primitives/pkg/transition/validator_update_test.go b/primitives/transition/validator_update_test.go similarity index 94% rename from mod/primitives/pkg/transition/validator_update_test.go rename to primitives/transition/validator_update_test.go index e851dd34e0..d46e4e73c9 100644 --- a/mod/primitives/pkg/transition/validator_update_test.go +++ b/primitives/transition/validator_update_test.go @@ -23,9 +23,9 @@ package transition_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/version/version.go b/primitives/version/version.go similarity index 100% rename from mod/primitives/pkg/version/version.go rename to primitives/version/version.go diff --git a/mod/primitives/pkg/version/version_test.go b/primitives/version/version_test.go similarity index 98% rename from mod/primitives/pkg/version/version_test.go rename to primitives/version/version_test.go index 62b1449e29..0a54f8f07b 100644 --- a/mod/primitives/pkg/version/version_test.go +++ b/primitives/version/version_test.go @@ -24,7 +24,7 @@ import ( "encoding/binary" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/build/scripts/build.mk b/scripts/build/build.mk similarity index 98% rename from build/scripts/build.mk rename to scripts/build/build.mk index eb8767942d..c44e187461 100644 --- a/build/scripts/build.mk +++ b/scripts/build/build.mk @@ -6,11 +6,10 @@ endif COMMIT = $(shell git log -1 --format='%H') CURRENT_DIR = $(shell pwd) OUT_DIR ?= $(CURDIR)/build/bin -BINDIR ?= $(GOPATH)/build/bin TESTNAME = beacon TESTAPP = beacond TESTAPP_FILES_DIR = testing/files -TESTAPP_CMD_DIR = $(TESTAPP)/cmd +TESTAPP_CMD_DIR = cmd/$(TESTAPP) PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git) # process build tags diff --git a/build/scripts/codegen.mk b/scripts/build/codegen.mk similarity index 100% rename from build/scripts/codegen.mk rename to scripts/build/codegen.mk diff --git a/build/scripts/constants.mk b/scripts/build/constants.mk similarity index 100% rename from build/scripts/constants.mk rename to scripts/build/constants.mk diff --git a/build/scripts/devtools.mk b/scripts/build/devtools.mk similarity index 98% rename from build/scripts/devtools.mk rename to scripts/build/devtools.mk index c60c2f22d5..7008d73344 100644 --- a/build/scripts/devtools.mk +++ b/scripts/build/devtools.mk @@ -54,7 +54,7 @@ update-dep: ## update a dependency in all of the go.mod files which import it done yap: ## the yap cave - @go run ./mod/cli/pkg/utils/yap/yap.go + @go run ./cli/utils/yap/yap.go tidy-sync-check: @{ \ diff --git a/build/scripts/golines.sh b/scripts/build/golines.sh similarity index 100% rename from build/scripts/golines.sh rename to scripts/build/golines.sh diff --git a/build/scripts/help.mk b/scripts/build/help.mk similarity index 100% rename from build/scripts/help.mk rename to scripts/build/help.mk diff --git a/build/scripts/linting.mk b/scripts/build/linting.mk similarity index 91% rename from build/scripts/linting.mk rename to scripts/build/linting.mk index 366c153c50..11eb3f23f6 100644 --- a/build/scripts/linting.mk +++ b/scripts/build/linting.mk @@ -31,7 +31,7 @@ golangci-fix: golines: @echo "--> Running golines" - @./build/scripts/golines.sh + @./scripts/build/golines.sh ################# # license # @@ -39,12 +39,12 @@ golines: license: @echo "--> Running addlicense with -check" - (go run github.com/google/addlicense -check -v -f $(ROOT_DIR)/LICENSE.header beacond build examples kurtosis mod testing) || exit 1; + (go run github.com/google/addlicense -check -v -f $(ROOT_DIR)/LICENSE.header -ignore "contracts/**" .) || exit 1; @printf "License check complete\n" license-fix: echo "--> Running addlicense" - (go run github.com/google/addlicense -v -f $(ROOT_DIR)/LICENSE.header beacond build examples kurtosis mod testing) || exit 1; + (go run github.com/google/addlicense -v -f $(ROOT_DIR)/LICENSE.header -ignore "contracts/**" .) || exit 1; @printf "License check complete\n" ################# @@ -53,7 +53,7 @@ license-fix: nilaway: @echo "--> Running nilaway" - (go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "mod/geth-primitives/pkg/deposit/" -v ./...) || exit 1; + (go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "geth-primitives/deposit/" -v ./...) || exit 1; @printf "Nilaway check complete\n" ################# diff --git a/build/scripts/proto_generate_pulsar.sh b/scripts/build/proto_generate_pulsar.sh similarity index 94% rename from build/scripts/proto_generate_pulsar.sh rename to scripts/build/proto_generate_pulsar.sh index 6245322b6b..e786145537 100755 --- a/build/scripts/proto_generate_pulsar.sh +++ b/scripts/build/proto_generate_pulsar.sh @@ -40,7 +40,7 @@ mkdir -p cosmos/api (cd cosmos/api; find ./ -type f \( -iname \*.pulsar.go -o -iname \*.pb.go -o -iname \*.cosmos_orm.go -o -iname \*.pb.gw.go \) -delete; find . -empty -type d -delete; cd ../../..) echo "Generating API module" -(cd mod/node-core/pkg/components/module/proto; buf generate --template buf.gen.pulsar.yaml; cd ../) +(cd node-core/components/module/proto; buf generate --template buf.gen.pulsar.yaml; cd ../) # # cp -r api cosmos # cp -r api/mod/node-core/pkg/components/module/* mod/node-core/pkg/components/module/api diff --git a/build/scripts/protobuf.mk b/scripts/build/protobuf.mk similarity index 79% rename from build/scripts/protobuf.mk rename to scripts/build/protobuf.mk index 81c5485df7..6816db5dd2 100644 --- a/build/scripts/protobuf.mk +++ b/scripts/build/protobuf.mk @@ -2,19 +2,19 @@ protoImageName := "ghcr.io/cosmos/proto-builder" protoImageVersion := "0.14.0" -modulesProtoDir := "mod/node-core/pkg/components/module/proto" +modulesProtoDir := "node-core/components/module/proto" ## Protobuf: proto: ## run all the proto tasks @$(MAKE) proto-build proto-build: ## build the proto files - @docker run --rm -v ${CURRENT_DIR}:/workspace --workdir /workspace $(protoImageName):$(protoImageVersion) sh ./build/scripts/proto_generate_pulsar.sh + @docker run --rm -v ${CURRENT_DIR}:/workspace --workdir /workspace $(protoImageName):$(protoImageVersion) sh ./scripts/build/proto_generate_pulsar.sh proto-clean: ## clean the proto files @find . -name '*.pb.go' -delete @find . -name '*.pb.gw.go' -delete - + buf-install: @echo "--> Installing buf" @go install github.com/bufbuild/buf/cmd/buf \ No newline at end of file diff --git a/build/scripts/release.mk b/scripts/build/release.mk similarity index 100% rename from build/scripts/release.mk rename to scripts/build/release.mk diff --git a/build/scripts/testing.mk b/scripts/build/testing.mk similarity index 94% rename from build/scripts/testing.mk rename to scripts/build/testing.mk index dc40977a0f..766cf6ea69 100644 --- a/build/scripts/testing.mk +++ b/scripts/build/testing.mk @@ -273,10 +273,10 @@ test-unit-bench: ## run golang unit benchmarks # use the old linker with flags -ldflags=-extldflags=-Wl,-ld_classic test-unit-fuzz: ## run fuzz tests @echo "Running fuzz tests with coverage..." - go test ./mod/payload/pkg/cache/... -fuzz=FuzzPayloadIDCacheBasic -fuzztime=${SHORT_FUZZ_TIME} - go test ./mod/payload/pkg/cache/... -fuzz=FuzzPayloadIDInvalidInput -fuzztime=${SHORT_FUZZ_TIME} - go test ./mod/payload/pkg/cache/... -fuzz=FuzzPayloadIDCacheConcurrency -fuzztime=${SHORT_FUZZ_TIME} - go test -fuzz=FuzzHashTreeRoot ./mod/primitives/pkg/merkle -fuzztime=${MEDIUM_FUZZ_TIME} + go test -run ^FuzzPayloadIDCacheBasic -fuzztime=${SHORT_FUZZ_TIME} github.com/berachain/beacon-kit/payload/cache + go test -run ^FuzzPayloadIDInvalidInput -fuzztime=${SHORT_FUZZ_TIME} github.com/berachain/beacon-kit/payload/cache + go test -run ^FuzzPayloadIDCacheConcurrency -fuzztime=${SHORT_FUZZ_TIME} github.com/berachain/beacon-kit/payload/cache + go test -run ^FuzzHashTreeRoot -fuzztime=${MEDIUM_FUZZ_TIME} github.com/berachain/beacon-kit/primitives/merkle test-e2e: ## run e2e tests @$(MAKE) build-docker VERSION=kurtosis-local test-e2e-no-build diff --git a/mod/state-transition/pkg/core/README.md b/state-transition/core/README.md similarity index 100% rename from mod/state-transition/pkg/core/README.md rename to state-transition/core/README.md diff --git a/mod/state-transition/pkg/core/core_test.go b/state-transition/core/core_test.go similarity index 85% rename from mod/state-transition/pkg/core/core_test.go rename to state-transition/core/core_test.go index e4366ceca0..012787ec31 100644 --- a/mod/state-transition/pkg/core/core_test.go +++ b/state-transition/core/core_test.go @@ -30,24 +30,24 @@ import ( "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/log/pkg/noop" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - nodemetrics "github.com/berachain/beacon-kit/mod/node-core/pkg/components/metrics" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - cryptomocks "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/mocks" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/mocks" - statedb "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" - "github.com/berachain/beacon-kit/mod/storage/pkg/db" - depositstore "github.com/berachain/beacon-kit/mod/storage/pkg/deposit" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/consensus-types/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/log/noop" + "github.com/berachain/beacon-kit/node-core/components" + nodemetrics "github.com/berachain/beacon-kit/node-core/components/metrics" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + cryptomocks "github.com/berachain/beacon-kit/primitives/crypto/mocks" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/state-transition/core" + "github.com/berachain/beacon-kit/state-transition/core/mocks" + statedb "github.com/berachain/beacon-kit/state-transition/core/state" + "github.com/berachain/beacon-kit/storage/beacondb" + "github.com/berachain/beacon-kit/storage/db" + depositstore "github.com/berachain/beacon-kit/storage/deposit" + "github.com/berachain/beacon-kit/storage/encoding" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/mock" diff --git a/mod/state-transition/pkg/core/errors.go b/state-transition/core/errors.go similarity index 98% rename from mod/state-transition/pkg/core/errors.go rename to state-transition/core/errors.go index 69023189b9..b7df837c01 100644 --- a/mod/state-transition/pkg/core/errors.go +++ b/state-transition/core/errors.go @@ -20,7 +20,7 @@ package core -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrValSetCapExceeded is returned when the number of genesis deposits diff --git a/mod/state-transition/pkg/core/interfaces.go b/state-transition/core/interfaces.go similarity index 96% rename from mod/state-transition/pkg/core/interfaces.go rename to state-transition/core/interfaces.go index c5ff805492..891d3c63d4 100644 --- a/mod/state-transition/pkg/core/interfaces.go +++ b/state-transition/core/interfaces.go @@ -23,9 +23,9 @@ package core import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconState is the interface for the beacon state. It diff --git a/mod/state-transition/pkg/core/metrics.go b/state-transition/core/metrics.go similarity index 100% rename from mod/state-transition/pkg/core/metrics.go rename to state-transition/core/metrics.go diff --git a/mod/state-transition/pkg/core/mocks/execution_engine.mock.go b/state-transition/core/mocks/execution_engine.mock.go similarity index 96% rename from mod/state-transition/pkg/core/mocks/execution_engine.mock.go rename to state-transition/core/mocks/execution_engine.mock.go index 8bf5537e0c..6c7f5fa5b0 100644 --- a/mod/state-transition/pkg/core/mocks/execution_engine.mock.go +++ b/state-transition/core/mocks/execution_engine.mock.go @@ -5,8 +5,8 @@ package mocks import ( context "context" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - core "github.com/berachain/beacon-kit/mod/state-transition/pkg/core" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + core "github.com/berachain/beacon-kit/state-transition/core" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/state-transition/pkg/core/state/constants.go b/state-transition/core/state/constants.go similarity index 100% rename from mod/state-transition/pkg/core/state/constants.go rename to state-transition/core/state/constants.go diff --git a/mod/state-transition/pkg/core/state/interfaces.go b/state-transition/core/state/interfaces.go similarity index 97% rename from mod/state-transition/pkg/core/state/interfaces.go rename to state-transition/core/state/interfaces.go index 01225fe560..9a321b93e2 100644 --- a/mod/state-transition/pkg/core/state/interfaces.go +++ b/state-transition/core/state/interfaces.go @@ -23,9 +23,9 @@ package state import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // KVStore is the interface for the key-value store holding the beacon state. diff --git a/mod/state-transition/pkg/core/state/statedb.go b/state-transition/core/state/statedb.go similarity index 98% rename from mod/state-transition/pkg/core/state/statedb.go rename to state-transition/core/state/statedb.go index 8d681ea494..834b90e8e2 100644 --- a/mod/state-transition/pkg/core/state/statedb.go +++ b/state-transition/core/state/statedb.go @@ -21,10 +21,10 @@ package state import ( - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // StateDB is the underlying struct behind the BeaconState interface. diff --git a/mod/state-transition/pkg/core/state/types.go b/state-transition/core/state/types.go similarity index 94% rename from mod/state-transition/pkg/core/state/types.go rename to state-transition/core/state/types.go index ed42c8dfe0..1776c35183 100644 --- a/mod/state-transition/pkg/core/state/types.go +++ b/state-transition/core/state/types.go @@ -21,9 +21,9 @@ package state import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconStateMarshallable represents an interface for a beacon state diff --git a/mod/state-transition/pkg/core/state/upgrade.go b/state-transition/core/state/upgrade.go similarity index 92% rename from mod/state-transition/pkg/core/state/upgrade.go rename to state-transition/core/state/upgrade.go index 9555d085a1..2b935ef0da 100644 --- a/mod/state-transition/pkg/core/state/upgrade.go +++ b/state-transition/core/state/upgrade.go @@ -21,8 +21,8 @@ package state import ( - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/primitives/math" ) // IsPostUpgrade returns true if the chain is post-upgrade (Fork2 on Boonet). diff --git a/mod/state-transition/pkg/core/state_processor.go b/state-transition/core/state_processor.go similarity index 96% rename from mod/state-transition/pkg/core/state_processor.go rename to state-transition/core/state_processor.go index b8370beeb2..d1e8060888 100644 --- a/mod/state-transition/pkg/core/state_processor.go +++ b/state-transition/core/state_processor.go @@ -25,15 +25,15 @@ import ( "fmt" "sync" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" ) // StateProcessor is a basic Processor, which takes care of the diff --git a/mod/state-transition/pkg/core/state_processor_genesis.go b/state-transition/core/state_processor_genesis.go similarity index 90% rename from mod/state-transition/pkg/core/state_processor_genesis.go rename to state-transition/core/state_processor_genesis.go index c96d257955..1335abdd6a 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis.go +++ b/state-transition/core/state_processor_genesis.go @@ -21,13 +21,13 @@ package core import ( - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/primitives/version" ) // InitializePreminedBeaconStateFromEth1 initializes the beacon state. diff --git a/mod/state-transition/pkg/core/state_processor_genesis_test.go b/state-transition/core/state_processor_genesis_test.go similarity index 94% rename from mod/state-transition/pkg/core/state_processor_genesis_test.go rename to state-transition/core/state_processor_genesis_test.go index 41f30a0632..2f40614f8c 100644 --- a/mod/state-transition/pkg/core/state_processor_genesis_test.go +++ b/state-transition/core/state_processor_genesis_test.go @@ -23,13 +23,13 @@ package core_test import ( "testing" - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-core/components" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/state-transition/pkg/core/state_processor_payload.go b/state-transition/core/state_processor_payload.go similarity index 94% rename from mod/state-transition/pkg/core/state_processor_payload.go rename to state-transition/core/state_processor_payload.go index 875dff96d8..cf2f7842bb 100644 --- a/mod/state-transition/pkg/core/state_processor_payload.go +++ b/state-transition/core/state_processor_payload.go @@ -23,11 +23,11 @@ package core import ( "context" - payloadtime "github.com/berachain/beacon-kit/mod/beacon/payload-time" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + payloadtime "github.com/berachain/beacon-kit/beacon/payload-time" + "github.com/berachain/beacon-kit/config/spec" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/math" "golang.org/x/sync/errgroup" ) diff --git a/mod/state-transition/pkg/core/state_processor_randao.go b/state-transition/core/state_processor_randao.go similarity index 91% rename from mod/state-transition/pkg/core/state_processor_randao.go rename to state-transition/core/state_processor_randao.go index 7d0be4494b..c285a1e224 100644 --- a/mod/state-transition/pkg/core/state_processor_randao.go +++ b/state-transition/core/state_processor_randao.go @@ -21,11 +21,11 @@ package core import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/crypto/sha256" + "github.com/berachain/beacon-kit/primitives/version" "github.com/go-faster/xor" ) diff --git a/mod/state-transition/pkg/core/state_processor_slashing.go b/state-transition/core/state_processor_slashing.go similarity index 98% rename from mod/state-transition/pkg/core/state_processor_slashing.go rename to state-transition/core/state_processor_slashing.go index 581852a0f0..0af3a79579 100644 --- a/mod/state-transition/pkg/core/state_processor_slashing.go +++ b/state-transition/core/state_processor_slashing.go @@ -21,7 +21,7 @@ package core import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) // processSlashingsReset as defined in the Ethereum 2.0 specification. diff --git a/mod/state-transition/pkg/core/state_processor_staking.go b/state-transition/core/state_processor_staking.go similarity index 97% rename from mod/state-transition/pkg/core/state_processor_staking.go rename to state-transition/core/state_processor_staking.go index 7c30dddec8..0b0039c9dd 100644 --- a/mod/state-transition/pkg/core/state_processor_staking.go +++ b/state-transition/core/state_processor_staking.go @@ -24,11 +24,11 @@ import ( "bytes" "slices" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/version" ) // processOperations processes the operations and ensures they match the diff --git a/mod/state-transition/pkg/core/state_processor_staking_test.go b/state-transition/core/state_processor_staking_test.go similarity index 98% rename from mod/state-transition/pkg/core/state_processor_staking_test.go rename to state-transition/core/state_processor_staking_test.go index d78cd85585..439c112b74 100644 --- a/mod/state-transition/pkg/core/state_processor_staking_test.go +++ b/state-transition/core/state_processor_staking_test.go @@ -24,17 +24,17 @@ import ( "strconv" "testing" - "github.com/berachain/beacon-kit/mod/chain-spec/pkg/chain" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" - "github.com/berachain/beacon-kit/mod/primitives/pkg/version" + "github.com/berachain/beacon-kit/chain-spec/chain" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/consensus-types/types" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/node-core/components" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constants" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" + "github.com/berachain/beacon-kit/primitives/version" "github.com/stretchr/testify/require" ) diff --git a/mod/state-transition/pkg/core/state_processor_validators.go b/state-transition/core/state_processor_validators.go similarity index 95% rename from mod/state-transition/pkg/core/state_processor_validators.go rename to state-transition/core/state_processor_validators.go index befc69650a..869153cfe3 100644 --- a/mod/state-transition/pkg/core/state_processor_validators.go +++ b/state-transition/core/state_processor_validators.go @@ -21,9 +21,9 @@ package core import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/primitives/pkg/transition" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/primitives/transition" "github.com/sourcegraph/conc/iter" ) diff --git a/mod/state-transition/pkg/core/state_processor_withdrawals.go b/state-transition/core/state_processor_withdrawals.go similarity index 97% rename from mod/state-transition/pkg/core/state_processor_withdrawals.go rename to state-transition/core/state_processor_withdrawals.go index b3415ee040..fd42a3ddc8 100644 --- a/mod/state-transition/pkg/core/state_processor_withdrawals.go +++ b/state-transition/core/state_processor_withdrawals.go @@ -23,10 +23,10 @@ package core import ( "fmt" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/state-transition/pkg/core/state" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/state-transition/core/state" "github.com/davecgh/go-spew/spew" ) diff --git a/mod/state-transition/pkg/core/types.go b/state-transition/core/types.go similarity index 95% rename from mod/state-transition/pkg/core/types.go rename to state-transition/core/types.go index a02e03ed5e..49b9f952cb 100644 --- a/mod/state-transition/pkg/core/types.go +++ b/state-transition/core/types.go @@ -24,13 +24,13 @@ import ( stdbytes "bytes" "context" - engineprimitives "github.com/berachain/beacon-kit/mod/engine-primitives/pkg/engine-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + engineprimitives "github.com/berachain/beacon-kit/engine-primitives/engine-primitives" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/eip4844" + "github.com/berachain/beacon-kit/primitives/math" "github.com/karalabe/ssz" ) diff --git a/mod/state-transition/pkg/core/validation_deposits.go b/state-transition/core/validation_deposits.go similarity index 96% rename from mod/state-transition/pkg/core/validation_deposits.go rename to state-transition/core/validation_deposits.go index 2f2651130a..03dac59a60 100644 --- a/mod/state-transition/pkg/core/validation_deposits.go +++ b/state-transition/core/validation_deposits.go @@ -23,9 +23,9 @@ package core import ( "fmt" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/math" ) func (sp *StateProcessor[ diff --git a/mod/storage/pkg/beacondb/eth1.go b/storage/beacondb/eth1.go similarity index 100% rename from mod/storage/pkg/beacondb/eth1.go rename to storage/beacondb/eth1.go diff --git a/mod/storage/pkg/beacondb/fork.go b/storage/beacondb/fork.go similarity index 100% rename from mod/storage/pkg/beacondb/fork.go rename to storage/beacondb/fork.go diff --git a/mod/storage/pkg/beacondb/history.go b/storage/beacondb/history.go similarity index 97% rename from mod/storage/pkg/beacondb/history.go rename to storage/beacondb/history.go index a873e1d5dc..5bc29d4253 100644 --- a/mod/storage/pkg/beacondb/history.go +++ b/storage/beacondb/history.go @@ -20,7 +20,7 @@ package beacondb -import "github.com/berachain/beacon-kit/mod/primitives/pkg/common" +import "github.com/berachain/beacon-kit/primitives/common" // UpdateBlockRootAtIndex sets a block root in the BeaconStore. func (kv *KVStore[ diff --git a/mod/storage/pkg/beacondb/index/validator.go b/storage/beacondb/index/validator.go similarity index 95% rename from mod/storage/pkg/beacondb/index/validator.go rename to storage/beacondb/index/validator.go index 7b845b63e1..c01a0737e5 100644 --- a/mod/storage/pkg/beacondb/index/validator.go +++ b/storage/beacondb/index/validator.go @@ -23,9 +23,9 @@ package index import ( sdkcollections "cosmossdk.io/collections" "cosmossdk.io/collections/indexes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" cmtcrypto "github.com/cometbft/cometbft/crypto" ) diff --git a/mod/storage/pkg/beacondb/index/validator_test.go b/storage/beacondb/index/validator_test.go similarity index 100% rename from mod/storage/pkg/beacondb/index/validator_test.go rename to storage/beacondb/index/validator_test.go diff --git a/mod/storage/pkg/beacondb/keys/keys.go b/storage/beacondb/keys/keys.go similarity index 100% rename from mod/storage/pkg/beacondb/keys/keys.go rename to storage/beacondb/keys/keys.go diff --git a/mod/storage/pkg/beacondb/kvstore.go b/storage/beacondb/kvstore.go similarity index 97% rename from mod/storage/pkg/beacondb/kvstore.go rename to storage/beacondb/kvstore.go index 7680df3256..b75165120e 100644 --- a/mod/storage/pkg/beacondb/kvstore.go +++ b/storage/beacondb/kvstore.go @@ -25,10 +25,10 @@ import ( sdkcollections "cosmossdk.io/collections" "cosmossdk.io/core/store" - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb/index" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb/keys" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/storage/beacondb/index" + "github.com/berachain/beacon-kit/storage/beacondb/keys" + "github.com/berachain/beacon-kit/storage/encoding" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/mod/storage/pkg/beacondb/randao.go b/storage/beacondb/randao.go similarity index 96% rename from mod/storage/pkg/beacondb/randao.go rename to storage/beacondb/randao.go index 1d9498aba3..a06a9fb631 100644 --- a/mod/storage/pkg/beacondb/randao.go +++ b/storage/beacondb/randao.go @@ -20,7 +20,7 @@ package beacondb -import "github.com/berachain/beacon-kit/mod/primitives/pkg/common" +import "github.com/berachain/beacon-kit/primitives/common" // UpdateRandaoMixAtIndex sets the current RANDAO mix in the store. func (kv *KVStore[ diff --git a/mod/storage/pkg/beacondb/registry.go b/storage/beacondb/registry.go similarity index 98% rename from mod/storage/pkg/beacondb/registry.go rename to storage/beacondb/registry.go index 2853d77ef2..389668a533 100644 --- a/mod/storage/pkg/beacondb/registry.go +++ b/storage/beacondb/registry.go @@ -24,8 +24,8 @@ import ( "errors" "cosmossdk.io/collections/indexes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // AddValidator registers a new validator in the beacon state. diff --git a/mod/storage/pkg/beacondb/registry_test.go b/storage/beacondb/registry_test.go similarity index 94% rename from mod/storage/pkg/beacondb/registry_test.go rename to storage/beacondb/registry_test.go index bdccb88bee..79e46c8122 100644 --- a/mod/storage/pkg/beacondb/registry_test.go +++ b/storage/beacondb/registry_test.go @@ -30,13 +30,13 @@ import ( "cosmossdk.io/store" "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/node-core/pkg/components" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/storage/pkg/beacondb" - "github.com/berachain/beacon-kit/mod/storage/pkg/db" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/node-core/components" + "github.com/berachain/beacon-kit/primitives/bytes" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/storage/beacondb" + "github.com/berachain/beacon-kit/storage/db" + "github.com/berachain/beacon-kit/storage/encoding" dbm "github.com/cosmos/cosmos-db" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" diff --git a/mod/storage/pkg/beacondb/slashing.go b/storage/beacondb/slashing.go similarity index 96% rename from mod/storage/pkg/beacondb/slashing.go rename to storage/beacondb/slashing.go index a44334580b..a4fca66442 100644 --- a/mod/storage/pkg/beacondb/slashing.go +++ b/storage/beacondb/slashing.go @@ -22,8 +22,8 @@ package beacondb import ( "cosmossdk.io/collections" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/math" ) func (kv *KVStore[ diff --git a/mod/storage/pkg/beacondb/staking_test.go b/storage/beacondb/staking_test.go similarity index 100% rename from mod/storage/pkg/beacondb/staking_test.go rename to storage/beacondb/staking_test.go diff --git a/mod/storage/pkg/beacondb/types.go b/storage/beacondb/types.go similarity index 88% rename from mod/storage/pkg/beacondb/types.go rename to storage/beacondb/types.go index cc401104de..eb7075f79f 100644 --- a/mod/storage/pkg/beacondb/types.go +++ b/storage/beacondb/types.go @@ -21,9 +21,9 @@ package beacondb import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/crypto" + "github.com/berachain/beacon-kit/primitives/math" ) // Validator represents an interface for a validator in the beacon chain. diff --git a/mod/storage/pkg/beacondb/versioning.go b/storage/beacondb/versioning.go similarity index 94% rename from mod/storage/pkg/beacondb/versioning.go rename to storage/beacondb/versioning.go index 82d48e4456..7b2b87f3c7 100644 --- a/mod/storage/pkg/beacondb/versioning.go +++ b/storage/beacondb/versioning.go @@ -21,8 +21,8 @@ package beacondb import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // SetGenesisValidatorsRoot sets the genesis validators root in the beacon diff --git a/mod/storage/pkg/beacondb/withdrawals.go b/storage/beacondb/withdrawals.go similarity index 97% rename from mod/storage/pkg/beacondb/withdrawals.go rename to storage/beacondb/withdrawals.go index c9fc3faf4c..ed77d7f8fe 100644 --- a/mod/storage/pkg/beacondb/withdrawals.go +++ b/storage/beacondb/withdrawals.go @@ -20,7 +20,7 @@ package beacondb -import "github.com/berachain/beacon-kit/mod/primitives/pkg/math" +import "github.com/berachain/beacon-kit/primitives/math" // GetNextWithdrawalIndex returns the next withdrawal index. func (kv *KVStore[ diff --git a/mod/storage/pkg/block/store.go b/storage/block/store.go similarity index 94% rename from mod/storage/pkg/block/store.go rename to storage/block/store.go index a309d81b3c..5be1900e76 100644 --- a/mod/storage/pkg/block/store.go +++ b/storage/block/store.go @@ -23,10 +23,10 @@ package block import ( "fmt" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" lru "github.com/hashicorp/golang-lru/v2" ) diff --git a/mod/storage/pkg/block/store_test.go b/storage/block/store_test.go similarity index 91% rename from mod/storage/pkg/block/store_test.go rename to storage/block/store_test.go index 14de7a5fef..a3b0046f4d 100644 --- a/mod/storage/pkg/block/store_test.go +++ b/storage/block/store_test.go @@ -23,10 +23,10 @@ package block_test import ( "testing" - "github.com/berachain/beacon-kit/mod/log/pkg/noop" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/storage/pkg/block" + "github.com/berachain/beacon-kit/log/noop" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/storage/block" "github.com/stretchr/testify/require" ) diff --git a/mod/storage/pkg/block/types.go b/storage/block/types.go similarity index 91% rename from mod/storage/pkg/block/types.go rename to storage/block/types.go index 3b02a2a9ec..0d60c5bb86 100644 --- a/mod/storage/pkg/block/types.go +++ b/storage/block/types.go @@ -21,8 +21,8 @@ package block import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/common" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconBlock is a block in the beacon chain that has a slot, block root (hash diff --git a/mod/storage/pkg/db/db.go b/storage/db/db.go similarity index 100% rename from mod/storage/pkg/db/db.go rename to storage/db/db.go diff --git a/mod/storage/pkg/deposit/store.go b/storage/deposit/store.go similarity index 95% rename from mod/storage/pkg/deposit/store.go rename to storage/deposit/store.go index 9d61747d2f..a2f5bd52f2 100644 --- a/mod/storage/pkg/deposit/store.go +++ b/storage/deposit/store.go @@ -27,10 +27,10 @@ import ( sdkcollections "cosmossdk.io/collections" "cosmossdk.io/core/store" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/encoding" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/encoding" + "github.com/berachain/beacon-kit/storage/pruner" ) const KeyDepositPrefix = "deposit" diff --git a/mod/storage/pkg/deposit/types.go b/storage/deposit/types.go similarity index 90% rename from mod/storage/pkg/deposit/types.go rename to storage/deposit/types.go index a1209960fc..1a47af76b6 100644 --- a/mod/storage/pkg/deposit/types.go +++ b/storage/deposit/types.go @@ -21,8 +21,8 @@ package deposit import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/constraints" + "github.com/berachain/beacon-kit/primitives/math" ) // Deposit is a struct that represents a deposit. diff --git a/mod/storage/pkg/encoding/ssz.go b/storage/encoding/ssz.go similarity index 98% rename from mod/storage/pkg/encoding/ssz.go rename to storage/encoding/ssz.go index 4982c1f01d..b31b17b16c 100644 --- a/mod/storage/pkg/encoding/ssz.go +++ b/storage/encoding/ssz.go @@ -21,7 +21,7 @@ package encoding import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/constraints" + "github.com/berachain/beacon-kit/primitives/constraints" "github.com/davecgh/go-spew/spew" ) diff --git a/mod/storage/pkg/encoding/u64.go b/storage/encoding/u64.go similarity index 95% rename from mod/storage/pkg/encoding/u64.go rename to storage/encoding/u64.go index 9acec94f5a..00bde47f51 100644 --- a/mod/storage/pkg/encoding/u64.go +++ b/storage/encoding/u64.go @@ -22,7 +22,7 @@ package encoding import ( "cosmossdk.io/collections/codec" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/math" ) var ( diff --git a/mod/storage/pkg/filedb/db.go b/storage/filedb/db.go similarity index 97% rename from mod/storage/pkg/filedb/db.go rename to storage/filedb/db.go index d56d59c830..448bacfaeb 100644 --- a/mod/storage/pkg/filedb/db.go +++ b/storage/filedb/db.go @@ -24,8 +24,8 @@ import ( "os" "path/filepath" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/log" "github.com/spf13/afero" ) diff --git a/mod/storage/pkg/filedb/db_options.go b/storage/filedb/db_options.go similarity index 97% rename from mod/storage/pkg/filedb/db_options.go rename to storage/filedb/db_options.go index 033c80f7ff..e8883fd9dd 100644 --- a/mod/storage/pkg/filedb/db_options.go +++ b/storage/filedb/db_options.go @@ -23,7 +23,7 @@ package filedb import ( "os" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" "github.com/spf13/afero" ) diff --git a/mod/storage/pkg/filedb/db_test.go b/storage/filedb/db_test.go similarity index 98% rename from mod/storage/pkg/filedb/db_test.go rename to storage/filedb/db_test.go index c159960364..07a88b0887 100644 --- a/mod/storage/pkg/filedb/db_test.go +++ b/storage/filedb/db_test.go @@ -24,8 +24,8 @@ import ( "testing" "cosmossdk.io/log" - "github.com/berachain/beacon-kit/mod/errors" - file "github.com/berachain/beacon-kit/mod/storage/pkg/filedb" + "github.com/berachain/beacon-kit/errors" + file "github.com/berachain/beacon-kit/storage/filedb" "github.com/spf13/afero" "github.com/stretchr/testify/require" ) diff --git a/mod/storage/pkg/filedb/range_db.go b/storage/filedb/range_db.go similarity index 95% rename from mod/storage/pkg/filedb/range_db.go rename to storage/filedb/range_db.go index a8fe1ea0ef..8267fd196f 100644 --- a/mod/storage/pkg/filedb/range_db.go +++ b/storage/filedb/range_db.go @@ -25,10 +25,10 @@ import ( "fmt" "strconv" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" - db "github.com/berachain/beacon-kit/mod/storage/pkg/interfaces" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/errors" + "github.com/berachain/beacon-kit/primitives/encoding/hex" + db "github.com/berachain/beacon-kit/storage/interfaces" + "github.com/berachain/beacon-kit/storage/pruner" ) // two is a constant for the number 2. diff --git a/mod/storage/pkg/filedb/range_db_test.go b/storage/filedb/range_db_test.go similarity index 98% rename from mod/storage/pkg/filedb/range_db_test.go rename to storage/filedb/range_db_test.go index 23de7c5c17..5fd5bce407 100644 --- a/mod/storage/pkg/filedb/range_db_test.go +++ b/storage/filedb/range_db_test.go @@ -25,9 +25,9 @@ import ( "testing" "cosmossdk.io/log" - "github.com/berachain/beacon-kit/mod/errors" - file "github.com/berachain/beacon-kit/mod/storage/pkg/filedb" - "github.com/berachain/beacon-kit/mod/storage/pkg/interfaces/mocks" + "github.com/berachain/beacon-kit/errors" + file "github.com/berachain/beacon-kit/storage/filedb" + "github.com/berachain/beacon-kit/storage/interfaces/mocks" "github.com/spf13/afero" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/mod/storage/pkg/interfaces/db.go b/storage/interfaces/db.go similarity index 100% rename from mod/storage/pkg/interfaces/db.go rename to storage/interfaces/db.go diff --git a/mod/storage/pkg/interfaces/mocks/db.mock.go b/storage/interfaces/mocks/db.mock.go similarity index 100% rename from mod/storage/pkg/interfaces/mocks/db.mock.go rename to storage/interfaces/mocks/db.mock.go diff --git a/mod/storage/pkg/manager/manager.go b/storage/manager/manager.go similarity index 94% rename from mod/storage/pkg/manager/manager.go rename to storage/manager/manager.go index 47c894b40f..131079a606 100644 --- a/mod/storage/pkg/manager/manager.go +++ b/storage/manager/manager.go @@ -28,8 +28,8 @@ package manager import ( "context" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/storage/pruner" ) // DBManager is a manager for all pruners. diff --git a/mod/storage/pkg/manager/manager_test.go b/storage/manager/manager_test.go similarity index 89% rename from mod/storage/pkg/manager/manager_test.go rename to storage/manager/manager_test.go index d54e5ca984..f90976edb7 100644 --- a/mod/storage/pkg/manager/manager_test.go +++ b/storage/manager/manager_test.go @@ -31,10 +31,10 @@ import ( "time" "cosmossdk.io/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/storage/pkg/manager" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner/mocks" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/storage/manager" + "github.com/berachain/beacon-kit/storage/pruner" + "github.com/berachain/beacon-kit/storage/pruner/mocks" "github.com/stretchr/testify/require" ) diff --git a/mod/storage/pkg/manager/names.go b/storage/manager/names.go similarity index 100% rename from mod/storage/pkg/manager/names.go rename to storage/manager/names.go diff --git a/mod/storage/pkg/manager/types.go b/storage/manager/types.go similarity index 92% rename from mod/storage/pkg/manager/types.go rename to storage/manager/types.go index fb50b114eb..bb367c0960 100644 --- a/mod/storage/pkg/manager/types.go +++ b/storage/manager/types.go @@ -28,8 +28,8 @@ package manager import ( "context" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/math" ) // BeaconBlock is an interface for beacon blocks. diff --git a/mod/storage/pkg/pruner/mocks/beacon_block.mock.go b/storage/pruner/mocks/beacon_block.mock.go similarity index 96% rename from mod/storage/pkg/pruner/mocks/beacon_block.mock.go rename to storage/pruner/mocks/beacon_block.mock.go index 3f6fa20bc2..baee5570cd 100644 --- a/mod/storage/pkg/pruner/mocks/beacon_block.mock.go +++ b/storage/pruner/mocks/beacon_block.mock.go @@ -3,7 +3,7 @@ package mocks import ( - math "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + math "github.com/berachain/beacon-kit/primitives/math" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/storage/pkg/pruner/mocks/block_event.mock.go b/storage/pruner/mocks/block_event.mock.go similarity index 97% rename from mod/storage/pkg/pruner/mocks/block_event.mock.go rename to storage/pruner/mocks/block_event.mock.go index 0297db3ce3..2ed95dcca0 100644 --- a/mod/storage/pkg/pruner/mocks/block_event.mock.go +++ b/storage/pruner/mocks/block_event.mock.go @@ -5,11 +5,11 @@ package mocks import ( context "context" - async "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + async "github.com/berachain/beacon-kit/primitives/async" mock "github.com/stretchr/testify/mock" - pruner "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + pruner "github.com/berachain/beacon-kit/storage/pruner" ) // BlockEvent is an autogenerated mock type for the BlockEvent type diff --git a/mod/storage/pkg/pruner/mocks/prunable.mock.go b/storage/pruner/mocks/prunable.mock.go similarity index 100% rename from mod/storage/pkg/pruner/mocks/prunable.mock.go rename to storage/pruner/mocks/prunable.mock.go diff --git a/mod/storage/pkg/pruner/mocks/pruner.mock.go b/storage/pruner/mocks/pruner.mock.go similarity index 97% rename from mod/storage/pkg/pruner/mocks/pruner.mock.go rename to storage/pruner/mocks/pruner.mock.go index 6d5b0672c4..f39c66af89 100644 --- a/mod/storage/pkg/pruner/mocks/pruner.mock.go +++ b/storage/pruner/mocks/pruner.mock.go @@ -5,7 +5,7 @@ package mocks import ( context "context" - pruner "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" + pruner "github.com/berachain/beacon-kit/storage/pruner" mock "github.com/stretchr/testify/mock" ) diff --git a/mod/storage/pkg/pruner/pruner.go b/storage/pruner/pruner.go similarity index 96% rename from mod/storage/pkg/pruner/pruner.go rename to storage/pruner/pruner.go index 90647d10b6..9d30d7a801 100644 --- a/mod/storage/pkg/pruner/pruner.go +++ b/storage/pruner/pruner.go @@ -29,8 +29,8 @@ package pruner import ( "context" - "github.com/berachain/beacon-kit/mod/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" + "github.com/berachain/beacon-kit/log" + "github.com/berachain/beacon-kit/primitives/async" ) // Compile-time check to ensure pruner implements the Pruner interface. diff --git a/mod/storage/pkg/pruner/pruner_test.go b/storage/pruner/pruner_test.go similarity index 93% rename from mod/storage/pkg/pruner/pruner_test.go rename to storage/pruner/pruner_test.go index 27690bc8c7..9d2c6f4535 100644 --- a/mod/storage/pkg/pruner/pruner_test.go +++ b/storage/pruner/pruner_test.go @@ -31,10 +31,10 @@ import ( "time" "cosmossdk.io/log" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" - "github.com/berachain/beacon-kit/mod/storage/pkg/pruner/mocks" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/math" + "github.com/berachain/beacon-kit/storage/pruner" + "github.com/berachain/beacon-kit/storage/pruner/mocks" "github.com/stretchr/testify/mock" ) diff --git a/mod/storage/pkg/pruner/types.go b/storage/pruner/types.go similarity index 94% rename from mod/storage/pkg/pruner/types.go rename to storage/pruner/types.go index b07e3d0633..1cf2319f2e 100644 --- a/mod/storage/pkg/pruner/types.go +++ b/storage/pruner/types.go @@ -29,8 +29,8 @@ import ( "context" "errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/async" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/primitives/async" + "github.com/berachain/beacon-kit/primitives/math" ) var ErrInvalidRange = errors.New("range start greater than end") diff --git a/testing/benchmarks/logger_benchmark_test.go b/testing/benchmarks/logger_benchmark_test.go index 336b1ec2cf..6ac45814aa 100644 --- a/testing/benchmarks/logger_benchmark_test.go +++ b/testing/benchmarks/logger_benchmark_test.go @@ -24,7 +24,7 @@ import ( "bytes" "testing" - "github.com/berachain/beacon-kit/mod/log/pkg/phuslu" + "github.com/berachain/beacon-kit/log/phuslu" ) /* -------------------------------------------------------------------------- */ diff --git a/testing/e2e/config/config.go b/testing/e2e/config/config.go index 77c922f9d9..51cf4011ea 100644 --- a/testing/e2e/config/config.go +++ b/testing/e2e/config/config.go @@ -22,7 +22,7 @@ package config import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/encoding/json" ) // E2ETestConfig defines the configuration for end-to-end tests, including any diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index b9e14ab04a..51f2c607db 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -22,7 +22,7 @@ package e2e_test import ( beaconapi "github.com/attestantio/go-eth2-client/api" - "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" + "github.com/berachain/beacon-kit/node-api/handlers/utils" "github.com/berachain/beacon-kit/testing/e2e/config" ) diff --git a/testing/e2e/e2e_staking_test.go b/testing/e2e/e2e_staking_test.go index 8f67cc3a18..3bfaab506f 100644 --- a/testing/e2e/e2e_staking_test.go +++ b/testing/e2e/e2e_staking_test.go @@ -23,10 +23,10 @@ package e2e_test import ( "math/big" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/geth-primitives/pkg/deposit" - "github.com/berachain/beacon-kit/mod/primitives/pkg/common" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/geth-primitives/deposit" + "github.com/berachain/beacon-kit/primitives/common" "github.com/berachain/beacon-kit/testing/e2e/config" "github.com/berachain/beacon-kit/testing/e2e/suite" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/testing/e2e/e2e_startup_test.go b/testing/e2e/e2e_startup_test.go index 0c86afef96..ae1a09b5c8 100644 --- a/testing/e2e/e2e_startup_test.go +++ b/testing/e2e/e2e_startup_test.go @@ -23,8 +23,8 @@ package e2e_test import ( "math/big" - "github.com/berachain/beacon-kit/mod/config/pkg/spec" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/config/spec" + "github.com/berachain/beacon-kit/primitives/math" "github.com/berachain/beacon-kit/testing/e2e/suite" gethcommon "github.com/ethereum/go-ethereum/common" ) diff --git a/testing/e2e/suite/errors.go b/testing/e2e/suite/errors.go index 3a1e3249f5..36df6e3857 100644 --- a/testing/e2e/suite/errors.go +++ b/testing/e2e/suite/errors.go @@ -20,7 +20,7 @@ package suite -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" // ErrUnexpectedBalance is returned when the balance is unexpected. var ErrUnexpectedBalance = errors.New("unexpected balance") diff --git a/testing/e2e/suite/setup.go b/testing/e2e/suite/setup.go index d87725ad18..80fa91e5d1 100644 --- a/testing/e2e/suite/setup.go +++ b/testing/e2e/suite/setup.go @@ -29,7 +29,7 @@ import ( "time" "cosmossdk.io/log" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" "github.com/berachain/beacon-kit/testing/e2e/config" "github.com/berachain/beacon-kit/testing/e2e/suite/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" diff --git a/testing/e2e/suite/suite.go b/testing/e2e/suite/suite.go index 75af8ed6ab..5235a8ef9b 100644 --- a/testing/e2e/suite/suite.go +++ b/testing/e2e/suite/suite.go @@ -23,7 +23,7 @@ package suite import ( "context" - "github.com/berachain/beacon-kit/mod/log" + "github.com/berachain/beacon-kit/log" "github.com/berachain/beacon-kit/testing/e2e/config" "github.com/berachain/beacon-kit/testing/e2e/suite/types" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" diff --git a/testing/e2e/suite/types/account.go b/testing/e2e/suite/types/account.go index 260f86e592..8e8f05a28e 100644 --- a/testing/e2e/suite/types/account.go +++ b/testing/e2e/suite/types/account.go @@ -24,7 +24,7 @@ import ( "crypto/ecdsa" "math/big" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" diff --git a/testing/e2e/suite/types/beacon_client.go b/testing/e2e/suite/types/beacon_client.go index fd029af4ba..c4d7c726ce 100644 --- a/testing/e2e/suite/types/beacon_client.go +++ b/testing/e2e/suite/types/beacon_client.go @@ -25,7 +25,7 @@ import ( client "github.com/attestantio/go-eth2-client" beaconhttp "github.com/attestantio/go-eth2-client/http" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" ) // BeaconKitNodeClient is a wrapper around the client.Service interface to add diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index 8f7edfc351..5d6ee674d9 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -25,7 +25,7 @@ import ( "fmt" beaconhttp "github.com/attestantio/go-eth2-client/http" - "github.com/berachain/beacon-kit/mod/errors" + "github.com/berachain/beacon-kit/errors" rpcclient "github.com/cometbft/cometbft/rpc/client" httpclient "github.com/cometbft/cometbft/rpc/client/http" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" diff --git a/testing/e2e/suite/types/errors.go b/testing/e2e/suite/types/errors.go index 64c98a5ad6..7fe7c9e6a5 100644 --- a/testing/e2e/suite/types/errors.go +++ b/testing/e2e/suite/types/errors.go @@ -20,7 +20,7 @@ package types -import "github.com/berachain/beacon-kit/mod/errors" +import "github.com/berachain/beacon-kit/errors" var ( // ErrPublicPortNotFound is returned when the public port is not found. diff --git a/testing/e2e/suite/types/service_context.go b/testing/e2e/suite/types/service_context.go index f575400b76..d65d5bbd93 100644 --- a/testing/e2e/suite/types/service_context.go +++ b/testing/e2e/suite/types/service_context.go @@ -26,7 +26,7 @@ import ( "path/filepath" "runtime" - "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/json" + "github.com/berachain/beacon-kit/primitives/encoding/json" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/services" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/starlark_run_config" diff --git a/testing/e2e/suite/types/tx/eip4844.go b/testing/e2e/suite/types/tx/eip4844.go index 6c921d4fcb..c8f5d4b9d4 100644 --- a/testing/e2e/suite/types/tx/eip4844.go +++ b/testing/e2e/suite/types/tx/eip4844.go @@ -23,7 +23,7 @@ package tx import ( "math/big" - "github.com/berachain/beacon-kit/mod/primitives/pkg/eip4844" + "github.com/berachain/beacon-kit/primitives/eip4844" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto/kzg4844" diff --git a/testing/files/entrypoint.sh b/testing/files/entrypoint.sh index 23c96a044c..291938a468 100755 --- a/testing/files/entrypoint.sh +++ b/testing/files/entrypoint.sh @@ -58,7 +58,7 @@ if [ -d $HOMEDIR ]; then printf "\nAn existing folder at '%s' was found. You can choose to delete this folder and start a new local node with new keys from genesis. When declined, the existing local node is started. \n" $HOMEDIR echo "Overwrite the existing configuration and start a new local node? [y/n]" read -r overwrite -else +else overwrite="Y" fi @@ -69,12 +69,12 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then --chain-id $CHAINID \ --home $HOMEDIR \ --consensus-key-algo $CONSENSUS_KEY_ALGO - + if [ "$CHAIN_SPEC" == "testnet" ]; then cp -f testing/networks/80084/*.toml testing/networks/80084/genesis.json ${HOMEDIR}/config else ./build/bin/beacond genesis add-premined-deposit --home $HOMEDIR - ./build/bin/beacond genesis collect-premined-deposits --home $HOMEDIR + ./build/bin/beacond genesis collect-premined-deposits --home $HOMEDIR ./build/bin/beacond genesis execution-payload "$ETH_GENESIS" --home $HOMEDIR fi fi diff --git a/testing/quick/compare_test.go b/testing/quick/compare_test.go index 5276d7d938..4b9aba7896 100644 --- a/testing/quick/compare_test.go +++ b/testing/quick/compare_test.go @@ -27,8 +27,8 @@ import ( "testing/quick" "unsafe" - "github.com/berachain/beacon-kit/mod/consensus-types/pkg/types" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + "github.com/berachain/beacon-kit/consensus-types/types" + "github.com/berachain/beacon-kit/primitives/math" zcommon "github.com/protolambda/zrnt/eth2/beacon/common" zdeneb "github.com/protolambda/zrnt/eth2/beacon/deneb" zspec "github.com/protolambda/zrnt/eth2/configs"