From a3970bd049d8e6b624948fb515f47de2f6d024e0 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Tue, 30 Jul 2024 14:45:41 -0400 Subject: [PATCH 01/44] init --- .../pkg/eip4788/beacon_verifier.abigen.go | 1334 +++++++++++++++++ .../pkg/eip4788/beacon_verifier.go | 23 + testing/e2e/api/api_suite_test.go | 56 + testing/e2e/api/api_test.go | 35 + testing/go.mod | 17 +- testing/go.sum | 39 + 6 files changed, 1503 insertions(+), 1 deletion(-) create mode 100644 mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go create mode 100644 mod/geth-primitives/pkg/eip4788/beacon_verifier.go create mode 100644 testing/e2e/api/api_suite_test.go create mode 100644 testing/e2e/api/api_test.go diff --git a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go new file mode 100644 index 0000000000..978b425801 --- /dev/null +++ b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go @@ -0,0 +1,1334 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package eip4788 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// BeaconVerifierMetaData contains all meta data concerning the BeaconVerifier contract. +var BeaconVerifierMetaData = &bind.MetaData{ + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BEACON_ROOTS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"executionNumberGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRootAt\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"setExecutionNumberGIndex\",\"inputs\":[{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setZeroValidatorPubkeyGIndex\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBeaconBlockProposer\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"validatorPubkeyProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proposerIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyExecutionNumber\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumberProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zeroValidatorPubkeyGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ExecutionNumberGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionNumberGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ZeroValidatorPubkeyGIndexChanged\",\"inputs\":[{\"name\":\"newZeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IndexOutOfRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorPubkeyLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]}]", + Bin: "0x6080604052348015600e575f80fd5b50604051610bde380380610bde833981016040819052602b916098565b5f8290556001819055603b336041565b505060b9565b638b78c6d819805415605a57630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f806040838503121560a8575f80fd5b505080516020909101519092909150565b610b18806100c65f395ff3fe6080604052600436106100ef575f3560e01c80638170577111610087578063f04e283e11610057578063f04e283e14610257578063f2fde38b1461026a578063f769afd11461027d578063fee81cf41461029c575f80fd5b806381705771146101d25780638da5cb5b146101f1578063ae9af3e314610224578063efcff00a14610243575f80fd5b806354d1f13d116100c257806354d1f13d1461015857806356d7e8fd146101605780635e67d452146101ab578063715018a6146101ca575f80fd5b806325692962146100f3578063305ea416146100fd57806335222ff114610125578063491920ab14610139575b5f80fd5b6100fb6102cd565b005b348015610108575f80fd5b5061011260015481565b6040519081526020015b60405180910390f35b348015610130575f80fd5b506101125f5481565b348015610144575f80fd5b506100fb6101533660046108f0565b61031a565b6100fb610338565b34801561016b575f80fd5b50610186720f3df6d732807ef1319fb7b8bb8522d0beac0281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011c565b3480156101b6575f80fd5b506101126101c53660046109ad565b610371565b6100fb610381565b3480156101dd575f80fd5b506100fb6101ec3660046109cd565b610394565b3480156101fc575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754610186565b34801561022f575f80fd5b506100fb61023e3660046109e4565b6103d7565b34801561024e575f80fd5b506101126103f1565b6100fb610265366004610a45565b610400565b6100fb610278366004610a45565b61043d565b348015610288575f80fd5b506100fb6102973660046109cd565b610463565b3480156102a7575f80fd5b506101126102b6366004610a45565b63389a75e1600c9081525f91909152602090205490565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610330610326876104a0565b86868686866104db565b505050505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f61037b826104a0565b92915050565b6103896105d6565b6103925f61060b565b565b61039c6105d6565b5f8190556040518181527fe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21906020015b60405180910390a150565b6103eb6103e3856104a0565b848484610679565b50505050565b5f6103fb426104a0565b905090565b6104086105d6565b63389a75e1600c52805f526020600c20805442111561042e57636f5e88185f526004601cfd5b5f905561043a8161060b565b50565b6104456105d6565b8060601b61045a57637448fbae5f526004601cfd5b61043a8161060b565b61046b6105d6565b60018190556040518181527febb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264906020016103cc565b5f815f5260205f60205f720f3df6d732807ef1319fb7b8bb8522d0beac025afa806104d257633033b0ff5f526004601cfd5b50505f51919050565b6501000000000067ffffffffffffffff821610610524576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61056384848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061079f92505050565b90505f610571836008610aa5565b67ffffffffffffffff165f546105879190610acf565b905061059687878a85856107f2565b6105cc576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610392576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b5f7bffffffff000000000000000000000000ffffffff000000000000000066ff000000ff0000600884811c91821667ff000000ff0000009186901b91821617601090811c64ff000000ff90931665ff000000ff0090921691909117901b17602081811c9283167fffffffff000000000000000000000000ffffffff0000000000000000000000009290911b91821617604090811c73ffffffff000000000000000000000000ffffffff90931677ffffffff000000000000000000000000ffffffff0000000090921691909117901b17608081811c91901b179050610762848487846001546107f2565b610798576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b80515f906030146107dc576040517f5f4167e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60205f60406020850160025afa806104d2575f80fd5b5f841561084e578460051b8601865b6001841660051b8460011c94508461082057635849603f5f526004601cfd5b85815281356020918218525f60408160025afa8061083c575f80fd5b505f5194506020018181106108015750505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82011561088357631b6661c35f526004601cfd5b50501492915050565b803567ffffffffffffffff811681146108a3575f80fd5b919050565b5f8083601f8401126108b8575f80fd5b50813567ffffffffffffffff8111156108cf575f80fd5b6020830191508360208260051b85010111156108e9575f80fd5b9250929050565b5f805f805f8060808789031215610905575f80fd5b61090e8761088c565b9550602087013567ffffffffffffffff811115610929575f80fd5b61093589828a016108a8565b909650945050604087013567ffffffffffffffff811115610954575f80fd5b8701601f81018913610964575f80fd5b803567ffffffffffffffff81111561097a575f80fd5b89602082840101111561098b575f80fd5b602091909101935091506109a16060880161088c565b90509295509295509295565b5f602082840312156109bd575f80fd5b6109c68261088c565b9392505050565b5f602082840312156109dd575f80fd5b5035919050565b5f805f80606085870312156109f7575f80fd5b610a008561088c565b9350602085013567ffffffffffffffff811115610a1b575f80fd5b610a27878288016108a8565b9094509250610a3a90506040860161088c565b905092959194509250565b5f60208284031215610a55575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146109c6575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff8181168382160290811690818114610ac857610ac8610a78565b5092915050565b8082018082111561037b5761037b610a7856fea264697066735822122039550e460ebcb1acfc71b3cb3b60a1ce8cdc0ed5d2f44202f2b24c8df0b48eca64736f6c634300081a0033", +} + +// BeaconVerifierABI is the input ABI used to generate the binding from. +// Deprecated: Use BeaconVerifierMetaData.ABI instead. +var BeaconVerifierABI = BeaconVerifierMetaData.ABI + +// BeaconVerifierBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use BeaconVerifierMetaData.Bin instead. +var BeaconVerifierBin = BeaconVerifierMetaData.Bin + +// DeployBeaconVerifier deploys a new Ethereum contract, binding an instance of BeaconVerifier to it. +func DeployBeaconVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _zeroValidatorPubkeyGIndex *big.Int, _executionNumberGIndex *big.Int) (common.Address, *types.Transaction, *BeaconVerifier, error) { + parsed, err := BeaconVerifierMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BeaconVerifierBin), backend, _zeroValidatorPubkeyGIndex, _executionNumberGIndex) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &BeaconVerifier{BeaconVerifierCaller: BeaconVerifierCaller{contract: contract}, BeaconVerifierTransactor: BeaconVerifierTransactor{contract: contract}, BeaconVerifierFilterer: BeaconVerifierFilterer{contract: contract}}, nil +} + +// BeaconVerifier is an auto generated Go binding around an Ethereum contract. +type BeaconVerifier struct { + BeaconVerifierCaller // Read-only binding to the contract + BeaconVerifierTransactor // Write-only binding to the contract + BeaconVerifierFilterer // Log filterer for contract events +} + +// BeaconVerifierCaller is an auto generated read-only Go binding around an Ethereum contract. +type BeaconVerifierCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BeaconVerifierTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BeaconVerifierTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BeaconVerifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BeaconVerifierFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BeaconVerifierSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BeaconVerifierSession struct { + Contract *BeaconVerifier // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BeaconVerifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BeaconVerifierCallerSession struct { + Contract *BeaconVerifierCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BeaconVerifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BeaconVerifierTransactorSession struct { + Contract *BeaconVerifierTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BeaconVerifierRaw is an auto generated low-level Go binding around an Ethereum contract. +type BeaconVerifierRaw struct { + Contract *BeaconVerifier // Generic contract binding to access the raw methods on +} + +// BeaconVerifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BeaconVerifierCallerRaw struct { + Contract *BeaconVerifierCaller // Generic read-only contract binding to access the raw methods on +} + +// BeaconVerifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BeaconVerifierTransactorRaw struct { + Contract *BeaconVerifierTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBeaconVerifier creates a new instance of BeaconVerifier, bound to a specific deployed contract. +func NewBeaconVerifier(address common.Address, backend bind.ContractBackend) (*BeaconVerifier, error) { + contract, err := bindBeaconVerifier(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &BeaconVerifier{BeaconVerifierCaller: BeaconVerifierCaller{contract: contract}, BeaconVerifierTransactor: BeaconVerifierTransactor{contract: contract}, BeaconVerifierFilterer: BeaconVerifierFilterer{contract: contract}}, nil +} + +// NewBeaconVerifierCaller creates a new read-only instance of BeaconVerifier, bound to a specific deployed contract. +func NewBeaconVerifierCaller(address common.Address, caller bind.ContractCaller) (*BeaconVerifierCaller, error) { + contract, err := bindBeaconVerifier(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BeaconVerifierCaller{contract: contract}, nil +} + +// NewBeaconVerifierTransactor creates a new write-only instance of BeaconVerifier, bound to a specific deployed contract. +func NewBeaconVerifierTransactor(address common.Address, transactor bind.ContractTransactor) (*BeaconVerifierTransactor, error) { + contract, err := bindBeaconVerifier(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BeaconVerifierTransactor{contract: contract}, nil +} + +// NewBeaconVerifierFilterer creates a new log filterer instance of BeaconVerifier, bound to a specific deployed contract. +func NewBeaconVerifierFilterer(address common.Address, filterer bind.ContractFilterer) (*BeaconVerifierFilterer, error) { + contract, err := bindBeaconVerifier(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BeaconVerifierFilterer{contract: contract}, nil +} + +// bindBeaconVerifier binds a generic wrapper to an already deployed contract. +func bindBeaconVerifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := BeaconVerifierMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_BeaconVerifier *BeaconVerifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BeaconVerifier.Contract.BeaconVerifierCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BeaconVerifier *BeaconVerifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BeaconVerifier.Contract.BeaconVerifierTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BeaconVerifier *BeaconVerifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BeaconVerifier.Contract.BeaconVerifierTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_BeaconVerifier *BeaconVerifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _BeaconVerifier.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_BeaconVerifier *BeaconVerifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BeaconVerifier.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_BeaconVerifier *BeaconVerifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _BeaconVerifier.Contract.contract.Transact(opts, method, params...) +} + +// BEACONROOTS is a free data retrieval call binding the contract method 0x56d7e8fd. +// +// Solidity: function BEACON_ROOTS() view returns(address) +func (_BeaconVerifier *BeaconVerifierCaller) BEACONROOTS(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "BEACON_ROOTS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// BEACONROOTS is a free data retrieval call binding the contract method 0x56d7e8fd. +// +// Solidity: function BEACON_ROOTS() view returns(address) +func (_BeaconVerifier *BeaconVerifierSession) BEACONROOTS() (common.Address, error) { + return _BeaconVerifier.Contract.BEACONROOTS(&_BeaconVerifier.CallOpts) +} + +// BEACONROOTS is a free data retrieval call binding the contract method 0x56d7e8fd. +// +// Solidity: function BEACON_ROOTS() view returns(address) +func (_BeaconVerifier *BeaconVerifierCallerSession) BEACONROOTS() (common.Address, error) { + return _BeaconVerifier.Contract.BEACONROOTS(&_BeaconVerifier.CallOpts) +} + +// ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. +// +// Solidity: function executionNumberGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierCaller) ExecutionNumberGIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "executionNumberGIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. +// +// Solidity: function executionNumberGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierSession) ExecutionNumberGIndex() (*big.Int, error) { + return _BeaconVerifier.Contract.ExecutionNumberGIndex(&_BeaconVerifier.CallOpts) +} + +// ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. +// +// Solidity: function executionNumberGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierCallerSession) ExecutionNumberGIndex() (*big.Int, error) { + return _BeaconVerifier.Contract.ExecutionNumberGIndex(&_BeaconVerifier.CallOpts) +} + +// GetParentBeaconBlockRoot is a free data retrieval call binding the contract method 0xefcff00a. +// +// Solidity: function getParentBeaconBlockRoot() view returns(bytes32) +func (_BeaconVerifier *BeaconVerifierCaller) GetParentBeaconBlockRoot(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "getParentBeaconBlockRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetParentBeaconBlockRoot is a free data retrieval call binding the contract method 0xefcff00a. +// +// Solidity: function getParentBeaconBlockRoot() view returns(bytes32) +func (_BeaconVerifier *BeaconVerifierSession) GetParentBeaconBlockRoot() ([32]byte, error) { + return _BeaconVerifier.Contract.GetParentBeaconBlockRoot(&_BeaconVerifier.CallOpts) +} + +// GetParentBeaconBlockRoot is a free data retrieval call binding the contract method 0xefcff00a. +// +// Solidity: function getParentBeaconBlockRoot() view returns(bytes32) +func (_BeaconVerifier *BeaconVerifierCallerSession) GetParentBeaconBlockRoot() ([32]byte, error) { + return _BeaconVerifier.Contract.GetParentBeaconBlockRoot(&_BeaconVerifier.CallOpts) +} + +// GetParentBeaconBlockRootAt is a free data retrieval call binding the contract method 0x5e67d452. +// +// Solidity: function getParentBeaconBlockRootAt(uint64 timestamp) view returns(bytes32) +func (_BeaconVerifier *BeaconVerifierCaller) GetParentBeaconBlockRootAt(opts *bind.CallOpts, timestamp uint64) ([32]byte, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "getParentBeaconBlockRootAt", timestamp) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetParentBeaconBlockRootAt is a free data retrieval call binding the contract method 0x5e67d452. +// +// Solidity: function getParentBeaconBlockRootAt(uint64 timestamp) view returns(bytes32) +func (_BeaconVerifier *BeaconVerifierSession) GetParentBeaconBlockRootAt(timestamp uint64) ([32]byte, error) { + return _BeaconVerifier.Contract.GetParentBeaconBlockRootAt(&_BeaconVerifier.CallOpts, timestamp) +} + +// GetParentBeaconBlockRootAt is a free data retrieval call binding the contract method 0x5e67d452. +// +// Solidity: function getParentBeaconBlockRootAt(uint64 timestamp) view returns(bytes32) +func (_BeaconVerifier *BeaconVerifierCallerSession) GetParentBeaconBlockRootAt(timestamp uint64) ([32]byte, error) { + return _BeaconVerifier.Contract.GetParentBeaconBlockRootAt(&_BeaconVerifier.CallOpts, timestamp) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address result) +func (_BeaconVerifier *BeaconVerifierCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address result) +func (_BeaconVerifier *BeaconVerifierSession) Owner() (common.Address, error) { + return _BeaconVerifier.Contract.Owner(&_BeaconVerifier.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address result) +func (_BeaconVerifier *BeaconVerifierCallerSession) Owner() (common.Address, error) { + return _BeaconVerifier.Contract.Owner(&_BeaconVerifier.CallOpts) +} + +// OwnershipHandoverExpiresAt is a free data retrieval call binding the contract method 0xfee81cf4. +// +// Solidity: function ownershipHandoverExpiresAt(address pendingOwner) view returns(uint256 result) +func (_BeaconVerifier *BeaconVerifierCaller) OwnershipHandoverExpiresAt(opts *bind.CallOpts, pendingOwner common.Address) (*big.Int, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "ownershipHandoverExpiresAt", pendingOwner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// OwnershipHandoverExpiresAt is a free data retrieval call binding the contract method 0xfee81cf4. +// +// Solidity: function ownershipHandoverExpiresAt(address pendingOwner) view returns(uint256 result) +func (_BeaconVerifier *BeaconVerifierSession) OwnershipHandoverExpiresAt(pendingOwner common.Address) (*big.Int, error) { + return _BeaconVerifier.Contract.OwnershipHandoverExpiresAt(&_BeaconVerifier.CallOpts, pendingOwner) +} + +// OwnershipHandoverExpiresAt is a free data retrieval call binding the contract method 0xfee81cf4. +// +// Solidity: function ownershipHandoverExpiresAt(address pendingOwner) view returns(uint256 result) +func (_BeaconVerifier *BeaconVerifierCallerSession) OwnershipHandoverExpiresAt(pendingOwner common.Address) (*big.Int, error) { + return _BeaconVerifier.Contract.OwnershipHandoverExpiresAt(&_BeaconVerifier.CallOpts, pendingOwner) +} + +// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0x491920ab. +// +// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, bytes32[] validatorPubkeyProof, bytes validatorPubkey, uint64 proposerIndex) view returns() +func (_BeaconVerifier *BeaconVerifierCaller) VerifyBeaconBlockProposer(opts *bind.CallOpts, timestamp uint64, validatorPubkeyProof [][32]byte, validatorPubkey []byte, proposerIndex uint64) error { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "verifyBeaconBlockProposer", timestamp, validatorPubkeyProof, validatorPubkey, proposerIndex) + + if err != nil { + return err + } + + return err + +} + +// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0x491920ab. +// +// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, bytes32[] validatorPubkeyProof, bytes validatorPubkey, uint64 proposerIndex) view returns() +func (_BeaconVerifier *BeaconVerifierSession) VerifyBeaconBlockProposer(timestamp uint64, validatorPubkeyProof [][32]byte, validatorPubkey []byte, proposerIndex uint64) error { + return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, validatorPubkeyProof, validatorPubkey, proposerIndex) +} + +// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0x491920ab. +// +// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, bytes32[] validatorPubkeyProof, bytes validatorPubkey, uint64 proposerIndex) view returns() +func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyBeaconBlockProposer(timestamp uint64, validatorPubkeyProof [][32]byte, validatorPubkey []byte, proposerIndex uint64) error { + return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, validatorPubkeyProof, validatorPubkey, proposerIndex) +} + +// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xae9af3e3. +// +// Solidity: function verifyExecutionNumber(uint64 timestamp, bytes32[] executionNumberProof, uint64 blockNumber) view returns() +func (_BeaconVerifier *BeaconVerifierCaller) VerifyExecutionNumber(opts *bind.CallOpts, timestamp uint64, executionNumberProof [][32]byte, blockNumber uint64) error { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "verifyExecutionNumber", timestamp, executionNumberProof, blockNumber) + + if err != nil { + return err + } + + return err + +} + +// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xae9af3e3. +// +// Solidity: function verifyExecutionNumber(uint64 timestamp, bytes32[] executionNumberProof, uint64 blockNumber) view returns() +func (_BeaconVerifier *BeaconVerifierSession) VerifyExecutionNumber(timestamp uint64, executionNumberProof [][32]byte, blockNumber uint64) error { + return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumberProof, blockNumber) +} + +// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xae9af3e3. +// +// Solidity: function verifyExecutionNumber(uint64 timestamp, bytes32[] executionNumberProof, uint64 blockNumber) view returns() +func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyExecutionNumber(timestamp uint64, executionNumberProof [][32]byte, blockNumber uint64) error { + return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumberProof, blockNumber) +} + +// ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. +// +// Solidity: function zeroValidatorPubkeyGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierCaller) ZeroValidatorPubkeyGIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "zeroValidatorPubkeyGIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. +// +// Solidity: function zeroValidatorPubkeyGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierSession) ZeroValidatorPubkeyGIndex() (*big.Int, error) { + return _BeaconVerifier.Contract.ZeroValidatorPubkeyGIndex(&_BeaconVerifier.CallOpts) +} + +// ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. +// +// Solidity: function zeroValidatorPubkeyGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierCallerSession) ZeroValidatorPubkeyGIndex() (*big.Int, error) { + return _BeaconVerifier.Contract.ZeroValidatorPubkeyGIndex(&_BeaconVerifier.CallOpts) +} + +// CancelOwnershipHandover is a paid mutator transaction binding the contract method 0x54d1f13d. +// +// Solidity: function cancelOwnershipHandover() payable returns() +func (_BeaconVerifier *BeaconVerifierTransactor) CancelOwnershipHandover(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "cancelOwnershipHandover") +} + +// CancelOwnershipHandover is a paid mutator transaction binding the contract method 0x54d1f13d. +// +// Solidity: function cancelOwnershipHandover() payable returns() +func (_BeaconVerifier *BeaconVerifierSession) CancelOwnershipHandover() (*types.Transaction, error) { + return _BeaconVerifier.Contract.CancelOwnershipHandover(&_BeaconVerifier.TransactOpts) +} + +// CancelOwnershipHandover is a paid mutator transaction binding the contract method 0x54d1f13d. +// +// Solidity: function cancelOwnershipHandover() payable returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) CancelOwnershipHandover() (*types.Transaction, error) { + return _BeaconVerifier.Contract.CancelOwnershipHandover(&_BeaconVerifier.TransactOpts) +} + +// CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. +// +// Solidity: function completeOwnershipHandover(address pendingOwner) payable returns() +func (_BeaconVerifier *BeaconVerifierTransactor) CompleteOwnershipHandover(opts *bind.TransactOpts, pendingOwner common.Address) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "completeOwnershipHandover", pendingOwner) +} + +// CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. +// +// Solidity: function completeOwnershipHandover(address pendingOwner) payable returns() +func (_BeaconVerifier *BeaconVerifierSession) CompleteOwnershipHandover(pendingOwner common.Address) (*types.Transaction, error) { + return _BeaconVerifier.Contract.CompleteOwnershipHandover(&_BeaconVerifier.TransactOpts, pendingOwner) +} + +// CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. +// +// Solidity: function completeOwnershipHandover(address pendingOwner) payable returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) CompleteOwnershipHandover(pendingOwner common.Address) (*types.Transaction, error) { + return _BeaconVerifier.Contract.CompleteOwnershipHandover(&_BeaconVerifier.TransactOpts, pendingOwner) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() payable returns() +func (_BeaconVerifier *BeaconVerifierTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() payable returns() +func (_BeaconVerifier *BeaconVerifierSession) RenounceOwnership() (*types.Transaction, error) { + return _BeaconVerifier.Contract.RenounceOwnership(&_BeaconVerifier.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() payable returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _BeaconVerifier.Contract.RenounceOwnership(&_BeaconVerifier.TransactOpts) +} + +// RequestOwnershipHandover is a paid mutator transaction binding the contract method 0x25692962. +// +// Solidity: function requestOwnershipHandover() payable returns() +func (_BeaconVerifier *BeaconVerifierTransactor) RequestOwnershipHandover(opts *bind.TransactOpts) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "requestOwnershipHandover") +} + +// RequestOwnershipHandover is a paid mutator transaction binding the contract method 0x25692962. +// +// Solidity: function requestOwnershipHandover() payable returns() +func (_BeaconVerifier *BeaconVerifierSession) RequestOwnershipHandover() (*types.Transaction, error) { + return _BeaconVerifier.Contract.RequestOwnershipHandover(&_BeaconVerifier.TransactOpts) +} + +// RequestOwnershipHandover is a paid mutator transaction binding the contract method 0x25692962. +// +// Solidity: function requestOwnershipHandover() payable returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) RequestOwnershipHandover() (*types.Transaction, error) { + return _BeaconVerifier.Contract.RequestOwnershipHandover(&_BeaconVerifier.TransactOpts) +} + +// SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. +// +// Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() +func (_BeaconVerifier *BeaconVerifierTransactor) SetExecutionNumberGIndex(opts *bind.TransactOpts, _executionNumberGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "setExecutionNumberGIndex", _executionNumberGIndex) +} + +// SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. +// +// Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() +func (_BeaconVerifier *BeaconVerifierSession) SetExecutionNumberGIndex(_executionNumberGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.Contract.SetExecutionNumberGIndex(&_BeaconVerifier.TransactOpts, _executionNumberGIndex) +} + +// SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. +// +// Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) SetExecutionNumberGIndex(_executionNumberGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.Contract.SetExecutionNumberGIndex(&_BeaconVerifier.TransactOpts, _executionNumberGIndex) +} + +// SetZeroValidatorPubkeyGIndex is a paid mutator transaction binding the contract method 0x81705771. +// +// Solidity: function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) returns() +func (_BeaconVerifier *BeaconVerifierTransactor) SetZeroValidatorPubkeyGIndex(opts *bind.TransactOpts, _zeroValidatorPubkeyGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "setZeroValidatorPubkeyGIndex", _zeroValidatorPubkeyGIndex) +} + +// SetZeroValidatorPubkeyGIndex is a paid mutator transaction binding the contract method 0x81705771. +// +// Solidity: function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) returns() +func (_BeaconVerifier *BeaconVerifierSession) SetZeroValidatorPubkeyGIndex(_zeroValidatorPubkeyGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.Contract.SetZeroValidatorPubkeyGIndex(&_BeaconVerifier.TransactOpts, _zeroValidatorPubkeyGIndex) +} + +// SetZeroValidatorPubkeyGIndex is a paid mutator transaction binding the contract method 0x81705771. +// +// Solidity: function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) SetZeroValidatorPubkeyGIndex(_zeroValidatorPubkeyGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.Contract.SetZeroValidatorPubkeyGIndex(&_BeaconVerifier.TransactOpts, _zeroValidatorPubkeyGIndex) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) payable returns() +func (_BeaconVerifier *BeaconVerifierTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) payable returns() +func (_BeaconVerifier *BeaconVerifierSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _BeaconVerifier.Contract.TransferOwnership(&_BeaconVerifier.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) payable returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _BeaconVerifier.Contract.TransferOwnership(&_BeaconVerifier.TransactOpts, newOwner) +} + +// BeaconVerifierExecutionNumberGIndexChangedIterator is returned from FilterExecutionNumberGIndexChanged and is used to iterate over the raw logs and unpacked data for ExecutionNumberGIndexChanged events raised by the BeaconVerifier contract. +type BeaconVerifierExecutionNumberGIndexChangedIterator struct { + Event *BeaconVerifierExecutionNumberGIndexChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BeaconVerifierExecutionNumberGIndexChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierExecutionNumberGIndexChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierExecutionNumberGIndexChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BeaconVerifierExecutionNumberGIndexChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BeaconVerifierExecutionNumberGIndexChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BeaconVerifierExecutionNumberGIndexChanged represents a ExecutionNumberGIndexChanged event raised by the BeaconVerifier contract. +type BeaconVerifierExecutionNumberGIndexChanged struct { + NewExecutionNumberGIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutionNumberGIndexChanged is a free log retrieval operation binding the contract event 0xebb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264. +// +// Solidity: event ExecutionNumberGIndexChanged(uint256 newExecutionNumberGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) FilterExecutionNumberGIndexChanged(opts *bind.FilterOpts) (*BeaconVerifierExecutionNumberGIndexChangedIterator, error) { + + logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "ExecutionNumberGIndexChanged") + if err != nil { + return nil, err + } + return &BeaconVerifierExecutionNumberGIndexChangedIterator{contract: _BeaconVerifier.contract, event: "ExecutionNumberGIndexChanged", logs: logs, sub: sub}, nil +} + +// WatchExecutionNumberGIndexChanged is a free log subscription operation binding the contract event 0xebb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264. +// +// Solidity: event ExecutionNumberGIndexChanged(uint256 newExecutionNumberGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) WatchExecutionNumberGIndexChanged(opts *bind.WatchOpts, sink chan<- *BeaconVerifierExecutionNumberGIndexChanged) (event.Subscription, error) { + + logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "ExecutionNumberGIndexChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BeaconVerifierExecutionNumberGIndexChanged) + if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionNumberGIndexChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecutionNumberGIndexChanged is a log parse operation binding the contract event 0xebb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264. +// +// Solidity: event ExecutionNumberGIndexChanged(uint256 newExecutionNumberGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) ParseExecutionNumberGIndexChanged(log types.Log) (*BeaconVerifierExecutionNumberGIndexChanged, error) { + event := new(BeaconVerifierExecutionNumberGIndexChanged) + if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionNumberGIndexChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BeaconVerifierOwnershipHandoverCanceledIterator is returned from FilterOwnershipHandoverCanceled and is used to iterate over the raw logs and unpacked data for OwnershipHandoverCanceled events raised by the BeaconVerifier contract. +type BeaconVerifierOwnershipHandoverCanceledIterator struct { + Event *BeaconVerifierOwnershipHandoverCanceled // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BeaconVerifierOwnershipHandoverCanceledIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierOwnershipHandoverCanceled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierOwnershipHandoverCanceled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BeaconVerifierOwnershipHandoverCanceledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BeaconVerifierOwnershipHandoverCanceledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BeaconVerifierOwnershipHandoverCanceled represents a OwnershipHandoverCanceled event raised by the BeaconVerifier contract. +type BeaconVerifierOwnershipHandoverCanceled struct { + PendingOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipHandoverCanceled is a free log retrieval operation binding the contract event 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92. +// +// Solidity: event OwnershipHandoverCanceled(address indexed pendingOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) FilterOwnershipHandoverCanceled(opts *bind.FilterOpts, pendingOwner []common.Address) (*BeaconVerifierOwnershipHandoverCanceledIterator, error) { + + var pendingOwnerRule []interface{} + for _, pendingOwnerItem := range pendingOwner { + pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) + } + + logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "OwnershipHandoverCanceled", pendingOwnerRule) + if err != nil { + return nil, err + } + return &BeaconVerifierOwnershipHandoverCanceledIterator{contract: _BeaconVerifier.contract, event: "OwnershipHandoverCanceled", logs: logs, sub: sub}, nil +} + +// WatchOwnershipHandoverCanceled is a free log subscription operation binding the contract event 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92. +// +// Solidity: event OwnershipHandoverCanceled(address indexed pendingOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) WatchOwnershipHandoverCanceled(opts *bind.WatchOpts, sink chan<- *BeaconVerifierOwnershipHandoverCanceled, pendingOwner []common.Address) (event.Subscription, error) { + + var pendingOwnerRule []interface{} + for _, pendingOwnerItem := range pendingOwner { + pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) + } + + logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "OwnershipHandoverCanceled", pendingOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BeaconVerifierOwnershipHandoverCanceled) + if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverCanceled", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipHandoverCanceled is a log parse operation binding the contract event 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92. +// +// Solidity: event OwnershipHandoverCanceled(address indexed pendingOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) ParseOwnershipHandoverCanceled(log types.Log) (*BeaconVerifierOwnershipHandoverCanceled, error) { + event := new(BeaconVerifierOwnershipHandoverCanceled) + if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverCanceled", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BeaconVerifierOwnershipHandoverRequestedIterator is returned from FilterOwnershipHandoverRequested and is used to iterate over the raw logs and unpacked data for OwnershipHandoverRequested events raised by the BeaconVerifier contract. +type BeaconVerifierOwnershipHandoverRequestedIterator struct { + Event *BeaconVerifierOwnershipHandoverRequested // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BeaconVerifierOwnershipHandoverRequestedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierOwnershipHandoverRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierOwnershipHandoverRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BeaconVerifierOwnershipHandoverRequestedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BeaconVerifierOwnershipHandoverRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BeaconVerifierOwnershipHandoverRequested represents a OwnershipHandoverRequested event raised by the BeaconVerifier contract. +type BeaconVerifierOwnershipHandoverRequested struct { + PendingOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipHandoverRequested is a free log retrieval operation binding the contract event 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d. +// +// Solidity: event OwnershipHandoverRequested(address indexed pendingOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) FilterOwnershipHandoverRequested(opts *bind.FilterOpts, pendingOwner []common.Address) (*BeaconVerifierOwnershipHandoverRequestedIterator, error) { + + var pendingOwnerRule []interface{} + for _, pendingOwnerItem := range pendingOwner { + pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) + } + + logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "OwnershipHandoverRequested", pendingOwnerRule) + if err != nil { + return nil, err + } + return &BeaconVerifierOwnershipHandoverRequestedIterator{contract: _BeaconVerifier.contract, event: "OwnershipHandoverRequested", logs: logs, sub: sub}, nil +} + +// WatchOwnershipHandoverRequested is a free log subscription operation binding the contract event 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d. +// +// Solidity: event OwnershipHandoverRequested(address indexed pendingOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) WatchOwnershipHandoverRequested(opts *bind.WatchOpts, sink chan<- *BeaconVerifierOwnershipHandoverRequested, pendingOwner []common.Address) (event.Subscription, error) { + + var pendingOwnerRule []interface{} + for _, pendingOwnerItem := range pendingOwner { + pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) + } + + logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "OwnershipHandoverRequested", pendingOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BeaconVerifierOwnershipHandoverRequested) + if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipHandoverRequested is a log parse operation binding the contract event 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d. +// +// Solidity: event OwnershipHandoverRequested(address indexed pendingOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) ParseOwnershipHandoverRequested(log types.Log) (*BeaconVerifierOwnershipHandoverRequested, error) { + event := new(BeaconVerifierOwnershipHandoverRequested) + if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverRequested", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BeaconVerifierOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BeaconVerifier contract. +type BeaconVerifierOwnershipTransferredIterator struct { + Event *BeaconVerifierOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BeaconVerifierOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BeaconVerifierOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BeaconVerifierOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BeaconVerifierOwnershipTransferred represents a OwnershipTransferred event raised by the BeaconVerifier contract. +type BeaconVerifierOwnershipTransferred struct { + OldOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed oldOwner, address indexed newOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, oldOwner []common.Address, newOwner []common.Address) (*BeaconVerifierOwnershipTransferredIterator, error) { + + var oldOwnerRule []interface{} + for _, oldOwnerItem := range oldOwner { + oldOwnerRule = append(oldOwnerRule, oldOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "OwnershipTransferred", oldOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &BeaconVerifierOwnershipTransferredIterator{contract: _BeaconVerifier.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed oldOwner, address indexed newOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BeaconVerifierOwnershipTransferred, oldOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var oldOwnerRule []interface{} + for _, oldOwnerItem := range oldOwner { + oldOwnerRule = append(oldOwnerRule, oldOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "OwnershipTransferred", oldOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BeaconVerifierOwnershipTransferred) + if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed oldOwner, address indexed newOwner) +func (_BeaconVerifier *BeaconVerifierFilterer) ParseOwnershipTransferred(log types.Log) (*BeaconVerifierOwnershipTransferred, error) { + event := new(BeaconVerifierOwnershipTransferred) + if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator is returned from FilterZeroValidatorPubkeyGIndexChanged and is used to iterate over the raw logs and unpacked data for ZeroValidatorPubkeyGIndexChanged events raised by the BeaconVerifier contract. +type BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator struct { + Event *BeaconVerifierZeroValidatorPubkeyGIndexChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BeaconVerifierZeroValidatorPubkeyGIndexChanged represents a ZeroValidatorPubkeyGIndexChanged event raised by the BeaconVerifier contract. +type BeaconVerifierZeroValidatorPubkeyGIndexChanged struct { + NewZeroValidatorPubkeyGIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterZeroValidatorPubkeyGIndexChanged is a free log retrieval operation binding the contract event 0xe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21. +// +// Solidity: event ZeroValidatorPubkeyGIndexChanged(uint256 newZeroValidatorPubkeyGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) FilterZeroValidatorPubkeyGIndexChanged(opts *bind.FilterOpts) (*BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator, error) { + + logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "ZeroValidatorPubkeyGIndexChanged") + if err != nil { + return nil, err + } + return &BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator{contract: _BeaconVerifier.contract, event: "ZeroValidatorPubkeyGIndexChanged", logs: logs, sub: sub}, nil +} + +// WatchZeroValidatorPubkeyGIndexChanged is a free log subscription operation binding the contract event 0xe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21. +// +// Solidity: event ZeroValidatorPubkeyGIndexChanged(uint256 newZeroValidatorPubkeyGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) WatchZeroValidatorPubkeyGIndexChanged(opts *bind.WatchOpts, sink chan<- *BeaconVerifierZeroValidatorPubkeyGIndexChanged) (event.Subscription, error) { + + logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "ZeroValidatorPubkeyGIndexChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) + if err := _BeaconVerifier.contract.UnpackLog(event, "ZeroValidatorPubkeyGIndexChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseZeroValidatorPubkeyGIndexChanged is a log parse operation binding the contract event 0xe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21. +// +// Solidity: event ZeroValidatorPubkeyGIndexChanged(uint256 newZeroValidatorPubkeyGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) ParseZeroValidatorPubkeyGIndexChanged(log types.Log) (*BeaconVerifierZeroValidatorPubkeyGIndexChanged, error) { + event := new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) + if err := _BeaconVerifier.contract.UnpackLog(event, "ZeroValidatorPubkeyGIndexChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/mod/geth-primitives/pkg/eip4788/beacon_verifier.go b/mod/geth-primitives/pkg/eip4788/beacon_verifier.go new file mode 100644 index 0000000000..8266eda40f --- /dev/null +++ b/mod/geth-primitives/pkg/eip4788/beacon_verifier.go @@ -0,0 +1,23 @@ +// 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 eip4788 + +//go:generate go run github.com/ethereum/go-ethereum/cmd/abigen --abi=../../../../contracts/out/BeaconVerifier.sol/BeaconVerifier.abi.json --bin=../../../../contracts/out/BeaconVerifier.sol/BeaconVerifier.bin --pkg=eip4788 --type=BeaconVerifier --out=beacon_verifier.abigen.go diff --git a/testing/e2e/api/api_suite_test.go b/testing/e2e/api/api_suite_test.go new file mode 100644 index 0000000000..9c0bc23443 --- /dev/null +++ b/testing/e2e/api/api_suite_test.go @@ -0,0 +1,56 @@ +// 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 api_test + +import ( + "context" + + eth2client "github.com/attestantio/go-eth2-client" + "github.com/attestantio/go-eth2-client/http" + "github.com/berachain/beacon-kit/testing/e2e/suite" + "github.com/rs/zerolog" +) + +// BeaconAPISuite is a suite of beacon node-api tests with full simulation of a +// beacon-kit network. +type BeaconAPISuite struct { + suite.KurtosisE2ESuite + + beaconClient eth2client.Service +} + +// NewBeaconAPISuite creates a new BeaconAPISuite. +// +// TODO: pass in values from the config. +func NewBeaconAPISuite() *BeaconAPISuite { + beaconClient, err := http.New( + context.Background(), + http.WithAddress("http://localhost:3500"), + http.WithLogLevel(zerolog.DebugLevel), + ) + if err != nil { + panic(err) + } + + return &BeaconAPISuite{ + beaconClient: beaconClient, + } +} diff --git a/testing/e2e/api/api_test.go b/testing/e2e/api/api_test.go new file mode 100644 index 0000000000..6d6d73221e --- /dev/null +++ b/testing/e2e/api/api_test.go @@ -0,0 +1,35 @@ +// 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. + +//go:build api +// +build api + +package api_test + +import ( + "testing" + + "github.com/berachain/beacon-kit/testing/e2e/suite" +) + +// TestBeaconAPISuite runs the test suite. +func TestBeaconAPISuite(t *testing.T) { + suite.Run(t, NewBeaconAPISuite()) +} diff --git a/testing/go.mod b/testing/go.mod index 3c264580dc..da69633409 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -11,6 +11,7 @@ replace ( require ( cosmossdk.io/log v1.3.2-0.20240530141513-465410c75bce + github.com/attestantio/go-eth2-client v0.21.9 github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240724161918-96b9bf999de2 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df @@ -23,6 +24,7 @@ require ( github.com/kurtosis-tech/kurtosis/api/golang v1.0.0 github.com/protolambda/zrnt v0.32.2 github.com/protolambda/ztyp v0.2.2 + github.com/rs/zerolog v1.33.0 github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 github.com/stretchr/testify v1.9.0 ) @@ -100,14 +102,19 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/getsentry/sentry-go v0.28.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-playground/validator/v10 v10.22.0 // indirect github.com/go-yaml/yaml v2.1.0+incompatible // indirect github.com/goccy/go-json v0.10.3 // indirect + github.com/goccy/go-yaml v1.9.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gofrs/flock v0.12.0 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect @@ -139,6 +146,7 @@ require ( github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect 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/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -179,6 +187,7 @@ require ( github.com/petermattis/goid v0.0.0-20240607163614-bb94eb51e7a7 // indirect github.com/phuslu/log v1.0.108-0.20240705160716-a8f8c12ae6c6 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect + github.com/pk910/dynamic-ssz v0.0.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect @@ -188,11 +197,11 @@ require ( github.com/protolambda/bls12-381-util v0.1.0 // indirect github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 // indirect github.com/prysmaticlabs/gohashtree v0.0.4-beta // 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 github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.0 // indirect - github.com/rs/zerolog v1.33.0 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -220,6 +229,9 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.27.0 // indirect @@ -227,11 +239,14 @@ require ( golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect + gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/testing/go.sum b/testing/go.sum index 140c7d9037..2cd58eea00 100644 --- a/testing/go.sum +++ b/testing/go.sum @@ -71,6 +71,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/attestantio/go-eth2-client v0.21.9 h1:NX5GmbAyx2ZtKEsKk6JsxPcaGR1E0vugMEb4kVsY0XU= +github.com/attestantio/go-eth2-client v0.21.9/go.mod h1:d7ZPNrMX8jLfIgML5u7QZxFo2AukLM+5m08iMaLdqb8= 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= @@ -227,6 +229,7 @@ github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWX github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= @@ -245,6 +248,7 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= @@ -265,15 +269,28 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.9.2 h1:2Njwzw+0+pjU2gb805ZC1B/uBuAs2VcZ3K+ZgHwDs7w= +github.com/goccy/go-yaml v1.9.2/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -394,6 +411,10 @@ github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXei github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= +github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= +github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= +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/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= @@ -450,12 +471,15 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linxGnu/grocksdb v1.9.2 h1:O3mzvO0wuzQ9mtlHbDrShixyVjVbmuqTjFrzlf43wZ8= github.com/linxGnu/grocksdb v1.9.2/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -542,6 +566,8 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pk910/dynamic-ssz v0.0.3 h1:fCWzFowq9P6SYCc7NtJMkZcIHk+r5hSVD+32zVi6Aio= +github.com/pk910/dynamic-ssz v0.0.3/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -580,6 +606,8 @@ github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 h1:lC8ki github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15/go.mod h1:8svFBIKKu31YriBG/pNizo9N0Jr9i5PQ+dFkxWg3x5k= github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= +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= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -684,6 +712,9 @@ go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -715,6 +746,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -786,6 +818,7 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -810,6 +843,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -852,7 +887,11 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 43092c7224736e2b7d113a8859158111af873d5f Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Tue, 30 Jul 2024 18:02:32 -0400 Subject: [PATCH 02/44] wip --- testing/e2e/api/api_suite_test.go | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/testing/e2e/api/api_suite_test.go b/testing/e2e/api/api_suite_test.go index 9c0bc23443..459611fbde 100644 --- a/testing/e2e/api/api_suite_test.go +++ b/testing/e2e/api/api_suite_test.go @@ -21,36 +21,18 @@ package api_test import ( - "context" - - eth2client "github.com/attestantio/go-eth2-client" - "github.com/attestantio/go-eth2-client/http" "github.com/berachain/beacon-kit/testing/e2e/suite" - "github.com/rs/zerolog" ) // BeaconAPISuite is a suite of beacon node-api tests with full simulation of a // beacon-kit network. type BeaconAPISuite struct { suite.KurtosisE2ESuite - - beaconClient eth2client.Service } -// NewBeaconAPISuite creates a new BeaconAPISuite. -// -// TODO: pass in values from the config. -func NewBeaconAPISuite() *BeaconAPISuite { - beaconClient, err := http.New( - context.Background(), - http.WithAddress("http://localhost:3500"), - http.WithLogLevel(zerolog.DebugLevel), - ) - if err != nil { - panic(err) - } - - return &BeaconAPISuite{ - beaconClient: beaconClient, - } +// TestBasicStartup tests the basic startup of the beacon-kit network. +// TODO: convert to test beacon client works. +func (s *BeaconAPISuite) TestBasicStartup() { + err := s.WaitForFinalizedBlockNumber(10) + s.Require().NoError(err) } From d3ad59a1394d7f3ec4f1b4a1e2c077ca64c02a09 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 11:08:28 -0400 Subject: [PATCH 03/44] comments nit --- mod/node-api/handlers/utils/id.go | 3 +++ testing/go.mod | 17 +------------- testing/go.sum | 39 ------------------------------- 3 files changed, 4 insertions(+), 55 deletions(-) diff --git a/mod/node-api/handlers/utils/id.go b/mod/node-api/handlers/utils/id.go index b37ce587ac..eb0c4a0738 100644 --- a/mod/node-api/handlers/utils/id.go +++ b/mod/node-api/handlers/utils/id.go @@ -26,6 +26,9 @@ import ( "github.com/berachain/beacon-kit/mod/primitives/pkg/math" ) +// TODO: define unique types for each of the query-able IDs (state & block from +// spec, execution unique to beacon-kit). For each type + const ( StateIDGenesis = "genesis" StateIDFinalized = "finalized" diff --git a/testing/go.mod b/testing/go.mod index 1d1b6e8816..cd29fc2c47 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -11,7 +11,6 @@ replace ( require ( cosmossdk.io/log v1.3.2-0.20240530141513-465410c75bce - github.com/attestantio/go-eth2-client v0.21.9 github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240724161918-96b9bf999de2 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df @@ -24,7 +23,6 @@ require ( github.com/kurtosis-tech/kurtosis/api/golang v1.0.0 github.com/protolambda/zrnt v0.32.2 github.com/protolambda/ztyp v0.2.2 - github.com/rs/zerolog v1.33.0 github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 github.com/stretchr/testify v1.9.0 ) @@ -102,19 +100,14 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/getsentry/sentry-go v0.28.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-playground/validator/v10 v10.22.0 // indirect github.com/go-yaml/yaml v2.1.0+incompatible // indirect github.com/goccy/go-json v0.10.3 // indirect - github.com/goccy/go-yaml v1.9.2 // indirect 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 @@ -146,7 +139,6 @@ require ( github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect 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/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -187,7 +179,6 @@ require ( github.com/petermattis/goid v0.0.0-20240607163614-bb94eb51e7a7 // indirect github.com/phuslu/log v1.0.108-0.20240705160716-a8f8c12ae6c6 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pk910/dynamic-ssz v0.0.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect @@ -197,11 +188,11 @@ require ( github.com/protolambda/bls12-381-util v0.1.0 // indirect github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 // indirect github.com/prysmaticlabs/gohashtree v0.0.4-beta // 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 github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -229,9 +220,6 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.27.0 // indirect @@ -239,14 +227,11 @@ require ( golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect - gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/testing/go.sum b/testing/go.sum index 1308877480..fcd3ebaf33 100644 --- a/testing/go.sum +++ b/testing/go.sum @@ -71,8 +71,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/attestantio/go-eth2-client v0.21.9 h1:NX5GmbAyx2ZtKEsKk6JsxPcaGR1E0vugMEb4kVsY0XU= -github.com/attestantio/go-eth2-client v0.21.9/go.mod h1:d7ZPNrMX8jLfIgML5u7QZxFo2AukLM+5m08iMaLdqb8= 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= @@ -229,7 +227,6 @@ github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWX github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= @@ -248,7 +245,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= @@ -269,28 +265,15 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/goccy/go-yaml v1.9.2 h1:2Njwzw+0+pjU2gb805ZC1B/uBuAs2VcZ3K+ZgHwDs7w= -github.com/goccy/go-yaml v1.9.2/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -411,10 +394,6 @@ github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXei github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= -github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= -github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= -github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= -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/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= @@ -471,15 +450,12 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linxGnu/grocksdb v1.9.2 h1:O3mzvO0wuzQ9mtlHbDrShixyVjVbmuqTjFrzlf43wZ8= github.com/linxGnu/grocksdb v1.9.2/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -566,8 +542,6 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pk910/dynamic-ssz v0.0.3 h1:fCWzFowq9P6SYCc7NtJMkZcIHk+r5hSVD+32zVi6Aio= -github.com/pk910/dynamic-ssz v0.0.3/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -606,8 +580,6 @@ github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 h1:lC8ki github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15/go.mod h1:8svFBIKKu31YriBG/pNizo9N0Jr9i5PQ+dFkxWg3x5k= github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= -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= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -712,9 +684,6 @@ go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -746,7 +715,6 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -818,7 +786,6 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -843,8 +810,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -887,11 +852,7 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -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/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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From e941afaf90c29c120288a6f4c118ea2eb45ac9c1 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 12:05:23 -0400 Subject: [PATCH 04/44] comments --- mod/node-api/engines/echo/vaildator.go | 4 ++++ mod/node-api/handlers/utils/id.go | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/node-api/engines/echo/vaildator.go b/mod/node-api/engines/echo/vaildator.go index 4ec2fa35db..461ef7162f 100644 --- a/mod/node-api/engines/echo/vaildator.go +++ b/mod/node-api/engines/echo/vaildator.go @@ -31,6 +31,10 @@ import ( "github.com/labstack/echo/v4" ) +// TODO: these validators need to be un-janked to 1) not use `FieldLevel` for +// repeated `.Field().String()` calls and 2) strongly type the allowed IDs, +// putting validation logic on each type. + // CustomValidator is a custom validator for the API. type CustomValidator struct { Validator *validator.Validate diff --git a/mod/node-api/handlers/utils/id.go b/mod/node-api/handlers/utils/id.go index eb0c4a0738..a607a253a8 100644 --- a/mod/node-api/handlers/utils/id.go +++ b/mod/node-api/handlers/utils/id.go @@ -27,7 +27,8 @@ import ( ) // TODO: define unique types for each of the query-able IDs (state & block from -// spec, execution unique to beacon-kit). For each type +// spec, execution unique to beacon-kit). For each type define validation +// functions and resolvers to slot number. const ( StateIDGenesis = "genesis" From a68b498efbda543c3b8bd58adaf076eb626a2b84 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 15:07:45 -0400 Subject: [PATCH 05/44] wipg --- .../src/nodes/consensus/beacond/launcher.star | 3 + testing/e2e/api/api_suite_test.go | 22 +++++-- testing/e2e/config/defaults.go | 33 ++++++++++ testing/e2e/e2e_staking_test.go | 27 ++++---- testing/e2e/suite/types/consensus_client.go | 52 +++++++++++++-- testing/go.mod | 23 ++++++- testing/go.sum | 64 ++++++++++++++++++- 7 files changed, 197 insertions(+), 27 deletions(-) create mode 100644 testing/e2e/config/defaults.go diff --git a/kurtosis/src/nodes/consensus/beacond/launcher.star b/kurtosis/src/nodes/consensus/beacond/launcher.star index f4106e5940..dfed02abce 100644 --- a/kurtosis/src/nodes/consensus/beacond/launcher.star +++ b/kurtosis/src/nodes/consensus/beacond/launcher.star @@ -10,6 +10,7 @@ COMETBFT_REST_PORT_NUM = 1317 COMETBFT_PPROF_PORT_NUM = 6060 METRICS_PORT_NUM = 26660 ENGINE_RPC_PORT_NUM = 8551 +NODE_API_PORT_NUM = 3500 # Port IDs COMETBFT_RPC_PORT_ID = "cometbft-rpc" @@ -20,6 +21,7 @@ COMETBFT_PPROF_PORT_ID = "cometbft-pprof" ENGINE_RPC_PORT_ID = "engine-rpc" METRICS_PORT_ID = "metrics" METRICS_PATH = "/metrics" +NODE_API_PORT_ID = "node-api" USED_PORTS = { COMETBFT_RPC_PORT_ID: shared_utils.new_port_spec(COMETBFT_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL), @@ -29,6 +31,7 @@ USED_PORTS = { COMETBFT_PPROF_PORT_ID: shared_utils.new_port_spec(COMETBFT_PPROF_PORT_NUM, shared_utils.TCP_PROTOCOL), # ENGINE_RPC_PORT_ID: shared_utils.new_port_spec(ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL), METRICS_PORT_ID: shared_utils.new_port_spec(METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL, wait = None), + NODE_API_PORT_ID: shared_utils.new_port_spec(NODE_API_PORT_NUM, shared_utils.TCP_PROTOCOL), } def get_config(node_struct, engine_dial_url, entrypoint = [], cmd = [], persistent_peers = "", expose_ports = True, jwt_file = None, kzg_trusted_setup_file = None): diff --git a/testing/e2e/api/api_suite_test.go b/testing/e2e/api/api_suite_test.go index 459611fbde..9bd71a2bcf 100644 --- a/testing/e2e/api/api_suite_test.go +++ b/testing/e2e/api/api_suite_test.go @@ -21,6 +21,7 @@ package api_test import ( + "github.com/berachain/beacon-kit/testing/e2e/config" "github.com/berachain/beacon-kit/testing/e2e/suite" ) @@ -30,9 +31,22 @@ type BeaconAPISuite struct { suite.KurtosisE2ESuite } -// TestBasicStartup tests the basic startup of the beacon-kit network. -// TODO: convert to test beacon client works. -func (s *BeaconAPISuite) TestBasicStartup() { - err := s.WaitForFinalizedBlockNumber(10) +// TestBeaconAPISuite tests that the api test suite is setup correctly with a +// working beacon node-api client. +func (s *BeaconAPISuite) TestBeaconAPISuite() { + executionBlockNum := uint64(5) + + // Wait for execution block 5. + err := s.WaitForFinalizedBlockNumber(executionBlockNum) + s.Require().NoError(err) + + // Get the consensus client. + client := s.ConsensusClients()[config.DefaultClient] + s.Require().NotNil(client) + + // Get the latest beacon block. + slot, htr, err := client.GetLatestBeaconBlock(s.Ctx()) s.Require().NoError(err) + s.Require().GreaterOrEqual(slot, executionBlockNum) + s.Require().NotEmpty(htr) } diff --git a/testing/e2e/config/defaults.go b/testing/e2e/config/defaults.go new file mode 100644 index 0000000000..918b6c3e65 --- /dev/null +++ b/testing/e2e/config/defaults.go @@ -0,0 +1,33 @@ +// 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 config + +// Consensus clients +const ( + DefaultClient = "cl-validator-beaconkit-0" + AlternateClient = "cl-validator-beaconkit-1" +) + +// Deposits +const ( + DepositContractAddress = "0x4242424242424242424242424242424242424242" + NumDepositsLoad = 500 +) diff --git a/testing/e2e/e2e_staking_test.go b/testing/e2e/e2e_staking_test.go index 718d4b9e39..a85b4cb230 100644 --- a/testing/e2e/e2e_staking_test.go +++ b/testing/e2e/e2e_staking_test.go @@ -25,26 +25,21 @@ import ( "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/testing/e2e/config" "github.com/berachain/beacon-kit/testing/e2e/suite" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" coretypes "github.com/ethereum/go-ethereum/core/types" ) -const ( - // DepositContractAddress is the address of the deposit contract. - DepositContractAddress = "0x4242424242424242424242424242424242424242" - DefaultClient = "cl-validator-beaconkit-0" - AlternateClient = "cl-validator-beaconkit-1" - NumDepositsLoad = 500 -) + func (s *BeaconKitE2ESuite) TestDepositRobustness() { // Get the consensus client. - client := s.ConsensusClients()[DefaultClient] + client := s.ConsensusClients()[config.DefaultClient] s.Require().NotNil(client) - client2 := s.ConsensusClients()[AlternateClient] + client2 := s.ConsensusClients()[config.AlternateClient] s.Require().NotNil(client2) // Sender account @@ -79,7 +74,7 @@ func (s *BeaconKitE2ESuite) TestDepositRobustness() { // Bind the deposit contract. dc, err := deposit.NewBeaconDepositContract( - common.HexToAddress(DepositContractAddress), + common.HexToAddress(config.DepositContractAddress), s.JSONRPCBalancer(), ) s.Require().NoError(err) @@ -98,7 +93,7 @@ func (s *BeaconKitE2ESuite) TestDepositRobustness() { tx, err = dc.AllowDeposit(&bind.TransactOpts{ From: genesisAccount.Address(), Signer: genesisAccount.SignerFunc(chainID), - }, sender.Address(), NumDepositsLoad) + }, sender.Address(), config.NumDepositsLoad) s.Require().NoError(err) // Wait for the transaction to be mined. @@ -114,7 +109,7 @@ func (s *BeaconKitE2ESuite) TestDepositRobustness() { ) s.Require().NoError(err) - for i := range NumDepositsLoad { + for i := range config.NumDepositsLoad { // Create a deposit transaction. tx, err = s.generateNewDepositTx( dc, @@ -125,7 +120,7 @@ func (s *BeaconKitE2ESuite) TestDepositRobustness() { s.Require().NoError(err) s.Logger(). Info("Deposit transaction created", "txHash", tx.Hash().Hex()) - if i == NumDepositsLoad-1 { + if i == config.NumDepositsLoad-1 { s.Logger().Info( "Waiting for deposit transaction to be mined", "txHash", tx.Hash().Hex(), @@ -157,7 +152,9 @@ func (s *BeaconKitE2ESuite) TestDepositRobustness() { // upper bound: 32ether * 500 + 1ether // lower bound: 32ether * 500 oneEther := big.NewInt(1e18) - totalAmt := new(big.Int).Mul(oneEther, big.NewInt(NumDepositsLoad*32)) + totalAmt := new(big.Int).Mul( + oneEther, big.NewInt(config.NumDepositsLoad*32), + ) upperBound := new(big.Int).Add(totalAmt, oneEther) amtSpent := new(big.Int).Sub(balance, postDepositBalance) @@ -196,7 +193,7 @@ func (s *BeaconKitE2ESuite) generateNewDepositTx( nonce *big.Int, ) (*coretypes.Transaction, error) { // Get the consensus client. - client := s.ConsensusClients()[DefaultClient] + client := s.ConsensusClients()[config.DefaultClient] s.Require().NotNil(client) pubkey, err := client.GetPubKey(s.Ctx()) diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index e81a73ba9f..e08da7d5d2 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -25,15 +25,25 @@ import ( "fmt" "github.com/berachain/beacon-kit/mod/errors" + "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/math" + rpcclient "github.com/cometbft/cometbft/rpc/client" httpclient "github.com/cometbft/cometbft/rpc/client/http" + "github.com/ethpandaops/beacon/pkg/beacon" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" ) // ConsensusClient represents a consensus client. type ConsensusClient struct { *WrappedServiceContext + + // Comet JSON-RPC client rpcclient.Client + + // Beacon node-api client + beacon.Node } // NewConsensusClient creates a new consensus client. @@ -51,18 +61,28 @@ func NewConsensusClient(serviceCtx *WrappedServiceContext) *ConsensusClient { // Connect connects the consensus client to the consensus client. func (cc *ConsensusClient) Connect() error { - // Start by trying to get the public port for the JSON-RPC WebSocket - port, ok := cc.WrappedServiceContext.GetPublicPorts()["cometbft-rpc"] + // Start by trying to get the public port for the comet JSON-RPC. + cometPort, ok := cc.WrappedServiceContext.GetPublicPorts()["cometbft-rpc"] if !ok { - panic("Couldn't find the public port for the JSON-RPC WebSocket") + panic("Couldn't find the public port for the comet JSON-RPC") } - clientURL := fmt.Sprintf("http://0.0.0.0:%d", port.GetNumber()) + clientURL := fmt.Sprintf("http://0.0.0.0:%d", cometPort.GetNumber()) client, err := httpclient.New(clientURL) if err != nil { return err } cc.Client = client - return nil + + // Then try to get the public port for the node API. + nodePort, ok := cc.WrappedServiceContext.GetPublicPorts()["node-api"] + if !ok { + panic("Couldn't find the public port for the node API") + } + cc.Node = beacon.NewNode(nil, &beacon.Config{ + Addr: fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), + Name: "beacon node", + }, "eth", *beacon.DefaultOptions()) + return cc.Node.Start(context.Background()) } // Start starts the consensus client. @@ -119,3 +139,25 @@ func (cc ConsensusClient) IsActive(ctx context.Context) (bool, error) { return res.ValidatorInfo.VotingPower > 0, nil } + +// Returns the latest beacon block's slot and hash tree root. +func (cc ConsensusClient) GetLatestBeaconBlock( + ctx context.Context, +) (math.Slot, common.Root, error) { + block, err := cc.Node.FetchBlock(ctx, utils.StateIDHead) + if err != nil { + return 0, common.Root{}, err + } + + slot, err := block.Slot() + if err != nil { + return 0, common.Root{}, err + } + + htr, err := block.Root() + if err != nil { + return 0, common.Root{}, err + } + + return math.Slot(slot), common.Root(htr), nil +} diff --git a/testing/go.mod b/testing/go.mod index cd29fc2c47..109f712391 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -14,11 +14,13 @@ require ( github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240724161918-96b9bf999de2 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df - github.com/berachain/beacon-kit/mod/log v0.0.0-20240619234034-fe96d94eafef + github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df + github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240726210727-594bfb4e7157 github.com/cometbft/cometbft v1.0.0-rc1.0.20240729121641-d06d2e8229ee github.com/cosmos/cosmos-sdk v0.51.0 github.com/ethereum/go-ethereum v1.14.6 + github.com/ethpandaops/beacon v0.39.0 github.com/holiman/uint256 v1.3.0 github.com/kurtosis-tech/kurtosis/api/golang v1.0.0 github.com/protolambda/zrnt v0.32.2 @@ -52,6 +54,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/adrg/xdg v0.4.0 // indirect + github.com/attestantio/go-eth2-client v0.21.9 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/berachain/beacon-kit/mod/chain-spec v0.0.0-20240705193247-d464364483df // indirect github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240710022615-726645827bad // indirect @@ -61,6 +64,7 @@ require ( github.com/bufbuild/protocompile v0.14.0 // indirect github.com/cespare/cp v1.1.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -96,18 +100,25 @@ require ( github.com/emicklei/dot v1.6.2 // indirect github.com/ethereum/c-kzg-4844 v1.0.2 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect + github.com/ethpandaops/ethwallclock v0.2.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/getsentry/sentry-go v0.28.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-co-op/gocron v1.16.2 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-playground/validator/v10 v10.22.0 // indirect github.com/go-yaml/yaml v2.1.0+incompatible // indirect github.com/goccy/go-json v0.10.3 // indirect + github.com/goccy/go-yaml v1.9.5 // indirect 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 @@ -139,6 +150,7 @@ require ( github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect 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/iancoleman/strcase v0.3.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -179,6 +191,7 @@ require ( github.com/petermattis/goid v0.0.0-20240607163614-bb94eb51e7a7 // indirect github.com/phuslu/log v1.0.108-0.20240705160716-a8f8c12ae6c6 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect + github.com/pk910/dynamic-ssz v0.0.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect @@ -188,8 +201,10 @@ require ( github.com/protolambda/bls12-381-util v0.1.0 // indirect github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 // indirect github.com/prysmaticlabs/gohashtree v0.0.4-beta // 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 + github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.0 // indirect github.com/rs/zerolog v1.33.0 // indirect @@ -220,6 +235,9 @@ require ( gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.1 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/otel v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.27.0 // indirect + go.opentelemetry.io/otel/trace v1.27.0 // indirect golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.27.0 // indirect @@ -227,11 +245,14 @@ require ( golang.org/x/sys v0.22.0 // indirect golang.org/x/term v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect + gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/testing/go.sum b/testing/go.sum index fcd3ebaf33..68889caeb3 100644 --- a/testing/go.sum +++ b/testing/go.sum @@ -71,6 +71,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/attestantio/go-eth2-client v0.21.9 h1:NX5GmbAyx2ZtKEsKk6JsxPcaGR1E0vugMEb4kVsY0XU= +github.com/attestantio/go-eth2-client v0.21.9/go.mod h1:d7ZPNrMX8jLfIgML5u7QZxFo2AukLM+5m08iMaLdqb8= 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= @@ -86,8 +88,10 @@ github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df h1 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df/go.mod h1:yRD7rmnyaaqgq/6+eIVqvSkFJXuLXpBddUu59HUOrtc= github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df h1:74LcTGSWRxCeehY7O4g6XZ2r4PY604n9U2/981iLtFk= github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df/go.mod h1:NItiDark82XGGPNYs3J0CdkXEtkGatE/QP3nu3jpeNs= -github.com/berachain/beacon-kit/mod/log v0.0.0-20240619234034-fe96d94eafef h1:KYnx+uPEKHax/OOcIfkzELEvgkBOy+I3LhZk1p6rtwU= -github.com/berachain/beacon-kit/mod/log v0.0.0-20240619234034-fe96d94eafef/go.mod h1:xP5KcG56VfbPgz2ZRHerxm90MkjXMSDaGZNOOO5yfH4= +github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df h1:SnzeY9SCmKyEx0iGC/C/8E39ozpl/g5yI7lFXpmbMBI= +github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df/go.mod h1:mJ0ZlK+izcPWcveHAtM4+W0a+8jhu5Y4DMPL2Takacg= +github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b h1:TZpt+fWXXnyQOTOSjhZU4fPGAYZaEB5UZ02ZUqRYiVk= +github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b/go.mod h1:wgOdrP96dMsXDXHItO4tRLuf8IaHP14RY4MbUPFAc4s= github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240726210727-594bfb4e7157 h1:2NHg24WWdkX7FgaFQsgNp3vbFRMnEIqchI6kKf6hs4I= github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240726210727-594bfb4e7157/go.mod h1:uSFWd+x3034sIGnSwxlJjhooh4zPXYX8DVc/r0TMvs4= github.com/berachain/cosmos-sdk v0.46.0-beta2.0.20240624014538-75ba469b1881 h1:08l5GGkl19zIShnUZKiU7ONTfK7L9KS/b82Mdrc+Fz8= @@ -113,6 +117,8 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 h1:xz6Nv3zcwO2Lila35hcb0QloCQsc38Al13RNEzWRpX4= +github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9/go.mod h1:2wSM9zJkl1UQEFZgSd68NfCgRz1VL1jzy/RjCg+ULrs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -227,6 +233,11 @@ github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWX github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= +github.com/ethpandaops/beacon v0.39.0 h1:D0ewcc5L/Rfyit8wXSYmNCo9KPj+wdACr1YqkdZlwaA= +github.com/ethpandaops/beacon v0.39.0/go.mod h1:vYeQUrplQLR3P1DjwLjKfpRPIDpxNUxIwIvvEHsjM+Y= +github.com/ethpandaops/ethwallclock v0.2.0 h1:EeFKtZ7v6TAdn/oAh0xaPujD7N4amjBxrWIByraUfLM= +github.com/ethpandaops/ethwallclock v0.2.0/go.mod h1:y0Cu+mhGLlem19vnAV2x0hpFS5KZ7oOi2SWYayv9l24= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= @@ -245,12 +256,16 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= +github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-co-op/gocron v1.16.2 h1:p9ghzsN5PqqPyWXYDO2JlvD1DOUNT8pPSyGYC62XBcY= +github.com/go-co-op/gocron v1.16.2/go.mod h1:W/N9G7bntRo5fVQlmjncvqSt74jxCxHfjyHlgcB33T8= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -265,15 +280,32 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= +github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-yaml v1.9.5 h1:Eh/+3uk9kLxG4koCX6lRMAPS1OaMSAi+FJcya0INdB0= +github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -394,6 +426,10 @@ github.com/holiman/uint256 v1.3.0/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXei github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= +github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= +github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= +github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= +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/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= @@ -450,12 +486,16 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/linxGnu/grocksdb v1.9.2 h1:O3mzvO0wuzQ9mtlHbDrShixyVjVbmuqTjFrzlf43wZ8= github.com/linxGnu/grocksdb v1.9.2/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= @@ -542,6 +582,8 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pk910/dynamic-ssz v0.0.3 h1:fCWzFowq9P6SYCc7NtJMkZcIHk+r5hSVD+32zVi6Aio= +github.com/pk910/dynamic-ssz v0.0.3/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -580,11 +622,15 @@ github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 h1:lC8ki github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15/go.mod h1:8svFBIKKu31YriBG/pNizo9N0Jr9i5PQ+dFkxWg3x5k= github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= +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= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= +github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -684,6 +730,12 @@ go.etcd.io/bbolt v1.4.0-alpha.1 h1:3yrqQzbRRPFPdOMWS/QQIVxVnzSkAZQYeWlZFv1kbj4= go.etcd.io/bbolt v1.4.0-alpha.1/go.mod h1:S/Z/Nm3iuOnyO1W4XuFfPci51Gj6F1Hv0z8hisyYYOw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= +go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= +go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= @@ -715,6 +767,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -786,6 +839,7 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -810,6 +864,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -852,7 +908,11 @@ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/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= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 16564d8682c4fe8b8efe027bddbb7e3624b1a8b6 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 15:09:01 -0400 Subject: [PATCH 06/44] gen --- .../pkg/eip4788/beacon_verifier.abigen.go | 271 ++++++++++++++++-- 1 file changed, 243 insertions(+), 28 deletions(-) diff --git a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go index 978b425801..424e9cc1b0 100644 --- a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go +++ b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go @@ -31,8 +31,8 @@ var ( // BeaconVerifierMetaData contains all meta data concerning the BeaconVerifier contract. var BeaconVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BEACON_ROOTS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"executionNumberGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRootAt\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"setExecutionNumberGIndex\",\"inputs\":[{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setZeroValidatorPubkeyGIndex\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBeaconBlockProposer\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"validatorPubkeyProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"validatorPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proposerIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyExecutionNumber\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumberProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zeroValidatorPubkeyGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ExecutionNumberGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionNumberGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ZeroValidatorPubkeyGIndexChanged\",\"inputs\":[{\"name\":\"newZeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IndexOutOfRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorPubkeyLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]}]", - Bin: "0x6080604052348015600e575f80fd5b50604051610bde380380610bde833981016040819052602b916098565b5f8290556001819055603b336041565b505060b9565b638b78c6d819805415605a57630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f806040838503121560a8575f80fd5b505080516020909101519092909150565b610b18806100c65f395ff3fe6080604052600436106100ef575f3560e01c80638170577111610087578063f04e283e11610057578063f04e283e14610257578063f2fde38b1461026a578063f769afd11461027d578063fee81cf41461029c575f80fd5b806381705771146101d25780638da5cb5b146101f1578063ae9af3e314610224578063efcff00a14610243575f80fd5b806354d1f13d116100c257806354d1f13d1461015857806356d7e8fd146101605780635e67d452146101ab578063715018a6146101ca575f80fd5b806325692962146100f3578063305ea416146100fd57806335222ff114610125578063491920ab14610139575b5f80fd5b6100fb6102cd565b005b348015610108575f80fd5b5061011260015481565b6040519081526020015b60405180910390f35b348015610130575f80fd5b506101125f5481565b348015610144575f80fd5b506100fb6101533660046108f0565b61031a565b6100fb610338565b34801561016b575f80fd5b50610186720f3df6d732807ef1319fb7b8bb8522d0beac0281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161011c565b3480156101b6575f80fd5b506101126101c53660046109ad565b610371565b6100fb610381565b3480156101dd575f80fd5b506100fb6101ec3660046109cd565b610394565b3480156101fc575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392754610186565b34801561022f575f80fd5b506100fb61023e3660046109e4565b6103d7565b34801561024e575f80fd5b506101126103f1565b6100fb610265366004610a45565b610400565b6100fb610278366004610a45565b61043d565b348015610288575f80fd5b506100fb6102973660046109cd565b610463565b3480156102a7575f80fd5b506101126102b6366004610a45565b63389a75e1600c9081525f91909152602090205490565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b610330610326876104a0565b86868686866104db565b505050505050565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f61037b826104a0565b92915050565b6103896105d6565b6103925f61060b565b565b61039c6105d6565b5f8190556040518181527fe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21906020015b60405180910390a150565b6103eb6103e3856104a0565b848484610679565b50505050565b5f6103fb426104a0565b905090565b6104086105d6565b63389a75e1600c52805f526020600c20805442111561042e57636f5e88185f526004601cfd5b5f905561043a8161060b565b50565b6104456105d6565b8060601b61045a57637448fbae5f526004601cfd5b61043a8161060b565b61046b6105d6565b60018190556040518181527febb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264906020016103cc565b5f815f5260205f60205f720f3df6d732807ef1319fb7b8bb8522d0beac025afa806104d257633033b0ff5f526004601cfd5b50505f51919050565b6501000000000067ffffffffffffffff821610610524576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61056384848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061079f92505050565b90505f610571836008610aa5565b67ffffffffffffffff165f546105879190610acf565b905061059687878a85856107f2565b6105cc576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610392576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b5f7bffffffff000000000000000000000000ffffffff000000000000000066ff000000ff0000600884811c91821667ff000000ff0000009186901b91821617601090811c64ff000000ff90931665ff000000ff0090921691909117901b17602081811c9283167fffffffff000000000000000000000000ffffffff0000000000000000000000009290911b91821617604090811c73ffffffff000000000000000000000000ffffffff90931677ffffffff000000000000000000000000ffffffff0000000090921691909117901b17608081811c91901b179050610762848487846001546107f2565b610798576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b80515f906030146107dc576040517f5f4167e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60205f60406020850160025afa806104d2575f80fd5b5f841561084e578460051b8601865b6001841660051b8460011c94508461082057635849603f5f526004601cfd5b85815281356020918218525f60408160025afa8061083c575f80fd5b505f5194506020018181106108015750505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82011561088357631b6661c35f526004601cfd5b50501492915050565b803567ffffffffffffffff811681146108a3575f80fd5b919050565b5f8083601f8401126108b8575f80fd5b50813567ffffffffffffffff8111156108cf575f80fd5b6020830191508360208260051b85010111156108e9575f80fd5b9250929050565b5f805f805f8060808789031215610905575f80fd5b61090e8761088c565b9550602087013567ffffffffffffffff811115610929575f80fd5b61093589828a016108a8565b909650945050604087013567ffffffffffffffff811115610954575f80fd5b8701601f81018913610964575f80fd5b803567ffffffffffffffff81111561097a575f80fd5b89602082840101111561098b575f80fd5b602091909101935091506109a16060880161088c565b90509295509295509295565b5f602082840312156109bd575f80fd5b6109c68261088c565b9392505050565b5f602082840312156109dd575f80fd5b5035919050565b5f805f80606085870312156109f7575f80fd5b610a008561088c565b9350602085013567ffffffffffffffff811115610a1b575f80fd5b610a27878288016108a8565b9094509250610a3a90506040860161088c565b905092959194509250565b5f60208284031215610a55575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146109c6575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff8181168382160290811690818114610ac857610ac8610a78565b5092915050565b8082018082111561037b5761037b610a7856fea264697066735822122039550e460ebcb1acfc71b3cb3b60a1ce8cdc0ed5d2f44202f2b24c8df0b48eca64736f6c634300081a0033", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionFeeRecipientGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BEACON_ROOTS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"executionFeeRecipientGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"executionNumberGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRootAt\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"setExecutionFeeRecipientGIndex\",\"inputs\":[{\"name\":\"_executionFeeRecipientGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutionNumberGIndex\",\"inputs\":[{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setZeroValidatorPubkeyGIndex\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBeaconBlockProposer\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposerIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposerPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proposerPubkeyProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCoinbase\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"coinbaseProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyExecutionNumber\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumberProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zeroValidatorPubkeyGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ExecutionFeeRecipientGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionFeeRecipientGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutionNumberGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionNumberGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ZeroValidatorPubkeyGIndexChanged\",\"inputs\":[{\"name\":\"newZeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IndexOutOfRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorPubkeyLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]}]", + Bin: "0x6080604052348015600e575f80fd5b50604051610ccc380380610ccc833981016040819052602b91609e565b5f839055600182905560028190556040336047565b50505060c8565b638b78c6d819805415606057630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f805f6060848603121560af575f80fd5b5050815160208301516040909301519094929350919050565b610bf7806100d55f395ff3fe60806040526004361061013d575f3560e01c80638da5cb5b116100bb578063efcff00a11610071578063f2fde38b11610057578063f2fde38b1461030b578063f769afd11461031e578063fee81cf41461033d575f80fd5b8063efcff00a146102e4578063f04e283e146102f8575f80fd5b8063c0c27230116100a1578063c0c2723014610291578063cbb60852146102b0578063e701fa76146102cf575f80fd5b80638da5cb5b1461023f578063ab15494a14610272575f80fd5b806356d7e8fd11610110578063715018a6116100f6578063715018a6146101f957806378e97954146102015780638170577114610220575f80fd5b806356d7e8fd1461018f5780635e67d452146101da575f80fd5b80632569296214610141578063305ea4161461014b57806335222ff11461017357806354d1f13d14610187575b5f80fd5b61014961036e565b005b348015610156575f80fd5b5061016060015481565b6040519081526020015b60405180910390f35b34801561017e575f80fd5b506101605f5481565b6101496103bb565b34801561019a575f80fd5b506101b5720f3df6d732807ef1319fb7b8bb8522d0beac0281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161016a565b3480156101e5575f80fd5b506101606101f4366004610956565b6103f4565b610149610404565b34801561020c575f80fd5b5061014961021b3660046109e1565b610417565b34801561022b575f80fd5b5061014961023a366004610a3e565b610431565b34801561024a575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546101b5565b34801561027d575f80fd5b5061014961028c366004610a55565b610474565b34801561029c575f80fd5b506101496102ab366004610a3e565b610492565b3480156102bb575f80fd5b506101496102ca366004610b14565b6104cf565b3480156102da575f80fd5b5061016060025481565b3480156102ef575f80fd5b506101606104e3565b610149610306366004610b3e565b6104f2565b610149610319366004610b3e565b61052f565b348015610329575f80fd5b50610149610338366004610a3e565b610555565b348015610348575f80fd5b50610160610357366004610b3e565b63389a75e1600c9081525f91909152602090205490565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f6103fe82610592565b92915050565b61040c6105cd565b6104155f610602565b565b61042b61042385610592565b838386610670565b50505050565b6104396105cd565b5f8190556040518181527fe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21906020015b60405180910390a150565b61048a61048087610592565b838387878a6106e6565b505050505050565b61049a6105cd565b60028190556040518181527f15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e85530154890602001610469565b61042b6104db85610592565b8383866107e1565b5f6104ed42610592565b905090565b6104fa6105cd565b63389a75e1600c52805f526020600c20805442111561052057636f5e88185f526004601cfd5b5f905561052c81610602565b50565b6105376105cd565b8060601b61054c57637448fbae5f526004601cfd5b61052c81610602565b61055d6105cd565b60018190556040518181527febb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff7626490602001610469565b5f815f5260205f60205f720f3df6d732807ef1319fb7b8bb8522d0beac025afa806105c457633033b0ff5f526004601cfd5b50505f51919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610415576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b5f606082901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690506106a98484878460025461084d565b6106df576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b6501000000000067ffffffffffffffff82161061072f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61076e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506108e792505050565b90505f61077c836008610b84565b67ffffffffffffffff165f546107929190610bae565b90506107a187878a858561084d565b6107d7576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050565b5f65ff000000ff00600883811b91821664ff000000ff9185901c91821617601090811b67ff000000ff0000009390931666ff000000ff00009290921691909117901c17602081811c63ffffffff1691901b67ffffffff00000000161760c01b90506106a9848487846001545b5f84156108a9578460051b8601865b6001841660051b8460011c94508461087b57635849603f5f526004601cfd5b85815281356020918218525f60408160025afa80610897575f80fd5b505f51945060200181811061085c5750505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201156108de57631b6661c35f526004601cfd5b50501492915050565b80515f90603014610924576040517f5f4167e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60205f60406020850160025afa806105c4575f80fd5b803567ffffffffffffffff81168114610951575f80fd5b919050565b5f60208284031215610966575f80fd5b61096f8261093a565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610951575f80fd5b5f8083601f8401126109a9575f80fd5b50813567ffffffffffffffff8111156109c0575f80fd5b6020830191508360208260051b85010111156109da575f80fd5b9250929050565b5f805f80606085870312156109f4575f80fd5b6109fd8561093a565b9350610a0b60208601610976565b9250604085013567ffffffffffffffff811115610a26575f80fd5b610a3287828801610999565b95989497509550505050565b5f60208284031215610a4e575f80fd5b5035919050565b5f805f805f8060808789031215610a6a575f80fd5b610a738761093a565b9550610a816020880161093a565b9450604087013567ffffffffffffffff811115610a9c575f80fd5b8701601f81018913610aac575f80fd5b803567ffffffffffffffff811115610ac2575f80fd5b896020828401011115610ad3575f80fd5b60209190910194509250606087013567ffffffffffffffff811115610af6575f80fd5b610b0289828a01610999565b979a9699509497509295939492505050565b5f805f8060608587031215610b27575f80fd5b610b308561093a565b9350610a0b6020860161093a565b5f60208284031215610b4e575f80fd5b61096f82610976565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff8181168382160290811690818114610ba757610ba7610b57565b5092915050565b808201808211156103fe576103fe610b5756fea2646970667358221220df10c90f71c34a556f620246dd6a3ffe6d363911421554cee259c441a7cb599364736f6c634300081a0033", } // BeaconVerifierABI is the input ABI used to generate the binding from. @@ -44,7 +44,7 @@ var BeaconVerifierABI = BeaconVerifierMetaData.ABI var BeaconVerifierBin = BeaconVerifierMetaData.Bin // DeployBeaconVerifier deploys a new Ethereum contract, binding an instance of BeaconVerifier to it. -func DeployBeaconVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _zeroValidatorPubkeyGIndex *big.Int, _executionNumberGIndex *big.Int) (common.Address, *types.Transaction, *BeaconVerifier, error) { +func DeployBeaconVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _zeroValidatorPubkeyGIndex *big.Int, _executionNumberGIndex *big.Int, _executionFeeRecipientGIndex *big.Int) (common.Address, *types.Transaction, *BeaconVerifier, error) { parsed, err := BeaconVerifierMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err @@ -53,7 +53,7 @@ func DeployBeaconVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BeaconVerifierBin), backend, _zeroValidatorPubkeyGIndex, _executionNumberGIndex) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BeaconVerifierBin), backend, _zeroValidatorPubkeyGIndex, _executionNumberGIndex, _executionFeeRecipientGIndex) if err != nil { return common.Address{}, nil, nil, err } @@ -233,6 +233,37 @@ func (_BeaconVerifier *BeaconVerifierCallerSession) BEACONROOTS() (common.Addres return _BeaconVerifier.Contract.BEACONROOTS(&_BeaconVerifier.CallOpts) } +// ExecutionFeeRecipientGIndex is a free data retrieval call binding the contract method 0xe701fa76. +// +// Solidity: function executionFeeRecipientGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierCaller) ExecutionFeeRecipientGIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "executionFeeRecipientGIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ExecutionFeeRecipientGIndex is a free data retrieval call binding the contract method 0xe701fa76. +// +// Solidity: function executionFeeRecipientGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierSession) ExecutionFeeRecipientGIndex() (*big.Int, error) { + return _BeaconVerifier.Contract.ExecutionFeeRecipientGIndex(&_BeaconVerifier.CallOpts) +} + +// ExecutionFeeRecipientGIndex is a free data retrieval call binding the contract method 0xe701fa76. +// +// Solidity: function executionFeeRecipientGIndex() view returns(uint256) +func (_BeaconVerifier *BeaconVerifierCallerSession) ExecutionFeeRecipientGIndex() (*big.Int, error) { + return _BeaconVerifier.Contract.ExecutionFeeRecipientGIndex(&_BeaconVerifier.CallOpts) +} + // ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. // // Solidity: function executionNumberGIndex() view returns(uint256) @@ -388,12 +419,12 @@ func (_BeaconVerifier *BeaconVerifierCallerSession) OwnershipHandoverExpiresAt(p return _BeaconVerifier.Contract.OwnershipHandoverExpiresAt(&_BeaconVerifier.CallOpts, pendingOwner) } -// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0x491920ab. +// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0xab15494a. // -// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, bytes32[] validatorPubkeyProof, bytes validatorPubkey, uint64 proposerIndex) view returns() -func (_BeaconVerifier *BeaconVerifierCaller) VerifyBeaconBlockProposer(opts *bind.CallOpts, timestamp uint64, validatorPubkeyProof [][32]byte, validatorPubkey []byte, proposerIndex uint64) error { +// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, uint64 proposerIndex, bytes proposerPubkey, bytes32[] proposerPubkeyProof) view returns() +func (_BeaconVerifier *BeaconVerifierCaller) VerifyBeaconBlockProposer(opts *bind.CallOpts, timestamp uint64, proposerIndex uint64, proposerPubkey []byte, proposerPubkeyProof [][32]byte) error { var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "verifyBeaconBlockProposer", timestamp, validatorPubkeyProof, validatorPubkey, proposerIndex) + err := _BeaconVerifier.contract.Call(opts, &out, "verifyBeaconBlockProposer", timestamp, proposerIndex, proposerPubkey, proposerPubkeyProof) if err != nil { return err @@ -403,26 +434,26 @@ func (_BeaconVerifier *BeaconVerifierCaller) VerifyBeaconBlockProposer(opts *bin } -// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0x491920ab. +// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0xab15494a. // -// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, bytes32[] validatorPubkeyProof, bytes validatorPubkey, uint64 proposerIndex) view returns() -func (_BeaconVerifier *BeaconVerifierSession) VerifyBeaconBlockProposer(timestamp uint64, validatorPubkeyProof [][32]byte, validatorPubkey []byte, proposerIndex uint64) error { - return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, validatorPubkeyProof, validatorPubkey, proposerIndex) +// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, uint64 proposerIndex, bytes proposerPubkey, bytes32[] proposerPubkeyProof) view returns() +func (_BeaconVerifier *BeaconVerifierSession) VerifyBeaconBlockProposer(timestamp uint64, proposerIndex uint64, proposerPubkey []byte, proposerPubkeyProof [][32]byte) error { + return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, proposerIndex, proposerPubkey, proposerPubkeyProof) } -// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0x491920ab. +// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0xab15494a. // -// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, bytes32[] validatorPubkeyProof, bytes validatorPubkey, uint64 proposerIndex) view returns() -func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyBeaconBlockProposer(timestamp uint64, validatorPubkeyProof [][32]byte, validatorPubkey []byte, proposerIndex uint64) error { - return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, validatorPubkeyProof, validatorPubkey, proposerIndex) +// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, uint64 proposerIndex, bytes proposerPubkey, bytes32[] proposerPubkeyProof) view returns() +func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyBeaconBlockProposer(timestamp uint64, proposerIndex uint64, proposerPubkey []byte, proposerPubkeyProof [][32]byte) error { + return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, proposerIndex, proposerPubkey, proposerPubkeyProof) } -// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xae9af3e3. +// VerifyCoinbase is a free data retrieval call binding the contract method 0x78e97954. // -// Solidity: function verifyExecutionNumber(uint64 timestamp, bytes32[] executionNumberProof, uint64 blockNumber) view returns() -func (_BeaconVerifier *BeaconVerifierCaller) VerifyExecutionNumber(opts *bind.CallOpts, timestamp uint64, executionNumberProof [][32]byte, blockNumber uint64) error { +// Solidity: function verifyCoinbase(uint64 timestamp, address coinbase, bytes32[] coinbaseProof) view returns() +func (_BeaconVerifier *BeaconVerifierCaller) VerifyCoinbase(opts *bind.CallOpts, timestamp uint64, coinbase common.Address, coinbaseProof [][32]byte) error { var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "verifyExecutionNumber", timestamp, executionNumberProof, blockNumber) + err := _BeaconVerifier.contract.Call(opts, &out, "verifyCoinbase", timestamp, coinbase, coinbaseProof) if err != nil { return err @@ -432,18 +463,47 @@ func (_BeaconVerifier *BeaconVerifierCaller) VerifyExecutionNumber(opts *bind.Ca } -// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xae9af3e3. +// VerifyCoinbase is a free data retrieval call binding the contract method 0x78e97954. // -// Solidity: function verifyExecutionNumber(uint64 timestamp, bytes32[] executionNumberProof, uint64 blockNumber) view returns() -func (_BeaconVerifier *BeaconVerifierSession) VerifyExecutionNumber(timestamp uint64, executionNumberProof [][32]byte, blockNumber uint64) error { - return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumberProof, blockNumber) +// Solidity: function verifyCoinbase(uint64 timestamp, address coinbase, bytes32[] coinbaseProof) view returns() +func (_BeaconVerifier *BeaconVerifierSession) VerifyCoinbase(timestamp uint64, coinbase common.Address, coinbaseProof [][32]byte) error { + return _BeaconVerifier.Contract.VerifyCoinbase(&_BeaconVerifier.CallOpts, timestamp, coinbase, coinbaseProof) } -// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xae9af3e3. +// VerifyCoinbase is a free data retrieval call binding the contract method 0x78e97954. // -// Solidity: function verifyExecutionNumber(uint64 timestamp, bytes32[] executionNumberProof, uint64 blockNumber) view returns() -func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyExecutionNumber(timestamp uint64, executionNumberProof [][32]byte, blockNumber uint64) error { - return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumberProof, blockNumber) +// Solidity: function verifyCoinbase(uint64 timestamp, address coinbase, bytes32[] coinbaseProof) view returns() +func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyCoinbase(timestamp uint64, coinbase common.Address, coinbaseProof [][32]byte) error { + return _BeaconVerifier.Contract.VerifyCoinbase(&_BeaconVerifier.CallOpts, timestamp, coinbase, coinbaseProof) +} + +// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xcbb60852. +// +// Solidity: function verifyExecutionNumber(uint64 timestamp, uint64 executionNumber, bytes32[] executionNumberProof) view returns() +func (_BeaconVerifier *BeaconVerifierCaller) VerifyExecutionNumber(opts *bind.CallOpts, timestamp uint64, executionNumber uint64, executionNumberProof [][32]byte) error { + var out []interface{} + err := _BeaconVerifier.contract.Call(opts, &out, "verifyExecutionNumber", timestamp, executionNumber, executionNumberProof) + + if err != nil { + return err + } + + return err + +} + +// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xcbb60852. +// +// Solidity: function verifyExecutionNumber(uint64 timestamp, uint64 executionNumber, bytes32[] executionNumberProof) view returns() +func (_BeaconVerifier *BeaconVerifierSession) VerifyExecutionNumber(timestamp uint64, executionNumber uint64, executionNumberProof [][32]byte) error { + return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumber, executionNumberProof) +} + +// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xcbb60852. +// +// Solidity: function verifyExecutionNumber(uint64 timestamp, uint64 executionNumber, bytes32[] executionNumberProof) view returns() +func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyExecutionNumber(timestamp uint64, executionNumber uint64, executionNumberProof [][32]byte) error { + return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumber, executionNumberProof) } // ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. @@ -561,6 +621,27 @@ func (_BeaconVerifier *BeaconVerifierTransactorSession) RequestOwnershipHandover return _BeaconVerifier.Contract.RequestOwnershipHandover(&_BeaconVerifier.TransactOpts) } +// SetExecutionFeeRecipientGIndex is a paid mutator transaction binding the contract method 0xc0c27230. +// +// Solidity: function setExecutionFeeRecipientGIndex(uint256 _executionFeeRecipientGIndex) returns() +func (_BeaconVerifier *BeaconVerifierTransactor) SetExecutionFeeRecipientGIndex(opts *bind.TransactOpts, _executionFeeRecipientGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.contract.Transact(opts, "setExecutionFeeRecipientGIndex", _executionFeeRecipientGIndex) +} + +// SetExecutionFeeRecipientGIndex is a paid mutator transaction binding the contract method 0xc0c27230. +// +// Solidity: function setExecutionFeeRecipientGIndex(uint256 _executionFeeRecipientGIndex) returns() +func (_BeaconVerifier *BeaconVerifierSession) SetExecutionFeeRecipientGIndex(_executionFeeRecipientGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.Contract.SetExecutionFeeRecipientGIndex(&_BeaconVerifier.TransactOpts, _executionFeeRecipientGIndex) +} + +// SetExecutionFeeRecipientGIndex is a paid mutator transaction binding the contract method 0xc0c27230. +// +// Solidity: function setExecutionFeeRecipientGIndex(uint256 _executionFeeRecipientGIndex) returns() +func (_BeaconVerifier *BeaconVerifierTransactorSession) SetExecutionFeeRecipientGIndex(_executionFeeRecipientGIndex *big.Int) (*types.Transaction, error) { + return _BeaconVerifier.Contract.SetExecutionFeeRecipientGIndex(&_BeaconVerifier.TransactOpts, _executionFeeRecipientGIndex) +} + // SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. // // Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() @@ -624,6 +705,140 @@ func (_BeaconVerifier *BeaconVerifierTransactorSession) TransferOwnership(newOwn return _BeaconVerifier.Contract.TransferOwnership(&_BeaconVerifier.TransactOpts, newOwner) } +// BeaconVerifierExecutionFeeRecipientGIndexChangedIterator is returned from FilterExecutionFeeRecipientGIndexChanged and is used to iterate over the raw logs and unpacked data for ExecutionFeeRecipientGIndexChanged events raised by the BeaconVerifier contract. +type BeaconVerifierExecutionFeeRecipientGIndexChangedIterator struct { + Event *BeaconVerifierExecutionFeeRecipientGIndexChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BeaconVerifierExecutionFeeRecipientGIndexChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierExecutionFeeRecipientGIndexChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BeaconVerifierExecutionFeeRecipientGIndexChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BeaconVerifierExecutionFeeRecipientGIndexChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BeaconVerifierExecutionFeeRecipientGIndexChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BeaconVerifierExecutionFeeRecipientGIndexChanged represents a ExecutionFeeRecipientGIndexChanged event raised by the BeaconVerifier contract. +type BeaconVerifierExecutionFeeRecipientGIndexChanged struct { + NewExecutionFeeRecipientGIndex *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutionFeeRecipientGIndexChanged is a free log retrieval operation binding the contract event 0x15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e855301548. +// +// Solidity: event ExecutionFeeRecipientGIndexChanged(uint256 newExecutionFeeRecipientGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) FilterExecutionFeeRecipientGIndexChanged(opts *bind.FilterOpts) (*BeaconVerifierExecutionFeeRecipientGIndexChangedIterator, error) { + + logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "ExecutionFeeRecipientGIndexChanged") + if err != nil { + return nil, err + } + return &BeaconVerifierExecutionFeeRecipientGIndexChangedIterator{contract: _BeaconVerifier.contract, event: "ExecutionFeeRecipientGIndexChanged", logs: logs, sub: sub}, nil +} + +// WatchExecutionFeeRecipientGIndexChanged is a free log subscription operation binding the contract event 0x15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e855301548. +// +// Solidity: event ExecutionFeeRecipientGIndexChanged(uint256 newExecutionFeeRecipientGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) WatchExecutionFeeRecipientGIndexChanged(opts *bind.WatchOpts, sink chan<- *BeaconVerifierExecutionFeeRecipientGIndexChanged) (event.Subscription, error) { + + logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "ExecutionFeeRecipientGIndexChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BeaconVerifierExecutionFeeRecipientGIndexChanged) + if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionFeeRecipientGIndexChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecutionFeeRecipientGIndexChanged is a log parse operation binding the contract event 0x15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e855301548. +// +// Solidity: event ExecutionFeeRecipientGIndexChanged(uint256 newExecutionFeeRecipientGIndex) +func (_BeaconVerifier *BeaconVerifierFilterer) ParseExecutionFeeRecipientGIndexChanged(log types.Log) (*BeaconVerifierExecutionFeeRecipientGIndexChanged, error) { + event := new(BeaconVerifierExecutionFeeRecipientGIndexChanged) + if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionFeeRecipientGIndexChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // BeaconVerifierExecutionNumberGIndexChangedIterator is returned from FilterExecutionNumberGIndexChanged and is used to iterate over the raw logs and unpacked data for ExecutionNumberGIndexChanged events raised by the BeaconVerifier contract. type BeaconVerifierExecutionNumberGIndexChangedIterator struct { Event *BeaconVerifierExecutionNumberGIndexChanged // Event containing the contract specifics and raw log From 38c76de81db0e4562d80bd10229f5a9333866df0 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 15:19:38 -0400 Subject: [PATCH 07/44] bet --- build/scripts/testing.mk | 2 +- testing/e2e/config/defaults.go | 4 ++-- testing/e2e/e2e_staking_test.go | 2 -- testing/e2e/suite/types/consensus_client.go | 9 ++++----- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/build/scripts/testing.mk b/build/scripts/testing.mk index 58f9eaf384..440105aec0 100644 --- a/build/scripts/testing.mk +++ b/build/scripts/testing.mk @@ -222,4 +222,4 @@ test-e2e: ## run e2e tests @$(MAKE) build-docker VERSION=kurtosis-local test-e2e-no-build test-e2e-no-build: - go test -tags e2e,bls12381 ./testing/e2e/. -v \ No newline at end of file + go test -tags e2e,bls12381,api ./testing/e2e/... -v \ No newline at end of file diff --git a/testing/e2e/config/defaults.go b/testing/e2e/config/defaults.go index 918b6c3e65..5cb40423d0 100644 --- a/testing/e2e/config/defaults.go +++ b/testing/e2e/config/defaults.go @@ -20,13 +20,13 @@ package config -// Consensus clients +// Consensus clients. const ( DefaultClient = "cl-validator-beaconkit-0" AlternateClient = "cl-validator-beaconkit-1" ) -// Deposits +// Deposits. const ( DepositContractAddress = "0x4242424242424242424242424242424242424242" NumDepositsLoad = 500 diff --git a/testing/e2e/e2e_staking_test.go b/testing/e2e/e2e_staking_test.go index a85b4cb230..5d45c06382 100644 --- a/testing/e2e/e2e_staking_test.go +++ b/testing/e2e/e2e_staking_test.go @@ -32,8 +32,6 @@ import ( coretypes "github.com/ethereum/go-ethereum/core/types" ) - - func (s *BeaconKitE2ESuite) TestDepositRobustness() { // Get the consensus client. client := s.ConsensusClients()[config.DefaultClient] diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index e08da7d5d2..9e1df083a9 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -28,7 +28,6 @@ import ( "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/math" - rpcclient "github.com/cometbft/cometbft/rpc/client" httpclient "github.com/cometbft/cometbft/rpc/client/http" "github.com/ethpandaops/beacon/pkg/beacon" @@ -52,7 +51,7 @@ func NewConsensusClient(serviceCtx *WrappedServiceContext) *ConsensusClient { WrappedServiceContext: serviceCtx, } - if err := cc.Connect(); err != nil { + if err := cc.Connect(context.Background()); err != nil { panic(err) } @@ -60,7 +59,7 @@ func NewConsensusClient(serviceCtx *WrappedServiceContext) *ConsensusClient { } // Connect connects the consensus client to the consensus client. -func (cc *ConsensusClient) Connect() error { +func (cc *ConsensusClient) Connect(ctx context.Context) error { // Start by trying to get the public port for the comet JSON-RPC. cometPort, ok := cc.WrappedServiceContext.GetPublicPorts()["cometbft-rpc"] if !ok { @@ -82,7 +81,7 @@ func (cc *ConsensusClient) Connect() error { Addr: fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), Name: "beacon node", }, "eth", *beacon.DefaultOptions()) - return cc.Node.Start(context.Background()) + return cc.Node.Start(ctx) } // Start starts the consensus client. @@ -95,7 +94,7 @@ func (cc ConsensusClient) Start( return nil, err } - return res, cc.Connect() + return res, cc.Connect(ctx) } // Stop stops the consensus client. From 2a5571b72df82750e1ea2f4c80d462f587cd2b46 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 15:35:09 -0400 Subject: [PATCH 08/44] nilaway --- build/scripts/linting.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/scripts/linting.mk b/build/scripts/linting.mk index baea711ed4..c788518f12 100644 --- a/build/scripts/linting.mk +++ b/build/scripts/linting.mk @@ -85,7 +85,7 @@ nilaway: for dir in $$dirs; do \ count=$$((count + 1)); \ printf "[%d/%d modules complete] Running nilaway in %s\n" $$count $$total $$dir && \ - (cd $$dir && go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "pkg/components/module,pkg/deposit" -v ./...) || exit 1; \ + (cd $$dir && go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "pkg/components/module,pkg/deposit,pkg/eip4788" -v ./...) || exit 1; \ done @printf "Nilaway complete for all modules\n" From af96a1d71586c8bf4455d1e9f46ec04365bfe376 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 15:43:14 -0400 Subject: [PATCH 09/44] use e2e build flag --- build/scripts/testing.mk | 2 +- testing/e2e/api/api_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/scripts/testing.mk b/build/scripts/testing.mk index 440105aec0..58f9eaf384 100644 --- a/build/scripts/testing.mk +++ b/build/scripts/testing.mk @@ -222,4 +222,4 @@ test-e2e: ## run e2e tests @$(MAKE) build-docker VERSION=kurtosis-local test-e2e-no-build test-e2e-no-build: - go test -tags e2e,bls12381,api ./testing/e2e/... -v \ No newline at end of file + go test -tags e2e,bls12381 ./testing/e2e/. -v \ No newline at end of file diff --git a/testing/e2e/api/api_test.go b/testing/e2e/api/api_test.go index 6d6d73221e..e0c36ff67e 100644 --- a/testing/e2e/api/api_test.go +++ b/testing/e2e/api/api_test.go @@ -18,8 +18,8 @@ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND // TITLE. -//go:build api -// +build api +//go:build e2e +// +build e2e package api_test From 3cdb28ff7caa576f3ad51ec93aa3afb6122004bf Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 16:03:00 -0400 Subject: [PATCH 10/44] cli flags --- kurtosis/src/nodes/consensus/beacond/node.star | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kurtosis/src/nodes/consensus/beacond/node.star b/kurtosis/src/nodes/consensus/beacond/node.star index 72645d28b2..0378f8b525 100644 --- a/kurtosis/src/nodes/consensus/beacond/node.star +++ b/kurtosis/src/nodes/consensus/beacond/node.star @@ -40,6 +40,8 @@ def start(persistent_peers, is_seed, validator_index, config_settings, app_setti --beacon-kit.engine.rpc-dial-url {} \ --rpc.laddr tcp://0.0.0.0:26657 \ --grpc.address 0.0.0.0:9090 --api.address tcp://0.0.0.0:1317 \ + --beacon-kit.block-store-service.enabled --beacon-kit.block-store-service.pruner-enabled \ + --beacon-kit.node-api.enabled --beacon-kit.node-api.logging \ --api.enable {} {}".format(kzg_impl, "$BEACOND_ENGINE_DIAL_URL", seed_option, persistent_peers_option) return "{} && {} && {}".format(mv_genesis, set_config, start_node) From b610b28a5543aac8d357cd83b88522428e5f65ef Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 16:10:26 -0400 Subject: [PATCH 11/44] nil logger --- testing/e2e/suite/types/consensus_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index 9e1df083a9..e39a2694be 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -32,6 +32,7 @@ import ( httpclient "github.com/cometbft/cometbft/rpc/client/http" "github.com/ethpandaops/beacon/pkg/beacon" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" + "github.com/sirupsen/logrus" ) // ConsensusClient represents a consensus client. @@ -77,7 +78,7 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { if !ok { panic("Couldn't find the public port for the node API") } - cc.Node = beacon.NewNode(nil, &beacon.Config{ + cc.Node = beacon.NewNode(logrus.New(), &beacon.Config{ Addr: fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), Name: "beacon node", }, "eth", *beacon.DefaultOptions()) From 511e696f3bf2c81abb4fbd0480e20781cc0917f8 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 16:19:28 -0400 Subject: [PATCH 12/44] tidy && sync --- testing/go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/go.mod b/testing/go.mod index 109f712391..34e988a42a 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -13,7 +13,6 @@ require ( cosmossdk.io/log v1.3.2-0.20240530141513-465410c75bce github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240724161918-96b9bf999de2 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df - github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240726210727-594bfb4e7157 @@ -25,6 +24,7 @@ require ( github.com/kurtosis-tech/kurtosis/api/golang v1.0.0 github.com/protolambda/zrnt v0.32.2 github.com/protolambda/ztyp v0.2.2 + github.com/sirupsen/logrus v1.9.3 github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 github.com/stretchr/testify v1.9.0 ) @@ -58,6 +58,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/berachain/beacon-kit/mod/chain-spec v0.0.0-20240705193247-d464364483df // indirect github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240710022615-726645827bad // indirect + github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect @@ -212,7 +213,6 @@ require ( github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.1 // indirect From abbaed290383e90dddafac9ca95770da1b500e73 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 16:22:14 -0400 Subject: [PATCH 13/44] disable prom on beacon client --- testing/e2e/suite/types/consensus_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index e39a2694be..ec19bc4dff 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -78,10 +78,12 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { if !ok { panic("Couldn't find the public port for the node API") } + opts := beacon.DefaultOptions() + opts.DisablePrometheusMetrics() cc.Node = beacon.NewNode(logrus.New(), &beacon.Config{ Addr: fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), Name: "beacon node", - }, "eth", *beacon.DefaultOptions()) + }, "eth", *opts) return cc.Node.Start(ctx) } From 07a3dc09ccd5011edb695c8c5263a33bc96ff674 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 17:16:59 -0400 Subject: [PATCH 14/44] Remove pruning --- kurtosis/src/nodes/consensus/beacond/node.star | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kurtosis/src/nodes/consensus/beacond/node.star b/kurtosis/src/nodes/consensus/beacond/node.star index 0378f8b525..34e220e131 100644 --- a/kurtosis/src/nodes/consensus/beacond/node.star +++ b/kurtosis/src/nodes/consensus/beacond/node.star @@ -40,8 +40,9 @@ def start(persistent_peers, is_seed, validator_index, config_settings, app_setti --beacon-kit.engine.rpc-dial-url {} \ --rpc.laddr tcp://0.0.0.0:26657 \ --grpc.address 0.0.0.0:9090 --api.address tcp://0.0.0.0:1317 \ - --beacon-kit.block-store-service.enabled --beacon-kit.block-store-service.pruner-enabled \ + --beacon-kit.block-store-service.enabled \ --beacon-kit.node-api.enabled --beacon-kit.node-api.logging \ + --pruning=nothing \ --api.enable {} {}".format(kzg_impl, "$BEACOND_ENGINE_DIAL_URL", seed_option, persistent_peers_option) return "{} && {} && {}".format(mv_genesis, set_config, start_node) From d407ef2fe98af51c7aabfff4aa103a2552b98c1b Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 17:26:14 -0400 Subject: [PATCH 15/44] timeout ctx --- testing/e2e/suite/types/consensus_client.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index ec19bc4dff..54915ae18b 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -23,6 +23,7 @@ package types import ( "context" "fmt" + "time" "github.com/berachain/beacon-kit/mod/errors" "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" @@ -35,6 +36,11 @@ import ( "github.com/sirupsen/logrus" ) +const ( + // connTimeout is the timeout for the connection to the consensus client. + connTimeout = 10 * time.Second +) + // ConsensusClient represents a consensus client. type ConsensusClient struct { *WrappedServiceContext @@ -80,11 +86,15 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { } opts := beacon.DefaultOptions() opts.DisablePrometheusMetrics() + time.Sleep(connTimeout) cc.Node = beacon.NewNode(logrus.New(), &beacon.Config{ Addr: fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), Name: "beacon node", }, "eth", *opts) - return cc.Node.Start(ctx) + + timeoutCtx, cancel := context.WithTimeout(ctx, connTimeout) + defer cancel() + return cc.Node.Start(timeoutCtx) } // Start starts the consensus client. From da3b96d9581728e43c28e1454f9a872edb984f4f Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 17:31:54 -0400 Subject: [PATCH 16/44] tidy sync --- testing/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/go.mod b/testing/go.mod index 34e988a42a..0b5c266c95 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -13,6 +13,7 @@ require ( cosmossdk.io/log v1.3.2-0.20240530141513-465410c75bce github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240724161918-96b9bf999de2 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df + github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240726210727-594bfb4e7157 @@ -58,7 +59,6 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/berachain/beacon-kit/mod/chain-spec v0.0.0-20240705193247-d464364483df // indirect github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240710022615-726645827bad // indirect - github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240705193247-d464364483df // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect From 6fba5f5da896cc1455b71a4b88772d51210078e2 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 1 Aug 2024 17:32:33 -0400 Subject: [PATCH 17/44] timeout bump --- testing/e2e/suite/types/consensus_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index 54915ae18b..b3db3f8da7 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -38,7 +38,7 @@ import ( const ( // connTimeout is the timeout for the connection to the consensus client. - connTimeout = 10 * time.Second + connTimeout = 15 * time.Second ) // ConsensusClient represents a consensus client. From 41b29da68c8a8616ea408ff2875b4babcf161b64 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Fri, 2 Aug 2024 12:00:02 -0400 Subject: [PATCH 18/44] placeholders --- mod/node-api/handlers/node/handler.go | 2 +- mod/node-api/handlers/node/placeholders.go | 61 ++++++++++++++++++++++ mod/node-api/handlers/node/routes.go | 4 +- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 mod/node-api/handlers/node/placeholders.go diff --git a/mod/node-api/handlers/node/handler.go b/mod/node-api/handlers/node/handler.go index 0f7c5c91a7..6ad6c29a43 100644 --- a/mod/node-api/handlers/node/handler.go +++ b/mod/node-api/handlers/node/handler.go @@ -31,7 +31,7 @@ type Handler[ContextT context.Context] struct { func NewHandler[ContextT context.Context]() *Handler[ContextT] { h := &Handler[ContextT]{ - BaseHandler: handlers.NewBaseHandler[ContextT]( + BaseHandler: handlers.NewBaseHandler( handlers.NewRouteSet[ContextT](""), ), } diff --git a/mod/node-api/handlers/node/placeholders.go b/mod/node-api/handlers/node/placeholders.go new file mode 100644 index 0000000000..293024e233 --- /dev/null +++ b/mod/node-api/handlers/node/placeholders.go @@ -0,0 +1,61 @@ +// 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 node + +// Syncing is a placeholder so that beacon API clients don't break. +// +// TODO: Implement with real data. +func (h *Handler[ContextT]) Syncing(ctx ContextT) (any, error) { + type SyncingResponse struct { + Data struct { + HeadSlot string `json:"head_slot"` + SyncDistance string `json:"sync_distance"` + IsSyncing bool `json:"is_syncing"` + IsOptimistic bool `json:"is_optimistic"` + ELOffline bool `json:"el_offline"` + } `json:"data"` + } + + response := SyncingResponse{} + response.Data.HeadSlot = "0" + response.Data.SyncDistance = "1" + response.Data.IsSyncing = false + response.Data.IsOptimistic = true + response.Data.ELOffline = false + + return response, nil +} + +// Version is a placeholder so that beacon API clients don't break. +// +// TODO: Implement with real data. +func (h *Handler[ContextT]) Version(ctx ContextT) (any, error) { + type VersionResponse struct { + Data struct { + Version string `json:"version"` + } `json:"data"` + } + + response := VersionResponse{} + response.Data.Version = "1.0.0" + + return response, nil +} diff --git a/mod/node-api/handlers/node/routes.go b/mod/node-api/handlers/node/routes.go index 370b2803f4..f0b8dca54a 100644 --- a/mod/node-api/handlers/node/routes.go +++ b/mod/node-api/handlers/node/routes.go @@ -55,12 +55,12 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/node/version", - Handler: h.NotImplemented, + Handler: h.Version, }, { Method: http.MethodGet, Path: "/eth/v1/node/syncing", - Handler: h.NotImplemented, + Handler: h.Syncing, }, { Method: http.MethodGet, From b23037d57919bd0d4bec00ed00e279f7a1b404d0 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Fri, 2 Aug 2024 13:26:38 -0400 Subject: [PATCH 19/44] beacon client --- mod/node-api/client/interface.go | 33 +++++++++++++++++++++++++++++ mod/node-api/client/node.go | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 mod/node-api/client/interface.go create mode 100644 mod/node-api/client/node.go diff --git a/mod/node-api/client/interface.go b/mod/node-api/client/interface.go new file mode 100644 index 0000000000..c4bbd16d28 --- /dev/null +++ b/mod/node-api/client/interface.go @@ -0,0 +1,33 @@ +// 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 client + +import ( + "github.com/ethpandaops/beacon/pkg/beacon" +) + +// BeaconKitNode is a wrapper around the beacon.Node interface to add +// additional methods specific to a beacon-kit node's API. +type BeaconKitNode interface { + beacon.Node + + // Other beacon-kit node-api methods here... +} diff --git a/mod/node-api/client/node.go b/mod/node-api/client/node.go new file mode 100644 index 0000000000..374c52debd --- /dev/null +++ b/mod/node-api/client/node.go @@ -0,0 +1,36 @@ +// 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 client + +import ( + "github.com/ethpandaops/beacon/pkg/beacon" + "github.com/sirupsen/logrus" +) + +// NewNode creates a new BeaconKitNode instance. +func NewNode( + log logrus.FieldLogger, + config *beacon.Config, + namespace string, + options beacon.Options, +) BeaconKitNode { + return beacon.NewNode(log, config, namespace, options) +} From ee983b3b94b784480652d92f5e589612efac17f6 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 8 Aug 2024 11:25:57 -0400 Subject: [PATCH 20/44] tidy && sync --- mod/node-api/go.sum | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/mod/node-api/go.sum b/mod/node-api/go.sum index 0a15b13179..698d70d935 100644 --- a/mod/node-api/go.sum +++ b/mod/node-api/go.sum @@ -84,15 +84,18 @@ github.com/ethpandaops/ethwallclock v0.2.0 h1:EeFKtZ7v6TAdn/oAh0xaPujD7N4amjBxrW github.com/ethpandaops/ethwallclock v0.2.0/go.mod h1:y0Cu+mhGLlem19vnAV2x0hpFS5KZ7oOi2SWYayv9l24= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= +github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 h1:oMYkNRlaY+YxcbYW4U84mQQkujiloBbxQFnTOHUbkec= github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79/go.mod h1:EGSbefgAPd3M0hlBwOCw4Mkj+0YAaSnXw1QeLasY6XQ= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= +github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-co-op/gocron v1.16.2 h1:p9ghzsN5PqqPyWXYDO2JlvD1DOUNT8pPSyGYC62XBcY= @@ -103,6 +106,7 @@ github.com/go-faster/xor v1.0.0 h1:2o8vTOgErSGHP3/7XwA5ib1FTtUsNtwCoLLBjl31X38= github.com/go-faster/xor v1.0.0/go.mod h1:x5CaDY9UKErKzqfRfFZdfu+OSTfoZny3w5Ak7UxcipQ= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -111,10 +115,13 @@ github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= +github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= @@ -177,6 +184,7 @@ github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7 github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -249,6 +257,7 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -256,6 +265,7 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= @@ -279,8 +289,11 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= +go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= +go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= +go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= 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= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= From 113556366f3aadf604a828d9a897605e6e3b5bbb Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Thu, 8 Aug 2024 11:43:47 -0400 Subject: [PATCH 21/44] lint --- mod/node-api/handlers/node/placeholders.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/node-api/handlers/node/placeholders.go b/mod/node-api/handlers/node/placeholders.go index 293024e233..cdc9dca2f3 100644 --- a/mod/node-api/handlers/node/placeholders.go +++ b/mod/node-api/handlers/node/placeholders.go @@ -23,7 +23,7 @@ package node // Syncing is a placeholder so that beacon API clients don't break. // // TODO: Implement with real data. -func (h *Handler[ContextT]) Syncing(ctx ContextT) (any, error) { +func (h *Handler[ContextT]) Syncing(ContextT) (any, error) { type SyncingResponse struct { Data struct { HeadSlot string `json:"head_slot"` @@ -47,7 +47,7 @@ func (h *Handler[ContextT]) Syncing(ctx ContextT) (any, error) { // Version is a placeholder so that beacon API clients don't break. // // TODO: Implement with real data. -func (h *Handler[ContextT]) Version(ctx ContextT) (any, error) { +func (h *Handler[ContextT]) Version(ContextT) (any, error) { type VersionResponse struct { Data struct { Version string `json:"version"` From a739db1dec712a5b4c5f8966e1a83735cb81c7ab Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Sun, 11 Aug 2024 11:48:24 -0400 Subject: [PATCH 22/44] run api e2e tests --- build/scripts/testing.mk | 6 +----- contracts/lib/forge-std | 2 +- contracts/lib/solady | 2 +- .../pkg/eip4788/beacon_verifier.abigen.go | 2 +- testing/e2e/api/api_test.go | 2 +- testing/e2e/e2e_test.go | 14 ++++---------- 6 files changed, 9 insertions(+), 19 deletions(-) diff --git a/build/scripts/testing.mk b/build/scripts/testing.mk index 0f5a0c8702..0086995a1f 100644 --- a/build/scripts/testing.mk +++ b/build/scripts/testing.mk @@ -249,12 +249,8 @@ test-unit-fuzz: ## run fuzz tests go test ./mod/payload/pkg/cache/... -fuzz=FuzzPayloadIDCacheConcurrency -fuzztime=${SHORT_FUZZ_TIME} go test -fuzz=FuzzHashTreeRoot ./mod/primitives/pkg/merkle -fuzztime=${MEDIUM_FUZZ_TIME} - - - - test-e2e: ## run e2e tests @$(MAKE) build-docker VERSION=kurtosis-local test-e2e-no-build test-e2e-no-build: - go test -tags e2e,bls12381 ./testing/e2e/. -v \ No newline at end of file + go test -tags e2e,api,bls12381 ./testing/e2e/... -v \ No newline at end of file diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std index 2cbff0602d..bf66061429 160000 --- a/contracts/lib/forge-std +++ b/contracts/lib/forge-std @@ -1 +1 @@ -Subproject commit 2cbff0602d340503dba9828ab6981053704d1384 +Subproject commit bf6606142994b1e47e2882ce0cd477c020d77623 diff --git a/contracts/lib/solady b/contracts/lib/solady index a95f671486..11c27fab52 160000 --- a/contracts/lib/solady +++ b/contracts/lib/solady @@ -1 +1 @@ -Subproject commit a95f6714868cfe5d590145f936d0661bddff40d2 +Subproject commit 11c27fab5233fae1456ee95d5a6ad06be8bd32c8 diff --git a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go index 424e9cc1b0..1dc3c16759 100644 --- a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go +++ b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go @@ -32,7 +32,7 @@ var ( // BeaconVerifierMetaData contains all meta data concerning the BeaconVerifier contract. var BeaconVerifierMetaData = &bind.MetaData{ ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionFeeRecipientGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BEACON_ROOTS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"executionFeeRecipientGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"executionNumberGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRootAt\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"setExecutionFeeRecipientGIndex\",\"inputs\":[{\"name\":\"_executionFeeRecipientGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutionNumberGIndex\",\"inputs\":[{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setZeroValidatorPubkeyGIndex\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBeaconBlockProposer\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposerIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposerPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proposerPubkeyProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCoinbase\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"coinbaseProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyExecutionNumber\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumberProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zeroValidatorPubkeyGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ExecutionFeeRecipientGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionFeeRecipientGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutionNumberGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionNumberGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ZeroValidatorPubkeyGIndexChanged\",\"inputs\":[{\"name\":\"newZeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IndexOutOfRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorPubkeyLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]}]", - Bin: "0x6080604052348015600e575f80fd5b50604051610ccc380380610ccc833981016040819052602b91609e565b5f839055600182905560028190556040336047565b50505060c8565b638b78c6d819805415606057630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f805f6060848603121560af575f80fd5b5050815160208301516040909301519094929350919050565b610bf7806100d55f395ff3fe60806040526004361061013d575f3560e01c80638da5cb5b116100bb578063efcff00a11610071578063f2fde38b11610057578063f2fde38b1461030b578063f769afd11461031e578063fee81cf41461033d575f80fd5b8063efcff00a146102e4578063f04e283e146102f8575f80fd5b8063c0c27230116100a1578063c0c2723014610291578063cbb60852146102b0578063e701fa76146102cf575f80fd5b80638da5cb5b1461023f578063ab15494a14610272575f80fd5b806356d7e8fd11610110578063715018a6116100f6578063715018a6146101f957806378e97954146102015780638170577114610220575f80fd5b806356d7e8fd1461018f5780635e67d452146101da575f80fd5b80632569296214610141578063305ea4161461014b57806335222ff11461017357806354d1f13d14610187575b5f80fd5b61014961036e565b005b348015610156575f80fd5b5061016060015481565b6040519081526020015b60405180910390f35b34801561017e575f80fd5b506101605f5481565b6101496103bb565b34801561019a575f80fd5b506101b5720f3df6d732807ef1319fb7b8bb8522d0beac0281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161016a565b3480156101e5575f80fd5b506101606101f4366004610956565b6103f4565b610149610404565b34801561020c575f80fd5b5061014961021b3660046109e1565b610417565b34801561022b575f80fd5b5061014961023a366004610a3e565b610431565b34801561024a575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546101b5565b34801561027d575f80fd5b5061014961028c366004610a55565b610474565b34801561029c575f80fd5b506101496102ab366004610a3e565b610492565b3480156102bb575f80fd5b506101496102ca366004610b14565b6104cf565b3480156102da575f80fd5b5061016060025481565b3480156102ef575f80fd5b506101606104e3565b610149610306366004610b3e565b6104f2565b610149610319366004610b3e565b61052f565b348015610329575f80fd5b50610149610338366004610a3e565b610555565b348015610348575f80fd5b50610160610357366004610b3e565b63389a75e1600c9081525f91909152602090205490565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f6103fe82610592565b92915050565b61040c6105cd565b6104155f610602565b565b61042b61042385610592565b838386610670565b50505050565b6104396105cd565b5f8190556040518181527fe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21906020015b60405180910390a150565b61048a61048087610592565b838387878a6106e6565b505050505050565b61049a6105cd565b60028190556040518181527f15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e85530154890602001610469565b61042b6104db85610592565b8383866107e1565b5f6104ed42610592565b905090565b6104fa6105cd565b63389a75e1600c52805f526020600c20805442111561052057636f5e88185f526004601cfd5b5f905561052c81610602565b50565b6105376105cd565b8060601b61054c57637448fbae5f526004601cfd5b61052c81610602565b61055d6105cd565b60018190556040518181527febb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff7626490602001610469565b5f815f5260205f60205f720f3df6d732807ef1319fb7b8bb8522d0beac025afa806105c457633033b0ff5f526004601cfd5b50505f51919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610415576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b5f606082901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690506106a98484878460025461084d565b6106df576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b6501000000000067ffffffffffffffff82161061072f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61076e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506108e792505050565b90505f61077c836008610b84565b67ffffffffffffffff165f546107929190610bae565b90506107a187878a858561084d565b6107d7576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050565b5f65ff000000ff00600883811b91821664ff000000ff9185901c91821617601090811b67ff000000ff0000009390931666ff000000ff00009290921691909117901c17602081811c63ffffffff1691901b67ffffffff00000000161760c01b90506106a9848487846001545b5f84156108a9578460051b8601865b6001841660051b8460011c94508461087b57635849603f5f526004601cfd5b85815281356020918218525f60408160025afa80610897575f80fd5b505f51945060200181811061085c5750505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201156108de57631b6661c35f526004601cfd5b50501492915050565b80515f90603014610924576040517f5f4167e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60205f60406020850160025afa806105c4575f80fd5b803567ffffffffffffffff81168114610951575f80fd5b919050565b5f60208284031215610966575f80fd5b61096f8261093a565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610951575f80fd5b5f8083601f8401126109a9575f80fd5b50813567ffffffffffffffff8111156109c0575f80fd5b6020830191508360208260051b85010111156109da575f80fd5b9250929050565b5f805f80606085870312156109f4575f80fd5b6109fd8561093a565b9350610a0b60208601610976565b9250604085013567ffffffffffffffff811115610a26575f80fd5b610a3287828801610999565b95989497509550505050565b5f60208284031215610a4e575f80fd5b5035919050565b5f805f805f8060808789031215610a6a575f80fd5b610a738761093a565b9550610a816020880161093a565b9450604087013567ffffffffffffffff811115610a9c575f80fd5b8701601f81018913610aac575f80fd5b803567ffffffffffffffff811115610ac2575f80fd5b896020828401011115610ad3575f80fd5b60209190910194509250606087013567ffffffffffffffff811115610af6575f80fd5b610b0289828a01610999565b979a9699509497509295939492505050565b5f805f8060608587031215610b27575f80fd5b610b308561093a565b9350610a0b6020860161093a565b5f60208284031215610b4e575f80fd5b61096f82610976565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff8181168382160290811690818114610ba757610ba7610b57565b5092915050565b808201808211156103fe576103fe610b5756fea2646970667358221220df10c90f71c34a556f620246dd6a3ffe6d363911421554cee259c441a7cb599364736f6c634300081a0033", + Bin: "0x6080604052348015600e575f80fd5b50604051610ccc380380610ccc833981016040819052602b91609e565b5f839055600182905560028190556040336047565b50505060c8565b638b78c6d819805415606057630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f805f6060848603121560af575f80fd5b5050815160208301516040909301519094929350919050565b610bf7806100d55f395ff3fe60806040526004361061013d575f3560e01c80638da5cb5b116100bb578063efcff00a11610071578063f2fde38b11610057578063f2fde38b1461030b578063f769afd11461031e578063fee81cf41461033d575f80fd5b8063efcff00a146102e4578063f04e283e146102f8575f80fd5b8063c0c27230116100a1578063c0c2723014610291578063cbb60852146102b0578063e701fa76146102cf575f80fd5b80638da5cb5b1461023f578063ab15494a14610272575f80fd5b806356d7e8fd11610110578063715018a6116100f6578063715018a6146101f957806378e97954146102015780638170577114610220575f80fd5b806356d7e8fd1461018f5780635e67d452146101da575f80fd5b80632569296214610141578063305ea4161461014b57806335222ff11461017357806354d1f13d14610187575b5f80fd5b61014961036e565b005b348015610156575f80fd5b5061016060015481565b6040519081526020015b60405180910390f35b34801561017e575f80fd5b506101605f5481565b6101496103bb565b34801561019a575f80fd5b506101b5720f3df6d732807ef1319fb7b8bb8522d0beac0281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161016a565b3480156101e5575f80fd5b506101606101f4366004610956565b6103f4565b610149610404565b34801561020c575f80fd5b5061014961021b3660046109e1565b610417565b34801561022b575f80fd5b5061014961023a366004610a3e565b610431565b34801561024a575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546101b5565b34801561027d575f80fd5b5061014961028c366004610a55565b610474565b34801561029c575f80fd5b506101496102ab366004610a3e565b610492565b3480156102bb575f80fd5b506101496102ca366004610b14565b6104cf565b3480156102da575f80fd5b5061016060025481565b3480156102ef575f80fd5b506101606104e3565b610149610306366004610b3e565b6104f2565b610149610319366004610b3e565b61052f565b348015610329575f80fd5b50610149610338366004610a3e565b610555565b348015610348575f80fd5b50610160610357366004610b3e565b63389a75e1600c9081525f91909152602090205490565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f6103fe82610592565b92915050565b61040c6105cd565b6104155f610602565b565b61042b61042385610592565b838386610670565b50505050565b6104396105cd565b5f8190556040518181527fe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21906020015b60405180910390a150565b61048a61048087610592565b838387878a6106e6565b505050505050565b61049a6105cd565b60028190556040518181527f15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e85530154890602001610469565b61042b6104db85610592565b8383866107e1565b5f6104ed42610592565b905090565b6104fa6105cd565b63389a75e1600c52805f526020600c20805442111561052057636f5e88185f526004601cfd5b5f905561052c81610602565b50565b6105376105cd565b8060601b61054c57637448fbae5f526004601cfd5b61052c81610602565b61055d6105cd565b60018190556040518181527febb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff7626490602001610469565b5f815f5260205f60205f720f3df6d732807ef1319fb7b8bb8522d0beac025afa806105c457633033b0ff5f526004601cfd5b50505f51919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610415576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b5f606082901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690506106a98484878460025461084d565b6106df576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b6501000000000067ffffffffffffffff82161061072f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61076e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506108e792505050565b90505f61077c836008610b84565b67ffffffffffffffff165f546107929190610bae565b90506107a187878a858561084d565b6107d7576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050565b5f65ff000000ff00600883811b91821664ff000000ff9185901c91821617601090811b67ff000000ff0000009390931666ff000000ff00009290921691909117901c17602081811c63ffffffff1691901b67ffffffff00000000161760c01b90506106a9848487846001545b5f84156108a9578460051b8601865b6001841660051b8460011c94508461087b57635849603f5f526004601cfd5b85815281356020918218525f60408160025afa80610897575f80fd5b505f51945060200181811061085c5750505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201156108de57631b6661c35f526004601cfd5b50501492915050565b80515f90603014610924576040517f5f4167e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60205f60406020850160025afa806105c4575f80fd5b803567ffffffffffffffff81168114610951575f80fd5b919050565b5f60208284031215610966575f80fd5b61096f8261093a565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610951575f80fd5b5f8083601f8401126109a9575f80fd5b50813567ffffffffffffffff8111156109c0575f80fd5b6020830191508360208260051b85010111156109da575f80fd5b9250929050565b5f805f80606085870312156109f4575f80fd5b6109fd8561093a565b9350610a0b60208601610976565b9250604085013567ffffffffffffffff811115610a26575f80fd5b610a3287828801610999565b95989497509550505050565b5f60208284031215610a4e575f80fd5b5035919050565b5f805f805f8060808789031215610a6a575f80fd5b610a738761093a565b9550610a816020880161093a565b9450604087013567ffffffffffffffff811115610a9c575f80fd5b8701601f81018913610aac575f80fd5b803567ffffffffffffffff811115610ac2575f80fd5b896020828401011115610ad3575f80fd5b60209190910194509250606087013567ffffffffffffffff811115610af6575f80fd5b610b0289828a01610999565b979a9699509497509295939492505050565b5f805f8060608587031215610b27575f80fd5b610b308561093a565b9350610a0b6020860161093a565b5f60208284031215610b4e575f80fd5b61096f82610976565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff8181168382160290811690818114610ba757610ba7610b57565b5092915050565b808201808211156103fe576103fe610b5756fea26469706673582212204277a535e42dca01d82f7a275fc22d40d4ab7ae2fdad7309d299900ac418acc664736f6c634300081a0033", } // BeaconVerifierABI is the input ABI used to generate the binding from. diff --git a/testing/e2e/api/api_test.go b/testing/e2e/api/api_test.go index e0c36ff67e..736253fe2b 100644 --- a/testing/e2e/api/api_test.go +++ b/testing/e2e/api/api_test.go @@ -31,5 +31,5 @@ import ( // TestBeaconAPISuite runs the test suite. func TestBeaconAPISuite(t *testing.T) { - suite.Run(t, NewBeaconAPISuite()) + suite.Run(t, new(BeaconAPISuite)) } diff --git a/testing/e2e/e2e_test.go b/testing/e2e/e2e_test.go index 872aee507e..689a45f8b4 100644 --- a/testing/e2e/e2e_test.go +++ b/testing/e2e/e2e_test.go @@ -23,13 +23,7 @@ package e2e_test -import ( - "testing" - - "github.com/berachain/beacon-kit/testing/e2e/suite" -) - -// TestBeaconKitE2ESuite runs the test suite. -func TestBeaconKitE2ESuite(t *testing.T) { - suite.Run(t, new(BeaconKitE2ESuite)) -} +// // TestBeaconKitE2ESuite runs the test suite. +// func TestBeaconKitE2ESuite(t *testing.T) { +// suite.Run(t, new(BeaconKitE2ESuite)) +// } From 961acb96f2d2746cce206254062c7712f115e988 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Sun, 11 Aug 2024 12:00:19 -0400 Subject: [PATCH 23/44] try abs path --- contracts/src/eip4788/BeaconVerifier.sol | 12 ++--- contracts/src/eip4788/SSZ.sol | 8 +-- contracts/src/eip4788/Verifier.sol | 4 +- .../eip4788/interfaces/IBeaconVerifier.sol | 4 +- contracts/test/BeaconDepositContract.t.sol | 8 +-- testing/e2e/e2e_test.go | 8 +-- testing/e2e/suite/setup.go | 6 ++- testing/e2e/suite/utils.go | 54 +++++++++++++++++++ 8 files changed, 72 insertions(+), 32 deletions(-) create mode 100644 testing/e2e/suite/utils.go diff --git a/contracts/src/eip4788/BeaconVerifier.sol b/contracts/src/eip4788/BeaconVerifier.sol index eb9eb41be4..b1559e5ea1 100644 --- a/contracts/src/eip4788/BeaconVerifier.sol +++ b/contracts/src/eip4788/BeaconVerifier.sol @@ -49,9 +49,7 @@ contract BeaconVerifier is Verifier, Ownable, IBeaconVerifier { return true; } - function setZeroValidatorPubkeyGIndex( - uint256 _zeroValidatorPubkeyGIndex - ) + function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) external onlyOwner { @@ -59,9 +57,7 @@ contract BeaconVerifier is Verifier, Ownable, IBeaconVerifier { emit ZeroValidatorPubkeyGIndexChanged(_zeroValidatorPubkeyGIndex); } - function setExecutionNumberGIndex( - uint256 _executionNumberGIndex - ) + function setExecutionNumberGIndex(uint256 _executionNumberGIndex) external onlyOwner { @@ -84,9 +80,7 @@ contract BeaconVerifier is Verifier, Ownable, IBeaconVerifier { /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @inheritdoc IBeaconVerifier - function getParentBeaconBlockRootAt( - uint64 timestamp - ) + function getParentBeaconBlockRootAt(uint64 timestamp) external view returns (bytes32) diff --git a/contracts/src/eip4788/SSZ.sol b/contracts/src/eip4788/SSZ.sol index 6e9c90994d..ba842fe904 100644 --- a/contracts/src/eip4788/SSZ.sol +++ b/contracts/src/eip4788/SSZ.sol @@ -12,9 +12,7 @@ library SSZ { error BranchHasExtraItem(); error InvalidValidatorPubkeyLength(); - function validatorPubkeyHashTreeRoot( - bytes memory pubkey - ) + function validatorPubkeyHashTreeRoot(bytes memory pubkey) internal view returns (bytes32 root) @@ -34,9 +32,7 @@ library SSZ { } } - function addressHashTreeRoot( - address v - ) + function addressHashTreeRoot(address v) internal pure returns (bytes32 root) diff --git a/contracts/src/eip4788/Verifier.sol b/contracts/src/eip4788/Verifier.sol index 73cc778e63..68dd04e479 100644 --- a/contracts/src/eip4788/Verifier.sol +++ b/contracts/src/eip4788/Verifier.sol @@ -10,9 +10,7 @@ abstract contract Verifier { error InvalidProof(); error RootNotFound(); - function getParentBlockRoot( - uint64 ts - ) + function getParentBlockRoot(uint64 ts) internal view returns (bytes32 root) diff --git a/contracts/src/eip4788/interfaces/IBeaconVerifier.sol b/contracts/src/eip4788/interfaces/IBeaconVerifier.sol index d950638376..a3eefc6841 100644 --- a/contracts/src/eip4788/interfaces/IBeaconVerifier.sol +++ b/contracts/src/eip4788/interfaces/IBeaconVerifier.sol @@ -32,9 +32,7 @@ interface IBeaconVerifier { function executionFeeRecipientGIndex() external view returns (uint256); /// @notice Get the parent beacon block root from the given timestamp. - function getParentBeaconBlockRootAt( - uint64 timestamp - ) + function getParentBeaconBlockRootAt(uint64 timestamp) external view returns (bytes32); diff --git a/contracts/test/BeaconDepositContract.t.sol b/contracts/test/BeaconDepositContract.t.sol index 192b38aabc..947bd640e2 100644 --- a/contracts/test/BeaconDepositContract.t.sol +++ b/contracts/test/BeaconDepositContract.t.sol @@ -60,9 +60,7 @@ contract DepositContractTest is SoladyTest { ); } - function testFuzz_DepositWrongCredentials( - bytes calldata credentials - ) + function testFuzz_DepositWrongCredentials(bytes calldata credentials) public { vm.assume(credentials.length != 32); @@ -119,9 +117,7 @@ contract DepositContractTest is SoladyTest { ); } - function testFuzz_DepositNativeWrongMinAmount( - uint256 amountInEther - ) + function testFuzz_DepositNativeWrongMinAmount(uint256 amountInEther) public { amountInEther = _bound(amountInEther, 1, 31); diff --git a/testing/e2e/e2e_test.go b/testing/e2e/e2e_test.go index 689a45f8b4..e9a53ba997 100644 --- a/testing/e2e/e2e_test.go +++ b/testing/e2e/e2e_test.go @@ -23,7 +23,7 @@ package e2e_test -// // TestBeaconKitE2ESuite runs the test suite. -// func TestBeaconKitE2ESuite(t *testing.T) { -// suite.Run(t, new(BeaconKitE2ESuite)) -// } +// TestBeaconKitE2ESuite runs the test suite. +func TestBeaconKitE2ESuite(t *testing.T) { + suite.Run(t, new(BeaconKitE2ESuite)) +} diff --git a/testing/e2e/suite/setup.go b/testing/e2e/suite/setup.go index c2dcb5f4c3..88af6042c5 100644 --- a/testing/e2e/suite/setup.go +++ b/testing/e2e/suite/setup.go @@ -112,9 +112,13 @@ func (s *KurtosisE2ESuite) SetupSuiteWithOptions(opts ...Option) { "num_full_nodes", len(s.cfg.NetworkConfiguration.FullNodes.Nodes), ) + + packageRootPath, err := GetRelativePathToKurtosis() + s.Require().NoError(err, "Error getting relative path to kurtosis") + result, err := s.enclave.RunStarlarkPackageBlocking( s.ctx, - "../../kurtosis", + packageRootPath, starlark_run_config.NewRunStarlarkConfig( starlark_run_config.WithSerializedParams( string(s.cfg.MustMarshalJSON()), diff --git a/testing/e2e/suite/utils.go b/testing/e2e/suite/utils.go new file mode 100644 index 0000000000..828c30850e --- /dev/null +++ b/testing/e2e/suite/utils.go @@ -0,0 +1,54 @@ +// 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 suite + +import ( + "path/filepath" + "runtime" + + "github.com/berachain/beacon-kit/mod/errors" +) + +// GetRelativePathToKurtosis returns the relative path to the kurtosis folder +// at the project root. +func GetRelativePathToKurtosis() (string, error) { + // Get the current file path + _, currentFile, _, ok := runtime.Caller(0) + if !ok { + return "", errors.New("failed to get current file path") + } + + // Get the directory of the current file + currentDir := filepath.Dir(currentFile) + + // Define the target directory (kurtosis folder at project root) + targetDir := filepath.Join( + filepath.Dir(filepath.Dir(filepath.Dir(currentDir))), "kurtosis", + ) + + // Calculate the relative path + relPath, err := filepath.Rel(currentDir, targetDir) + if err != nil { + return "", errors.Wrap(err, "failed to calculate relative path") + } + + return relPath, nil +} From ad2e25df07eedb37f34059e3a6012fca2dc67e92 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Sun, 11 Aug 2024 12:05:15 -0400 Subject: [PATCH 24/44] lint --- testing/e2e/e2e_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testing/e2e/e2e_test.go b/testing/e2e/e2e_test.go index e9a53ba997..872aee507e 100644 --- a/testing/e2e/e2e_test.go +++ b/testing/e2e/e2e_test.go @@ -23,6 +23,12 @@ package e2e_test +import ( + "testing" + + "github.com/berachain/beacon-kit/testing/e2e/suite" +) + // TestBeaconKitE2ESuite runs the test suite. func TestBeaconKitE2ESuite(t *testing.T) { suite.Run(t, new(BeaconKitE2ESuite)) From 2797ec520b0309aa7976a482fd325e01fefcb976 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Sun, 11 Aug 2024 12:40:39 -0400 Subject: [PATCH 25/44] move api tests into e2e packaghe --- build/scripts/testing.mk | 2 +- testing/e2e/api/api_test.go | 35 ------------ .../api_suite_test.go => e2e_api_test.go} | 11 +--- testing/e2e/suite/setup.go | 5 +- testing/e2e/suite/utils.go | 54 ------------------- 5 files changed, 4 insertions(+), 103 deletions(-) delete mode 100644 testing/e2e/api/api_test.go rename testing/e2e/{api/api_suite_test.go => e2e_api_test.go} (85%) delete mode 100644 testing/e2e/suite/utils.go diff --git a/build/scripts/testing.mk b/build/scripts/testing.mk index 0086995a1f..31a9ac86e1 100644 --- a/build/scripts/testing.mk +++ b/build/scripts/testing.mk @@ -253,4 +253,4 @@ test-e2e: ## run e2e tests @$(MAKE) build-docker VERSION=kurtosis-local test-e2e-no-build test-e2e-no-build: - go test -tags e2e,api,bls12381 ./testing/e2e/... -v \ No newline at end of file + go test -tags e2e,bls12381 ./testing/e2e/. -v \ No newline at end of file diff --git a/testing/e2e/api/api_test.go b/testing/e2e/api/api_test.go deleted file mode 100644 index 736253fe2b..0000000000 --- a/testing/e2e/api/api_test.go +++ /dev/null @@ -1,35 +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. - -//go:build e2e -// +build e2e - -package api_test - -import ( - "testing" - - "github.com/berachain/beacon-kit/testing/e2e/suite" -) - -// TestBeaconAPISuite runs the test suite. -func TestBeaconAPISuite(t *testing.T) { - suite.Run(t, new(BeaconAPISuite)) -} diff --git a/testing/e2e/api/api_suite_test.go b/testing/e2e/e2e_api_test.go similarity index 85% rename from testing/e2e/api/api_suite_test.go rename to testing/e2e/e2e_api_test.go index 9bd71a2bcf..aee16f26ad 100644 --- a/testing/e2e/api/api_suite_test.go +++ b/testing/e2e/e2e_api_test.go @@ -18,22 +18,15 @@ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND // TITLE. -package api_test +package e2e_test import ( "github.com/berachain/beacon-kit/testing/e2e/config" - "github.com/berachain/beacon-kit/testing/e2e/suite" ) -// BeaconAPISuite is a suite of beacon node-api tests with full simulation of a -// beacon-kit network. -type BeaconAPISuite struct { - suite.KurtosisE2ESuite -} - // TestBeaconAPISuite tests that the api test suite is setup correctly with a // working beacon node-api client. -func (s *BeaconAPISuite) TestBeaconAPISuite() { +func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { executionBlockNum := uint64(5) // Wait for execution block 5. diff --git a/testing/e2e/suite/setup.go b/testing/e2e/suite/setup.go index 88af6042c5..397e13fc68 100644 --- a/testing/e2e/suite/setup.go +++ b/testing/e2e/suite/setup.go @@ -113,12 +113,9 @@ func (s *KurtosisE2ESuite) SetupSuiteWithOptions(opts ...Option) { len(s.cfg.NetworkConfiguration.FullNodes.Nodes), ) - packageRootPath, err := GetRelativePathToKurtosis() - s.Require().NoError(err, "Error getting relative path to kurtosis") - result, err := s.enclave.RunStarlarkPackageBlocking( s.ctx, - packageRootPath, + "../../kurtosis", starlark_run_config.NewRunStarlarkConfig( starlark_run_config.WithSerializedParams( string(s.cfg.MustMarshalJSON()), diff --git a/testing/e2e/suite/utils.go b/testing/e2e/suite/utils.go deleted file mode 100644 index 828c30850e..0000000000 --- a/testing/e2e/suite/utils.go +++ /dev/null @@ -1,54 +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 suite - -import ( - "path/filepath" - "runtime" - - "github.com/berachain/beacon-kit/mod/errors" -) - -// GetRelativePathToKurtosis returns the relative path to the kurtosis folder -// at the project root. -func GetRelativePathToKurtosis() (string, error) { - // Get the current file path - _, currentFile, _, ok := runtime.Caller(0) - if !ok { - return "", errors.New("failed to get current file path") - } - - // Get the directory of the current file - currentDir := filepath.Dir(currentFile) - - // Define the target directory (kurtosis folder at project root) - targetDir := filepath.Join( - filepath.Dir(filepath.Dir(filepath.Dir(currentDir))), "kurtosis", - ) - - // Calculate the relative path - relPath, err := filepath.Rel(currentDir, targetDir) - if err != nil { - return "", errors.Wrap(err, "failed to calculate relative path") - } - - return relPath, nil -} From e7e2b14964145c83a6090e7a542f5ce064ae05ef Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Sun, 11 Aug 2024 14:28:34 -0400 Subject: [PATCH 26/44] go-eth2-client --- mod/node-api/handlers/config/placeholders.go | 45 ++++++++++++ mod/node-api/handlers/config/routes.go | 2 +- testing/e2e/e2e_api_test.go | 7 +- testing/e2e/suite/types/consensus_client.go | 74 ++++++++++---------- 4 files changed, 86 insertions(+), 42 deletions(-) create mode 100644 mod/node-api/handlers/config/placeholders.go diff --git a/mod/node-api/handlers/config/placeholders.go b/mod/node-api/handlers/config/placeholders.go new file mode 100644 index 0000000000..01c0b65a99 --- /dev/null +++ b/mod/node-api/handlers/config/placeholders.go @@ -0,0 +1,45 @@ +// 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 config + +// Spec is a placeholder so that beacon API clients don't break. +// +// TODO: Implement with real data. +func (h *Handler[ContextT]) Spec(ContextT) (any, error) { + type SpecResponse struct { + Data map[string]string `json:"data"` + } + + response := SpecResponse{ + Data: map[string]string{ + "DEPOSIT_NETWORK_ID": "80087", + "DOMAIN_AGGREGATE_AND_PROOF": "0x06000000", + "INACTIVITY_PENALTY_QUOTIENT": "67108864", + "INACTIVITY_PENALTY_QUOTIENT_ALTAIR": "50331648", + "SLOTS_PER_EPOCH": "8192", + "SECONDS_PER_SLOT": "2", + }, + } + response.Data["DEPOSIT_CONTRACT_ADDRESS"] = + "0x4242424242424242424242424242424242424242" + + return response, nil +} diff --git a/mod/node-api/handlers/config/routes.go b/mod/node-api/handlers/config/routes.go index d863ed9f82..5b58fcbc31 100644 --- a/mod/node-api/handlers/config/routes.go +++ b/mod/node-api/handlers/config/routes.go @@ -40,7 +40,7 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/config/spec", - Handler: h.NotImplemented, + Handler: h.Spec, }, { Method: http.MethodGet, diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index aee16f26ad..806a49ac84 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -37,9 +37,8 @@ func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { client := s.ConsensusClients()[config.DefaultClient] s.Require().NotNil(client) - // Get the latest beacon block. - slot, htr, err := client.GetLatestBeaconBlock(s.Ctx()) + // Get the beacon validators. + validators, err := client.GetBeaconValidators(s.Ctx()) s.Require().NoError(err) - s.Require().GreaterOrEqual(slot, executionBlockNum) - s.Require().NotEmpty(htr) + s.Require().NotEmpty(validators) } diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index b3db3f8da7..908d469e15 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -23,22 +23,19 @@ package types import ( "context" "fmt" - "time" "github.com/berachain/beacon-kit/mod/errors" - "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/node-api/handlers/utils" + // "github.com/berachain/beacon-kit/mod/primitives/pkg/common" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + beaconapi "github.com/attestantio/go-eth2-client/api/v1" + beaconhttp "github.com/attestantio/go-eth2-client/http" + rpcclient "github.com/cometbft/cometbft/rpc/client" httpclient "github.com/cometbft/cometbft/rpc/client/http" - "github.com/ethpandaops/beacon/pkg/beacon" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/enclaves" - "github.com/sirupsen/logrus" -) - -const ( - // connTimeout is the timeout for the connection to the consensus client. - connTimeout = 15 * time.Second + "github.com/rs/zerolog" ) // ConsensusClient represents a consensus client. @@ -49,7 +46,10 @@ type ConsensusClient struct { rpcclient.Client // Beacon node-api client - beacon.Node + *beaconhttp.Service + + // Cancel function for the context + cancelFunc context.CancelFunc } // NewConsensusClient creates a new consensus client. @@ -84,17 +84,22 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { if !ok { panic("Couldn't find the public port for the node API") } - opts := beacon.DefaultOptions() - opts.DisablePrometheusMetrics() - time.Sleep(connTimeout) - cc.Node = beacon.NewNode(logrus.New(), &beacon.Config{ - Addr: fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), - Name: "beacon node", - }, "eth", *opts) - - timeoutCtx, cancel := context.WithTimeout(ctx, connTimeout) - defer cancel() - return cc.Node.Start(timeoutCtx) + cancelCtx, cancel := context.WithCancel(ctx) + service, err := beaconhttp.New( + cancelCtx, + beaconhttp.WithAddress( + fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), + ), + beaconhttp.WithLogLevel(zerolog.WarnLevel), + ) + if err != nil { + cancel() + return err + } + cc.Service = service.(*beaconhttp.Service) + cc.cancelFunc = cancel + + return nil } // Start starts the consensus client. @@ -114,6 +119,7 @@ func (cc ConsensusClient) Start( func (cc ConsensusClient) Stop( ctx context.Context, ) (*enclaves.StarlarkRunResult, error) { + cc.cancelFunc() return cc.WrappedServiceContext.Stop(ctx) } @@ -152,24 +158,18 @@ func (cc ConsensusClient) IsActive(ctx context.Context) (bool, error) { return res.ValidatorInfo.VotingPower > 0, nil } -// Returns the latest beacon block's slot and hash tree root. -func (cc ConsensusClient) GetLatestBeaconBlock( +// Returns the current beacon validators from beacon node-api. +func (cc ConsensusClient) GetBeaconValidators( ctx context.Context, -) (math.Slot, common.Root, error) { - block, err := cc.Node.FetchBlock(ctx, utils.StateIDHead) - if err != nil { - return 0, common.Root{}, err - } - - slot, err := block.Slot() +) (map[math.ValidatorIndex]*beaconapi.Validator, error) { + res, err := cc.Service.Validators(ctx, nil) if err != nil { - return 0, common.Root{}, err + return nil, err } - htr, err := block.Root() - if err != nil { - return 0, common.Root{}, err + validators := make(map[math.ValidatorIndex]*beaconapi.Validator) + for idx, validator := range res.Data { + validators[math.ValidatorIndex(idx)] = validator } - - return math.Slot(slot), common.Root(htr), nil + return validators, nil } From dae352abaccc90aa4f620d4f83bc5156f9ec0e1e Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Sun, 11 Aug 2024 14:41:40 -0400 Subject: [PATCH 27/44] lint --- testing/e2e/suite/types/consensus_client.go | 24 +++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index 908d469e15..efa9075d00 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -24,14 +24,11 @@ import ( "context" "fmt" + beaconapi "github.com/attestantio/go-eth2-client/api" + apiv1 "github.com/attestantio/go-eth2-client/api/v1" + beaconhttp "github.com/attestantio/go-eth2-client/http" "github.com/berachain/beacon-kit/mod/errors" - // "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/math" - - beaconapi "github.com/attestantio/go-eth2-client/api/v1" - beaconhttp "github.com/attestantio/go-eth2-client/http" - 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" @@ -90,13 +87,16 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { beaconhttp.WithAddress( fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), ), - beaconhttp.WithLogLevel(zerolog.WarnLevel), + beaconhttp.WithLogLevel(zerolog.DebugLevel), ) if err != nil { cancel() return err } - cc.Service = service.(*beaconhttp.Service) + cc.Service, ok = service.(*beaconhttp.Service) + if !ok { + panic("failed to cast beacon node-api service to beaconhttp.Service") + } cc.cancelFunc = cancel return nil @@ -161,13 +161,15 @@ func (cc ConsensusClient) IsActive(ctx context.Context) (bool, error) { // Returns the current beacon validators from beacon node-api. func (cc ConsensusClient) GetBeaconValidators( ctx context.Context, -) (map[math.ValidatorIndex]*beaconapi.Validator, error) { - res, err := cc.Service.Validators(ctx, nil) +) (map[math.ValidatorIndex]*apiv1.Validator, error) { + res, err := cc.Service.Validators(ctx, &beaconapi.ValidatorsOpts{ + State: "head", + }) if err != nil { return nil, err } - validators := make(map[math.ValidatorIndex]*beaconapi.Validator) + validators := make(map[math.ValidatorIndex]*apiv1.Validator) for idx, validator := range res.Data { validators[math.ValidatorIndex(idx)] = validator } From 1a0f07a77035223a82356090bf6c393f58a32788 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 14:44:39 -0400 Subject: [PATCH 28/44] bet --- contracts/src/eip4788/BeaconVerifier.sol | 12 ++++++--- contracts/src/eip4788/SSZ.sol | 8 ++++-- contracts/src/eip4788/Verifier.sol | 4 ++- .../eip4788/interfaces/IBeaconVerifier.sol | 4 ++- contracts/test/BeaconDepositContract.t.sol | 8 ++++-- mod/node-api/backend/validator.go | 2 +- testing/e2e/e2e_api_test.go | 14 ++++++++--- testing/e2e/suite/types/consensus_client.go | 25 +++---------------- 8 files changed, 43 insertions(+), 34 deletions(-) diff --git a/contracts/src/eip4788/BeaconVerifier.sol b/contracts/src/eip4788/BeaconVerifier.sol index b1559e5ea1..eb9eb41be4 100644 --- a/contracts/src/eip4788/BeaconVerifier.sol +++ b/contracts/src/eip4788/BeaconVerifier.sol @@ -49,7 +49,9 @@ contract BeaconVerifier is Verifier, Ownable, IBeaconVerifier { return true; } - function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) + function setZeroValidatorPubkeyGIndex( + uint256 _zeroValidatorPubkeyGIndex + ) external onlyOwner { @@ -57,7 +59,9 @@ contract BeaconVerifier is Verifier, Ownable, IBeaconVerifier { emit ZeroValidatorPubkeyGIndexChanged(_zeroValidatorPubkeyGIndex); } - function setExecutionNumberGIndex(uint256 _executionNumberGIndex) + function setExecutionNumberGIndex( + uint256 _executionNumberGIndex + ) external onlyOwner { @@ -80,7 +84,9 @@ contract BeaconVerifier is Verifier, Ownable, IBeaconVerifier { /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @inheritdoc IBeaconVerifier - function getParentBeaconBlockRootAt(uint64 timestamp) + function getParentBeaconBlockRootAt( + uint64 timestamp + ) external view returns (bytes32) diff --git a/contracts/src/eip4788/SSZ.sol b/contracts/src/eip4788/SSZ.sol index ba842fe904..6e9c90994d 100644 --- a/contracts/src/eip4788/SSZ.sol +++ b/contracts/src/eip4788/SSZ.sol @@ -12,7 +12,9 @@ library SSZ { error BranchHasExtraItem(); error InvalidValidatorPubkeyLength(); - function validatorPubkeyHashTreeRoot(bytes memory pubkey) + function validatorPubkeyHashTreeRoot( + bytes memory pubkey + ) internal view returns (bytes32 root) @@ -32,7 +34,9 @@ library SSZ { } } - function addressHashTreeRoot(address v) + function addressHashTreeRoot( + address v + ) internal pure returns (bytes32 root) diff --git a/contracts/src/eip4788/Verifier.sol b/contracts/src/eip4788/Verifier.sol index 68dd04e479..73cc778e63 100644 --- a/contracts/src/eip4788/Verifier.sol +++ b/contracts/src/eip4788/Verifier.sol @@ -10,7 +10,9 @@ abstract contract Verifier { error InvalidProof(); error RootNotFound(); - function getParentBlockRoot(uint64 ts) + function getParentBlockRoot( + uint64 ts + ) internal view returns (bytes32 root) diff --git a/contracts/src/eip4788/interfaces/IBeaconVerifier.sol b/contracts/src/eip4788/interfaces/IBeaconVerifier.sol index a3eefc6841..d950638376 100644 --- a/contracts/src/eip4788/interfaces/IBeaconVerifier.sol +++ b/contracts/src/eip4788/interfaces/IBeaconVerifier.sol @@ -32,7 +32,9 @@ interface IBeaconVerifier { function executionFeeRecipientGIndex() external view returns (uint256); /// @notice Get the parent beacon block root from the given timestamp. - function getParentBeaconBlockRootAt(uint64 timestamp) + function getParentBeaconBlockRootAt( + uint64 timestamp + ) external view returns (bytes32); diff --git a/contracts/test/BeaconDepositContract.t.sol b/contracts/test/BeaconDepositContract.t.sol index 947bd640e2..192b38aabc 100644 --- a/contracts/test/BeaconDepositContract.t.sol +++ b/contracts/test/BeaconDepositContract.t.sol @@ -60,7 +60,9 @@ contract DepositContractTest is SoladyTest { ); } - function testFuzz_DepositWrongCredentials(bytes calldata credentials) + function testFuzz_DepositWrongCredentials( + bytes calldata credentials + ) public { vm.assume(credentials.length != 32); @@ -117,7 +119,9 @@ contract DepositContractTest is SoladyTest { ); } - function testFuzz_DepositNativeWrongMinAmount(uint256 amountInEther) + function testFuzz_DepositNativeWrongMinAmount( + uint256 amountInEther + ) public { amountInEther = _bound(amountInEther, 1, 31); diff --git a/mod/node-api/backend/validator.go b/mod/node-api/backend/validator.go index 67755397ca..9efcf61c56 100644 --- a/mod/node-api/backend/validator.go +++ b/mod/node-api/backend/validator.go @@ -55,7 +55,7 @@ func (b Backend[ Index: index.Unwrap(), Balance: balance.Unwrap(), }, - Status: "active", // TODO: fix + Status: "active_ongoing", // TODO: fix Validator: validator, }, nil } diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index 806a49ac84..f7eaad0254 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -21,7 +21,10 @@ package e2e_test import ( + "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" "github.com/berachain/beacon-kit/testing/e2e/config" + + beaconapi "github.com/attestantio/go-eth2-client/api" ) // TestBeaconAPISuite tests that the api test suite is setup correctly with a @@ -37,8 +40,13 @@ func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { client := s.ConsensusClients()[config.DefaultClient] s.Require().NotNil(client) - // Get the beacon validators. - validators, err := client.GetBeaconValidators(s.Ctx()) + // Ensure the state root is not nil. + stateRoot, err := client.BeaconStateRoot( + s.Ctx(), + &beaconapi.BeaconStateRootOpts{ + State: utils.StateIDHead, + }, + ) s.Require().NoError(err) - s.Require().NotEmpty(validators) + s.Require().NotEmpty(stateRoot) } diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index efa9075d00..30a80774ee 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -24,11 +24,9 @@ import ( "context" "fmt" - beaconapi "github.com/attestantio/go-eth2-client/api" - apiv1 "github.com/attestantio/go-eth2-client/api/v1" - beaconhttp "github.com/attestantio/go-eth2-client/http" "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/math" + + beaconhttp "github.com/attestantio/go-eth2-client/http" 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" @@ -158,20 +156,5 @@ func (cc ConsensusClient) IsActive(ctx context.Context) (bool, error) { return res.ValidatorInfo.VotingPower > 0, nil } -// Returns the current beacon validators from beacon node-api. -func (cc ConsensusClient) GetBeaconValidators( - ctx context.Context, -) (map[math.ValidatorIndex]*apiv1.Validator, error) { - res, err := cc.Service.Validators(ctx, &beaconapi.ValidatorsOpts{ - State: "head", - }) - if err != nil { - return nil, err - } - - validators := make(map[math.ValidatorIndex]*apiv1.Validator) - for idx, validator := range res.Data { - validators[math.ValidatorIndex(idx)] = validator - } - return validators, nil -} +// TODO: Add helpers for the beacon node-api client (converting from +// go-eth2-client types to beacon-kit consensus types). From bc02d827132c2fefe32ed48104c94d8a663198c7 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 15:03:43 -0400 Subject: [PATCH 29/44] client --- mod/node-api/client/{node.go => client.go} | 34 +++++++++---- mod/node-api/client/interface.go | 54 +++++++++++++++++++-- testing/e2e/e2e_api_test.go | 3 +- testing/e2e/suite/types/consensus_client.go | 14 ++---- 4 files changed, 81 insertions(+), 24 deletions(-) rename mod/node-api/client/{node.go => client.go} (65%) diff --git a/mod/node-api/client/node.go b/mod/node-api/client/client.go similarity index 65% rename from mod/node-api/client/node.go rename to mod/node-api/client/client.go index 374c52debd..71db99d41f 100644 --- a/mod/node-api/client/node.go +++ b/mod/node-api/client/client.go @@ -21,16 +21,30 @@ package client import ( - "github.com/ethpandaops/beacon/pkg/beacon" - "github.com/sirupsen/logrus" + "context" + + "github.com/berachain/beacon-kit/mod/errors" + + beaconhttp "github.com/attestantio/go-eth2-client/http" ) -// NewNode creates a new BeaconKitNode instance. -func NewNode( - log logrus.FieldLogger, - config *beacon.Config, - namespace string, - options beacon.Options, -) BeaconKitNode { - return beacon.NewNode(log, config, namespace, options) +// New creates a new BeaconKitNode client instance with a given cancel context. +func New( + cancelCtx context.Context, + params ...beaconhttp.Parameter, +) (BeaconKitNode, error) { + service, err := beaconhttp.New( + cancelCtx, + params..., + ) + if err != nil { + return nil, err + } + + client, ok := service.(BeaconKitNode) + if !ok { + return nil, errors.New("failed to cast service to BeaconKitNode") + } + + return client, nil } diff --git a/mod/node-api/client/interface.go b/mod/node-api/client/interface.go index c4bbd16d28..695bf97be4 100644 --- a/mod/node-api/client/interface.go +++ b/mod/node-api/client/interface.go @@ -21,13 +21,61 @@ package client import ( - "github.com/ethpandaops/beacon/pkg/beacon" + client "github.com/attestantio/go-eth2-client" ) -// BeaconKitNode is a wrapper around the beacon.Node interface to add +// BeaconKitNode is a wrapper around the client.Service interface to add // additional methods specific to a beacon-kit node's API. type BeaconKitNode interface { - beacon.Node + client.Service + client.FarFutureEpochProvider + client.ValidatorIDProvider + client.SignedBeaconBlockProvider + client.BlobSidecarsProvider + client.BeaconCommitteesProvider + client.SyncCommitteesProvider + client.AggregateAttestationProvider + client.AggregateAttestationsSubmitter + client.AttestationDataProvider + client.AttestationPoolProvider + client.AttestationsSubmitter + client.AttesterSlashingSubmitter + client.AttesterDutiesProvider + client.SyncCommitteeDutiesProvider + client.SyncCommitteeMessagesSubmitter + client.SyncCommitteeSubscriptionsSubmitter + client.SyncCommitteeContributionProvider + client.SyncCommitteeContributionsSubmitter + client.BLSToExecutionChangesSubmitter + client.BeaconBlockHeadersProvider + client.ProposalProvider + client.ProposalSlashingSubmitter + client.BeaconBlockRootProvider + client.ProposalSubmitter + client.BeaconCommitteeSubscriptionsSubmitter + client.BeaconStateProvider + client.BeaconStateRandaoProvider + client.BeaconStateRootProvider + client.BlindedProposalSubmitter + client.ValidatorRegistrationsSubmitter + client.EventsProvider + client.FinalityProvider + client.ForkChoiceProvider + client.ForkProvider + client.ForkScheduleProvider + client.GenesisProvider + client.NodePeersProvider + client.NodeSyncingProvider + client.NodeVersionProvider + client.ProposalPreparationsSubmitter + client.ProposerDutiesProvider + client.SpecProvider + client.ValidatorBalancesProvider + client.ValidatorsProvider + client.VoluntaryExitSubmitter + client.VoluntaryExitPoolProvider + client.DomainProvider + client.NodeClientProvider // Other beacon-kit node-api methods here... } diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index f7eaad0254..0afe2cbfcc 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -21,10 +21,9 @@ 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/testing/e2e/config" - - beaconapi "github.com/attestantio/go-eth2-client/api" ) // TestBeaconAPISuite tests that the api test suite is setup correctly with a diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index 30a80774ee..843fabd47c 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -24,9 +24,9 @@ import ( "context" "fmt" - "github.com/berachain/beacon-kit/mod/errors" - beaconhttp "github.com/attestantio/go-eth2-client/http" + "github.com/berachain/beacon-kit/mod/errors" + bclient "github.com/berachain/beacon-kit/mod/node-api/client" 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" @@ -41,7 +41,7 @@ type ConsensusClient struct { rpcclient.Client // Beacon node-api client - *beaconhttp.Service + bclient.BeaconKitNode // Cancel function for the context cancelFunc context.CancelFunc @@ -80,7 +80,7 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { panic("Couldn't find the public port for the node API") } cancelCtx, cancel := context.WithCancel(ctx) - service, err := beaconhttp.New( + cc.BeaconKitNode, err = bclient.New( cancelCtx, beaconhttp.WithAddress( fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), @@ -91,10 +91,6 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { cancel() return err } - cc.Service, ok = service.(*beaconhttp.Service) - if !ok { - panic("failed to cast beacon node-api service to beaconhttp.Service") - } cc.cancelFunc = cancel return nil @@ -156,5 +152,5 @@ func (cc ConsensusClient) IsActive(ctx context.Context) (bool, error) { return res.ValidatorInfo.VotingPower > 0, nil } -// TODO: Add helpers for the beacon node-api client (converting from +// TODO: Add helpers for the beacon node-api client (converting from // go-eth2-client types to beacon-kit consensus types). From 81ed3a58726653fdf19c30c72305daa1552bebf3 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 15:07:01 -0400 Subject: [PATCH 30/44] tidy sync --- mod/node-api/go.mod | 9 +-------- mod/node-api/go.sum | 17 ----------------- testing/go.mod | 16 ++++++---------- testing/go.sum | 12 ------------ 4 files changed, 7 insertions(+), 47 deletions(-) diff --git a/mod/node-api/go.mod b/mod/node-api/go.mod index 65648e405d..6305d0afc4 100644 --- a/mod/node-api/go.mod +++ b/mod/node-api/go.mod @@ -3,13 +3,12 @@ module github.com/berachain/beacon-kit/mod/node-api go 1.22.5 require ( + github.com/attestantio/go-eth2-client v0.21.9 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240808194557-e72e74f58197 github.com/berachain/beacon-kit/mod/state-transition v0.0.0-20240717225334-64ec6650da31 - github.com/ethpandaops/beacon v0.39.0 github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 - github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 ) @@ -17,7 +16,6 @@ require ( github.com/DataDog/zstd v1.5.6 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect - github.com/attestantio/go-eth2-client v0.21.9 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/berachain/beacon-kit/mod/chain-spec v0.0.0-20240705193247-d464364483df // indirect github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240808194557-e72e74f58197 // indirect @@ -25,7 +23,6 @@ require ( github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -42,11 +39,9 @@ require ( github.com/ethereum/c-kzg-4844 v1.0.3 // indirect github.com/ethereum/go-ethereum v1.14.7 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect - github.com/ethpandaops/ethwallclock v0.2.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/getsentry/sentry-go v0.28.1 // indirect - github.com/go-co-op/gocron v1.16.2 // indirect github.com/go-faster/xor v1.0.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -85,12 +80,10 @@ require ( github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b // indirect github.com/r3labs/sse/v2 v2.10.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/zerolog v1.33.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect - github.com/spf13/cast v1.6.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect diff --git a/mod/node-api/go.sum b/mod/node-api/go.sum index cf25ba6dab..cd8af0c973 100644 --- a/mod/node-api/go.sum +++ b/mod/node-api/go.sum @@ -33,8 +33,6 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtyd github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 h1:xz6Nv3zcwO2Lila35hcb0QloCQsc38Al13RNEzWRpX4= -github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9/go.mod h1:2wSM9zJkl1UQEFZgSd68NfCgRz1VL1jzy/RjCg+ULrs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -78,17 +76,11 @@ github.com/ethereum/go-ethereum v1.14.7 h1:EHpv3dE8evQmpVEQ/Ne2ahB06n2mQptdwqaMN github.com/ethereum/go-ethereum v1.14.7/go.mod h1:Mq0biU2jbdmKSZoqOj29017ygFrMnB5/Rifwp980W4o= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= -github.com/ethpandaops/beacon v0.39.0 h1:D0ewcc5L/Rfyit8wXSYmNCo9KPj+wdACr1YqkdZlwaA= -github.com/ethpandaops/beacon v0.39.0/go.mod h1:vYeQUrplQLR3P1DjwLjKfpRPIDpxNUxIwIvvEHsjM+Y= -github.com/ethpandaops/ethwallclock v0.2.0 h1:EeFKtZ7v6TAdn/oAh0xaPujD7N4amjBxrWIByraUfLM= -github.com/ethpandaops/ethwallclock v0.2.0/go.mod h1:y0Cu+mhGLlem19vnAV2x0hpFS5KZ7oOi2SWYayv9l24= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 h1:oMYkNRlaY+YxcbYW4U84mQQkujiloBbxQFnTOHUbkec= github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79/go.mod h1:EGSbefgAPd3M0hlBwOCw4Mkj+0YAaSnXw1QeLasY6XQ= -github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= -github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= @@ -98,8 +90,6 @@ github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= -github.com/go-co-op/gocron v1.16.2 h1:p9ghzsN5PqqPyWXYDO2JlvD1DOUNT8pPSyGYC62XBcY= -github.com/go-co-op/gocron v1.16.2/go.mod h1:W/N9G7bntRo5fVQlmjncvqSt74jxCxHfjyHlgcB33T8= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/xor v1.0.0 h1:2o8vTOgErSGHP3/7XwA5ib1FTtUsNtwCoLLBjl31X38= @@ -252,8 +242,6 @@ github.com/r3labs/sse/v2 v2.10.0/go.mod h1:Igau6Whc+F17QUgML1fYe1VPZzTV6EMCnYktE github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= -github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -262,12 +250,8 @@ github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= -github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= @@ -344,7 +328,6 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/testing/go.mod b/testing/go.mod index db6eb87ca2..989dae0a6b 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -6,6 +6,7 @@ replace ( // The following are required to build with the latest version of the cosmos-sdk main branch: cosmossdk.io/api => cosmossdk.io/api v0.7.3-0.20240806152830-8fb47b368cd4 cosmossdk.io/core/testing => cosmossdk.io/core/testing v0.0.0-20240806152830-8fb47b368cd4 + github.com/berachain/beacon-kit/mod/node-api => ../mod/node-api github.com/cosmos/cosmos-sdk => github.com/berachain/cosmos-sdk v0.46.0-beta2.0.20240808182639-7bdbf06a94f2 ) @@ -20,19 +21,20 @@ require ( github.com/cometbft/cometbft v1.0.0-rc1.0.20240806094948-2c4293ef36c4 github.com/cosmos/cosmos-sdk v0.53.0 github.com/ethereum/go-ethereum v1.14.7 - github.com/ethpandaops/beacon v0.39.0 github.com/holiman/uint256 v1.3.1 github.com/kurtosis-tech/kurtosis/api/golang v1.0.0 github.com/protolambda/zrnt v0.32.2 github.com/protolambda/ztyp v0.2.2 - github.com/sirupsen/logrus v1.9.3 github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 github.com/stretchr/testify v1.9.0 ) require ( github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240806094948-2c4293ef36c4 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/leodido/go-urn v1.4.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/umbracle/fastrlp v0.1.0 // indirect ) @@ -61,7 +63,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VictoriaMetrics/fastcache v1.12.2 // indirect github.com/adrg/xdg v0.4.0 // indirect - github.com/attestantio/go-eth2-client v0.21.9 // indirect + github.com/attestantio/go-eth2-client v0.21.9 github.com/beorn7/perks v1.0.1 // indirect github.com/berachain/beacon-kit/mod/chain-spec v0.0.0-20240705193247-d464364483df // indirect github.com/berachain/beacon-kit/mod/config v0.0.0-20240705193247-d464364483df // indirect @@ -71,7 +73,6 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect github.com/bufbuild/protocompile v0.14.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 // indirect github.com/cockroachdb/errors v1.11.3 // indirect github.com/cockroachdb/fifo v0.0.0-20240616162244-4768e80dfb9a // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -107,22 +108,18 @@ require ( github.com/emicklei/dot v1.6.2 // indirect github.com/ethereum/c-kzg-4844 v1.0.3 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect - github.com/ethpandaops/ethwallclock v0.2.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/getsentry/sentry-go v0.28.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect - github.com/go-co-op/gocron v1.16.2 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-playground/validator/v10 v10.22.0 // indirect github.com/go-yaml/yaml v2.1.0+incompatible // indirect github.com/goccy/go-json v0.10.3 // indirect github.com/goccy/go-yaml v1.9.5 // indirect @@ -209,10 +206,9 @@ require ( 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 - github.com/robfig/cron/v3 v3.0.1 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.11.0 // indirect - github.com/rs/zerolog v1.33.0 // indirect + github.com/rs/zerolog v1.33.0 github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect diff --git a/testing/go.sum b/testing/go.sum index eb762dee53..6ae2ab8cae 100644 --- a/testing/go.sum +++ b/testing/go.sum @@ -90,8 +90,6 @@ github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240806160829-cde2d1 github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240806160829-cde2d1347e7e/go.mod h1:7/SXz8S5VpFl2thcKuBdu1OId+SgI1o4N+S1FB92Zw8= github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df h1:SnzeY9SCmKyEx0iGC/C/8E39ozpl/g5yI7lFXpmbMBI= github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df/go.mod h1:mJ0ZlK+izcPWcveHAtM4+W0a+8jhu5Y4DMPL2Takacg= -github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b h1:TZpt+fWXXnyQOTOSjhZU4fPGAYZaEB5UZ02ZUqRYiVk= -github.com/berachain/beacon-kit/mod/node-api v0.0.0-20240801184637-7dce5a0acd5b/go.mod h1:wgOdrP96dMsXDXHItO4tRLuf8IaHP14RY4MbUPFAc4s= github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240808194557-e72e74f58197 h1:hk8N7Q1CCKMW/05pRu5rbfRnbTUou5TjULaeeRtbU+E= github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240808194557-e72e74f58197/go.mod h1:7kNnd9rhYjyZJHuXs/ku5drL9EMM64ekJVR181fGmbM= github.com/berachain/cosmos-sdk v0.46.0-beta2.0.20240808182639-7bdbf06a94f2 h1:4qwOPga+dKeDelSJ6pseasQq6fcjd7iXhah0y7enuco= @@ -117,8 +115,6 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9 h1:xz6Nv3zcwO2Lila35hcb0QloCQsc38Al13RNEzWRpX4= -github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9/go.mod h1:2wSM9zJkl1UQEFZgSd68NfCgRz1VL1jzy/RjCg+ULrs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -233,10 +229,6 @@ github.com/ethereum/go-ethereum v1.14.7 h1:EHpv3dE8evQmpVEQ/Ne2ahB06n2mQptdwqaMN github.com/ethereum/go-ethereum v1.14.7/go.mod h1:Mq0biU2jbdmKSZoqOj29017ygFrMnB5/Rifwp980W4o= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= -github.com/ethpandaops/beacon v0.39.0 h1:D0ewcc5L/Rfyit8wXSYmNCo9KPj+wdACr1YqkdZlwaA= -github.com/ethpandaops/beacon v0.39.0/go.mod h1:vYeQUrplQLR3P1DjwLjKfpRPIDpxNUxIwIvvEHsjM+Y= -github.com/ethpandaops/ethwallclock v0.2.0 h1:EeFKtZ7v6TAdn/oAh0xaPujD7N4amjBxrWIByraUfLM= -github.com/ethpandaops/ethwallclock v0.2.0/go.mod h1:y0Cu+mhGLlem19vnAV2x0hpFS5KZ7oOi2SWYayv9l24= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= @@ -264,8 +256,6 @@ github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRt github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-co-op/gocron v1.16.2 h1:p9ghzsN5PqqPyWXYDO2JlvD1DOUNT8pPSyGYC62XBcY= -github.com/go-co-op/gocron v1.16.2/go.mod h1:W/N9G7bntRo5fVQlmjncvqSt74jxCxHfjyHlgcB33T8= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -626,8 +616,6 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqn github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= -github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= From 3f90efe1b05833366f86d029bcf02c053937fd60 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 15:12:13 -0400 Subject: [PATCH 31/44] remove placeholders --- mod/node-api/handlers/config/placeholders.go | 45 --------------- mod/node-api/handlers/config/routes.go | 2 +- mod/node-api/handlers/node/placeholders.go | 61 -------------------- mod/node-api/handlers/node/routes.go | 2 +- 4 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 mod/node-api/handlers/config/placeholders.go delete mode 100644 mod/node-api/handlers/node/placeholders.go diff --git a/mod/node-api/handlers/config/placeholders.go b/mod/node-api/handlers/config/placeholders.go deleted file mode 100644 index 01c0b65a99..0000000000 --- a/mod/node-api/handlers/config/placeholders.go +++ /dev/null @@ -1,45 +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 config - -// Spec is a placeholder so that beacon API clients don't break. -// -// TODO: Implement with real data. -func (h *Handler[ContextT]) Spec(ContextT) (any, error) { - type SpecResponse struct { - Data map[string]string `json:"data"` - } - - response := SpecResponse{ - Data: map[string]string{ - "DEPOSIT_NETWORK_ID": "80087", - "DOMAIN_AGGREGATE_AND_PROOF": "0x06000000", - "INACTIVITY_PENALTY_QUOTIENT": "67108864", - "INACTIVITY_PENALTY_QUOTIENT_ALTAIR": "50331648", - "SLOTS_PER_EPOCH": "8192", - "SECONDS_PER_SLOT": "2", - }, - } - response.Data["DEPOSIT_CONTRACT_ADDRESS"] = - "0x4242424242424242424242424242424242424242" - - return response, nil -} diff --git a/mod/node-api/handlers/config/routes.go b/mod/node-api/handlers/config/routes.go index 5b58fcbc31..d863ed9f82 100644 --- a/mod/node-api/handlers/config/routes.go +++ b/mod/node-api/handlers/config/routes.go @@ -40,7 +40,7 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/config/spec", - Handler: h.Spec, + Handler: h.NotImplemented, }, { Method: http.MethodGet, diff --git a/mod/node-api/handlers/node/placeholders.go b/mod/node-api/handlers/node/placeholders.go deleted file mode 100644 index cdc9dca2f3..0000000000 --- a/mod/node-api/handlers/node/placeholders.go +++ /dev/null @@ -1,61 +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 node - -// Syncing is a placeholder so that beacon API clients don't break. -// -// TODO: Implement with real data. -func (h *Handler[ContextT]) Syncing(ContextT) (any, error) { - type SyncingResponse struct { - Data struct { - HeadSlot string `json:"head_slot"` - SyncDistance string `json:"sync_distance"` - IsSyncing bool `json:"is_syncing"` - IsOptimistic bool `json:"is_optimistic"` - ELOffline bool `json:"el_offline"` - } `json:"data"` - } - - response := SyncingResponse{} - response.Data.HeadSlot = "0" - response.Data.SyncDistance = "1" - response.Data.IsSyncing = false - response.Data.IsOptimistic = true - response.Data.ELOffline = false - - return response, nil -} - -// Version is a placeholder so that beacon API clients don't break. -// -// TODO: Implement with real data. -func (h *Handler[ContextT]) Version(ContextT) (any, error) { - type VersionResponse struct { - Data struct { - Version string `json:"version"` - } `json:"data"` - } - - response := VersionResponse{} - response.Data.Version = "1.0.0" - - return response, nil -} diff --git a/mod/node-api/handlers/node/routes.go b/mod/node-api/handlers/node/routes.go index f0b8dca54a..34375ee297 100644 --- a/mod/node-api/handlers/node/routes.go +++ b/mod/node-api/handlers/node/routes.go @@ -55,7 +55,7 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/node/version", - Handler: h.Version, + Handler: h.NotImplemented, }, { Method: http.MethodGet, From 1e4ff5957e87a11f5f2e44c56f9962e769601e8b Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 15:12:55 -0400 Subject: [PATCH 32/44] nit --- mod/node-api/handlers/node/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/node-api/handlers/node/routes.go b/mod/node-api/handlers/node/routes.go index 34375ee297..370b2803f4 100644 --- a/mod/node-api/handlers/node/routes.go +++ b/mod/node-api/handlers/node/routes.go @@ -60,7 +60,7 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/node/syncing", - Handler: h.Syncing, + Handler: h.NotImplemented, }, { Method: http.MethodGet, From ea9206d2513ea4736c13721617b51a22283300a5 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 16:16:57 -0400 Subject: [PATCH 33/44] revive placeholders --- mod/node-api/handlers/node/placeholders.go | 61 ++++++++++++++++++++++ mod/node-api/handlers/node/routes.go | 2 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 mod/node-api/handlers/node/placeholders.go diff --git a/mod/node-api/handlers/node/placeholders.go b/mod/node-api/handlers/node/placeholders.go new file mode 100644 index 0000000000..cdc9dca2f3 --- /dev/null +++ b/mod/node-api/handlers/node/placeholders.go @@ -0,0 +1,61 @@ +// 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 node + +// Syncing is a placeholder so that beacon API clients don't break. +// +// TODO: Implement with real data. +func (h *Handler[ContextT]) Syncing(ContextT) (any, error) { + type SyncingResponse struct { + Data struct { + HeadSlot string `json:"head_slot"` + SyncDistance string `json:"sync_distance"` + IsSyncing bool `json:"is_syncing"` + IsOptimistic bool `json:"is_optimistic"` + ELOffline bool `json:"el_offline"` + } `json:"data"` + } + + response := SyncingResponse{} + response.Data.HeadSlot = "0" + response.Data.SyncDistance = "1" + response.Data.IsSyncing = false + response.Data.IsOptimistic = true + response.Data.ELOffline = false + + return response, nil +} + +// Version is a placeholder so that beacon API clients don't break. +// +// TODO: Implement with real data. +func (h *Handler[ContextT]) Version(ContextT) (any, error) { + type VersionResponse struct { + Data struct { + Version string `json:"version"` + } `json:"data"` + } + + response := VersionResponse{} + response.Data.Version = "1.0.0" + + return response, nil +} diff --git a/mod/node-api/handlers/node/routes.go b/mod/node-api/handlers/node/routes.go index 370b2803f4..e0fe60433c 100644 --- a/mod/node-api/handlers/node/routes.go +++ b/mod/node-api/handlers/node/routes.go @@ -55,7 +55,7 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/node/version", - Handler: h.NotImplemented, + Handler: h.Version, }, { Method: http.MethodGet, From 980d0522855f6c0c096f2101362fec351c4fd3ac Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 16:17:18 -0400 Subject: [PATCH 34/44] nit --- mod/node-api/handlers/node/routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/node-api/handlers/node/routes.go b/mod/node-api/handlers/node/routes.go index e0fe60433c..f0b8dca54a 100644 --- a/mod/node-api/handlers/node/routes.go +++ b/mod/node-api/handlers/node/routes.go @@ -60,7 +60,7 @@ func (h *Handler[ContextT]) RegisterRoutes( { Method: http.MethodGet, Path: "/eth/v1/node/syncing", - Handler: h.NotImplemented, + Handler: h.Syncing, }, { Method: http.MethodGet, From efb3efc1dd4668ae788b7d8b4567ae6900b6cbe5 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 16:25:05 -0400 Subject: [PATCH 35/44] format --- mod/node-api/client/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/node-api/client/client.go b/mod/node-api/client/client.go index 71db99d41f..7232eba129 100644 --- a/mod/node-api/client/client.go +++ b/mod/node-api/client/client.go @@ -23,9 +23,8 @@ package client import ( "context" - "github.com/berachain/beacon-kit/mod/errors" - beaconhttp "github.com/attestantio/go-eth2-client/http" + "github.com/berachain/beacon-kit/mod/errors" ) // New creates a new BeaconKitNode client instance with a given cancel context. From 118e0001153eabe9cea8b978a10ee368894726cd Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 16:36:25 -0400 Subject: [PATCH 36/44] remove unimplemented func --- mod/node-api/client/interface.go | 1 - 1 file changed, 1 deletion(-) diff --git a/mod/node-api/client/interface.go b/mod/node-api/client/interface.go index 695bf97be4..36555b8fa4 100644 --- a/mod/node-api/client/interface.go +++ b/mod/node-api/client/interface.go @@ -29,7 +29,6 @@ import ( type BeaconKitNode interface { client.Service client.FarFutureEpochProvider - client.ValidatorIDProvider client.SignedBeaconBlockProvider client.BlobSidecarsProvider client.BeaconCommitteesProvider From fc73a5f0a2768cb07027808f5a87c38e1381a34f Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 17:40:53 -0400 Subject: [PATCH 37/44] client --- mod/node-api/client/client.go | 49 ------------------- testing/e2e/e2e_api_test.go | 5 +- .../e2e/suite/types/beacon_client.go | 29 ++++++++++- testing/e2e/suite/types/consensus_client.go | 5 +- 4 files changed, 32 insertions(+), 56 deletions(-) delete mode 100644 mod/node-api/client/client.go rename mod/node-api/client/interface.go => testing/e2e/suite/types/beacon_client.go (82%) diff --git a/mod/node-api/client/client.go b/mod/node-api/client/client.go deleted file mode 100644 index 7232eba129..0000000000 --- a/mod/node-api/client/client.go +++ /dev/null @@ -1,49 +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 client - -import ( - "context" - - beaconhttp "github.com/attestantio/go-eth2-client/http" - "github.com/berachain/beacon-kit/mod/errors" -) - -// New creates a new BeaconKitNode client instance with a given cancel context. -func New( - cancelCtx context.Context, - params ...beaconhttp.Parameter, -) (BeaconKitNode, error) { - service, err := beaconhttp.New( - cancelCtx, - params..., - ) - if err != nil { - return nil, err - } - - client, ok := service.(BeaconKitNode) - if !ok { - return nil, errors.New("failed to cast service to BeaconKitNode") - } - - return client, nil -} diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index 0afe2cbfcc..758c10c782 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -29,10 +29,8 @@ import ( // TestBeaconAPISuite tests that the api test suite is setup correctly with a // working beacon node-api client. func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { - executionBlockNum := uint64(5) - // Wait for execution block 5. - err := s.WaitForFinalizedBlockNumber(executionBlockNum) + err := s.WaitForFinalizedBlockNumber(5) s.Require().NoError(err) // Get the consensus client. @@ -48,4 +46,5 @@ func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { ) s.Require().NoError(err) s.Require().NotEmpty(stateRoot) + s.Require().False(stateRoot.Data.IsZero()) } diff --git a/mod/node-api/client/interface.go b/testing/e2e/suite/types/beacon_client.go similarity index 82% rename from mod/node-api/client/interface.go rename to testing/e2e/suite/types/beacon_client.go index 36555b8fa4..0d002bd150 100644 --- a/mod/node-api/client/interface.go +++ b/testing/e2e/suite/types/beacon_client.go @@ -18,16 +18,21 @@ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND // TITLE. -package client +package types import ( + "context" + client "github.com/attestantio/go-eth2-client" + beaconhttp "github.com/attestantio/go-eth2-client/http" + "github.com/berachain/beacon-kit/mod/errors" ) // BeaconKitNode is a wrapper around the client.Service interface to add // additional methods specific to a beacon-kit node's API. type BeaconKitNode interface { client.Service + client.FarFutureEpochProvider client.SignedBeaconBlockProvider client.BlobSidecarsProvider @@ -78,3 +83,25 @@ type BeaconKitNode interface { // Other beacon-kit node-api methods here... } + +// NewBeaconKitClient creates a new BeaconKitNode client instance with a given +// cancel context. +func NewBeaconKitClient( + cancelCtx context.Context, + params ...beaconhttp.Parameter, +) (BeaconKitNode, error) { + service, err := beaconhttp.New( + cancelCtx, + params..., + ) + if err != nil { + return nil, err + } + + client, ok := service.(BeaconKitNode) + if !ok { + return nil, errors.New("failed to cast service to BeaconKitNode") + } + + return client, nil +} diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index 843fabd47c..eb2189fb73 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -26,7 +26,6 @@ import ( beaconhttp "github.com/attestantio/go-eth2-client/http" "github.com/berachain/beacon-kit/mod/errors" - bclient "github.com/berachain/beacon-kit/mod/node-api/client" 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" @@ -41,7 +40,7 @@ type ConsensusClient struct { rpcclient.Client // Beacon node-api client - bclient.BeaconKitNode + BeaconKitNode // Cancel function for the context cancelFunc context.CancelFunc @@ -80,7 +79,7 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { panic("Couldn't find the public port for the node API") } cancelCtx, cancel := context.WithCancel(ctx) - cc.BeaconKitNode, err = bclient.New( + cc.BeaconKitNode, err = NewBeaconKitClient( cancelCtx, beaconhttp.WithAddress( fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), From 89b9299f931a5ac3e63269979c00d2bf4e3ec53d Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 17:42:30 -0400 Subject: [PATCH 38/44] Remove bindings --- build/scripts/linting.mk | 2 +- .../pkg/eip4788/beacon_verifier.abigen.go | 1549 ----------------- .../pkg/eip4788/beacon_verifier.go | 23 - 3 files changed, 1 insertion(+), 1573 deletions(-) delete mode 100644 mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go delete mode 100644 mod/geth-primitives/pkg/eip4788/beacon_verifier.go diff --git a/build/scripts/linting.mk b/build/scripts/linting.mk index c099e6dfd2..9cc73045be 100644 --- a/build/scripts/linting.mk +++ b/build/scripts/linting.mk @@ -85,7 +85,7 @@ nilaway: for dir in $$dirs; do \ count=$$((count + 1)); \ printf "[%d/%d modules complete] Running nilaway in %s\n" $$count $$total $$dir && \ - (cd $$dir && go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "pkg/components/module,pkg/deposit,pkg/cosmos,pkg/eip4788" -v ./...) || exit 1; \ + (cd $$dir && go run go.uber.org/nilaway/cmd/nilaway -exclude-errors-in-files "pkg/components/module,pkg/deposit,pkg/cosmos" -v ./...) || exit 1; \ done @printf "Nilaway complete for all modules\n" diff --git a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go b/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go deleted file mode 100644 index 1dc3c16759..0000000000 --- a/mod/geth-primitives/pkg/eip4788/beacon_verifier.abigen.go +++ /dev/null @@ -1,1549 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package eip4788 - -import ( - "errors" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" -) - -// Reference imports to suppress errors if they are not otherwise used. -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -// BeaconVerifierMetaData contains all meta data concerning the BeaconVerifier contract. -var BeaconVerifierMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_executionFeeRecipientGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"BEACON_ROOTS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"cancelOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"completeOwnershipHandover\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"executionFeeRecipientGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"executionNumberGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRoot\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getParentBeaconBlockRootAt\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"result\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"ownershipHandoverExpiresAt\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"result\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"requestOwnershipHandover\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"setExecutionFeeRecipientGIndex\",\"inputs\":[{\"name\":\"_executionFeeRecipientGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setExecutionNumberGIndex\",\"inputs\":[{\"name\":\"_executionNumberGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setZeroValidatorPubkeyGIndex\",\"inputs\":[{\"name\":\"_zeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifyBeaconBlockProposer\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposerIndex\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"proposerPubkey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proposerPubkeyProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyCoinbase\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"coinbase\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"coinbaseProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"verifyExecutionNumber\",\"inputs\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"executionNumberProof\",\"type\":\"bytes32[]\",\"internalType\":\"bytes32[]\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"zeroValidatorPubkeyGIndex\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"ExecutionFeeRecipientGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionFeeRecipientGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ExecutionNumberGIndexChanged\",\"inputs\":[{\"name\":\"newExecutionNumberGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverCanceled\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipHandoverRequested\",\"inputs\":[{\"name\":\"pendingOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"oldOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ZeroValidatorPubkeyGIndexChanged\",\"inputs\":[{\"name\":\"newZeroValidatorPubkeyGIndex\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AlreadyInitialized\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"IndexOutOfRange\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidValidatorPubkeyLength\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NewOwnerIsZeroAddress\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoHandoverRequest\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"RootNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"Unauthorized\",\"inputs\":[]}]", - Bin: "0x6080604052348015600e575f80fd5b50604051610ccc380380610ccc833981016040819052602b91609e565b5f839055600182905560028190556040336047565b50505060c8565b638b78c6d819805415606057630dc149f05f526004601cfd5b6001600160a01b03909116801560ff1b8117909155805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b5f805f6060848603121560af575f80fd5b5050815160208301516040909301519094929350919050565b610bf7806100d55f395ff3fe60806040526004361061013d575f3560e01c80638da5cb5b116100bb578063efcff00a11610071578063f2fde38b11610057578063f2fde38b1461030b578063f769afd11461031e578063fee81cf41461033d575f80fd5b8063efcff00a146102e4578063f04e283e146102f8575f80fd5b8063c0c27230116100a1578063c0c2723014610291578063cbb60852146102b0578063e701fa76146102cf575f80fd5b80638da5cb5b1461023f578063ab15494a14610272575f80fd5b806356d7e8fd11610110578063715018a6116100f6578063715018a6146101f957806378e97954146102015780638170577114610220575f80fd5b806356d7e8fd1461018f5780635e67d452146101da575f80fd5b80632569296214610141578063305ea4161461014b57806335222ff11461017357806354d1f13d14610187575b5f80fd5b61014961036e565b005b348015610156575f80fd5b5061016060015481565b6040519081526020015b60405180910390f35b34801561017e575f80fd5b506101605f5481565b6101496103bb565b34801561019a575f80fd5b506101b5720f3df6d732807ef1319fb7b8bb8522d0beac0281565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161016a565b3480156101e5575f80fd5b506101606101f4366004610956565b6103f4565b610149610404565b34801561020c575f80fd5b5061014961021b3660046109e1565b610417565b34801561022b575f80fd5b5061014961023a366004610a3e565b610431565b34801561024a575f80fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927546101b5565b34801561027d575f80fd5b5061014961028c366004610a55565b610474565b34801561029c575f80fd5b506101496102ab366004610a3e565b610492565b3480156102bb575f80fd5b506101496102ca366004610b14565b6104cf565b3480156102da575f80fd5b5061016060025481565b3480156102ef575f80fd5b506101606104e3565b610149610306366004610b3e565b6104f2565b610149610319366004610b3e565b61052f565b348015610329575f80fd5b50610149610338366004610a3e565b610555565b348015610348575f80fd5b50610160610357366004610b3e565b63389a75e1600c9081525f91909152602090205490565b5f6202a30067ffffffffffffffff164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b5f6103fe82610592565b92915050565b61040c6105cd565b6104155f610602565b565b61042b61042385610592565b838386610670565b50505050565b6104396105cd565b5f8190556040518181527fe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21906020015b60405180910390a150565b61048a61048087610592565b838387878a6106e6565b505050505050565b61049a6105cd565b60028190556040518181527f15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e85530154890602001610469565b61042b6104db85610592565b8383866107e1565b5f6104ed42610592565b905090565b6104fa6105cd565b63389a75e1600c52805f526020600c20805442111561052057636f5e88185f526004601cfd5b5f905561052c81610602565b50565b6105376105cd565b8060601b61054c57637448fbae5f526004601cfd5b61052c81610602565b61055d6105cd565b60018190556040518181527febb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff7626490602001610469565b5f815f5260205f60205f720f3df6d732807ef1319fb7b8bb8522d0beac025afa806105c457633033b0ff5f526004601cfd5b50505f51919050565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314610415576382b429005f526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927805473ffffffffffffffffffffffffffffffffffffffff9092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3811560ff1b8217905550565b5f606082901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690506106a98484878460025461084d565b6106df576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b6501000000000067ffffffffffffffff82161061072f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f61076e84848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506108e792505050565b90505f61077c836008610b84565b67ffffffffffffffff165f546107929190610bae565b90506107a187878a858561084d565b6107d7576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050505050565b5f65ff000000ff00600883811b91821664ff000000ff9185901c91821617601090811b67ff000000ff0000009390931666ff000000ff00009290921691909117901c17602081811c63ffffffff1691901b67ffffffff00000000161760c01b90506106a9848487846001545b5f84156108a9578460051b8601865b6001841660051b8460011c94508461087b57635849603f5f526004601cfd5b85815281356020918218525f60408160025afa80610897575f80fd5b505f51945060200181811061085c5750505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8201156108de57631b6661c35f526004601cfd5b50501492915050565b80515f90603014610924576040517f5f4167e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60205f60406020850160025afa806105c4575f80fd5b803567ffffffffffffffff81168114610951575f80fd5b919050565b5f60208284031215610966575f80fd5b61096f8261093a565b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610951575f80fd5b5f8083601f8401126109a9575f80fd5b50813567ffffffffffffffff8111156109c0575f80fd5b6020830191508360208260051b85010111156109da575f80fd5b9250929050565b5f805f80606085870312156109f4575f80fd5b6109fd8561093a565b9350610a0b60208601610976565b9250604085013567ffffffffffffffff811115610a26575f80fd5b610a3287828801610999565b95989497509550505050565b5f60208284031215610a4e575f80fd5b5035919050565b5f805f805f8060808789031215610a6a575f80fd5b610a738761093a565b9550610a816020880161093a565b9450604087013567ffffffffffffffff811115610a9c575f80fd5b8701601f81018913610aac575f80fd5b803567ffffffffffffffff811115610ac2575f80fd5b896020828401011115610ad3575f80fd5b60209190910194509250606087013567ffffffffffffffff811115610af6575f80fd5b610b0289828a01610999565b979a9699509497509295939492505050565b5f805f8060608587031215610b27575f80fd5b610b308561093a565b9350610a0b6020860161093a565b5f60208284031215610b4e575f80fd5b61096f82610976565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b67ffffffffffffffff8181168382160290811690818114610ba757610ba7610b57565b5092915050565b808201808211156103fe576103fe610b5756fea26469706673582212204277a535e42dca01d82f7a275fc22d40d4ab7ae2fdad7309d299900ac418acc664736f6c634300081a0033", -} - -// BeaconVerifierABI is the input ABI used to generate the binding from. -// Deprecated: Use BeaconVerifierMetaData.ABI instead. -var BeaconVerifierABI = BeaconVerifierMetaData.ABI - -// BeaconVerifierBin is the compiled bytecode used for deploying new contracts. -// Deprecated: Use BeaconVerifierMetaData.Bin instead. -var BeaconVerifierBin = BeaconVerifierMetaData.Bin - -// DeployBeaconVerifier deploys a new Ethereum contract, binding an instance of BeaconVerifier to it. -func DeployBeaconVerifier(auth *bind.TransactOpts, backend bind.ContractBackend, _zeroValidatorPubkeyGIndex *big.Int, _executionNumberGIndex *big.Int, _executionFeeRecipientGIndex *big.Int) (common.Address, *types.Transaction, *BeaconVerifier, error) { - parsed, err := BeaconVerifierMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(BeaconVerifierBin), backend, _zeroValidatorPubkeyGIndex, _executionNumberGIndex, _executionFeeRecipientGIndex) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &BeaconVerifier{BeaconVerifierCaller: BeaconVerifierCaller{contract: contract}, BeaconVerifierTransactor: BeaconVerifierTransactor{contract: contract}, BeaconVerifierFilterer: BeaconVerifierFilterer{contract: contract}}, nil -} - -// BeaconVerifier is an auto generated Go binding around an Ethereum contract. -type BeaconVerifier struct { - BeaconVerifierCaller // Read-only binding to the contract - BeaconVerifierTransactor // Write-only binding to the contract - BeaconVerifierFilterer // Log filterer for contract events -} - -// BeaconVerifierCaller is an auto generated read-only Go binding around an Ethereum contract. -type BeaconVerifierCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BeaconVerifierTransactor is an auto generated write-only Go binding around an Ethereum contract. -type BeaconVerifierTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BeaconVerifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type BeaconVerifierFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BeaconVerifierSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type BeaconVerifierSession struct { - Contract *BeaconVerifier // Generic contract binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BeaconVerifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type BeaconVerifierCallerSession struct { - Contract *BeaconVerifierCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// BeaconVerifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type BeaconVerifierTransactorSession struct { - Contract *BeaconVerifierTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BeaconVerifierRaw is an auto generated low-level Go binding around an Ethereum contract. -type BeaconVerifierRaw struct { - Contract *BeaconVerifier // Generic contract binding to access the raw methods on -} - -// BeaconVerifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type BeaconVerifierCallerRaw struct { - Contract *BeaconVerifierCaller // Generic read-only contract binding to access the raw methods on -} - -// BeaconVerifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type BeaconVerifierTransactorRaw struct { - Contract *BeaconVerifierTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewBeaconVerifier creates a new instance of BeaconVerifier, bound to a specific deployed contract. -func NewBeaconVerifier(address common.Address, backend bind.ContractBackend) (*BeaconVerifier, error) { - contract, err := bindBeaconVerifier(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &BeaconVerifier{BeaconVerifierCaller: BeaconVerifierCaller{contract: contract}, BeaconVerifierTransactor: BeaconVerifierTransactor{contract: contract}, BeaconVerifierFilterer: BeaconVerifierFilterer{contract: contract}}, nil -} - -// NewBeaconVerifierCaller creates a new read-only instance of BeaconVerifier, bound to a specific deployed contract. -func NewBeaconVerifierCaller(address common.Address, caller bind.ContractCaller) (*BeaconVerifierCaller, error) { - contract, err := bindBeaconVerifier(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BeaconVerifierCaller{contract: contract}, nil -} - -// NewBeaconVerifierTransactor creates a new write-only instance of BeaconVerifier, bound to a specific deployed contract. -func NewBeaconVerifierTransactor(address common.Address, transactor bind.ContractTransactor) (*BeaconVerifierTransactor, error) { - contract, err := bindBeaconVerifier(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BeaconVerifierTransactor{contract: contract}, nil -} - -// NewBeaconVerifierFilterer creates a new log filterer instance of BeaconVerifier, bound to a specific deployed contract. -func NewBeaconVerifierFilterer(address common.Address, filterer bind.ContractFilterer) (*BeaconVerifierFilterer, error) { - contract, err := bindBeaconVerifier(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BeaconVerifierFilterer{contract: contract}, nil -} - -// bindBeaconVerifier binds a generic wrapper to an already deployed contract. -func bindBeaconVerifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := BeaconVerifierMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_BeaconVerifier *BeaconVerifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BeaconVerifier.Contract.BeaconVerifierCaller.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_BeaconVerifier *BeaconVerifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVerifier.Contract.BeaconVerifierTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BeaconVerifier *BeaconVerifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BeaconVerifier.Contract.BeaconVerifierTransactor.contract.Transact(opts, method, params...) -} - -// Call invokes the (constant) contract method with params as input values and -// sets the output to result. The result type might be a single field for simple -// returns, a slice of interfaces for anonymous returns and a struct for named -// returns. -func (_BeaconVerifier *BeaconVerifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _BeaconVerifier.Contract.contract.Call(opts, result, method, params...) -} - -// Transfer initiates a plain transaction to move funds to the contract, calling -// its default method if one is available. -func (_BeaconVerifier *BeaconVerifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVerifier.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_BeaconVerifier *BeaconVerifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _BeaconVerifier.Contract.contract.Transact(opts, method, params...) -} - -// BEACONROOTS is a free data retrieval call binding the contract method 0x56d7e8fd. -// -// Solidity: function BEACON_ROOTS() view returns(address) -func (_BeaconVerifier *BeaconVerifierCaller) BEACONROOTS(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "BEACON_ROOTS") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// BEACONROOTS is a free data retrieval call binding the contract method 0x56d7e8fd. -// -// Solidity: function BEACON_ROOTS() view returns(address) -func (_BeaconVerifier *BeaconVerifierSession) BEACONROOTS() (common.Address, error) { - return _BeaconVerifier.Contract.BEACONROOTS(&_BeaconVerifier.CallOpts) -} - -// BEACONROOTS is a free data retrieval call binding the contract method 0x56d7e8fd. -// -// Solidity: function BEACON_ROOTS() view returns(address) -func (_BeaconVerifier *BeaconVerifierCallerSession) BEACONROOTS() (common.Address, error) { - return _BeaconVerifier.Contract.BEACONROOTS(&_BeaconVerifier.CallOpts) -} - -// ExecutionFeeRecipientGIndex is a free data retrieval call binding the contract method 0xe701fa76. -// -// Solidity: function executionFeeRecipientGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierCaller) ExecutionFeeRecipientGIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "executionFeeRecipientGIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// ExecutionFeeRecipientGIndex is a free data retrieval call binding the contract method 0xe701fa76. -// -// Solidity: function executionFeeRecipientGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierSession) ExecutionFeeRecipientGIndex() (*big.Int, error) { - return _BeaconVerifier.Contract.ExecutionFeeRecipientGIndex(&_BeaconVerifier.CallOpts) -} - -// ExecutionFeeRecipientGIndex is a free data retrieval call binding the contract method 0xe701fa76. -// -// Solidity: function executionFeeRecipientGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierCallerSession) ExecutionFeeRecipientGIndex() (*big.Int, error) { - return _BeaconVerifier.Contract.ExecutionFeeRecipientGIndex(&_BeaconVerifier.CallOpts) -} - -// ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. -// -// Solidity: function executionNumberGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierCaller) ExecutionNumberGIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "executionNumberGIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. -// -// Solidity: function executionNumberGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierSession) ExecutionNumberGIndex() (*big.Int, error) { - return _BeaconVerifier.Contract.ExecutionNumberGIndex(&_BeaconVerifier.CallOpts) -} - -// ExecutionNumberGIndex is a free data retrieval call binding the contract method 0x305ea416. -// -// Solidity: function executionNumberGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierCallerSession) ExecutionNumberGIndex() (*big.Int, error) { - return _BeaconVerifier.Contract.ExecutionNumberGIndex(&_BeaconVerifier.CallOpts) -} - -// GetParentBeaconBlockRoot is a free data retrieval call binding the contract method 0xefcff00a. -// -// Solidity: function getParentBeaconBlockRoot() view returns(bytes32) -func (_BeaconVerifier *BeaconVerifierCaller) GetParentBeaconBlockRoot(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "getParentBeaconBlockRoot") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetParentBeaconBlockRoot is a free data retrieval call binding the contract method 0xefcff00a. -// -// Solidity: function getParentBeaconBlockRoot() view returns(bytes32) -func (_BeaconVerifier *BeaconVerifierSession) GetParentBeaconBlockRoot() ([32]byte, error) { - return _BeaconVerifier.Contract.GetParentBeaconBlockRoot(&_BeaconVerifier.CallOpts) -} - -// GetParentBeaconBlockRoot is a free data retrieval call binding the contract method 0xefcff00a. -// -// Solidity: function getParentBeaconBlockRoot() view returns(bytes32) -func (_BeaconVerifier *BeaconVerifierCallerSession) GetParentBeaconBlockRoot() ([32]byte, error) { - return _BeaconVerifier.Contract.GetParentBeaconBlockRoot(&_BeaconVerifier.CallOpts) -} - -// GetParentBeaconBlockRootAt is a free data retrieval call binding the contract method 0x5e67d452. -// -// Solidity: function getParentBeaconBlockRootAt(uint64 timestamp) view returns(bytes32) -func (_BeaconVerifier *BeaconVerifierCaller) GetParentBeaconBlockRootAt(opts *bind.CallOpts, timestamp uint64) ([32]byte, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "getParentBeaconBlockRootAt", timestamp) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetParentBeaconBlockRootAt is a free data retrieval call binding the contract method 0x5e67d452. -// -// Solidity: function getParentBeaconBlockRootAt(uint64 timestamp) view returns(bytes32) -func (_BeaconVerifier *BeaconVerifierSession) GetParentBeaconBlockRootAt(timestamp uint64) ([32]byte, error) { - return _BeaconVerifier.Contract.GetParentBeaconBlockRootAt(&_BeaconVerifier.CallOpts, timestamp) -} - -// GetParentBeaconBlockRootAt is a free data retrieval call binding the contract method 0x5e67d452. -// -// Solidity: function getParentBeaconBlockRootAt(uint64 timestamp) view returns(bytes32) -func (_BeaconVerifier *BeaconVerifierCallerSession) GetParentBeaconBlockRootAt(timestamp uint64) ([32]byte, error) { - return _BeaconVerifier.Contract.GetParentBeaconBlockRootAt(&_BeaconVerifier.CallOpts, timestamp) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address result) -func (_BeaconVerifier *BeaconVerifierCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address result) -func (_BeaconVerifier *BeaconVerifierSession) Owner() (common.Address, error) { - return _BeaconVerifier.Contract.Owner(&_BeaconVerifier.CallOpts) -} - -// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. -// -// Solidity: function owner() view returns(address result) -func (_BeaconVerifier *BeaconVerifierCallerSession) Owner() (common.Address, error) { - return _BeaconVerifier.Contract.Owner(&_BeaconVerifier.CallOpts) -} - -// OwnershipHandoverExpiresAt is a free data retrieval call binding the contract method 0xfee81cf4. -// -// Solidity: function ownershipHandoverExpiresAt(address pendingOwner) view returns(uint256 result) -func (_BeaconVerifier *BeaconVerifierCaller) OwnershipHandoverExpiresAt(opts *bind.CallOpts, pendingOwner common.Address) (*big.Int, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "ownershipHandoverExpiresAt", pendingOwner) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// OwnershipHandoverExpiresAt is a free data retrieval call binding the contract method 0xfee81cf4. -// -// Solidity: function ownershipHandoverExpiresAt(address pendingOwner) view returns(uint256 result) -func (_BeaconVerifier *BeaconVerifierSession) OwnershipHandoverExpiresAt(pendingOwner common.Address) (*big.Int, error) { - return _BeaconVerifier.Contract.OwnershipHandoverExpiresAt(&_BeaconVerifier.CallOpts, pendingOwner) -} - -// OwnershipHandoverExpiresAt is a free data retrieval call binding the contract method 0xfee81cf4. -// -// Solidity: function ownershipHandoverExpiresAt(address pendingOwner) view returns(uint256 result) -func (_BeaconVerifier *BeaconVerifierCallerSession) OwnershipHandoverExpiresAt(pendingOwner common.Address) (*big.Int, error) { - return _BeaconVerifier.Contract.OwnershipHandoverExpiresAt(&_BeaconVerifier.CallOpts, pendingOwner) -} - -// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0xab15494a. -// -// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, uint64 proposerIndex, bytes proposerPubkey, bytes32[] proposerPubkeyProof) view returns() -func (_BeaconVerifier *BeaconVerifierCaller) VerifyBeaconBlockProposer(opts *bind.CallOpts, timestamp uint64, proposerIndex uint64, proposerPubkey []byte, proposerPubkeyProof [][32]byte) error { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "verifyBeaconBlockProposer", timestamp, proposerIndex, proposerPubkey, proposerPubkeyProof) - - if err != nil { - return err - } - - return err - -} - -// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0xab15494a. -// -// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, uint64 proposerIndex, bytes proposerPubkey, bytes32[] proposerPubkeyProof) view returns() -func (_BeaconVerifier *BeaconVerifierSession) VerifyBeaconBlockProposer(timestamp uint64, proposerIndex uint64, proposerPubkey []byte, proposerPubkeyProof [][32]byte) error { - return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, proposerIndex, proposerPubkey, proposerPubkeyProof) -} - -// VerifyBeaconBlockProposer is a free data retrieval call binding the contract method 0xab15494a. -// -// Solidity: function verifyBeaconBlockProposer(uint64 timestamp, uint64 proposerIndex, bytes proposerPubkey, bytes32[] proposerPubkeyProof) view returns() -func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyBeaconBlockProposer(timestamp uint64, proposerIndex uint64, proposerPubkey []byte, proposerPubkeyProof [][32]byte) error { - return _BeaconVerifier.Contract.VerifyBeaconBlockProposer(&_BeaconVerifier.CallOpts, timestamp, proposerIndex, proposerPubkey, proposerPubkeyProof) -} - -// VerifyCoinbase is a free data retrieval call binding the contract method 0x78e97954. -// -// Solidity: function verifyCoinbase(uint64 timestamp, address coinbase, bytes32[] coinbaseProof) view returns() -func (_BeaconVerifier *BeaconVerifierCaller) VerifyCoinbase(opts *bind.CallOpts, timestamp uint64, coinbase common.Address, coinbaseProof [][32]byte) error { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "verifyCoinbase", timestamp, coinbase, coinbaseProof) - - if err != nil { - return err - } - - return err - -} - -// VerifyCoinbase is a free data retrieval call binding the contract method 0x78e97954. -// -// Solidity: function verifyCoinbase(uint64 timestamp, address coinbase, bytes32[] coinbaseProof) view returns() -func (_BeaconVerifier *BeaconVerifierSession) VerifyCoinbase(timestamp uint64, coinbase common.Address, coinbaseProof [][32]byte) error { - return _BeaconVerifier.Contract.VerifyCoinbase(&_BeaconVerifier.CallOpts, timestamp, coinbase, coinbaseProof) -} - -// VerifyCoinbase is a free data retrieval call binding the contract method 0x78e97954. -// -// Solidity: function verifyCoinbase(uint64 timestamp, address coinbase, bytes32[] coinbaseProof) view returns() -func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyCoinbase(timestamp uint64, coinbase common.Address, coinbaseProof [][32]byte) error { - return _BeaconVerifier.Contract.VerifyCoinbase(&_BeaconVerifier.CallOpts, timestamp, coinbase, coinbaseProof) -} - -// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xcbb60852. -// -// Solidity: function verifyExecutionNumber(uint64 timestamp, uint64 executionNumber, bytes32[] executionNumberProof) view returns() -func (_BeaconVerifier *BeaconVerifierCaller) VerifyExecutionNumber(opts *bind.CallOpts, timestamp uint64, executionNumber uint64, executionNumberProof [][32]byte) error { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "verifyExecutionNumber", timestamp, executionNumber, executionNumberProof) - - if err != nil { - return err - } - - return err - -} - -// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xcbb60852. -// -// Solidity: function verifyExecutionNumber(uint64 timestamp, uint64 executionNumber, bytes32[] executionNumberProof) view returns() -func (_BeaconVerifier *BeaconVerifierSession) VerifyExecutionNumber(timestamp uint64, executionNumber uint64, executionNumberProof [][32]byte) error { - return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumber, executionNumberProof) -} - -// VerifyExecutionNumber is a free data retrieval call binding the contract method 0xcbb60852. -// -// Solidity: function verifyExecutionNumber(uint64 timestamp, uint64 executionNumber, bytes32[] executionNumberProof) view returns() -func (_BeaconVerifier *BeaconVerifierCallerSession) VerifyExecutionNumber(timestamp uint64, executionNumber uint64, executionNumberProof [][32]byte) error { - return _BeaconVerifier.Contract.VerifyExecutionNumber(&_BeaconVerifier.CallOpts, timestamp, executionNumber, executionNumberProof) -} - -// ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. -// -// Solidity: function zeroValidatorPubkeyGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierCaller) ZeroValidatorPubkeyGIndex(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _BeaconVerifier.contract.Call(opts, &out, "zeroValidatorPubkeyGIndex") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. -// -// Solidity: function zeroValidatorPubkeyGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierSession) ZeroValidatorPubkeyGIndex() (*big.Int, error) { - return _BeaconVerifier.Contract.ZeroValidatorPubkeyGIndex(&_BeaconVerifier.CallOpts) -} - -// ZeroValidatorPubkeyGIndex is a free data retrieval call binding the contract method 0x35222ff1. -// -// Solidity: function zeroValidatorPubkeyGIndex() view returns(uint256) -func (_BeaconVerifier *BeaconVerifierCallerSession) ZeroValidatorPubkeyGIndex() (*big.Int, error) { - return _BeaconVerifier.Contract.ZeroValidatorPubkeyGIndex(&_BeaconVerifier.CallOpts) -} - -// CancelOwnershipHandover is a paid mutator transaction binding the contract method 0x54d1f13d. -// -// Solidity: function cancelOwnershipHandover() payable returns() -func (_BeaconVerifier *BeaconVerifierTransactor) CancelOwnershipHandover(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "cancelOwnershipHandover") -} - -// CancelOwnershipHandover is a paid mutator transaction binding the contract method 0x54d1f13d. -// -// Solidity: function cancelOwnershipHandover() payable returns() -func (_BeaconVerifier *BeaconVerifierSession) CancelOwnershipHandover() (*types.Transaction, error) { - return _BeaconVerifier.Contract.CancelOwnershipHandover(&_BeaconVerifier.TransactOpts) -} - -// CancelOwnershipHandover is a paid mutator transaction binding the contract method 0x54d1f13d. -// -// Solidity: function cancelOwnershipHandover() payable returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) CancelOwnershipHandover() (*types.Transaction, error) { - return _BeaconVerifier.Contract.CancelOwnershipHandover(&_BeaconVerifier.TransactOpts) -} - -// CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. -// -// Solidity: function completeOwnershipHandover(address pendingOwner) payable returns() -func (_BeaconVerifier *BeaconVerifierTransactor) CompleteOwnershipHandover(opts *bind.TransactOpts, pendingOwner common.Address) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "completeOwnershipHandover", pendingOwner) -} - -// CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. -// -// Solidity: function completeOwnershipHandover(address pendingOwner) payable returns() -func (_BeaconVerifier *BeaconVerifierSession) CompleteOwnershipHandover(pendingOwner common.Address) (*types.Transaction, error) { - return _BeaconVerifier.Contract.CompleteOwnershipHandover(&_BeaconVerifier.TransactOpts, pendingOwner) -} - -// CompleteOwnershipHandover is a paid mutator transaction binding the contract method 0xf04e283e. -// -// Solidity: function completeOwnershipHandover(address pendingOwner) payable returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) CompleteOwnershipHandover(pendingOwner common.Address) (*types.Transaction, error) { - return _BeaconVerifier.Contract.CompleteOwnershipHandover(&_BeaconVerifier.TransactOpts, pendingOwner) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() payable returns() -func (_BeaconVerifier *BeaconVerifierTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "renounceOwnership") -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() payable returns() -func (_BeaconVerifier *BeaconVerifierSession) RenounceOwnership() (*types.Transaction, error) { - return _BeaconVerifier.Contract.RenounceOwnership(&_BeaconVerifier.TransactOpts) -} - -// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. -// -// Solidity: function renounceOwnership() payable returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) RenounceOwnership() (*types.Transaction, error) { - return _BeaconVerifier.Contract.RenounceOwnership(&_BeaconVerifier.TransactOpts) -} - -// RequestOwnershipHandover is a paid mutator transaction binding the contract method 0x25692962. -// -// Solidity: function requestOwnershipHandover() payable returns() -func (_BeaconVerifier *BeaconVerifierTransactor) RequestOwnershipHandover(opts *bind.TransactOpts) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "requestOwnershipHandover") -} - -// RequestOwnershipHandover is a paid mutator transaction binding the contract method 0x25692962. -// -// Solidity: function requestOwnershipHandover() payable returns() -func (_BeaconVerifier *BeaconVerifierSession) RequestOwnershipHandover() (*types.Transaction, error) { - return _BeaconVerifier.Contract.RequestOwnershipHandover(&_BeaconVerifier.TransactOpts) -} - -// RequestOwnershipHandover is a paid mutator transaction binding the contract method 0x25692962. -// -// Solidity: function requestOwnershipHandover() payable returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) RequestOwnershipHandover() (*types.Transaction, error) { - return _BeaconVerifier.Contract.RequestOwnershipHandover(&_BeaconVerifier.TransactOpts) -} - -// SetExecutionFeeRecipientGIndex is a paid mutator transaction binding the contract method 0xc0c27230. -// -// Solidity: function setExecutionFeeRecipientGIndex(uint256 _executionFeeRecipientGIndex) returns() -func (_BeaconVerifier *BeaconVerifierTransactor) SetExecutionFeeRecipientGIndex(opts *bind.TransactOpts, _executionFeeRecipientGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "setExecutionFeeRecipientGIndex", _executionFeeRecipientGIndex) -} - -// SetExecutionFeeRecipientGIndex is a paid mutator transaction binding the contract method 0xc0c27230. -// -// Solidity: function setExecutionFeeRecipientGIndex(uint256 _executionFeeRecipientGIndex) returns() -func (_BeaconVerifier *BeaconVerifierSession) SetExecutionFeeRecipientGIndex(_executionFeeRecipientGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.Contract.SetExecutionFeeRecipientGIndex(&_BeaconVerifier.TransactOpts, _executionFeeRecipientGIndex) -} - -// SetExecutionFeeRecipientGIndex is a paid mutator transaction binding the contract method 0xc0c27230. -// -// Solidity: function setExecutionFeeRecipientGIndex(uint256 _executionFeeRecipientGIndex) returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) SetExecutionFeeRecipientGIndex(_executionFeeRecipientGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.Contract.SetExecutionFeeRecipientGIndex(&_BeaconVerifier.TransactOpts, _executionFeeRecipientGIndex) -} - -// SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. -// -// Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() -func (_BeaconVerifier *BeaconVerifierTransactor) SetExecutionNumberGIndex(opts *bind.TransactOpts, _executionNumberGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "setExecutionNumberGIndex", _executionNumberGIndex) -} - -// SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. -// -// Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() -func (_BeaconVerifier *BeaconVerifierSession) SetExecutionNumberGIndex(_executionNumberGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.Contract.SetExecutionNumberGIndex(&_BeaconVerifier.TransactOpts, _executionNumberGIndex) -} - -// SetExecutionNumberGIndex is a paid mutator transaction binding the contract method 0xf769afd1. -// -// Solidity: function setExecutionNumberGIndex(uint256 _executionNumberGIndex) returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) SetExecutionNumberGIndex(_executionNumberGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.Contract.SetExecutionNumberGIndex(&_BeaconVerifier.TransactOpts, _executionNumberGIndex) -} - -// SetZeroValidatorPubkeyGIndex is a paid mutator transaction binding the contract method 0x81705771. -// -// Solidity: function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) returns() -func (_BeaconVerifier *BeaconVerifierTransactor) SetZeroValidatorPubkeyGIndex(opts *bind.TransactOpts, _zeroValidatorPubkeyGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "setZeroValidatorPubkeyGIndex", _zeroValidatorPubkeyGIndex) -} - -// SetZeroValidatorPubkeyGIndex is a paid mutator transaction binding the contract method 0x81705771. -// -// Solidity: function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) returns() -func (_BeaconVerifier *BeaconVerifierSession) SetZeroValidatorPubkeyGIndex(_zeroValidatorPubkeyGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.Contract.SetZeroValidatorPubkeyGIndex(&_BeaconVerifier.TransactOpts, _zeroValidatorPubkeyGIndex) -} - -// SetZeroValidatorPubkeyGIndex is a paid mutator transaction binding the contract method 0x81705771. -// -// Solidity: function setZeroValidatorPubkeyGIndex(uint256 _zeroValidatorPubkeyGIndex) returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) SetZeroValidatorPubkeyGIndex(_zeroValidatorPubkeyGIndex *big.Int) (*types.Transaction, error) { - return _BeaconVerifier.Contract.SetZeroValidatorPubkeyGIndex(&_BeaconVerifier.TransactOpts, _zeroValidatorPubkeyGIndex) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) payable returns() -func (_BeaconVerifier *BeaconVerifierTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { - return _BeaconVerifier.contract.Transact(opts, "transferOwnership", newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) payable returns() -func (_BeaconVerifier *BeaconVerifierSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _BeaconVerifier.Contract.TransferOwnership(&_BeaconVerifier.TransactOpts, newOwner) -} - -// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. -// -// Solidity: function transferOwnership(address newOwner) payable returns() -func (_BeaconVerifier *BeaconVerifierTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { - return _BeaconVerifier.Contract.TransferOwnership(&_BeaconVerifier.TransactOpts, newOwner) -} - -// BeaconVerifierExecutionFeeRecipientGIndexChangedIterator is returned from FilterExecutionFeeRecipientGIndexChanged and is used to iterate over the raw logs and unpacked data for ExecutionFeeRecipientGIndexChanged events raised by the BeaconVerifier contract. -type BeaconVerifierExecutionFeeRecipientGIndexChangedIterator struct { - Event *BeaconVerifierExecutionFeeRecipientGIndexChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BeaconVerifierExecutionFeeRecipientGIndexChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierExecutionFeeRecipientGIndexChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierExecutionFeeRecipientGIndexChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BeaconVerifierExecutionFeeRecipientGIndexChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BeaconVerifierExecutionFeeRecipientGIndexChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BeaconVerifierExecutionFeeRecipientGIndexChanged represents a ExecutionFeeRecipientGIndexChanged event raised by the BeaconVerifier contract. -type BeaconVerifierExecutionFeeRecipientGIndexChanged struct { - NewExecutionFeeRecipientGIndex *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterExecutionFeeRecipientGIndexChanged is a free log retrieval operation binding the contract event 0x15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e855301548. -// -// Solidity: event ExecutionFeeRecipientGIndexChanged(uint256 newExecutionFeeRecipientGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) FilterExecutionFeeRecipientGIndexChanged(opts *bind.FilterOpts) (*BeaconVerifierExecutionFeeRecipientGIndexChangedIterator, error) { - - logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "ExecutionFeeRecipientGIndexChanged") - if err != nil { - return nil, err - } - return &BeaconVerifierExecutionFeeRecipientGIndexChangedIterator{contract: _BeaconVerifier.contract, event: "ExecutionFeeRecipientGIndexChanged", logs: logs, sub: sub}, nil -} - -// WatchExecutionFeeRecipientGIndexChanged is a free log subscription operation binding the contract event 0x15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e855301548. -// -// Solidity: event ExecutionFeeRecipientGIndexChanged(uint256 newExecutionFeeRecipientGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) WatchExecutionFeeRecipientGIndexChanged(opts *bind.WatchOpts, sink chan<- *BeaconVerifierExecutionFeeRecipientGIndexChanged) (event.Subscription, error) { - - logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "ExecutionFeeRecipientGIndexChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BeaconVerifierExecutionFeeRecipientGIndexChanged) - if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionFeeRecipientGIndexChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseExecutionFeeRecipientGIndexChanged is a log parse operation binding the contract event 0x15e42eec45edd1a051ce50f823a5d6482237d402c471639da37b62e855301548. -// -// Solidity: event ExecutionFeeRecipientGIndexChanged(uint256 newExecutionFeeRecipientGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) ParseExecutionFeeRecipientGIndexChanged(log types.Log) (*BeaconVerifierExecutionFeeRecipientGIndexChanged, error) { - event := new(BeaconVerifierExecutionFeeRecipientGIndexChanged) - if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionFeeRecipientGIndexChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BeaconVerifierExecutionNumberGIndexChangedIterator is returned from FilterExecutionNumberGIndexChanged and is used to iterate over the raw logs and unpacked data for ExecutionNumberGIndexChanged events raised by the BeaconVerifier contract. -type BeaconVerifierExecutionNumberGIndexChangedIterator struct { - Event *BeaconVerifierExecutionNumberGIndexChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BeaconVerifierExecutionNumberGIndexChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierExecutionNumberGIndexChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierExecutionNumberGIndexChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BeaconVerifierExecutionNumberGIndexChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BeaconVerifierExecutionNumberGIndexChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BeaconVerifierExecutionNumberGIndexChanged represents a ExecutionNumberGIndexChanged event raised by the BeaconVerifier contract. -type BeaconVerifierExecutionNumberGIndexChanged struct { - NewExecutionNumberGIndex *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterExecutionNumberGIndexChanged is a free log retrieval operation binding the contract event 0xebb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264. -// -// Solidity: event ExecutionNumberGIndexChanged(uint256 newExecutionNumberGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) FilterExecutionNumberGIndexChanged(opts *bind.FilterOpts) (*BeaconVerifierExecutionNumberGIndexChangedIterator, error) { - - logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "ExecutionNumberGIndexChanged") - if err != nil { - return nil, err - } - return &BeaconVerifierExecutionNumberGIndexChangedIterator{contract: _BeaconVerifier.contract, event: "ExecutionNumberGIndexChanged", logs: logs, sub: sub}, nil -} - -// WatchExecutionNumberGIndexChanged is a free log subscription operation binding the contract event 0xebb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264. -// -// Solidity: event ExecutionNumberGIndexChanged(uint256 newExecutionNumberGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) WatchExecutionNumberGIndexChanged(opts *bind.WatchOpts, sink chan<- *BeaconVerifierExecutionNumberGIndexChanged) (event.Subscription, error) { - - logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "ExecutionNumberGIndexChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BeaconVerifierExecutionNumberGIndexChanged) - if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionNumberGIndexChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseExecutionNumberGIndexChanged is a log parse operation binding the contract event 0xebb01e1290204d373c7af00fec97d08cfacb9d72df4842842680e74f9ff76264. -// -// Solidity: event ExecutionNumberGIndexChanged(uint256 newExecutionNumberGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) ParseExecutionNumberGIndexChanged(log types.Log) (*BeaconVerifierExecutionNumberGIndexChanged, error) { - event := new(BeaconVerifierExecutionNumberGIndexChanged) - if err := _BeaconVerifier.contract.UnpackLog(event, "ExecutionNumberGIndexChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BeaconVerifierOwnershipHandoverCanceledIterator is returned from FilterOwnershipHandoverCanceled and is used to iterate over the raw logs and unpacked data for OwnershipHandoverCanceled events raised by the BeaconVerifier contract. -type BeaconVerifierOwnershipHandoverCanceledIterator struct { - Event *BeaconVerifierOwnershipHandoverCanceled // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BeaconVerifierOwnershipHandoverCanceledIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierOwnershipHandoverCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierOwnershipHandoverCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BeaconVerifierOwnershipHandoverCanceledIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BeaconVerifierOwnershipHandoverCanceledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BeaconVerifierOwnershipHandoverCanceled represents a OwnershipHandoverCanceled event raised by the BeaconVerifier contract. -type BeaconVerifierOwnershipHandoverCanceled struct { - PendingOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipHandoverCanceled is a free log retrieval operation binding the contract event 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92. -// -// Solidity: event OwnershipHandoverCanceled(address indexed pendingOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) FilterOwnershipHandoverCanceled(opts *bind.FilterOpts, pendingOwner []common.Address) (*BeaconVerifierOwnershipHandoverCanceledIterator, error) { - - var pendingOwnerRule []interface{} - for _, pendingOwnerItem := range pendingOwner { - pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) - } - - logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "OwnershipHandoverCanceled", pendingOwnerRule) - if err != nil { - return nil, err - } - return &BeaconVerifierOwnershipHandoverCanceledIterator{contract: _BeaconVerifier.contract, event: "OwnershipHandoverCanceled", logs: logs, sub: sub}, nil -} - -// WatchOwnershipHandoverCanceled is a free log subscription operation binding the contract event 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92. -// -// Solidity: event OwnershipHandoverCanceled(address indexed pendingOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) WatchOwnershipHandoverCanceled(opts *bind.WatchOpts, sink chan<- *BeaconVerifierOwnershipHandoverCanceled, pendingOwner []common.Address) (event.Subscription, error) { - - var pendingOwnerRule []interface{} - for _, pendingOwnerItem := range pendingOwner { - pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) - } - - logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "OwnershipHandoverCanceled", pendingOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BeaconVerifierOwnershipHandoverCanceled) - if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverCanceled", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipHandoverCanceled is a log parse operation binding the contract event 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92. -// -// Solidity: event OwnershipHandoverCanceled(address indexed pendingOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) ParseOwnershipHandoverCanceled(log types.Log) (*BeaconVerifierOwnershipHandoverCanceled, error) { - event := new(BeaconVerifierOwnershipHandoverCanceled) - if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverCanceled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BeaconVerifierOwnershipHandoverRequestedIterator is returned from FilterOwnershipHandoverRequested and is used to iterate over the raw logs and unpacked data for OwnershipHandoverRequested events raised by the BeaconVerifier contract. -type BeaconVerifierOwnershipHandoverRequestedIterator struct { - Event *BeaconVerifierOwnershipHandoverRequested // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BeaconVerifierOwnershipHandoverRequestedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierOwnershipHandoverRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierOwnershipHandoverRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BeaconVerifierOwnershipHandoverRequestedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BeaconVerifierOwnershipHandoverRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BeaconVerifierOwnershipHandoverRequested represents a OwnershipHandoverRequested event raised by the BeaconVerifier contract. -type BeaconVerifierOwnershipHandoverRequested struct { - PendingOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipHandoverRequested is a free log retrieval operation binding the contract event 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d. -// -// Solidity: event OwnershipHandoverRequested(address indexed pendingOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) FilterOwnershipHandoverRequested(opts *bind.FilterOpts, pendingOwner []common.Address) (*BeaconVerifierOwnershipHandoverRequestedIterator, error) { - - var pendingOwnerRule []interface{} - for _, pendingOwnerItem := range pendingOwner { - pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) - } - - logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "OwnershipHandoverRequested", pendingOwnerRule) - if err != nil { - return nil, err - } - return &BeaconVerifierOwnershipHandoverRequestedIterator{contract: _BeaconVerifier.contract, event: "OwnershipHandoverRequested", logs: logs, sub: sub}, nil -} - -// WatchOwnershipHandoverRequested is a free log subscription operation binding the contract event 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d. -// -// Solidity: event OwnershipHandoverRequested(address indexed pendingOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) WatchOwnershipHandoverRequested(opts *bind.WatchOpts, sink chan<- *BeaconVerifierOwnershipHandoverRequested, pendingOwner []common.Address) (event.Subscription, error) { - - var pendingOwnerRule []interface{} - for _, pendingOwnerItem := range pendingOwner { - pendingOwnerRule = append(pendingOwnerRule, pendingOwnerItem) - } - - logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "OwnershipHandoverRequested", pendingOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BeaconVerifierOwnershipHandoverRequested) - if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipHandoverRequested is a log parse operation binding the contract event 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d. -// -// Solidity: event OwnershipHandoverRequested(address indexed pendingOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) ParseOwnershipHandoverRequested(log types.Log) (*BeaconVerifierOwnershipHandoverRequested, error) { - event := new(BeaconVerifierOwnershipHandoverRequested) - if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipHandoverRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BeaconVerifierOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the BeaconVerifier contract. -type BeaconVerifierOwnershipTransferredIterator struct { - Event *BeaconVerifierOwnershipTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BeaconVerifierOwnershipTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BeaconVerifierOwnershipTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BeaconVerifierOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BeaconVerifierOwnershipTransferred represents a OwnershipTransferred event raised by the BeaconVerifier contract. -type BeaconVerifierOwnershipTransferred struct { - OldOwner common.Address - NewOwner common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed oldOwner, address indexed newOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, oldOwner []common.Address, newOwner []common.Address) (*BeaconVerifierOwnershipTransferredIterator, error) { - - var oldOwnerRule []interface{} - for _, oldOwnerItem := range oldOwner { - oldOwnerRule = append(oldOwnerRule, oldOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "OwnershipTransferred", oldOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return &BeaconVerifierOwnershipTransferredIterator{contract: _BeaconVerifier.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed oldOwner, address indexed newOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BeaconVerifierOwnershipTransferred, oldOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { - - var oldOwnerRule []interface{} - for _, oldOwnerItem := range oldOwner { - oldOwnerRule = append(oldOwnerRule, oldOwnerItem) - } - var newOwnerRule []interface{} - for _, newOwnerItem := range newOwner { - newOwnerRule = append(newOwnerRule, newOwnerItem) - } - - logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "OwnershipTransferred", oldOwnerRule, newOwnerRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BeaconVerifierOwnershipTransferred) - if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. -// -// Solidity: event OwnershipTransferred(address indexed oldOwner, address indexed newOwner) -func (_BeaconVerifier *BeaconVerifierFilterer) ParseOwnershipTransferred(log types.Log) (*BeaconVerifierOwnershipTransferred, error) { - event := new(BeaconVerifierOwnershipTransferred) - if err := _BeaconVerifier.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator is returned from FilterZeroValidatorPubkeyGIndexChanged and is used to iterate over the raw logs and unpacked data for ZeroValidatorPubkeyGIndexChanged events raised by the BeaconVerifier contract. -type BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator struct { - Event *BeaconVerifierZeroValidatorPubkeyGIndexChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BeaconVerifierZeroValidatorPubkeyGIndexChanged represents a ZeroValidatorPubkeyGIndexChanged event raised by the BeaconVerifier contract. -type BeaconVerifierZeroValidatorPubkeyGIndexChanged struct { - NewZeroValidatorPubkeyGIndex *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterZeroValidatorPubkeyGIndexChanged is a free log retrieval operation binding the contract event 0xe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21. -// -// Solidity: event ZeroValidatorPubkeyGIndexChanged(uint256 newZeroValidatorPubkeyGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) FilterZeroValidatorPubkeyGIndexChanged(opts *bind.FilterOpts) (*BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator, error) { - - logs, sub, err := _BeaconVerifier.contract.FilterLogs(opts, "ZeroValidatorPubkeyGIndexChanged") - if err != nil { - return nil, err - } - return &BeaconVerifierZeroValidatorPubkeyGIndexChangedIterator{contract: _BeaconVerifier.contract, event: "ZeroValidatorPubkeyGIndexChanged", logs: logs, sub: sub}, nil -} - -// WatchZeroValidatorPubkeyGIndexChanged is a free log subscription operation binding the contract event 0xe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21. -// -// Solidity: event ZeroValidatorPubkeyGIndexChanged(uint256 newZeroValidatorPubkeyGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) WatchZeroValidatorPubkeyGIndexChanged(opts *bind.WatchOpts, sink chan<- *BeaconVerifierZeroValidatorPubkeyGIndexChanged) (event.Subscription, error) { - - logs, sub, err := _BeaconVerifier.contract.WatchLogs(opts, "ZeroValidatorPubkeyGIndexChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) - if err := _BeaconVerifier.contract.UnpackLog(event, "ZeroValidatorPubkeyGIndexChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseZeroValidatorPubkeyGIndexChanged is a log parse operation binding the contract event 0xe2e34d74290e04aa3646f259594633252b8ecbbc3bb59351491198ab661eab21. -// -// Solidity: event ZeroValidatorPubkeyGIndexChanged(uint256 newZeroValidatorPubkeyGIndex) -func (_BeaconVerifier *BeaconVerifierFilterer) ParseZeroValidatorPubkeyGIndexChanged(log types.Log) (*BeaconVerifierZeroValidatorPubkeyGIndexChanged, error) { - event := new(BeaconVerifierZeroValidatorPubkeyGIndexChanged) - if err := _BeaconVerifier.contract.UnpackLog(event, "ZeroValidatorPubkeyGIndexChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/mod/geth-primitives/pkg/eip4788/beacon_verifier.go b/mod/geth-primitives/pkg/eip4788/beacon_verifier.go deleted file mode 100644 index 8266eda40f..0000000000 --- a/mod/geth-primitives/pkg/eip4788/beacon_verifier.go +++ /dev/null @@ -1,23 +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 eip4788 - -//go:generate go run github.com/ethereum/go-ethereum/cmd/abigen --abi=../../../../contracts/out/BeaconVerifier.sol/BeaconVerifier.abi.json --bin=../../../../contracts/out/BeaconVerifier.sol/BeaconVerifier.bin --pkg=eip4788 --type=BeaconVerifier --out=beacon_verifier.abigen.go From 4d7ad22c3c9e36a52b02556e9813ab0274078b63 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 17:47:50 -0400 Subject: [PATCH 39/44] tidy-sync --- mod/node-api/go.mod | 20 ------------- mod/node-api/go.sum | 72 --------------------------------------------- testing/go.mod | 4 +-- 3 files changed, 2 insertions(+), 94 deletions(-) diff --git a/mod/node-api/go.mod b/mod/node-api/go.mod index 6305d0afc4..23159f34c2 100644 --- a/mod/node-api/go.mod +++ b/mod/node-api/go.mod @@ -3,7 +3,6 @@ module github.com/berachain/beacon-kit/mod/node-api go 1.22.5 require ( - github.com/attestantio/go-eth2-client v0.21.9 github.com/berachain/beacon-kit/mod/errors v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/log v0.0.0-20240705193247-d464364483df github.com/berachain/beacon-kit/mod/primitives v0.0.0-20240808194557-e72e74f58197 @@ -39,15 +38,9 @@ require ( github.com/ethereum/c-kzg-4844 v1.0.3 // indirect github.com/ethereum/go-ethereum v1.14.7 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect - github.com/fatih/color v1.17.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.4 // indirect github.com/getsentry/sentry-go v0.28.1 // indirect github.com/go-faster/xor v1.0.0 // indirect - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-playground/validator/v10 v10.22.0 // indirect - github.com/goccy/go-yaml v1.9.5 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect @@ -55,21 +48,17 @@ require ( github.com/gorilla/websocket v1.5.3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.3.1 // indirect - github.com/huandu/go-clone v1.6.0 // indirect github.com/karalabe/ssz v0.2.1-0.20240724074312-3d1ff7a6f7c4 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/pk910/dynamic-ssz v0.0.3 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect @@ -78,10 +67,8 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 // indirect github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b // indirect - github.com/r3labs/sse/v2 v2.10.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect - github.com/rs/zerolog v1.33.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect github.com/stretchr/objx v0.5.2 // indirect @@ -91,19 +78,12 @@ require ( github.com/tklauser/numcpus v0.8.0 // indirect github.com/umbracle/fastrlp v0.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/otel v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.27.0 // indirect - go.opentelemetry.io/otel/trace v1.27.0 // indirect golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.27.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect - gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/mod/node-api/go.sum b/mod/node-api/go.sum index cd8af0c973..289f8ce1b5 100644 --- a/mod/node-api/go.sum +++ b/mod/node-api/go.sum @@ -6,8 +6,6 @@ github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjC github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/attestantio/go-eth2-client v0.21.9 h1:NX5GmbAyx2ZtKEsKk6JsxPcaGR1E0vugMEb4kVsY0XU= -github.com/attestantio/go-eth2-client v0.21.9/go.mod h1:d7ZPNrMX8jLfIgML5u7QZxFo2AukLM+5m08iMaLdqb8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/berachain/beacon-kit/mod/chain-spec v0.0.0-20240705193247-d464364483df h1:mnD1LKqDQ0n+OFdDqOuvKaEiUKRJzsO4V0wyyn/gJYg= @@ -54,7 +52,6 @@ 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/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= github.com/crate-crypto/go-kzg-4844 v1.1.0 h1:EN/u9k2TF6OWSHrCCDBBU6GLNMq88OspHHlMnHfoyU4= @@ -76,9 +73,6 @@ github.com/ethereum/go-ethereum v1.14.7 h1:EHpv3dE8evQmpVEQ/Ne2ahB06n2mQptdwqaMN github.com/ethereum/go-ethereum v1.14.7/go.mod h1:Mq0biU2jbdmKSZoqOj29017ygFrMnB5/Rifwp980W4o= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= -github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79 h1:oMYkNRlaY+YxcbYW4U84mQQkujiloBbxQFnTOHUbkec= github.com/ferranbt/fastssz v0.1.4-0.20240629094022-eac385e6ee79/go.mod h1:EGSbefgAPd3M0hlBwOCw4Mkj+0YAaSnXw1QeLasY6XQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -86,38 +80,18 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= -github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/getsentry/sentry-go v0.28.1 h1:zzaSm/vHmGllRM6Tpx1492r0YDzauArdBfkJRtY6P5k= github.com/getsentry/sentry-go v0.28.1/go.mod h1:1fQZ+7l7eeJ3wYi82q5Hg8GqAPgefRq+FP/QhafYVgg= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-faster/xor v1.0.0 h1:2o8vTOgErSGHP3/7XwA5ib1FTtUsNtwCoLLBjl31X38= github.com/go-faster/xor v1.0.0/go.mod h1:x5CaDY9UKErKzqfRfFZdfu+OSTfoZny3w5Ak7UxcipQ= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= -github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= -github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao= -github.com/go-playground/validator/v10 v10.22.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/goccy/go-yaml v1.9.5 h1:Eh/+3uk9kLxG4koCX6lRMAPS1OaMSAi+FJcya0INdB0= -github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -151,12 +125,6 @@ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iU github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= -github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= -github.com/huandu/go-clone v1.6.0 h1:HMo5uvg4wgfiy5FoGOqlFLQED/VGRm2D9Pi8g1FXPGc= -github.com/huandu/go-clone v1.6.0/go.mod h1:ReGivhG6op3GYr+UY3lS6mxjKp7MIGTknuU5TbTVaXE= -github.com/huandu/go-clone/generic v1.6.0 h1:Wgmt/fUZ28r16F2Y3APotFD59sHk1p78K0XLdbUYN5U= -github.com/huandu/go-clone/generic v1.6.0/go.mod h1:xgd9ZebcMsBWWcBx5mVMCoqMX24gLWr5lQicr+nVXNs= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/karalabe/ssz v0.2.1-0.20240724074312-3d1ff7a6f7c4 h1:CvO92iWYv7SS7hWzd1cYaAhGVZmanD/DtUfe0s+kTeg= github.com/karalabe/ssz v0.2.1-0.20240724074312-3d1ff7a6f7c4/go.mod h1:SUFJO5R2VkUK3vT80pjfIB/g7eaQgSU2RhbuL8GOJq4= @@ -174,17 +142,6 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= -github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= @@ -217,8 +174,6 @@ github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pk910/dynamic-ssz v0.0.3 h1:fCWzFowq9P6SYCc7NtJMkZcIHk+r5hSVD+32zVi6Aio= -github.com/pk910/dynamic-ssz v0.0.3/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -237,17 +192,12 @@ github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15 h1:lC8ki github.com/prysmaticlabs/go-bitfield v0.0.0-20240618144021-706c95b2dd15/go.mod h1:8svFBIKKu31YriBG/pNizo9N0Jr9i5PQ+dFkxWg3x5k= github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b h1:VK7thFOnhxAZ/5aolr5Os4beiubuD08WiuiHyRqgwks= github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b/go.mod h1:HRuvtXLZ4WkaB1MItToVH2e8ZwKwZPY5/Rcby+CvvLY= -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/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= -github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw= @@ -256,9 +206,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= @@ -276,12 +224,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/otel v1.27.0 h1:9BZoF3yMK/O1AafMiQTVu0YDj5Ea4hPhxCs7sGva+cg= -go.opentelemetry.io/otel v1.27.0/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -go.opentelemetry.io/otel/metric v1.27.0 h1:hvj3vdEKyeCi4YaYfNjv2NUje8FqKqUY8IlF0FxV/ik= -go.opentelemetry.io/otel/metric v1.27.0/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -go.opentelemetry.io/otel/trace v1.27.0 h1:IqYb813p7cmbHk0a5y6pD5JPakbVfftRXABGt5/Rscw= -go.opentelemetry.io/otel/trace v1.27.0/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= 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= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -294,7 +236,6 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191116160921-f9c825593386/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= @@ -317,8 +258,6 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -328,18 +267,14 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -355,8 +290,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -367,10 +300,6 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= -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/cenkalti/backoff.v1 v1.1.0 h1:Arh75ttbsvlpVA7WtVpH4u9h6Zl46xuptxqLxPiSo4Y= -gopkg.in/cenkalti/backoff.v1 v1.1.0/go.mod h1:J6Vskwqd+OMVJl8C33mmtxTBs2gyzfv7UDAkHu8BrjI= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -382,7 +311,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= diff --git a/testing/go.mod b/testing/go.mod index 989dae0a6b..53e5bcb26e 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -31,9 +31,9 @@ require ( require ( github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240806094948-2c4293ef36c4 // indirect - github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/gabriel-vasile/mimetype v1.4.4 // indirect + github.com/go-playground/validator/v10 v10.22.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/leodido/go-urn v1.4.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/umbracle/fastrlp v0.1.0 // indirect ) From cf36833bdbc8c8d73445c1a6c076661d9c51ae1b Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 18:11:01 -0400 Subject: [PATCH 40/44] try test --- testing/e2e/e2e_api_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index 758c10c782..aeca3ed802 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -21,6 +21,8 @@ package e2e_test import ( + "fmt" + beaconapi "github.com/attestantio/go-eth2-client/api" "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" "github.com/berachain/beacon-kit/testing/e2e/config" @@ -38,13 +40,14 @@ func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { s.Require().NotNil(client) // Ensure the state root is not nil. - stateRoot, err := client.BeaconStateRoot( + stateRootResp, err := client.BeaconStateRoot( s.Ctx(), &beaconapi.BeaconStateRootOpts{ State: utils.StateIDHead, }, ) s.Require().NoError(err) - s.Require().NotEmpty(stateRoot) - s.Require().False(stateRoot.Data.IsZero()) + s.Require().NotEmpty(stateRootResp) + fmt.Println("stateRootResp data", *stateRootResp.Data) + s.Require().False(stateRootResp.Data.IsZero()) } From 002012ed58f0ce73b29eb434689480ed698cdc83 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Mon, 12 Aug 2024 18:31:26 -0400 Subject: [PATCH 41/44] fix --- mod/node-api/handlers/beacon/historical.go | 4 +--- testing/e2e/e2e_api_test.go | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/mod/node-api/handlers/beacon/historical.go b/mod/node-api/handlers/beacon/historical.go index 44fc21c081..b97e26f55b 100644 --- a/mod/node-api/handlers/beacon/historical.go +++ b/mod/node-api/handlers/beacon/historical.go @@ -47,9 +47,7 @@ func (h *Handler[_, ContextT, _, _]) GetStateRoot(c ContextT) (any, error) { return beacontypes.ValidatorResponse{ ExecutionOptimistic: false, // stubbed Finalized: false, // stubbed - Data: types.Wrap( - beacontypes.RootData{Root: stateRoot}, - ), + Data: beacontypes.RootData{Root: stateRoot}, }, nil } diff --git a/testing/e2e/e2e_api_test.go b/testing/e2e/e2e_api_test.go index aeca3ed802..b9e14ab04a 100644 --- a/testing/e2e/e2e_api_test.go +++ b/testing/e2e/e2e_api_test.go @@ -21,8 +21,6 @@ package e2e_test import ( - "fmt" - beaconapi "github.com/attestantio/go-eth2-client/api" "github.com/berachain/beacon-kit/mod/node-api/handlers/utils" "github.com/berachain/beacon-kit/testing/e2e/config" @@ -48,6 +46,5 @@ func (s *BeaconKitE2ESuite) TestBeaconAPIStartup() { ) s.Require().NoError(err) s.Require().NotEmpty(stateRootResp) - fmt.Println("stateRootResp data", *stateRootResp.Data) s.Require().False(stateRootResp.Data.IsZero()) } From e569d6ce29179fd7666bbe712dd0485e1eae2340 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Wed, 14 Aug 2024 12:03:46 -0400 Subject: [PATCH 42/44] rename --- testing/e2e/suite/types/beacon_client.go | 16 ++++++++-------- testing/e2e/suite/types/consensus_client.go | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/testing/e2e/suite/types/beacon_client.go b/testing/e2e/suite/types/beacon_client.go index 0d002bd150..fd029af4ba 100644 --- a/testing/e2e/suite/types/beacon_client.go +++ b/testing/e2e/suite/types/beacon_client.go @@ -28,9 +28,9 @@ import ( "github.com/berachain/beacon-kit/mod/errors" ) -// BeaconKitNode is a wrapper around the client.Service interface to add +// BeaconKitNodeClient is a wrapper around the client.Service interface to add // additional methods specific to a beacon-kit node's API. -type BeaconKitNode interface { +type BeaconKitNodeClient interface { client.Service client.FarFutureEpochProvider @@ -84,12 +84,12 @@ type BeaconKitNode interface { // Other beacon-kit node-api methods here... } -// NewBeaconKitClient creates a new BeaconKitNode client instance with a given -// cancel context. -func NewBeaconKitClient( +// NewBeaconKitNodeClient creates a new beacon-kit node-api client instance +// with the given cancel context. +func NewBeaconKitNodeClient( cancelCtx context.Context, params ...beaconhttp.Parameter, -) (BeaconKitNode, error) { +) (BeaconKitNodeClient, error) { service, err := beaconhttp.New( cancelCtx, params..., @@ -98,9 +98,9 @@ func NewBeaconKitClient( return nil, err } - client, ok := service.(BeaconKitNode) + client, ok := service.(BeaconKitNodeClient) if !ok { - return nil, errors.New("failed to cast service to BeaconKitNode") + return nil, errors.New("failed to cast service to BeaconKitNodeClient") } return client, nil diff --git a/testing/e2e/suite/types/consensus_client.go b/testing/e2e/suite/types/consensus_client.go index eb2189fb73..8f7edfc351 100644 --- a/testing/e2e/suite/types/consensus_client.go +++ b/testing/e2e/suite/types/consensus_client.go @@ -40,7 +40,7 @@ type ConsensusClient struct { rpcclient.Client // Beacon node-api client - BeaconKitNode + BeaconKitNodeClient // Cancel function for the context cancelFunc context.CancelFunc @@ -79,7 +79,7 @@ func (cc *ConsensusClient) Connect(ctx context.Context) error { panic("Couldn't find the public port for the node API") } cancelCtx, cancel := context.WithCancel(ctx) - cc.BeaconKitNode, err = NewBeaconKitClient( + cc.BeaconKitNodeClient, err = NewBeaconKitNodeClient( cancelCtx, beaconhttp.WithAddress( fmt.Sprintf("http://0.0.0.0:%d", nodePort.GetNumber()), From 4bd3be69d7859c8007fc72c1ae04da2ec3f4c02c Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Wed, 14 Aug 2024 14:21:25 -0400 Subject: [PATCH 43/44] bet --- mod/consensus-types/pkg/types/block.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/consensus-types/pkg/types/block.go b/mod/consensus-types/pkg/types/block.go index 5a6b10131e..a4e86f5c5c 100644 --- a/mod/consensus-types/pkg/types/block.go +++ b/mod/consensus-types/pkg/types/block.go @@ -24,6 +24,7 @@ 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/version" + "github.com/davecgh/go-spew/spew" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) @@ -111,6 +112,8 @@ func (b *BeaconBlock) SizeSSZ(fixed bool) uint32 { // DefineSSZ defines the SSZ encoding for the BeaconBlock object. func (b *BeaconBlock) DefineSSZ(codec *ssz.Codec) { + + spew.Dump(b) // Define the static data (fields and dynamic offsets) ssz.DefineUint64(codec, &b.Slot) ssz.DefineUint64(codec, &b.ProposerIndex) From 347d0ef6e197c3db00ab3a0ec59595dfea71cfc2 Mon Sep 17 00:00:00 2001 From: Cal Bera Date: Wed, 14 Aug 2024 15:48:44 -0400 Subject: [PATCH 44/44] undo --- mod/consensus-types/pkg/types/block.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/mod/consensus-types/pkg/types/block.go b/mod/consensus-types/pkg/types/block.go index a4e86f5c5c..5a6b10131e 100644 --- a/mod/consensus-types/pkg/types/block.go +++ b/mod/consensus-types/pkg/types/block.go @@ -24,7 +24,6 @@ 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/version" - "github.com/davecgh/go-spew/spew" fastssz "github.com/ferranbt/fastssz" "github.com/karalabe/ssz" ) @@ -112,8 +111,6 @@ func (b *BeaconBlock) SizeSSZ(fixed bool) uint32 { // DefineSSZ defines the SSZ encoding for the BeaconBlock object. func (b *BeaconBlock) DefineSSZ(codec *ssz.Codec) { - - spew.Dump(b) // Define the static data (fields and dynamic offsets) ssz.DefineUint64(codec, &b.Slot) ssz.DefineUint64(codec, &b.ProposerIndex)