From 56ef8367b5f2a5d68a051dacdc3f78d4feb70ac4 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 20 Sep 2023 16:12:28 -0400 Subject: [PATCH 01/94] modularize default handler --- cosmos/abci/abci.go | 50 ++++++++++++++++ cosmos/abci/prepare/default.go | 101 +++++++++++++++++++++++++++++++++ cosmos/abci/process/default.go | 60 ++++++++++++++++++++ e2e/testapp/app.go | 6 +- 4 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 cosmos/abci/abci.go create mode 100644 cosmos/abci/prepare/default.go create mode 100644 cosmos/abci/process/default.go diff --git a/cosmos/abci/abci.go b/cosmos/abci/abci.go new file mode 100644 index 000000000..24456cb5a --- /dev/null +++ b/cosmos/abci/abci.go @@ -0,0 +1,50 @@ +package abci + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/mempool" + + prepare "pkg.berachain.dev/polaris/cosmos/abci/prepare" + process "pkg.berachain.dev/polaris/cosmos/abci/process" +) + +type ( + // ProposalTxVerifier defines the interface that is implemented by BaseApp, + // that any custom ABCI PrepareProposal and ProcessProposal handler can use + // to verify a transaction. + ProposalTxVerifier interface { + PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) + ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) + } + + // GasTx defines the contract that a transaction with a gas limit must implement. + GasTx interface { + GetGas() uint64 + } + + // DefaultProposalHandler defines the default ABCI PrepareProposal and + // ProcessProposal handlers. + DefaultProposalHandler struct { + proposer prepare.Handler + processor process.Handler + } +) + +func NewDefaultProposalHandler(mp mempool.Mempool, txVerifier ProposalTxVerifier) DefaultProposalHandler { + _, isNoOp := mp.(mempool.NoOpMempool) + if mp == nil || isNoOp { + panic("mempool must be set and cannot be a NoOpMempool") + } + return DefaultProposalHandler{ + proposer: prepare.NewHandler(mp, txVerifier), + processor: process.NewHandler(txVerifier), + } +} + +func (h DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { + return h.proposer.PrepareProposal +} + +func (h DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { + return h.processor.ProcessProposal +} diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go new file mode 100644 index 000000000..1acefa3f8 --- /dev/null +++ b/cosmos/abci/prepare/default.go @@ -0,0 +1,101 @@ +package prepare + +import ( + "errors" + + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" +) + +type ( + // ProposalTxVerifier defines the interface that is implemented by BaseApp, + // that any custom ABCI PrepareProposal and ProcessProposal handler can use + // to verify a transaction. + ProposalTxVerifier interface { + PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) + ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) + } + + // GasTx defines the contract that a transaction with a gas limit must implement. + GasTx interface { + GetGas() uint64 + } +) + +type Handler struct { + mempool sdkmempool.Mempool + txVerifier ProposalTxVerifier +} + +func NewHandler(mempool sdkmempool.Mempool, txVerifier ProposalTxVerifier) Handler { + return Handler{ + mempool: mempool, + txVerifier: txVerifier, + } +} + +func (h *Handler) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { + var maxBlockGas int64 + if b := ctx.ConsensusParams().Block; b != nil { + maxBlockGas = b.MaxGas + } + + var ( + selectedTxs [][]byte + totalTxBytes int64 + totalTxGas uint64 + ) + + iterator := h.mempool.Select(ctx, req.Txs) + + for iterator != nil { + memTx := iterator.Tx() + + // NOTE: Since transaction verification was already executed in CheckTx, + // which calls mempool.Insert, in theory everything in the pool should be + // valid. But some mempool implementations may insert invalid txs, so we + // check again. + bz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) + if err != nil { + err := h.mempool.Remove(memTx) + if err != nil && !errors.Is(err, sdkmempool.ErrTxNotFound) { + return nil, err + } + } else { + var txGasLimit uint64 + txSize := int64(len(bz)) + + gasTx, ok := memTx.(GasTx) + if ok { + txGasLimit = gasTx.GetGas() + } + + // only add the transaction to the proposal if we have enough capacity + if (txSize + totalTxBytes) < req.MaxTxBytes { + // If there is a max block gas limit, add the tx only if the limit has + // not been met. + if maxBlockGas > 0 { + if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { + totalTxGas += txGasLimit + totalTxBytes += txSize + selectedTxs = append(selectedTxs, bz) + } + } else { + totalTxBytes += txSize + selectedTxs = append(selectedTxs, bz) + } + } + + // Check if we've reached capacity. If so, we cannot select any more + // transactions. + if totalTxBytes >= req.MaxTxBytes || (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { + break + } + } + + iterator = iterator.Next() + } + + return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil +} diff --git a/cosmos/abci/process/default.go b/cosmos/abci/process/default.go new file mode 100644 index 000000000..268107f0a --- /dev/null +++ b/cosmos/abci/process/default.go @@ -0,0 +1,60 @@ +package proposal + +import ( + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type ( + // ProposalTxVerifier defines the interface that is implemented by BaseApp, + // that any custom ABCI PrepareProposal and ProcessProposal handler can use + // to verify a transaction. + ProposalTxVerifier interface { + PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) + ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) + } + + // GasTx defines the contract that a transaction with a gas limit must implement. + GasTx interface { + GetGas() uint64 + } +) + +type Handler struct { + txVerifier ProposalTxVerifier +} + +func NewHandler(txVerifier ProposalTxVerifier) Handler { + return Handler{ + txVerifier: txVerifier, + } +} + +func (h *Handler) ProcessProposal(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { + var totalTxGas uint64 + + var maxBlockGas int64 + if b := ctx.ConsensusParams().Block; b != nil { + maxBlockGas = b.MaxGas + } + + for _, txBytes := range req.Txs { + tx, err := h.txVerifier.ProcessProposalVerifyTx(txBytes) + if err != nil { + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil + } + + if maxBlockGas > 0 { + gasTx, ok := tx.(GasTx) + if ok { + totalTxGas += gasTx.GetGas() + } + + if totalTxGas > uint64(maxBlockGas) { + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil + } + } + } + + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil +} diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 1f30dc3a6..d782d2ffc 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -61,6 +61,7 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "pkg.berachain.dev/polaris/cosmos/abci" evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" @@ -208,8 +209,6 @@ func NewPolarisApp( // abciPropHandler := NewDefaultProposalHandler(nonceMempool, app.App.BaseApp) // // app.App.BaseApp.SetMempool(nonceMempool) - // app.App.BaseApp.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) - // app.App.BaseApp.SetProcessProposal(abciPropHandler.ProcessProposalHandler()) // // Alternatively, you can construct BaseApp options, append those to // baseAppOptions and pass them to the appBuilder. @@ -223,6 +222,9 @@ func NewPolarisApp( // baseAppOptions = append(baseAppOptions, prepareOpt) app.App = appBuilder.Build(db, traceStore, append(baseAppOptions, baseapp.SetMempool(ethTxMempool))...) + proposalHandler := abci.NewDefaultProposalHandler(ethTxMempool, app) + app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) + app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) // read oracle config from app-opts, and construct oracle service polarisCfg, err := evmconfig.ReadConfigFromAppOpts(appOpts) From 4fe840ad5c86f8f9a42beea08fba7d91799d48cf Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 20 Sep 2023 16:17:31 -0400 Subject: [PATCH 02/94] lint --- cosmos/abci/abci.go | 20 ++++++++++++++++ cosmos/abci/prepare/default.go | 43 +++++++++++++++++++++++++++------- cosmos/abci/process/default.go | 36 ++++++++++++++++++++++++---- 3 files changed, 85 insertions(+), 14 deletions(-) diff --git a/cosmos/abci/abci.go b/cosmos/abci/abci.go index 24456cb5a..52d32f556 100644 --- a/cosmos/abci/abci.go +++ b/cosmos/abci/abci.go @@ -1,3 +1,23 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 abci import ( diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 1acefa3f8..7cb15dd74 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -1,9 +1,30 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 prepare import ( "errors" abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" ) @@ -12,7 +33,7 @@ type ( // ProposalTxVerifier defines the interface that is implemented by BaseApp, // that any custom ABCI PrepareProposal and ProcessProposal handler can use // to verify a transaction. - ProposalTxVerifier interface { + TxVerifier interface { PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) } @@ -25,17 +46,20 @@ type ( type Handler struct { mempool sdkmempool.Mempool - txVerifier ProposalTxVerifier + txVerifier TxVerifier } -func NewHandler(mempool sdkmempool.Mempool, txVerifier ProposalTxVerifier) Handler { +func NewHandler(mempool sdkmempool.Mempool, txVerifier TxVerifier) Handler { return Handler{ - mempool: mempool, + mempool: mempool, txVerifier: txVerifier, } } -func (h *Handler) PrepareProposal(ctx sdk.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) { +//nolint:gocognit // from sdk. +func (h *Handler) PrepareProposal( + ctx sdk.Context, req *abci.RequestPrepareProposal, +) (*abci.ResponsePrepareProposal, error) { var maxBlockGas int64 if b := ctx.ConsensusParams().Block; b != nil { maxBlockGas = b.MaxGas @@ -57,9 +81,9 @@ func (h *Handler) PrepareProposal(ctx sdk.Context, req *abci.RequestPreparePropo // valid. But some mempool implementations may insert invalid txs, so we // check again. bz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) - if err != nil { - err := h.mempool.Remove(memTx) - if err != nil && !errors.Is(err, sdkmempool.ErrTxNotFound) { + if err != nil { //nolint:nestif // from sdk. + err2 := h.mempool.Remove(memTx) + if err2 != nil && !errors.Is(err2, sdkmempool.ErrTxNotFound) { return nil, err } } else { @@ -89,7 +113,8 @@ func (h *Handler) PrepareProposal(ctx sdk.Context, req *abci.RequestPreparePropo // Check if we've reached capacity. If so, we cannot select any more // transactions. - if totalTxBytes >= req.MaxTxBytes || (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { + if totalTxBytes >= req.MaxTxBytes || + (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { break } } diff --git a/cosmos/abci/process/default.go b/cosmos/abci/process/default.go index 268107f0a..1cc77474d 100644 --- a/cosmos/abci/process/default.go +++ b/cosmos/abci/process/default.go @@ -1,7 +1,28 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 proposal import ( abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -9,7 +30,7 @@ type ( // ProposalTxVerifier defines the interface that is implemented by BaseApp, // that any custom ABCI PrepareProposal and ProcessProposal handler can use // to verify a transaction. - ProposalTxVerifier interface { + TxVerifier interface { PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) } @@ -21,16 +42,18 @@ type ( ) type Handler struct { - txVerifier ProposalTxVerifier + txVerifier TxVerifier } -func NewHandler(txVerifier ProposalTxVerifier) Handler { +func NewHandler(txVerifier TxVerifier) Handler { return Handler{ txVerifier: txVerifier, } } -func (h *Handler) ProcessProposal(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { +func (h *Handler) ProcessProposal( + ctx sdk.Context, req *abci.RequestProcessProposal, +) (*abci.ResponseProcessProposal, error) { var totalTxGas uint64 var maxBlockGas int64 @@ -41,7 +64,10 @@ func (h *Handler) ProcessProposal(ctx sdk.Context, req *abci.RequestProcessPropo for _, txBytes := range req.Txs { tx, err := h.txVerifier.ProcessProposalVerifyTx(txBytes) if err != nil { - return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil + //nolint:nolintlint,nilerr // intentional. + return &abci.ResponseProcessProposal{ + Status: abci.ResponseProcessProposal_REJECT, + }, nil } if maxBlockGas > 0 { From f03126f811d19131846158ec48fc0bffaacbd3b1 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 25 Sep 2023 22:29:40 -0400 Subject: [PATCH 03/94] base fee works --- .../cosmos/lib/cosmos_types.abigen.go | 2 +- .../bindings/testing/consume_gas.abigen.go | 2 +- .../distribution_testing_helper.abigen.go | 2 +- .../governance/governance_wrapper.abigen.go | 2 +- .../bindings/testing/liquid_staking.abigen.go | 2 +- .../testing/precompile_constructor.abigen.go | 2 +- .../bindings/testing/solmate_erc20.abigen.go | 2 +- cosmos/go.mod | 2 +- cosmos/go.sum | 4 +- cosmos/x/evm/genesis_test.go | 2 +- cosmos/x/evm/keeper/host.go | 6 +- cosmos/x/evm/keeper/keeper.go | 5 +- cosmos/x/evm/keeper/processor_test.go | 2 +- cosmos/x/evm/plugins/txpool/handler.go | 131 +++++ cosmos/x/evm/plugins/txpool/mempool/errors.go | 27 - .../evm/plugins/txpool/mempool/interfaces.go | 36 -- .../x/evm/plugins/txpool/mempool/mempool.go | 94 +--- .../plugins/txpool/mempool/mempool_policy.go | 96 ---- .../plugins/txpool/mempool/mempool_reader.go | 210 -------- .../plugins/txpool/mempool/mempool_test.go | 509 ------------------ .../plugins/txpool/mempool/mempool_writer.go | 94 ---- cosmos/x/evm/plugins/txpool/plugin.go | 86 +-- cosmos/x/evm/plugins/txpool/serializer.go | 27 +- .../x/evm/plugins/txpool/subpool/mempool.go | 3 + e2e/localnet/go.mod | 2 +- e2e/localnet/go.sum | 4 +- e2e/precompile/go.mod | 2 +- e2e/precompile/go.sum | 4 +- e2e/testapp/app.go | 2 +- e2e/testapp/go.mod | 2 +- e2e/testapp/polard/cmd/root.go | 2 +- eth/core/chain_resources.go | 13 +- eth/core/host.go | 23 +- eth/core/mock/txpool_plugin.mock.go | 404 +------------- eth/core/txpool/txpool.go | 45 -- eth/go.mod | 2 +- eth/go.sum | 4 +- eth/miner/miner.go | 12 +- eth/polar/backend.go | 14 +- eth/polar/polaris.go | 32 +- 40 files changed, 288 insertions(+), 1627 deletions(-) create mode 100644 cosmos/x/evm/plugins/txpool/handler.go delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/errors.go delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/interfaces.go delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/mempool_policy.go delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/mempool_reader.go delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/mempool_test.go delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/mempool_writer.go create mode 100644 cosmos/x/evm/plugins/txpool/subpool/mempool.go delete mode 100644 eth/core/txpool/txpool.go diff --git a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go index 8a80c42ac..c4ee848a6 100644 --- a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go +++ b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go @@ -53,7 +53,7 @@ type CosmosPageResponse struct { // CosmosTypesMetaData contains all meta data concerning the CosmosTypes contract. var CosmosTypesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"coin\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structCosmos.PageRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageRequest\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"nextKey\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structCosmos.PageResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageResponse\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea2646970667358221220cd938f1594be90a76ff4980bf8e5eaf239e05e8867ea7e669197172d39f7515c64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea264697066735822122015e30edb9e27c41d56fb4bfa53a31f05390368387a2fc2162a847aff41cbd03f64736f6c63430008140033", } // CosmosTypesABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/consume_gas.abigen.go b/contracts/bindings/testing/consume_gas.abigen.go index a9094d2e4..e6a63d51a 100644 --- a/contracts/bindings/testing/consume_gas.abigen.go +++ b/contracts/bindings/testing/consume_gas.abigen.go @@ -32,7 +32,7 @@ var ( // ConsumeGasMetaData contains all meta data concerning the ConsumeGas contract. var ConsumeGasMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"name\":\"GasConsumed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetGas\",\"type\":\"uint256\"}],\"name\":\"consumeGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220e4c37c223937988a35267edfbba61b52336e1dcb9878edd519edc3eb1881ec2a64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220cf53a89b858bcd89a9f376c9fc26e35242e2b2c6d3caa86630baa63414ba767d64736f6c63430008140033", } // ConsumeGasABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/distribution_testing_helper.abigen.go b/contracts/bindings/testing/distribution_testing_helper.abigen.go index fb1bc5865..7b666b045 100644 --- a/contracts/bindings/testing/distribution_testing_helper.abigen.go +++ b/contracts/bindings/testing/distribution_testing_helper.abigen.go @@ -32,7 +32,7 @@ var ( // DistributionWrapperMetaData contains all meta data concerning the DistributionWrapper contract. var DistributionWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_distributionprecompile\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingprecompile\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validator\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"contractIDistributionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawAddress\",\"type\":\"address\"}],\"name\":\"setWithdrawAddress\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_validatorAddress\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea2646970667358221220d6420ed9fe47b1dded4517a423e78839a9dd77daf8059b956323723ecfd6fbaa64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea26469706673582212202e148d4d850cdba2cbe51678ae1a7f68fe0fa2f96b110fc952cd1dda2cd446f064736f6c63430008140033", } // DistributionWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/governance/governance_wrapper.abigen.go b/contracts/bindings/testing/governance/governance_wrapper.abigen.go index 078e0b533..18c2f176a 100644 --- a/contracts/bindings/testing/governance/governance_wrapper.abigen.go +++ b/contracts/bindings/testing/governance/governance_wrapper.abigen.go @@ -63,7 +63,7 @@ type IGovernanceModuleTallyResult struct { // GovernanceWrapperMetaData contains all meta data concerning the GovernanceWrapper contract. var GovernanceWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governanceModule\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"bank\",\"outputs\":[{\"internalType\":\"contractIBankModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"cancelProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"proposalStatus\",\"type\":\"int32\"}],\"name\":\"getProposals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceModule\",\"outputs\":[{\"internalType\":\"contractIGovernanceModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposal\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"submit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"option\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212201f67eaa333db58f67fd67829d4572725e7b6f8e219b7fff6db0569c9cde8c99064736f6c63430008140033", + Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212200f262c3e6b8ff76d92a1e14eccc8782c65e08fa4ac303d2cc597f07cbb2108e564736f6c63430008140033", } // GovernanceWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/liquid_staking.abigen.go b/contracts/bindings/testing/liquid_staking.abigen.go index b21677f25..3564e4d87 100644 --- a/contracts/bindings/testing/liquid_staking.abigen.go +++ b/contracts/bindings/testing/liquid_staking.abigen.go @@ -32,7 +32,7 @@ var ( // LiquidStakingMetaData contains all meta data concerning the LiquidStaking contract. var LiquidStakingMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Data\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"Success\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"}],\"name\":\"totalDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212207fe4477c3d859b2693554fce34aa78b5b6178fed4358006f6720363c82c3e61a64736f6c63430008140033", + Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212203dcda167560f1c8fb3c11f4a89b20e181e1e50d985f93a819a0df6da03697e7564736f6c63430008140033", } // LiquidStakingABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/precompile_constructor.abigen.go b/contracts/bindings/testing/precompile_constructor.abigen.go index b797846d5..6de916b48 100644 --- a/contracts/bindings/testing/precompile_constructor.abigen.go +++ b/contracts/bindings/testing/precompile_constructor.abigen.go @@ -32,7 +32,7 @@ var ( // PrecompileConstructorMetaData contains all meta data concerning the PrecompileConstructor contract. var PrecompileConstructorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"stakingModule\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea264697066735822122046e77f6a88a4be3cbc9d7ea46351722a7a2d37b3318c5b6d0788e34350d484aa64736f6c63430008140033", + Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea2646970667358221220a82988036ad4b985661f0390de6424b0e38ace000700a265b64053cd745ef6a664736f6c63430008140033", } // PrecompileConstructorABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/solmate_erc20.abigen.go b/contracts/bindings/testing/solmate_erc20.abigen.go index b05c3b6da..044cae7c7 100644 --- a/contracts/bindings/testing/solmate_erc20.abigen.go +++ b/contracts/bindings/testing/solmate_erc20.abigen.go @@ -32,7 +32,7 @@ var ( // SolmateERC20MetaData contains all meta data concerning the SolmateERC20 contract. var SolmateERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea2646970667358221220383dcd14dbb4c0b9470e469c942780d9bdeb224d65a2dfb2a8153bcffc7cd73064736f6c63430008140033", + Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea26469706673582212205e042b28d312604c9eb9f461fa6a115a942807f99d76a60aa48515134e1ded3e64736f6c63430008140033", } // SolmateERC20ABI is the input ABI used to generate the binding from. diff --git a/cosmos/go.mod b/cosmos/go.mod index 9fe4a6b4c..163e9e509 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/cosmos/go.sum b/cosmos/go.sum index 74e176068..a53e11919 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -113,8 +113,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230919212829-4a52af33e74d h1:w5V4L3haBlaaC0VMWd+WlLIS4U8J1YOIsdFaPf/qoWs= -github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 240c6b0bb..53fab8ce8 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -67,7 +67,7 @@ var _ = Describe("", func() { k = keeper.NewKeeper( ak, sk, storetypes.NewKVStoreKey("evm"), - evmmempool.NewPolarisEthereumTxPool(), + &evmmempool.WrappedGethTxPool{}, func() *ethprecompile.Injector { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index e99590d69..4c69f9b7f 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -35,10 +35,8 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" - "pkg.berachain.dev/polaris/lib/utils" ) // Compile-time interface assertion. @@ -86,7 +84,7 @@ func NewHost( h.cp = configuration.NewPlugin(storeKey) h.ep = engine.NewPlugin() h.gp = gas.NewPlugin() - h.txp = txpool.NewPlugin(utils.MustGetAs[*mempool.EthTxPool](ethTxMempool)) + // h.txp = txpool.NewPlugin(utils.MustGetAs[*mempool.EthTxPool](ethTxMempool)) h.pcs = precompiles return h @@ -105,7 +103,7 @@ func (h *host) Setup( h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) // TODO: re-enable historical plugin using ABCI listener. h.hp = historical.NewPlugin(h.cp, h.bp, nil, storeKey) - h.txp.SetNonceRetriever(h.sp) + // h.txp.SetNonceRetriever(h.sp) // Set the query context function for the block and state plugins h.sp.SetQueryContextFn(qc) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 325d402ce..927837125 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -35,7 +35,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/common" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" @@ -132,13 +131,13 @@ func (k *Keeper) GetPolaris() *polar.Polaris { } func (k *Keeper) SetClientCtx(clientContext client.Context) { - k.host.GetTxPoolPlugin().(txpool.Plugin).SetClientContext(clientContext) + // k.host.GetTxPoolPlugin().(txpool.Plugin).SetClientContext(clientContext) k.host.GetEnginePlugin().(engine.Plugin).Start(clientContext) // TODO: move this go func() { // spin lock for a bit - for ; k.lock; time.Sleep(1 * time.Second) { + for ; k.lock; time.Sleep(2 * time.Second) { continue } diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index b8e649210..6a9d05318 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -91,7 +91,7 @@ var _ = Describe("Processor", func() { k = keeper.NewKeeper( ak, sk, storetypes.NewKVStoreKey("evm"), - evmmempool.NewPolarisEthereumTxPool(), + &evmmempool.WrappedGethTxPool{}, func() *ethprecompile.Injector { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go new file mode 100644 index 000000000..ba59f0827 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 txpool + +import ( + "sync" + + "cosmossdk.io/log" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + + "github.com/ethereum/go-ethereum/event" + + "github.com/ethereum/go-ethereum/core/txpool" + "pkg.berachain.dev/polaris/eth/core" + "pkg.berachain.dev/polaris/eth/core/types" +) + +// txChanSize is the size of channel listening to NewTxsEvent. The number is referenced from the +// size of tx pool. +const txChanSize = 4096 + +// handler listens for new insertions into the geth txpool and broadcasts them to the CometBFT +// layer for p2p and ABCI. +type handler struct { + // Cosmos + logger log.Logger + clientCtx client.Context + serializer *serializer + + // Ethereum + txPool *txpool.TxPool + txsCh chan core.NewTxsEvent + txsSub event.Subscription + wg sync.WaitGroup +} + +// newHandler creates a new handler and starts the broadcast loop. +func newHandler( + clientCtx client.Context, txPool *txpool.TxPool, serializer *serializer, logger log.Logger, +) *handler { + h := &handler{ + clientCtx: clientCtx.WithBroadcastMode(flags.BroadcastSync), + serializer: serializer, + txPool: txPool, + logger: logger, + } + h.wg.Add(1) + h.txsCh = make(chan core.NewTxsEvent, txChanSize) + h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) + h.logger.Info("handler started") + go h.txBroadcastLoop() // start broadcast handlers + return h +} + +// stop stops the handler. +func (h *handler) stop() { + // Triggers txBroadcastLoop to quit. + h.txsSub.Unsubscribe() + + // Leave the channels. + close(h.txsCh) + h.wg.Wait() + + // h.logger.Info("handler stopped") + + // h.txPool.Stop() +} + +// txBroadcastLoop announces new transactions to connected peers. +func (h *handler) txBroadcastLoop() { + defer h.wg.Done() + for { + select { + case event := <-h.txsCh: + h.broadcastTransactions(event.Txs) + case <-h.txsSub.Err(): + h.logger.Error("tx subscription error", "err", h.txsSub.Err()) + h.stop() // TODO: move this call into exit routine. + return + } + } +} + +// broadcastTransactions will propagate a batch of transactions to the CometBFT mempool. +func (h *handler) broadcastTransactions(txs types.Transactions) { + h.logger.Info("broadcasting transactions", "num_txs", len(txs)) + for _, signedEthTx := range txs { + // Serialize the transaction to Bytes + txBytes, err := h.serializer.SerializeToBytes(signedEthTx) + if err != nil { + h.logger.Error("failed to serialize transaction", "err", err) + continue + } + + // Send the transaction to the CometBFT mempool, which will gossip it to peers via + // CometBFT's p2p layer. + rsp, err := h.clientCtx.BroadcastTx(txBytes) + + // If we see an ABCI response error. + if rsp != nil && rsp.Code != 0 { + h.logger.Error("failed to broadcast transaction", "rsp", rsp, "err", err) + continue + } + + // If we see any other type of error. + if err != nil { + h.logger.Error("error on transactions broadcast", "err", err) + continue + } + } +} diff --git a/cosmos/x/evm/plugins/txpool/mempool/errors.go b/cosmos/x/evm/plugins/txpool/mempool/errors.go deleted file mode 100644 index 4fd579661..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/errors.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import "errors" - -var ( - ErrIncorrectTxType = errors.New("tx is not of type WrappedEthereumTransaction") -) diff --git a/cosmos/x/evm/plugins/txpool/mempool/interfaces.go b/cosmos/x/evm/plugins/txpool/mempool/interfaces.go deleted file mode 100644 index 7ea05cae9..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/interfaces.go +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import ( - "pkg.berachain.dev/polaris/eth/common" - "pkg.berachain.dev/polaris/eth/core" -) - -type ( - // NonceRetriever is used to retrieve a nonce from the db. - NonceRetriever interface { - // used to directly retrieve a nonce during queries. - GetNonce(addr common.Address) uint64 - // used to verify nonce during insertion into mempool. - StateAtBlockNumber(number uint64) (core.StatePlugin, error) - } -) diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool.go b/cosmos/x/evm/plugins/txpool/mempool/mempool.go index bee6696ef..4e35a8a87 100644 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool.go +++ b/cosmos/x/evm/plugins/txpool/mempool/mempool.go @@ -1,95 +1,31 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool import ( - "math/big" - "sync" + "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" - - "pkg.berachain.dev/polaris/eth/common" - coretypes "pkg.berachain.dev/polaris/eth/core/types" + "github.com/ethereum/go-ethereum/core/txpool" ) -// EthTxPool is a mempool for Ethereum transactions. It wraps a PriorityNonceMempool and caches -// transactions that are added to the mempool by ethereum transaction hash. -type EthTxPool struct { - // The underlying mempool implementation. - *mempool.PriorityNonceMempool[*big.Int] - - // We need to keep track of the priority policy so that we can update the base fee. - priorityPolicy *EthereumTxPriorityPolicy - - // NonceRetriever is used to retrieve the nonce for a given address (this is typically a - // reference to the StateDB). - nr NonceRetriever +var _ mempool.Mempool = (*WrappedGethTxPool)(nil) - // ethTxCache caches transactions that are added to the mempool so that they can be retrieved - // later - ethTxCache map[common.Hash]*coretypes.Transaction - - // nonceToHash maps a nonce to the hash of the transaction that was added to the mempool with - // that nonce. This is used to retrieve the hash of a transaction that was added to the mempool - // by nonce. - nonceToHash map[common.Address]map[uint64]common.Hash - - // We have a mutex to protect the ethTxCache and nonces maps since they are accessed - // concurrently by multiple goroutines. - mu sync.RWMutex +type WrappedGethTxPool struct { + txpool.TxPool } -// NewPolarisEthereumTxPool creates a new Ethereum transaction pool. -func NewPolarisEthereumTxPool() *EthTxPool { - tpp := EthereumTxPriorityPolicy{ - baseFee: big.NewInt(0), - } - config := mempool.PriorityNonceMempoolConfig[*big.Int]{ - TxReplacement: EthereumTxReplacePolicy[*big.Int]{ - PriceBump: 10, //nolint:gomnd // 10% to match geth. - }.Func, - TxPriority: mempool.TxPriority[*big.Int]{ - GetTxPriority: tpp.GetTxPriority, - Compare: func(a *big.Int, b *big.Int) int { - return a.Cmp(b) - }, - MinValue: big.NewInt(-1), - }, - MaxTx: 10000, //nolint:gomnd // todo: parametize this. - } +func (wgtp *WrappedGethTxPool) CountTx() int { + return 0 +} - return &EthTxPool{ - PriorityNonceMempool: mempool.NewPriorityMempool(config), - nonceToHash: make(map[common.Address]map[uint64]common.Hash), - ethTxCache: make(map[common.Hash]*coretypes.Transaction), - priorityPolicy: &tpp, - } +func (wgtp *WrappedGethTxPool) Insert(_ context.Context, tx sdk.Tx) error { + return nil } -// SetNonceRetriever sets the nonce retriever db for the mempool. -func (etp *EthTxPool) SetNonceRetriever(nr NonceRetriever) { - etp.nr = nr +func (wgtp *WrappedGethTxPool) Select(context.Context, [][]byte) mempool.Iterator { + return nil } -// SetBaseFee updates the base fee in the priority policy. -func (etp *EthTxPool) SetBaseFee(baseFee *big.Int) { - etp.priorityPolicy.baseFee = baseFee +func (wgtp *WrappedGethTxPool) Remove(sdk.Tx) error { + return nil } diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool_policy.go b/cosmos/x/evm/plugins/txpool/mempool/mempool_policy.go deleted file mode 100644 index 4513fc621..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool_policy.go +++ /dev/null @@ -1,96 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import ( - "context" - "math/big" - - sdk "github.com/cosmos/cosmos-sdk/types" - - evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" -) - -// ============================================================================= -// Priority Policy -// ============================================================================= - -type EthereumTxPriorityPolicy struct { - baseFee *big.Int -} - -// GetTxPriorityFn returns a function that can be used to calculate the priority of a transaction. -func (tpp *EthereumTxPriorityPolicy) GetTxPriority(ctx context.Context, tx sdk.Tx) *big.Int { - ethTx := evmtypes.GetAsEthTx(tx) - if ethTx == nil { - // If not an ethereum transaction fallback to the default cosmos-sdk priority. - return big.NewInt(sdk.UnwrapSDKContext(ctx).Priority()) - } - - return ethTx.EffectiveGasTipValue(tpp.baseFee) -} - -// ============================================================================= -// Replacement Policy -// ============================================================================= - -// EthereumTxReplacePolicy implements the Ethereum protocol's transaction replacement policy for a Cosmos-SDK mempool. -type EthereumTxReplacePolicy[C comparable] struct { - PriceBump uint64 // Minimum price bump percentage to replace an already existing transaction (nonce) -} - -// EthereumTxReplacePolicy.Func is called when a new transaction is added to the mempool and a transaction -// with the same nonce already exists. It returns true if the new transaction should replace the -// existing transaction. -// -// Source: https://github.com/ethereum/go-ethereum/blob/9231770811cda0473a7fa4e2bccc95bf62aae634/core/txpool/list.go#L284 -// -//nolint:lll // url. -func (etpc EthereumTxReplacePolicy[C]) Func(_, _ C, oldTx, newTx sdk.Tx) bool { - // Convert the transactions to Ethereum transactions. - oldEthTx := evmtypes.GetAsEthTx(oldTx) - newEthTx := evmtypes.GetAsEthTx(newTx) - if oldEthTx == nil || newEthTx == nil || - oldEthTx.GasFeeCapCmp(newEthTx) >= 0 || oldEthTx.GasTipCapCmp(newEthTx) >= 0 { - return false - } - - // thresholdFeeCap = oldFC * (100 + priceBump) / 100 - a := big.NewInt(100 + int64(etpc.PriceBump)) //nolint:gomnd // 100% + priceBump. - aFeeCap := new(big.Int).Mul(a, oldEthTx.GasFeeCap()) - aTip := a.Mul(a, oldEthTx.GasTipCap()) - - // thresholdTip = oldTip * (100 + priceBump) / 100 - b := big.NewInt(100) //nolint:gomnd // 100% + priceBump. - thresholdFeeCap := aFeeCap.Div(aFeeCap, b) - thresholdTip := aTip.Div(aTip, b) - - // We have to ensure that both the new fee cap and tip are higher than the - // old ones as well as checking the percentage threshold to ensure that - // this is accurate for low (Wei-level) gas price replacements. - if newEthTx.GasFeeCapIntCmp(thresholdFeeCap) < 0 || newEthTx.GasTipCapIntCmp(thresholdTip) < 0 { - return false - } - - // If we get here, the new transaction has a higher fee cap and tip than the - // old one, and the percentage threshold has been met, so we can replace it. - return true -} diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool_reader.go b/cosmos/x/evm/plugins/txpool/mempool/mempool_reader.go deleted file mode 100644 index bef1ad44e..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool_reader.go +++ /dev/null @@ -1,210 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/signing" - - evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" - "pkg.berachain.dev/polaris/eth/common" - coretypes "pkg.berachain.dev/polaris/eth/core/types" -) - -// Get is called when a transaction is retrieved from the mempool. -func (etp *EthTxPool) Get(hash common.Hash) *coretypes.Transaction { - return etp.ethTxCache[hash] -} - -// Pending is called when txs in the mempool are retrieved. -// -// NOT THREAD SAFE. -func (etp *EthTxPool) Pending(bool) map[common.Address][]*coretypes.Transaction { - pendingNonces := make(map[common.Address]uint64) - pending := make(map[common.Address][]*coretypes.Transaction) - - etp.mu.RLock() - defer etp.mu.RUnlock() - for iter := etp.PriorityNonceMempool.Select(context.Background(), nil); iter != nil; iter = iter.Next() { - tx := iter.Tx() - if ethTx := evmtypes.GetAsEthTx(tx); ethTx != nil { - addr := coretypes.GetSender(ethTx) - pendingNonce := pendingNonces[addr] - switch { - case pendingNonce == 0: - // If its the first tx, set the pending nonce to the nonce of the tx. - txNonce := ethTx.Nonce() - // If on the first lookup the nonce delta is more than 0, then there is a gap - // and thus no pending transactions, but there are queued transactions. We - // continue. - if sdbNonce := etp.nr.GetNonce(addr); txNonce-sdbNonce >= 1 { - continue - } - // this is a pending tx, add it to the pending map. - pendingNonces[addr] = txNonce - pending[addr] = append(pending[addr], ethTx) - case ethTx.Nonce() == pendingNonce+1: - // If its not the first tx, but the nonce is the same as the pending nonce, add - // it to the list. - pending[addr] = append(pending[addr], ethTx) - pendingNonces[addr] = pendingNonce + 1 - default: - // If we see an out of order nonce, we break since the rest should be "queued". - break - } - } - } - - return pending -} - -// queued retrieves the content of the mempool. -// -// NOT THREAD SAFE. -func (etp *EthTxPool) queued() map[common.Address][]*coretypes.Transaction { - pendingNonces := make(map[common.Address]uint64) - queued := make(map[common.Address][]*coretypes.Transaction) - - // After the lock is released we can iterate over the mempool. - etp.mu.RLock() - defer etp.mu.RUnlock() - for iter := etp.PriorityNonceMempool.Select(context.Background(), nil); iter != nil; iter = iter.Next() { - if ethTx := evmtypes.GetAsEthTx(iter.Tx()); ethTx != nil { - addr := coretypes.GetSender(ethTx) - pendingNonce, seenTransaction := pendingNonces[addr] - switch { - case !seenTransaction: - // When we see a transaction, mark it as the pending nonce. - pendingNonce = ethTx.Nonce() - // If on the first lookup the nonce delta is more than 0, then there is a gap - // and thus no pending transactions, but there are queued transactions. - if pendingNonce-etp.nr.GetNonce(addr) >= 1 { - queued[addr] = append(queued[addr], ethTx) - } else { - // this is a pending tx, add it to the pending map. - pendingNonces[addr] = pendingNonce - } - case ethTx.Nonce() == pendingNonce+1: - // If we are still contiguous and the nonce is the same as the pending nonce, - // increment the pending nonce. - pendingNonce++ - pendingNonces[addr] = pendingNonce - default: - // If we are still contiguous and the nonce is greater than the pending nonce, we are no longer contiguous. - // Add to the queued list. - queued[addr] = append(queued[addr], ethTx) - // All other transactions in the skip list should be queued. - } - } - } - - return queued -} - -// Nonce returns the nonce for the given address from the mempool if the address has sent a tx -// in the mempool. -// -// NOT THREAD SAFE. -func (etp *EthTxPool) Nonce(addr common.Address) uint64 { - etp.mu.RLock() - defer etp.mu.RUnlock() - pendingNonces := make(map[common.Address]uint64) - - // search for the last pending tx for the given address - for iter := etp.PriorityNonceMempool.Select(context.Background(), nil); iter != nil; iter = iter.Next() { - txAddr, txNonce := getTxSenderNonce(iter.Tx()) - if addr != txAddr { - continue - } - pendingNonce, ok := pendingNonces[addr] - switch { - case !ok: - // If on the first lookup the nonce delta is more than 0, then there is a gap - // and thus no pending transactions, but there are queued transactions. - if sdbNonce := etp.nr.GetNonce(addr); txNonce-sdbNonce >= 1 { - return sdbNonce - } - // this is a pending tx, add it to the pending map. - pendingNonces[addr] = txNonce - case txNonce == pendingNonce+1: - // If we are still contiguous and the nonce is the same as the pending nonce, - // increment the pending nonce. - pendingNonces[addr]++ - case txNonce > pendingNonce+1: - // As soon as we see a non contiguous nonce we break. - break - } - } - - // if the addr has no eth txs, fallback to the nonce retriever db - if _, ok := pendingNonces[addr]; !ok { - return etp.nr.GetNonce(addr) - } - - // pending nonce is 1 more than the current nonce - return pendingNonces[addr] + 1 -} - -// Stats returns the number of currently pending and queued (locally created) transactions. -// -// NOT THREAD SAFE. -func (etp *EthTxPool) Stats() (int, int) { - var pendingTxsLen, queuedTxsLen int - pending, queued := etp.Content() - - for _, txs := range pending { - pendingTxsLen += len(txs) - } - for _, txs := range queued { - queuedTxsLen += len(txs) - } - return pendingTxsLen, queuedTxsLen -} - -// ContentFrom retrieves the data content of the transaction pool, returning the pending as well as -// queued transactions of this address, grouped by nonce. -// -// NOT THREAD SAFE. -func (etp *EthTxPool) ContentFrom(addr common.Address) ([]*coretypes.Transaction, []*coretypes.Transaction) { - pending, queued := etp.Content() - return pending[addr], queued[addr] -} - -// Content retrieves the data content of the transaction pool, returning all the pending as well as -// queued transactions, grouped by account and nonce. -// -// NOT THREAD SAFE. -func (etp *EthTxPool) Content() ( - map[common.Address][]*coretypes.Transaction, map[common.Address][]*coretypes.Transaction, -) { - return etp.Pending(false), etp.queued() -} - -// getTxSenderNonce returns the sender address (as an Eth address) and the nonce of the given tx. -func getTxSenderNonce(tx sdk.Tx) (common.Address, uint64) { - sigs, err := tx.(signing.SigVerifiableTx).GetSignaturesV2() - if err != nil || len(sigs) == 0 { - return common.Address{}, 0 - } - return common.BytesToAddress(sdk.AccAddress(sigs[0].PubKey.Address())), sigs[0].Sequence -} diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool_test.go b/cosmos/x/evm/plugins/txpool/mempool/mempool_test.go deleted file mode 100644 index 9583c422f..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool_test.go +++ /dev/null @@ -1,509 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import ( - "bytes" - "context" - "crypto/ecdsa" - "errors" - "math/big" - "sync" - "testing" - - "google.golang.org/protobuf/reflect/protoreflect" - - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/tx/signing" - authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" - - "pkg.berachain.dev/polaris/cosmos/crypto/keys/ethsecp256k1" - testutil "pkg.berachain.dev/polaris/cosmos/testing/utils" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" - evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" - "pkg.berachain.dev/polaris/eth/common" - coretypes "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/crypto" - "pkg.berachain.dev/polaris/eth/params" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestEthPool(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "cosmos/x/evm/plugins/txpool/mempool") -} - -var ( - ctx sdk.Context - sp state.Plugin - etp *EthTxPool - key1, _ = crypto.GenerateEthKey() - addr1 = crypto.PubkeyToAddress(key1.PublicKey) - key2, _ = crypto.GenerateEthKey() - addr2 = crypto.PubkeyToAddress(key2.PublicKey) -) - -var _ = Describe("EthTxPool", func() { - - BeforeEach(func() { - sCtx, ak, _, _ := testutil.SetupMinimalKeepers() - sp = state.NewPlugin(ak, testutil.EvmKey, &mockPLF{}) - ctx = sCtx - sp.SetQueryContextFn(mockQueryContext) - sp.Reset(ctx) - sp.SetNonce(addr1, 1) - sp.SetNonce(addr2, 2) - sp.Finalize() - sp.Reset(ctx) - etp = NewPolarisEthereumTxPool() - etp.SetNonceRetriever(sp) - }) - - Describe("All Cases", func() { - It("should handle empty txs", func() { - Expect(etp.Get(common.Hash{})).To(BeNil()) - emptyPending, emptyQueued := etp.Content() - Expect(emptyPending).To(BeEmpty()) - Expect(emptyQueued).To(BeEmpty()) - Expect(etp.Nonce(addr1)).To(Equal(uint64(1))) - Expect(etp.Nonce(addr2)).To(Equal(uint64(2))) - Expect(etp.Nonce(common.HexToAddress("0x3"))).To(Equal(uint64(0))) - }) - - It("should error with low nonces", func() { - _, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 0}) - err := etp.Insert(ctx, tx1) - Expect(err).To(HaveOccurred()) - Expect(err.Error()).To(ContainSubstring("nonce too low")) - }) - - It("should return pending/queued txs with correct nonces", func() { - ethTx1, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1}) - ethTx2, tx2 := buildTx(key2, &coretypes.LegacyTx{Nonce: 2}) - - Expect(etp.Insert(ctx, tx1)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - - Expect(etp.Nonce(addr1)).To(Equal(uint64(2))) - Expect(etp.Nonce(addr2)).To(Equal(uint64(3))) - - Expect(etp.Get(ethTx1.Hash()).Hash()).To(Equal(ethTx1.Hash())) - Expect(etp.Get(ethTx2.Hash()).Hash()).To(Equal(ethTx2.Hash())) - - pending, queued := etp.Content() - lenP, lenQ := etp.Stats() - - Expect(pending).To(HaveLen(lenP)) - Expect(queued).To(HaveLen(lenQ)) - - Expect(isPendingTx(etp, ethTx1)).To(BeTrue()) - Expect(isPendingTx(etp, ethTx2)).To(BeTrue()) - - Expect(etp.Remove(tx2)).ToNot(HaveOccurred()) - Expect(etp.Get(ethTx2.Hash())).To(BeNil()) - p2, q2 := etp.ContentFrom(addr2) - Expect(p2).To(BeEmpty()) - Expect(q2).To(BeEmpty()) - Expect(etp.Nonce(addr2)).To(Equal(uint64(2))) - - ethTx11, tx11 := buildTx(key1, &coretypes.LegacyTx{Nonce: 2}) - Expect(etp.Insert(ctx, tx11)).ToNot(HaveOccurred()) - Expect(etp.Nonce(addr1)).To(Equal(uint64(3))) - p11, q11 := etp.ContentFrom(addr1) - Expect(p11).To(HaveLen(2)) - - Expect(isPendingTx(etp, ethTx11)).To(BeTrue()) - Expect(q11).To(BeEmpty()) - }) - - It("should handle replacement txs", func() { - ethTx1, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(1)}) - ethTx2, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(2)}) - - Expect(etp.Insert(ctx, tx1)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - - Expect(etp.Nonce(addr1)).To(Equal(uint64(2))) - - Expect(etp.Get(ethTx1.Hash())).To(BeNil()) - Expect(etp.Get(ethTx2.Hash()).Hash()).To(Equal(ethTx2.Hash())) - - }) - It("should enqueue transactions with out of order nonces then poll from queue when inorder nonce tx is received", - func() { - _, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1}) - ethtx3, tx3 := buildTx(key1, &coretypes.LegacyTx{Nonce: 3}) - - Expect(etp.Insert(ctx, tx1)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx3)).ToNot(HaveOccurred()) - - Expect(isQueuedTx(etp, ethtx3)).To(BeTrue()) - - _, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 2}) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - - _, queuedTransactions := etp.ContentFrom(addr1) - Expect(queuedTransactions).To(BeEmpty()) - Expect(etp.Nonce(addr1)).To(Equal(uint64(4))) - }) - It("should not allow replacement txs with gas increase < 10%", func() { - _, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(99)}) - _, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(100)}) - _, tx3 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(99)}) - - Expect(etp.Insert(ctx, tx1)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx2)).To(HaveOccurred()) - Expect(etp.Insert(ctx, tx3)).To(HaveOccurred()) // should skip the math for replacement - }) - It("should handle spam txs and prevent DOS attacks", func() { - for i := 1; i < 1000; i++ { - _, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: uint64(i)}) - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - } - // probably more stuff down here... - }) - It("should be able to fetch transactions from the cache", func() { - - var txHashes []common.Hash - for i := 1; i < 100; i++ { - ethTx, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: uint64(i)}) - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - txHashes = append(txHashes, ethTx.Hash()) - } - for _, txHash := range txHashes { - Expect(etp.Get(txHash).Hash()).To(Equal(txHash)) - } - - }) - It("should allow resubmitting a transaction with same nonce but different fields", func() { - _, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(1)}) - _, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(5), Data: []byte("blahblah")}) - - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - }) - It("should prioritize transactions first by nonce, then priority", func() { - _, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(1)}) - _, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 2, GasPrice: big.NewInt(5)}) - _, tx3 := buildTx(key1, &coretypes.LegacyTx{Nonce: 3, GasPrice: big.NewInt(3)}) - _, tx31 := buildTx(key1, &coretypes.LegacyTx{Nonce: 3, GasPrice: big.NewInt(5)}) - - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx3)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx31)).ToNot(HaveOccurred()) - - var prevTx *coretypes.Transaction - for _, txs := range etp.Pending(false) { - for _, tx := range txs { - if prevTx == nil { // for the first transaction from a sender - prevTx = tx - } else { // for the rest of the transactions - Expect(tx.Nonce()).To(Equal(prevTx.Nonce() + 1)) - prevTx = tx - - } - // NOTE: replacement transactions are not handled because the old tx is removed from the pool - } - } - pending, _ := etp.Stats() - Expect(pending).To(Equal(3)) - }) - It("should handle many pending txs", func() { - ethTx1, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(1)}) - ethTx2, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 2, GasPrice: big.NewInt(2)}) - ethTx3, tx3 := buildTx(key1, &coretypes.LegacyTx{Nonce: 3, GasPrice: big.NewInt(3)}) - Expect(etp.Insert(ctx, tx1)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx3)).ToNot(HaveOccurred()) - - expected := []common.Hash{ethTx1.Hash(), ethTx2.Hash(), ethTx3.Hash()} - found := etp.Pending(false)[addr1] - Expect(found).To(HaveLen(3)) - for i, ethTx := range found { - Expect(ethTx.Hash()).To(Equal(expected[i])) - } - }) - - It("should not return pending when queued", func() { - _, tx2 := buildTx(key1, &coretypes.LegacyTx{Nonce: 2, GasPrice: big.NewInt(2)}) - _, tx3 := buildTx(key1, &coretypes.LegacyTx{Nonce: 3, GasPrice: big.NewInt(3)}) - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - Expect(etp.Insert(ctx, tx3)).ToNot(HaveOccurred()) - - Expect(etp.Pending(false)[addr1]).To(BeEmpty()) - Expect(etp.queued()[addr1]).To(HaveLen(2)) - pending, queued := etp.Stats() - Expect(pending).To(Equal(0)) - Expect(queued).To(Equal(2)) - }) - - It("should handle concurrent reads", func() { - readsFromA := 0 - readsFromB := 0 - { - // fill mempoopl with transactions - var wg sync.WaitGroup - - for i := 1; i < 10; i++ { - _, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: uint64(i)}) - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - } - - // concurrently read mempool from Peer A ... - wg.Add(1) - go func(etp *EthTxPool) { - defer wg.Done() - for _, txs := range etp.Pending(false) { - for range txs { - readsFromA++ - } - } - }(etp) - - // ... and peer B - wg.Add(1) - go func(etp *EthTxPool) { - defer wg.Done() - for _, txs := range etp.Pending(false) { - for range txs { - readsFromB++ - } - } - }(etp) - wg.Wait() - } - Expect(readsFromA).To(BeEquivalentTo(readsFromB)) - }) - It("should be able to return the transaction priority for a Cosmos tx and effective gas tip value", func() { - ethTx1, tx1 := buildTx(key1, &coretypes.DynamicFeeTx{ - Nonce: 1, GasTipCap: big.NewInt(1), GasFeeCap: big.NewInt(10000)}) - ethTx2, tx2 := buildTx(key2, &coretypes.DynamicFeeTx{ - Nonce: 2, GasTipCap: big.NewInt(2), GasFeeCap: big.NewInt(200)}) - - // Test that the priority policy is working as expected. - tpp := EthereumTxPriorityPolicy{baseFee: big.NewInt(69)} - Expect(tpp.GetTxPriority(ctx, tx1)).To(Equal(ethTx1.EffectiveGasTipValue(tpp.baseFee))) - Expect(tpp.GetTxPriority(ctx, tx2)).To(Equal(ethTx2.EffectiveGasTipValue(tpp.baseFee))) - - // Test live mempool - err := etp.Insert(ctx, tx1) - Expect(err).ToNot(HaveOccurred()) - err = etp.Insert(ctx, tx2) - Expect(err).ToNot(HaveOccurred()) - - // Test that the priority policy is working as expected. - iter := etp.Select(context.TODO(), nil) - higherPriorityTx := evmtypes.GetAsEthTx(iter.Tx()) - lowerPriorityTx := evmtypes.GetAsEthTx(iter.Next().Tx()) - Expect(higherPriorityTx.Hash()).To(Equal(ethTx2.Hash())) - Expect(lowerPriorityTx.Hash()).To(Equal(ethTx1.Hash())) - }) - It("should allow you to set the base fee of the EthTxPool", func() { - before := etp.priorityPolicy.baseFee - etp.SetBaseFee(big.NewInt(69)) - after := etp.priorityPolicy.baseFee - Expect(before).ToNot(BeEquivalentTo(after)) - Expect(after).To(BeEquivalentTo(big.NewInt(69))) - }) - It("should throw when attempting to remove a transaction that doesn't exist", func() { - _, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: 1, GasPrice: big.NewInt(1)}) - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - Expect(etp.Remove(tx)).ToNot(HaveOccurred()) - Expect(etp.Remove(tx)).To(HaveOccurred()) - }) - - It("should return StateDB's nonce when seeing nonce gap on first lookup", func() { - ethTx, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: 3}) - - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - - sdbNonce := etp.nr.GetNonce(addr1) - txNonce := ethTx.Nonce() - Expect(sdbNonce).ToNot(BeEquivalentTo(txNonce)) - Expect(sdbNonce).To(BeEquivalentTo(1)) - Expect(txNonce).To(BeEquivalentTo(3)) - Expect(etp.Nonce(addr1)).To(BeEquivalentTo(sdbNonce)) - - }) - It("should break out of func Nonce(addr) when seeing a noncontigious nonce gap", func() { - _, tx1 := buildTx(key1, &coretypes.LegacyTx{Nonce: 1}) - tx2 := buildSdkTx(key1, 2) - _, tx3 := buildTx(key1, &coretypes.LegacyTx{Nonce: 3}) - _, tx10 := buildTx(key1, &coretypes.LegacyTx{Nonce: 10}) - - Expect(etp.Insert(ctx, tx1)).ToNot(HaveOccurred()) - Expect(etp.Nonce(addr1)).To(BeEquivalentTo(2)) - - Expect(etp.Insert(ctx, tx2)).ToNot(HaveOccurred()) - Expect(etp.Nonce(addr1)).To(BeEquivalentTo(3)) - - Expect(etp.Insert(ctx, tx3)).ToNot(HaveOccurred()) - Expect(etp.Nonce(addr1)).To(BeEquivalentTo(4)) - - Expect(etp.Insert(ctx, tx10)).ToNot(HaveOccurred()) - Expect(etp.Nonce(addr1)).To(BeEquivalentTo(4)) // should not be 10 - }) - - }) - Describe("Race Cases", func() { - It("should handle concurrent additions", func() { - - // apologies in advance for this test, it's not great. - - var wg sync.WaitGroup - - wg.Add(1) - go func(etp *EthTxPool) { - defer wg.Done() - for i := 1; i <= 10; i++ { - _, tx := buildTx(key1, &coretypes.LegacyTx{Nonce: uint64(i)}) - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - } - }(etp) - - wg.Add(1) - go func(etp *EthTxPool) { - defer wg.Done() - for i := 2; i <= 11; i++ { - _, tx := buildTx(key2, &coretypes.LegacyTx{Nonce: uint64(i)}) - Expect(etp.Insert(ctx, tx)).ToNot(HaveOccurred()) - } - }(etp) - - wg.Wait() - lenPending, _ := etp.Stats() - Expect(lenPending).To(BeEquivalentTo(20)) - }) - }) -}) - -// MOCKS BELOW. - -type mockPLF struct{} - -func (mplf *mockPLF) Build(event *sdk.Event) (*coretypes.Log, error) { - return &coretypes.Log{ - Address: common.BytesToAddress([]byte(event.Type)), - }, nil -} - -func isQueuedTx(mempool *EthTxPool, tx *coretypes.Transaction) bool { - _, queued := mempool.Content() - - for _, list := range queued { - for _, ethTx := range list { - if tx.Hash() == ethTx.Hash() { - return true - } - } - } - return false -} - -func isPendingTx(mempool *EthTxPool, tx *coretypes.Transaction) bool { - pending, _ := mempool.Content() - - for _, list := range pending { - for _, ethTx := range list { - if tx.Hash() == ethTx.Hash() { - return true - } - } - } - return false -} - -func buildSdkTx(from *ecdsa.PrivateKey, nonce uint64) sdk.Tx { - pubKey := ðsecp256k1.PubKey{Key: crypto.CompressPubkey(&from.PublicKey)} - signer := crypto.PubkeyToAddress(from.PublicKey) - return &mockSdkTx{ - signers: [][]byte{signer.Bytes()}, - msgs: []sdk.Msg{}, - pubKeys: []cryptotypes.PubKey{pubKey}, - signatures: []signing.SignatureV2{ - { - PubKey: pubKey, - // NOTE: not including the signature data for the mock - Sequence: nonce, - }, - }, - } -} - -func buildTx(from *ecdsa.PrivateKey, txData coretypes.TxData) (*coretypes.Transaction, sdk.Tx) { - signer := coretypes.LatestSignerForChainID(params.DefaultChainConfig.ChainID) - signedEthTx := coretypes.MustSignNewTx(from, signer, txData) - addr, _ := signer.Sender(signedEthTx) - if !bytes.Equal(addr.Bytes(), crypto.PubkeyToAddress(from.PublicKey).Bytes()) { - panic("sender mismatch") - } - pubKey := ðsecp256k1.PubKey{Key: crypto.CompressPubkey(&from.PublicKey)} - return signedEthTx, &mockSdkTx{ - signers: [][]byte{addr.Bytes()}, - msgs: []sdk.Msg{evmtypes.NewFromTransaction(signedEthTx)}, - pubKeys: []cryptotypes.PubKey{pubKey}, - signatures: []signing.SignatureV2{ - { - PubKey: pubKey, - // NOTE: not including the signature data for the mock - Sequence: signedEthTx.Nonce(), - }, - }, - } -} - -var _ authsigning.SigVerifiableTx = (*mockSdkTx)(nil) - -type mockSdkTx struct { - signers [][]byte - msgs []sdk.Msg - pubKeys []cryptotypes.PubKey - signatures []signing.SignatureV2 -} - -func (m *mockSdkTx) ValidateBasic() error { return nil } - -func (m *mockSdkTx) GetMsgs() []sdk.Msg { return m.msgs } -func (m mockSdkTx) GetMsgsV2() ([]protoreflect.ProtoMessage, error) { return nil, nil } -func (m *mockSdkTx) GetSigners() ([][]byte, error) { return m.signers, nil } - -func (m *mockSdkTx) GetPubKeys() ([]cryptotypes.PubKey, error) { return m.pubKeys, nil } - -func (m *mockSdkTx) GetSignaturesV2() ([]signing.SignatureV2, error) { return m.signatures, nil } - -func mockQueryContext(height int64, _ bool) (sdk.Context, error) { - if height <= 0 { - return sdk.Context{}, errors.New("cannot query context at this height") - } - newCtx := testutil.NewContext().WithBlockHeight(height) - header := &coretypes.Header{Number: big.NewInt(height)} - headerBz, err := coretypes.MarshalHeader(header) - if err != nil { - return sdk.Context{}, err - } - newCtx.KVStore(testutil.EvmKey).Set([]byte{evmtypes.HeaderKey}, headerBz) - newCtx.KVStore(testutil.EvmKey).Set(header.Hash().Bytes(), header.Number.Bytes()) - return newCtx, nil -} diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool_writer.go b/cosmos/x/evm/plugins/txpool/mempool/mempool_writer.go deleted file mode 100644 index dbf9cc2c6..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool_writer.go +++ /dev/null @@ -1,94 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - - evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" - "pkg.berachain.dev/polaris/eth/common" - coretypes "pkg.berachain.dev/polaris/eth/core/types" - errorslib "pkg.berachain.dev/polaris/lib/errors" -) - -// Insert is called when a transaction is added to the mempool. -func (etp *EthTxPool) Insert(ctx context.Context, tx sdk.Tx) error { - etp.mu.Lock() - defer etp.mu.Unlock() - - // TODO: do this once per block. This is a temporary solution. - sp, err := etp.nr.StateAtBlockNumber(uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) - if err != nil { - return err - } - - // Call the base mempool's Insert method - if err = etp.PriorityNonceMempool.Insert(ctx, tx); err != nil { - return err - } - - // We want to cache the transaction for lookup. - if ethTx := evmtypes.GetAsEthTx(tx); ethTx != nil { - sender := coretypes.GetSender(ethTx) - nonce := ethTx.Nonce() - - // Reject txs with a nonce lower than the nonce reported by the statedb. - if sdbNonce := sp.GetNonce(sender); sdbNonce > nonce { - return errorslib.Wrap(etp.PriorityNonceMempool.Remove(tx), "nonce too low") - } - - // Delete old hash if the sender has a tx with the same nonce. - if senderNonceHash := etp.nonceToHash[sender]; senderNonceHash != nil { - delete(etp.ethTxCache, senderNonceHash[nonce]) - } - - // Add new hash. - newHash := ethTx.Hash() - if etp.nonceToHash[sender] == nil { - etp.nonceToHash[sender] = make(map[uint64]common.Hash) - } - etp.nonceToHash[sender][nonce] = newHash - etp.ethTxCache[newHash] = ethTx - } - - return nil -} - -// Remove is called when a transaction is removed from the mempool. -func (etp *EthTxPool) Remove(tx sdk.Tx) error { - etp.mu.Lock() - defer etp.mu.Unlock() - - // Call the base mempool's Remove method - if err := etp.PriorityNonceMempool.Remove(tx); err != nil { - return err - } - - // We want to remove any references to the tx from the cache. - if ethTx := evmtypes.GetAsEthTx(tx); ethTx != nil { - delete(etp.ethTxCache, ethTx.Hash()) - delete(etp.nonceToHash[coretypes.GetSender(ethTx)], ethTx.Nonce()) - } - - return nil -} diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index 3661cf794..410c78f46 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -21,18 +21,13 @@ package txpool import ( - errorsmod "cosmossdk.io/errors" + "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/core/txpool" mempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" "pkg.berachain.dev/polaris/eth/core" - coretypes "pkg.berachain.dev/polaris/eth/core/types" - errorslib "pkg.berachain.dev/polaris/lib/errors" ) // Compile-time type assertion. @@ -41,80 +36,31 @@ var _ Plugin = (*plugin)(nil) // Plugin defines the required functions of the transaction pool plugin. type Plugin interface { core.TxPoolPlugin - SetNonceRetriever(mempool.NonceRetriever) - SetClientContext(client.Context) + Start(*txpool.TxPool, client.Context) + // Prepare(*big.Int, coretypes.Signer) } // plugin represents the transaction pool plugin. type plugin struct { - *mempool.EthTxPool - - clientContext client.Context - - // txFeed and scope is used to send new batch transactions to new txs subscribers when the - // batch is added to the mempool. - txFeed event.Feed - scope event.SubscriptionScope + *mempool.WrappedGethTxPool + *handler + serializer *serializer } // NewPlugin returns a new transaction pool plugin. -func NewPlugin(ethTxMempool *mempool.EthTxPool) Plugin { +func NewPlugin(wrappedGethTxPool *mempool.WrappedGethTxPool) Plugin { return &plugin{ - EthTxPool: ethTxMempool, + WrappedGethTxPool: wrappedGethTxPool, } } -// SetClientContext implements the Plugin interface. -func (p *plugin) SetClientContext(ctx client.Context) { - p.clientContext = ctx -} - -// SubscribeNewTxsEvent returns a new event subscription for the new txs feed. -func (p *plugin) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription { - return p.scope.Track(p.txFeed.Subscribe(ch)) -} - -// SendTx sends a transaction to the transaction pool. It takes in a signed Ethereum transaction -// from the rpc backend and wraps it in a Cosmos transaction. The Cosmos transaction is then -// broadcasted to the network. -func (p *plugin) SendTx(signedEthTx *coretypes.Transaction) error { - // Serialize the transaction to Bytes - txBytes, err := SerializeToBytes(p.clientContext, signedEthTx) - if err != nil { - return errorslib.Wrap(err, "failed to serialize transaction") - } - - // Send the transaction to the CometBFT mempool, which will gossip it to peers via CometBFT's - // p2p layer. - syncCtx := p.clientContext.WithBroadcastMode(flags.BroadcastSync) - rsp, err := syncCtx.BroadcastTx(txBytes) - if rsp != nil && rsp.Code != 0 { - err = errorsmod.ABCIError(rsp.Codespace, rsp.Code, rsp.RawLog) - } - if err != nil { - // b.logger.Error("failed to broadcast tx", "error", err.Errsor()) - return err - } - - // Currently sending an individual new txs event for every new tx added to the mempool via - // broadcast. - // TODO: support sending batch new txs events when adding queued txs to the pending txs. - // TODO: move to mempool? - p.txFeed.Send(core.NewTxsEvent{Txs: coretypes.Transactions{signedEthTx}}) - return nil +func (p *plugin) GetHandler() core.Handler { + return p.handler } -// SendPrivTx sends a private transaction to the transaction pool. It takes in a signed ethereum -// transaction from the rpc backend and wraps it in a Cosmos transaction. The Cosmos transaction is -// injected into the local mempool, but is NOT gossiped to peers. -func (p *plugin) SendPrivTx(signedTx *coretypes.Transaction) error { - cosmosTx, err := SerializeToSdkTx(p.clientContext, signedTx) - if err != nil { - return err - } - - // We insert into the local mempool, without gossiping to peers. We use a blank sdk.Context{} - // as the context, as we don't need to use it anyways. We set the priority as the gas price of - // the tx. - return p.EthTxPool.Insert(sdk.Context{}.WithPriority(signedTx.GasPrice().Int64()), cosmosTx) +// Setup implements the Plugin interface. +func (p *plugin) Start(txpool *txpool.TxPool, ctx client.Context) { + p.serializer = newSerializer(ctx) + // p.WrappedGethTxPool.Setup(txpool, p.serializer) + p.handler = newHandler(ctx, txpool, p.serializer, log.NewNopLogger()) } diff --git a/cosmos/x/evm/plugins/txpool/serializer.go b/cosmos/x/evm/plugins/txpool/serializer.go index d2e2af733..bacf686a0 100644 --- a/cosmos/x/evm/plugins/txpool/serializer.go +++ b/cosmos/x/evm/plugins/txpool/serializer.go @@ -30,12 +30,21 @@ import ( coretypes "pkg.berachain.dev/polaris/eth/core/types" ) +type serializer struct { + clientCtx client.Context +} + +func newSerializer(clientCtx client.Context) *serializer { + return &serializer{ + clientCtx: clientCtx, + } +} + // SerializeToSdkTx converts an ethereum transaction to a Cosmos native transaction. -func SerializeToSdkTx( - clientCtx client.Context, signedTx *coretypes.Transaction, -) (sdk.Tx, error) { - // Create a new, empty TxBuilder. - tx := clientCtx.TxConfig.NewTxBuilder() +func (s *serializer) SerializeToSdkTx(signedTx *coretypes.Transaction) (sdk.Tx, error) { + // TODO: do we really need to use extensions for anything? Since we + // are using the standard ante handler stuff I don't think we actually need to. + tx := s.clientCtx.TxConfig.NewTxBuilder() // We can also retrieve the gaslimit for the transaction from the ethereum transaction. tx.SetGasLimit(signedTx.Gas()) @@ -86,17 +95,15 @@ func SerializeToSdkTx( // SerializeToBytes converts an Ethereum transaction to Cosmos formatted txBytes which allows for // it to broadcast it to CometBFT. -func SerializeToBytes( - clientCtx client.Context, signedTx *coretypes.Transaction, -) ([]byte, error) { +func (s *serializer) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) { // First, we convert the Ethereum transaction to a Cosmos transaction. - cosmosTx, err := SerializeToSdkTx(clientCtx, signedTx) + cosmosTx, err := s.SerializeToSdkTx(signedTx) if err != nil { return nil, err } // Then we use the clientCtx.TxConfig.TxEncoder() to encode the Cosmos transaction into bytes. - txBytes, err := clientCtx.TxConfig.TxEncoder()(cosmosTx) + txBytes, err := s.clientCtx.TxConfig.TxEncoder()(cosmosTx) if err != nil { return nil, err } diff --git a/cosmos/x/evm/plugins/txpool/subpool/mempool.go b/cosmos/x/evm/plugins/txpool/subpool/mempool.go new file mode 100644 index 000000000..eec219c66 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/subpool/mempool.go @@ -0,0 +1,3 @@ +package subpool + +type WrappedGethTxPool struct{} diff --git a/e2e/localnet/go.mod b/e2e/localnet/go.mod index 7b0d031f7..bce812328 100644 --- a/e2e/localnet/go.mod +++ b/e2e/localnet/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/e2e/localnet go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 require ( github.com/docker/docker v24.0.5+incompatible diff --git a/e2e/localnet/go.sum b/e2e/localnet/go.sum index f3ffd50ef..587a9a837 100644 --- a/e2e/localnet/go.sum +++ b/e2e/localnet/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230919212829-4a52af33e74d h1:w5V4L3haBlaaC0VMWd+WlLIS4U8J1YOIsdFaPf/qoWs= -github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/precompile/go.mod b/e2e/precompile/go.mod index ed6e8c4a9..f73379927 100644 --- a/e2e/precompile/go.mod +++ b/e2e/precompile/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/e2e/precompile/go.sum b/e2e/precompile/go.sum index 84a992363..99e9e2d47 100644 --- a/e2e/precompile/go.sum +++ b/e2e/precompile/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230919212829-4a52af33e74d h1:w5V4L3haBlaaC0VMWd+WlLIS4U8J1YOIsdFaPf/qoWs= -github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index d782d2ffc..687aebf48 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -135,7 +135,7 @@ func NewPolarisApp( var ( app = &SimApp{} appBuilder *runtime.AppBuilder - ethTxMempool = evmmempool.NewPolarisEthereumTxPool() + ethTxMempool = &evmmempool.WrappedGethTxPool{} // merge the AppConfig and other configuration in one config appConfig = depinject.Configs( MakeAppConfig(bech32Prefix), diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index 8e5443299..3bffdb000 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/e2e/testapp/polard/cmd/root.go b/e2e/testapp/polard/cmd/root.go index 7ae768c28..751b3cff2 100644 --- a/e2e/testapp/polard/cmd/root.go +++ b/e2e/testapp/polard/cmd/root.go @@ -82,7 +82,7 @@ func NewRootCmd() *cobra.Command { if err := depinject.Inject(depinject.Configs( testapp.MakeAppConfig(""), - depinject.Supply(evmmempool.NewPolarisEthereumTxPool(), log.NewNopLogger()), + depinject.Supply(&evmmempool.WrappedGethTxPool{}, log.NewNopLogger()), depinject.Provide(evmtypes.ProvideEthereumTransactionGetSigners)), &interfaceRegistry, &appCodec, diff --git a/eth/core/chain_resources.go b/eth/core/chain_resources.go index 914ac8b9b..f35e670b4 100644 --- a/eth/core/chain_resources.go +++ b/eth/core/chain_resources.go @@ -21,6 +21,9 @@ package core import ( + "errors" + + "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/state" "pkg.berachain.dev/polaris/eth/core/vm" ) @@ -28,13 +31,19 @@ import ( // ChainResources is the interface that defines functions for code paths within the chain to acquire // resources to use in execution such as StateDBss and EVMss. type ChainResources interface { - StateAtBlockNumber(uint64) (vm.GethStateDB, error) + StateAtBlockNumber(uint64) (state.StateDBI, error) + StateAt(root common.Hash) (state.StateDBI, error) GetVMConfig() *vm.Config } +// StateAt returns a statedb configured to read what the state of the blockchain is/was at a given +func (bc *blockchain) StateAt(common.Hash) (state.StateDBI, error) { + return nil, errors.New("not implemented") +} + // StateAtBlockNumber returns a statedb configured to read what the state of the blockchain is/was // at a given block number. -func (bc *blockchain) StateAtBlockNumber(number uint64) (vm.GethStateDB, error) { +func (bc *blockchain) StateAtBlockNumber(number uint64) (state.StateDBI, error) { sp, err := bc.sp.StateAtBlockNumber(number) if err != nil { return nil, err diff --git a/eth/core/host.go b/eth/core/host.go index 360c1a109..71c49bf11 100644 --- a/eth/core/host.go +++ b/eth/core/host.go @@ -25,7 +25,6 @@ import ( "math/big" "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/event" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/precompile" @@ -136,26 +135,14 @@ type ( // support the transaction pool. TxPoolPlugin interface { // SetBaseFee sets the base fee of the transaction pool. - SetBaseFee(*big.Int) + // SetBaseFee(*big.Int) // SendTx submits the tx to the transaction pool. - SendTx(tx *types.Transaction) error + // SendTx(tx *types.Transaction) error // Pending returns all pending transactions in the transaction pool. - Pending(bool) map[common.Address][]*types.Transaction - // Get returns the transaction from the pool with the given hash. - Get(common.Hash) *types.Transaction - // Nonce returns the nonce of the given address in the transaction pool. - Nonce(common.Address) uint64 - // SubscribeNewTxsEvent returns a subscription with the new txs event channel. - SubscribeNewTxsEvent(ch chan<- NewTxsEvent) event.Subscription - // Stats returns the number of currently pending and queued (locally created) txs. - Stats() (int, int) - // Content retrieves the data content of the transaction pool, returning all the pending as - // well as queued transactions, grouped by account and nonce. - Content() (map[common.Address][]*types.Transaction, map[common.Address][]*types.Transaction) - // ContentFrom retrieves the data content of the transaction pool, returning the pending - // as well as queued transactions of this address, grouped by nonce. - ContentFrom(addr common.Address) ([]*types.Transaction, []*types.Transaction) + GetHandler() Handler } + + Handler interface{} ) // ============================================================================= diff --git a/eth/core/mock/txpool_plugin.mock.go b/eth/core/mock/txpool_plugin.mock.go index 0f4d863af..60bd36da5 100644 --- a/eth/core/mock/txpool_plugin.mock.go +++ b/eth/core/mock/txpool_plugin.mock.go @@ -4,415 +4,65 @@ package mock import ( - "github.com/ethereum/go-ethereum/common" - ethereumcore "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "math/big" - ethcore "pkg.berachain.dev/polaris/eth/core" + "pkg.berachain.dev/polaris/eth/core" "sync" ) -// Ensure, that TxPoolPluginMock does implement ethcore.TxPoolPlugin. +// Ensure, that TxPoolPluginMock does implement core.TxPoolPlugin. // If this is not the case, regenerate this file with moq. -var _ ethcore.TxPoolPlugin = &TxPoolPluginMock{} +var _ core.TxPoolPlugin = &TxPoolPluginMock{} -// TxPoolPluginMock is a mock implementation of ethcore.TxPoolPlugin. +// TxPoolPluginMock is a mock implementation of core.TxPoolPlugin. // // func TestSomethingThatUsesTxPoolPlugin(t *testing.T) { // -// // make and configure a mocked ethcore.TxPoolPlugin +// // make and configure a mocked core.TxPoolPlugin // mockedTxPoolPlugin := &TxPoolPluginMock{ -// ContentFunc: func() (map[common.Address][]*types.Transaction, map[common.Address][]*types.Transaction) { -// panic("mock out the Content method") -// }, -// ContentFromFunc: func(addr common.Address) ([]*types.Transaction, []*types.Transaction) { -// panic("mock out the ContentFrom method") -// }, -// GetFunc: func(hash common.Hash) *types.Transaction { -// panic("mock out the Get method") -// }, -// NonceFunc: func(address common.Address) uint64 { -// panic("mock out the Nonce method") -// }, -// PendingFunc: func(b bool) map[common.Address][]*types.Transaction { -// panic("mock out the Pending method") -// }, -// SendTxFunc: func(tx *types.Transaction) error { -// panic("mock out the SendTx method") -// }, -// SetBaseFeeFunc: func(intMoqParam *big.Int) { -// panic("mock out the SetBaseFee method") -// }, -// StatsFunc: func() (int, int) { -// panic("mock out the Stats method") -// }, -// SubscribeNewTxsEventFunc: func(ch chan<- ethereumcore.NewTxsEvent) event.Subscription { -// panic("mock out the SubscribeNewTxsEvent method") +// GetHandlerFunc: func() core.Handler { +// panic("mock out the GetHandler method") // }, // } // -// // use mockedTxPoolPlugin in code that requires ethcore.TxPoolPlugin +// // use mockedTxPoolPlugin in code that requires core.TxPoolPlugin // // and then make assertions. // // } type TxPoolPluginMock struct { - // ContentFunc mocks the Content method. - ContentFunc func() (map[common.Address][]*types.Transaction, map[common.Address][]*types.Transaction) - - // ContentFromFunc mocks the ContentFrom method. - ContentFromFunc func(addr common.Address) ([]*types.Transaction, []*types.Transaction) - - // GetFunc mocks the Get method. - GetFunc func(hash common.Hash) *types.Transaction - - // NonceFunc mocks the Nonce method. - NonceFunc func(address common.Address) uint64 - - // PendingFunc mocks the Pending method. - PendingFunc func(b bool) map[common.Address][]*types.Transaction - - // SendTxFunc mocks the SendTx method. - SendTxFunc func(tx *types.Transaction) error - - // SetBaseFeeFunc mocks the SetBaseFee method. - SetBaseFeeFunc func(intMoqParam *big.Int) - - // StatsFunc mocks the Stats method. - StatsFunc func() (int, int) - - // SubscribeNewTxsEventFunc mocks the SubscribeNewTxsEvent method. - SubscribeNewTxsEventFunc func(ch chan<- ethereumcore.NewTxsEvent) event.Subscription + // GetHandlerFunc mocks the GetHandler method. + GetHandlerFunc func() core.Handler // calls tracks calls to the methods. calls struct { - // Content holds details about calls to the Content method. - Content []struct { + // GetHandler holds details about calls to the GetHandler method. + GetHandler []struct { } - // ContentFrom holds details about calls to the ContentFrom method. - ContentFrom []struct { - // Addr is the addr argument value. - Addr common.Address - } - // Get holds details about calls to the Get method. - Get []struct { - // Hash is the hash argument value. - Hash common.Hash - } - // Nonce holds details about calls to the Nonce method. - Nonce []struct { - // Address is the address argument value. - Address common.Address - } - // Pending holds details about calls to the Pending method. - Pending []struct { - // B is the b argument value. - B bool - } - // SendTx holds details about calls to the SendTx method. - SendTx []struct { - // Tx is the tx argument value. - Tx *types.Transaction - } - // SetBaseFee holds details about calls to the SetBaseFee method. - SetBaseFee []struct { - // IntMoqParam is the intMoqParam argument value. - IntMoqParam *big.Int - } - // Stats holds details about calls to the Stats method. - Stats []struct { - } - // SubscribeNewTxsEvent holds details about calls to the SubscribeNewTxsEvent method. - SubscribeNewTxsEvent []struct { - // Ch is the ch argument value. - Ch chan<- ethereumcore.NewTxsEvent - } - } - lockContent sync.RWMutex - lockContentFrom sync.RWMutex - lockGet sync.RWMutex - lockNonce sync.RWMutex - lockPending sync.RWMutex - lockSendTx sync.RWMutex - lockSetBaseFee sync.RWMutex - lockStats sync.RWMutex - lockSubscribeNewTxsEvent sync.RWMutex -} - -// Content calls ContentFunc. -func (mock *TxPoolPluginMock) Content() (map[common.Address][]*types.Transaction, map[common.Address][]*types.Transaction) { - if mock.ContentFunc == nil { - panic("TxPoolPluginMock.ContentFunc: method is nil but TxPoolPlugin.Content was just called") - } - callInfo := struct { - }{} - mock.lockContent.Lock() - mock.calls.Content = append(mock.calls.Content, callInfo) - mock.lockContent.Unlock() - return mock.ContentFunc() -} - -// ContentCalls gets all the calls that were made to Content. -// Check the length with: -// -// len(mockedTxPoolPlugin.ContentCalls()) -func (mock *TxPoolPluginMock) ContentCalls() []struct { -} { - var calls []struct { - } - mock.lockContent.RLock() - calls = mock.calls.Content - mock.lockContent.RUnlock() - return calls -} - -// ContentFrom calls ContentFromFunc. -func (mock *TxPoolPluginMock) ContentFrom(addr common.Address) ([]*types.Transaction, []*types.Transaction) { - if mock.ContentFromFunc == nil { - panic("TxPoolPluginMock.ContentFromFunc: method is nil but TxPoolPlugin.ContentFrom was just called") - } - callInfo := struct { - Addr common.Address - }{ - Addr: addr, - } - mock.lockContentFrom.Lock() - mock.calls.ContentFrom = append(mock.calls.ContentFrom, callInfo) - mock.lockContentFrom.Unlock() - return mock.ContentFromFunc(addr) -} - -// ContentFromCalls gets all the calls that were made to ContentFrom. -// Check the length with: -// -// len(mockedTxPoolPlugin.ContentFromCalls()) -func (mock *TxPoolPluginMock) ContentFromCalls() []struct { - Addr common.Address -} { - var calls []struct { - Addr common.Address - } - mock.lockContentFrom.RLock() - calls = mock.calls.ContentFrom - mock.lockContentFrom.RUnlock() - return calls -} - -// Get calls GetFunc. -func (mock *TxPoolPluginMock) Get(hash common.Hash) *types.Transaction { - if mock.GetFunc == nil { - panic("TxPoolPluginMock.GetFunc: method is nil but TxPoolPlugin.Get was just called") - } - callInfo := struct { - Hash common.Hash - }{ - Hash: hash, - } - mock.lockGet.Lock() - mock.calls.Get = append(mock.calls.Get, callInfo) - mock.lockGet.Unlock() - return mock.GetFunc(hash) -} - -// GetCalls gets all the calls that were made to Get. -// Check the length with: -// -// len(mockedTxPoolPlugin.GetCalls()) -func (mock *TxPoolPluginMock) GetCalls() []struct { - Hash common.Hash -} { - var calls []struct { - Hash common.Hash - } - mock.lockGet.RLock() - calls = mock.calls.Get - mock.lockGet.RUnlock() - return calls -} - -// Nonce calls NonceFunc. -func (mock *TxPoolPluginMock) Nonce(address common.Address) uint64 { - if mock.NonceFunc == nil { - panic("TxPoolPluginMock.NonceFunc: method is nil but TxPoolPlugin.Nonce was just called") - } - callInfo := struct { - Address common.Address - }{ - Address: address, - } - mock.lockNonce.Lock() - mock.calls.Nonce = append(mock.calls.Nonce, callInfo) - mock.lockNonce.Unlock() - return mock.NonceFunc(address) -} - -// NonceCalls gets all the calls that were made to Nonce. -// Check the length with: -// -// len(mockedTxPoolPlugin.NonceCalls()) -func (mock *TxPoolPluginMock) NonceCalls() []struct { - Address common.Address -} { - var calls []struct { - Address common.Address - } - mock.lockNonce.RLock() - calls = mock.calls.Nonce - mock.lockNonce.RUnlock() - return calls -} - -// Pending calls PendingFunc. -func (mock *TxPoolPluginMock) Pending(b bool) map[common.Address][]*types.Transaction { - if mock.PendingFunc == nil { - panic("TxPoolPluginMock.PendingFunc: method is nil but TxPoolPlugin.Pending was just called") - } - callInfo := struct { - B bool - }{ - B: b, - } - mock.lockPending.Lock() - mock.calls.Pending = append(mock.calls.Pending, callInfo) - mock.lockPending.Unlock() - return mock.PendingFunc(b) -} - -// PendingCalls gets all the calls that were made to Pending. -// Check the length with: -// -// len(mockedTxPoolPlugin.PendingCalls()) -func (mock *TxPoolPluginMock) PendingCalls() []struct { - B bool -} { - var calls []struct { - B bool - } - mock.lockPending.RLock() - calls = mock.calls.Pending - mock.lockPending.RUnlock() - return calls -} - -// SendTx calls SendTxFunc. -func (mock *TxPoolPluginMock) SendTx(tx *types.Transaction) error { - if mock.SendTxFunc == nil { - panic("TxPoolPluginMock.SendTxFunc: method is nil but TxPoolPlugin.SendTx was just called") - } - callInfo := struct { - Tx *types.Transaction - }{ - Tx: tx, - } - mock.lockSendTx.Lock() - mock.calls.SendTx = append(mock.calls.SendTx, callInfo) - mock.lockSendTx.Unlock() - return mock.SendTxFunc(tx) -} - -// SendTxCalls gets all the calls that were made to SendTx. -// Check the length with: -// -// len(mockedTxPoolPlugin.SendTxCalls()) -func (mock *TxPoolPluginMock) SendTxCalls() []struct { - Tx *types.Transaction -} { - var calls []struct { - Tx *types.Transaction - } - mock.lockSendTx.RLock() - calls = mock.calls.SendTx - mock.lockSendTx.RUnlock() - return calls -} - -// SetBaseFee calls SetBaseFeeFunc. -func (mock *TxPoolPluginMock) SetBaseFee(intMoqParam *big.Int) { - if mock.SetBaseFeeFunc == nil { - panic("TxPoolPluginMock.SetBaseFeeFunc: method is nil but TxPoolPlugin.SetBaseFee was just called") - } - callInfo := struct { - IntMoqParam *big.Int - }{ - IntMoqParam: intMoqParam, - } - mock.lockSetBaseFee.Lock() - mock.calls.SetBaseFee = append(mock.calls.SetBaseFee, callInfo) - mock.lockSetBaseFee.Unlock() - mock.SetBaseFeeFunc(intMoqParam) -} - -// SetBaseFeeCalls gets all the calls that were made to SetBaseFee. -// Check the length with: -// -// len(mockedTxPoolPlugin.SetBaseFeeCalls()) -func (mock *TxPoolPluginMock) SetBaseFeeCalls() []struct { - IntMoqParam *big.Int -} { - var calls []struct { - IntMoqParam *big.Int } - mock.lockSetBaseFee.RLock() - calls = mock.calls.SetBaseFee - mock.lockSetBaseFee.RUnlock() - return calls + lockGetHandler sync.RWMutex } -// Stats calls StatsFunc. -func (mock *TxPoolPluginMock) Stats() (int, int) { - if mock.StatsFunc == nil { - panic("TxPoolPluginMock.StatsFunc: method is nil but TxPoolPlugin.Stats was just called") +// GetHandler calls GetHandlerFunc. +func (mock *TxPoolPluginMock) GetHandler() core.Handler { + if mock.GetHandlerFunc == nil { + panic("TxPoolPluginMock.GetHandlerFunc: method is nil but TxPoolPlugin.GetHandler was just called") } callInfo := struct { }{} - mock.lockStats.Lock() - mock.calls.Stats = append(mock.calls.Stats, callInfo) - mock.lockStats.Unlock() - return mock.StatsFunc() -} - -// StatsCalls gets all the calls that were made to Stats. -// Check the length with: -// -// len(mockedTxPoolPlugin.StatsCalls()) -func (mock *TxPoolPluginMock) StatsCalls() []struct { -} { - var calls []struct { - } - mock.lockStats.RLock() - calls = mock.calls.Stats - mock.lockStats.RUnlock() - return calls -} - -// SubscribeNewTxsEvent calls SubscribeNewTxsEventFunc. -func (mock *TxPoolPluginMock) SubscribeNewTxsEvent(ch chan<- ethereumcore.NewTxsEvent) event.Subscription { - if mock.SubscribeNewTxsEventFunc == nil { - panic("TxPoolPluginMock.SubscribeNewTxsEventFunc: method is nil but TxPoolPlugin.SubscribeNewTxsEvent was just called") - } - callInfo := struct { - Ch chan<- ethereumcore.NewTxsEvent - }{ - Ch: ch, - } - mock.lockSubscribeNewTxsEvent.Lock() - mock.calls.SubscribeNewTxsEvent = append(mock.calls.SubscribeNewTxsEvent, callInfo) - mock.lockSubscribeNewTxsEvent.Unlock() - return mock.SubscribeNewTxsEventFunc(ch) + mock.lockGetHandler.Lock() + mock.calls.GetHandler = append(mock.calls.GetHandler, callInfo) + mock.lockGetHandler.Unlock() + return mock.GetHandlerFunc() } -// SubscribeNewTxsEventCalls gets all the calls that were made to SubscribeNewTxsEvent. +// GetHandlerCalls gets all the calls that were made to GetHandler. // Check the length with: // -// len(mockedTxPoolPlugin.SubscribeNewTxsEventCalls()) -func (mock *TxPoolPluginMock) SubscribeNewTxsEventCalls() []struct { - Ch chan<- ethereumcore.NewTxsEvent +// len(mockedTxPoolPlugin.GetHandlerCalls()) +func (mock *TxPoolPluginMock) GetHandlerCalls() []struct { } { var calls []struct { - Ch chan<- ethereumcore.NewTxsEvent } - mock.lockSubscribeNewTxsEvent.RLock() - calls = mock.calls.SubscribeNewTxsEvent - mock.lockSubscribeNewTxsEvent.RUnlock() + mock.lockGetHandler.RLock() + calls = mock.calls.GetHandler + mock.lockGetHandler.RUnlock() return calls } diff --git a/eth/core/txpool/txpool.go b/eth/core/txpool/txpool.go deleted file mode 100644 index 5e1a65bd9..000000000 --- a/eth/core/txpool/txpool.go +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// - -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 txpool - -import "pkg.berachain.dev/polaris/eth/core" - -// TxPool is an interface for the Polaris transaction pool. -type TxPool interface { - core.TxPoolPlugin -} - -// NewTxPool creates a new TxPool instance. -// It takes in a core.TxPoolPlugin to satisfy the interface. -func NewTxPool(plugin core.TxPoolPlugin) TxPool { - return &polarisTxPool{ - TxPoolPlugin: plugin, - } -} - -// polarisTxPool implements the TxPool interface. -// It embeds a core.TxPoolPlugin to satisfy the interface. -type polarisTxPool struct { - core.TxPoolPlugin -} diff --git a/eth/go.mod b/eth/go.mod index a6719d474..82a34a2f1 100644 --- a/eth/go.mod +++ b/eth/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/eth go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 require ( github.com/BurntSushi/toml v1.3.2 diff --git a/eth/go.sum b/eth/go.sum index fe135b3a8..d284c785a 100644 --- a/eth/go.sum +++ b/eth/go.sum @@ -14,8 +14,8 @@ github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7D github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= 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/polaris-geth v0.0.0-20230919212829-4a52af33e74d h1:w5V4L3haBlaaC0VMWd+WlLIS4U8J1YOIsdFaPf/qoWs= -github.com/berachain/polaris-geth v0.0.0-20230919212829-4a52af33e74d/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= +github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= diff --git a/eth/miner/miner.go b/eth/miner/miner.go index d527c5179..50a879110 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -27,10 +27,10 @@ import ( "github.com/ethereum/go-ethereum/consensus/misc/eip1559" "github.com/ethereum/go-ethereum/consensus/misc/eip4844" + "github.com/ethereum/go-ethereum/core/txpool" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/core/state" - "pkg.berachain.dev/polaris/eth/core/txpool" "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/core/vm" "pkg.berachain.dev/polaris/eth/log" @@ -42,7 +42,7 @@ import ( type Backend interface { // Blockchain returns the blockchain instance. Blockchain() core.Blockchain - TxPool() txpool.TxPool + TxPool() *txpool.TxPool Host() core.PolarisHostChain } @@ -65,7 +65,7 @@ type miner struct { backend Backend chain core.Blockchain processor *core.StateProcessor - txPool txpool.TxPool + txPool *txpool.TxPool bp core.BlockPlugin cp core.ConfigurationPlugin gp core.GasPlugin @@ -211,9 +211,9 @@ func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { m.pendingHeader, ) - // We update the base fee in the txpool to the next base fee. - // TODO: Move to prepare proposal - m.txPool.SetBaseFee(m.pendingHeader.BaseFee) + // // We update the base fee in the txpool to the next base fee. + // // TODO: Move to prepare proposal + // m.txPool.SetBaseFee(m.pendingHeader.BaseFee) return m.pendingHeader } diff --git a/eth/polar/backend.go b/eth/polar/backend.go index e1fa16850..68119543d 100644 --- a/eth/polar/backend.go +++ b/eth/polar/backend.go @@ -442,7 +442,7 @@ func (b *backend) SubscribeChainSideEvent(ch chan<- core.ChainSideEvent) event.S // ============================================================================== func (b *backend) SendTx(_ context.Context, signedTx *types.Transaction) error { - return b.polar.txPool.SendTx(signedTx) + return b.polar.txPool.Add([]*types.Transaction{signedTx}, true, false)[0] } func (b *backend) GetPoolTransactions() (types.Transactions, error) { @@ -450,13 +450,11 @@ func (b *backend) GetPoolTransactions() (types.Transactions, error) { pending := b.polar.txPool.Pending(false) var txs types.Transactions for _, batch := range pending { - // TODO: Subpools. - // for _, lazy := range batch { - // if tx := lazy.Resolve(); tx != nil { - // txs = append(txs, tx) - // } - // } - txs = append(txs, batch...) + for _, lazy := range batch { + if tx := lazy.Resolve(); tx != nil { + txs = append(txs, tx) + } + } } return txs, nil } diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index f5d8afa42..d121a41ca 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -21,6 +21,7 @@ package polar import ( + "math/big" "net/http" "time" @@ -28,8 +29,9 @@ import ( "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/filters" + "github.com/ethereum/go-ethereum/core/txpool" + "github.com/ethereum/go-ethereum/core/txpool/legacypool" "pkg.berachain.dev/polaris/eth/core" - "pkg.berachain.dev/polaris/eth/core/txpool" "pkg.berachain.dev/polaris/eth/log" "pkg.berachain.dev/polaris/eth/miner" polarapi "pkg.berachain.dev/polaris/eth/polar/api" @@ -73,7 +75,8 @@ type Polaris struct { // core pieces of the polaris stack host core.PolarisHostChain blockchain core.Blockchain - txPool txpool.TxPool + handler core.Handler + txPool *txpool.TxPool miner miner.Miner // backend is utilize by the api handlers as a middleware between the JSON-RPC APIs and the core pieces. @@ -113,7 +116,6 @@ func NewWithNetworkingStack( // Build and set the RPC Backend and other services. pl.backend = NewBackend(pl, stack.ExtRPCEnabled(), cfg) - pl.txPool = txpool.NewTxPool(host.GetTxPoolPlugin()) pl.miner = miner.NewMiner(pl) return pl @@ -140,15 +142,27 @@ func (pl *Polaris) APIs() []rpc.API { // StartServices notifies the NetworkStack to spin up (i.e json-rpc). func (pl *Polaris) StartServices() error { - // Register the JSON-RPCs with the networking stack. - pl.stack.RegisterAPIs(pl.APIs()) - - // Register the filter API separately in order to get access to the filterSystem - pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) go func() { // TODO: unhack this. time.Sleep(2 * time.Second) //nolint:gomnd // we will fix this eventually. + + // Register the JSON-RPCs with the networking stack. + pl.stack.RegisterAPIs(pl.APIs()) + + legacyPool := legacypool.New( + legacypool.DefaultConfig, pl.Blockchain(), + ) + + var err error + pl.txPool, err = txpool.New(big.NewInt(0), pl.blockchain, []txpool.SubPool{legacyPool}) + if err != nil { + panic(err) + } + + // Register the filter API separately in order to get access to the filterSystem + pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) + if err := pl.stack.Start(); err != nil { panic(err) } @@ -168,7 +182,7 @@ func (pl *Polaris) Miner() miner.Miner { return pl.miner } -func (pl *Polaris) TxPool() txpool.TxPool { +func (pl *Polaris) TxPool() *txpool.TxPool { return pl.txPool } From a57dcdd102de0c3641ba9ca3e259de8c94638b30 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 14:33:20 -0400 Subject: [PATCH 04/94] hacky works --- contracts/scripts/DeployAndCallERC20.sol | 2 +- cosmos/abci/abci.go | 24 +-- cosmos/abci/prepare/default.go | 143 ++++++++++++------ cosmos/x/evm/keeper/host.go | 4 +- cosmos/x/evm/keeper/keeper.go | 10 +- cosmos/x/evm/plugins/txpool/handler.go | 4 +- .../x/evm/plugins/txpool/mempool/mempool.go | 30 +++- cosmos/x/evm/plugins/txpool/plugin.go | 16 ++ .../x/evm/plugins/txpool/subpool/mempool.go | 20 +++ e2e/testapp/app.go | 8 +- eth/core/chain_resources.go | 2 +- eth/core/host.go | 6 +- eth/miner/miner.go | 2 +- eth/miner/new_miner.go | 28 ++++ eth/polar/polaris.go | 8 +- 15 files changed, 228 insertions(+), 79 deletions(-) create mode 100644 eth/miner/new_miner.go diff --git a/contracts/scripts/DeployAndCallERC20.sol b/contracts/scripts/DeployAndCallERC20.sol index b5a420015..30d01de50 100644 --- a/contracts/scripts/DeployAndCallERC20.sol +++ b/contracts/scripts/DeployAndCallERC20.sol @@ -36,7 +36,7 @@ contract DeployAndCallERC20 is Script { vm.startBroadcast(); SolmateERC20 drop = new SolmateERC20(); - for (uint256 i = 0; i < 66; i++) { + for (uint256 i = 0; i < 62226; i++) { drop.mint(dropAddress, quantity); } diff --git a/cosmos/abci/abci.go b/cosmos/abci/abci.go index 52d32f556..46e2cdb4b 100644 --- a/cosmos/abci/abci.go +++ b/cosmos/abci/abci.go @@ -22,10 +22,10 @@ package abci import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" prepare "pkg.berachain.dev/polaris/cosmos/abci/prepare" process "pkg.berachain.dev/polaris/cosmos/abci/process" + "pkg.berachain.dev/polaris/eth/polar" ) type ( @@ -50,21 +50,25 @@ type ( } ) -func NewDefaultProposalHandler(mp mempool.Mempool, txVerifier ProposalTxVerifier) DefaultProposalHandler { - _, isNoOp := mp.(mempool.NoOpMempool) - if mp == nil || isNoOp { - panic("mempool must be set and cannot be a NoOpMempool") - } - return DefaultProposalHandler{ - proposer: prepare.NewHandler(mp, txVerifier), +func NewDefaultProposalHandler(txVerifier ProposalTxVerifier) *DefaultProposalHandler { + // _, isNoOp := mp.(mempool.NoOpMempool) + // if mp == nil || isNoOp { + // panic("mempool must be set and cannot be a NoOpMempool") + // } + return &DefaultProposalHandler{ + proposer: prepare.NewHandler(txVerifier), processor: process.NewHandler(txVerifier), } } -func (h DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { +func (h *DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { return h.proposer.PrepareProposal } -func (h DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { +func (h *DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { return h.processor.ProcessProposal } + +func (h *DefaultProposalHandler) SetPolaris(polaris *polar.Polaris) { + h.proposer.SetPolaris(polaris) +} diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 7cb15dd74..198f6fb22 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -21,12 +21,15 @@ package prepare import ( - "errors" + "fmt" + "math/big" abci "github.com/cometbft/cometbft/abci/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/miner" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" + "pkg.berachain.dev/polaris/eth/polar" ) type ( @@ -45,17 +48,20 @@ type ( ) type Handler struct { - mempool sdkmempool.Mempool + polaris *polar.Polaris txVerifier TxVerifier } -func NewHandler(mempool sdkmempool.Mempool, txVerifier TxVerifier) Handler { +func NewHandler(txVerifier TxVerifier) Handler { return Handler{ - mempool: mempool, txVerifier: txVerifier, } } +func (h *Handler) SetPolaris(polaris *polar.Polaris) { + h.polaris = polaris +} + //nolint:gocognit // from sdk. func (h *Handler) PrepareProposal( ctx sdk.Context, req *abci.RequestPrepareProposal, @@ -70,57 +76,100 @@ func (h *Handler) PrepareProposal( totalTxBytes int64 totalTxGas uint64 ) + fmt.Println("TODO FIX RACE NIL SHIT") + pending := h.polaris.TxPool().Pending(false) + txp := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) - iterator := h.mempool.Select(ctx, req.Txs) - - for iterator != nil { - memTx := iterator.Tx() + // If no transactions to propose, just continue + if len(pending) == 0 { + return &abci.ResponsePrepareProposal{}, nil + } - // NOTE: Since transaction verification was already executed in CheckTx, - // which calls mempool.Insert, in theory everything in the pool should be - // valid. But some mempool implementations may insert invalid txs, so we - // check again. - bz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) - if err != nil { //nolint:nestif // from sdk. - err2 := h.mempool.Remove(memTx) - if err2 != nil && !errors.Is(err2, sdkmempool.ErrTxNotFound) { - return nil, err - } - } else { - var txGasLimit uint64 - txSize := int64(len(bz)) + byPriceAndNonce := miner.NewTransactionsByPriceAndNonce(types.LatestSigner( + h.polaris.Host().GetConfigurationPlugin().ChainConfig(), + ), pending, big.NewInt(0)) // todo get baseFeeproperly - gasTx, ok := memTx.(GasTx) - if ok { - txGasLimit = gasTx.GetGas() - } - - // only add the transaction to the proposal if we have enough capacity - if (txSize + totalTxBytes) < req.MaxTxBytes { - // If there is a max block gas limit, add the tx only if the limit has - // not been met. - if maxBlockGas > 0 { - if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { - totalTxGas += txGasLimit - totalTxBytes += txSize - selectedTxs = append(selectedTxs, bz) - } - } else { + for _tx := byPriceAndNonce.Peek(); _tx != nil; _tx = byPriceAndNonce.Peek() { + bz, err := txp.SerializeToBytes(_tx.Resolve()) + if err != nil { + ctx.Logger().Error("Failed sdk.Tx Serialization", _tx.Resolve().Hash(), err) + continue + } + txGasLimit := _tx.Tx.Gas() + txSize := int64(len(bz)) + // only add the transaction to the proposal if we have enough capacity + if (txSize + totalTxBytes) < req.MaxTxBytes { + // If there is a max block gas limit, add the tx only if the limit has + // not been met. + if maxBlockGas > 0 { + if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { + totalTxGas += txGasLimit totalTxBytes += txSize selectedTxs = append(selectedTxs, bz) } + } else { + totalTxBytes += txSize + selectedTxs = append(selectedTxs, bz) } - - // Check if we've reached capacity. If so, we cannot select any more - // transactions. - if totalTxBytes >= req.MaxTxBytes || - (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { - break - } } + // Check if we've reached capacity. If so, we cannot select any more + // transactions. + if totalTxBytes >= req.MaxTxBytes || + (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { + break + } + + byPriceAndNonce.Shift() - iterator = iterator.Next() } + // for iterator != nil { + // memTx := iterator.Tx() + + // // NOTE: Since transaction verification was already executed in CheckTx, + // // which calls mempool.Insert, in theory everything in the pool should be + // // valid. But some mempool implementations may insert invalid txs, so we + // // check again. + // bz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) + // if err != nil { //nolint:nestif // from sdk. + // err2 := h.mempool.Remove(memTx) + // if err2 != nil && !errors.Is(err2, sdkmempool.ErrTxNotFound) { + // return nil, err + // } + // } else { + // var txGasLimit uint64 + // txSize := int64(len(bz)) + + // gasTx, ok := memTx.(GasTx) + // if ok { + // txGasLimit = gasTx.GetGas() + // } + + // // only add the transaction to the proposal if we have enough capacity + // if (txSize + totalTxBytes) < req.MaxTxBytes { + // // If there is a max block gas limit, add the tx only if the limit has + // // not been met. + // if maxBlockGas > 0 { + // if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { + // totalTxGas += txGasLimit + // totalTxBytes += txSize + // selectedTxs = append(selectedTxs, bz) + // } + // } else { + // totalTxBytes += txSize + // selectedTxs = append(selectedTxs, bz) + // } + // } + + // // Check if we've reached capacity. If so, we cannot select any more + // // transactions. + // if totalTxBytes >= req.MaxTxBytes || + // (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { + // break + // } + // } + + // iterator = iterator.Next() + // } return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil } diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 4c69f9b7f..26c0ab14b 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -35,8 +35,10 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" + "pkg.berachain.dev/polaris/lib/utils" ) // Compile-time interface assertion. @@ -84,7 +86,7 @@ func NewHost( h.cp = configuration.NewPlugin(storeKey) h.ep = engine.NewPlugin() h.gp = gas.NewPlugin() - // h.txp = txpool.NewPlugin(utils.MustGetAs[*mempool.EthTxPool](ethTxMempool)) + h.txp = txpool.NewPlugin(utils.MustGetAs[*mempool.WrappedGethTxPool](ethTxMempool)) h.pcs = precompiles return h diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 927837125..0b7b30603 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -35,6 +35,7 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/common" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" @@ -137,13 +138,20 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { // TODO: move this go func() { // spin lock for a bit - for ; k.lock; time.Sleep(2 * time.Second) { + for ; k.lock; time.Sleep(2 * time.Second) { //nolint:gomnd // todo remove. continue } if err := k.polaris.StartServices(); err != nil { panic(err) } + + time.Sleep(3 * time.Second) //nolint:gomnd // TODO: this is hiding a race condition. + txp := k.host.GetTxPoolPlugin().(txpool.Plugin) + txp.Start( + k.polaris.TxPool(), + clientContext, + ) }() } diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index ba59f0827..0fd0b4a81 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -22,15 +22,16 @@ package txpool import ( "sync" + "time" "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/ethereum/go-ethereum/core/txpool" "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/core/txpool" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/core/types" ) @@ -66,6 +67,7 @@ func newHandler( } h.wg.Add(1) h.txsCh = make(chan core.NewTxsEvent, txChanSize) + time.Sleep(15 * time.Second) //nolint:gomnd // todo remove. TODO: this is hiding a race condition. h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) h.logger.Info("handler started") go h.txBroadcastLoop() // start broadcast handlers diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool.go b/cosmos/x/evm/plugins/txpool/mempool/mempool.go index 4e35a8a87..c36ce376f 100644 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool.go +++ b/cosmos/x/evm/plugins/txpool/mempool/mempool.go @@ -1,3 +1,23 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 mempool import ( @@ -5,20 +25,25 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/core/txpool" ) var _ mempool.Mempool = (*WrappedGethTxPool)(nil) type WrappedGethTxPool struct { - txpool.TxPool + *txpool.TxPool } +// func (wgtp *WrappedGethTxPool) commitTransactions() error { + +// } + func (wgtp *WrappedGethTxPool) CountTx() int { return 0 } -func (wgtp *WrappedGethTxPool) Insert(_ context.Context, tx sdk.Tx) error { +func (wgtp *WrappedGethTxPool) Insert(_ context.Context, _ sdk.Tx) error { return nil } @@ -27,5 +52,6 @@ func (wgtp *WrappedGethTxPool) Select(context.Context, [][]byte) mempool.Iterato } func (wgtp *WrappedGethTxPool) Remove(sdk.Tx) error { + // intentionally a no-op return nil } diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index 410c78f46..fb3f386ca 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -26,8 +26,11 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/core/txpool" + mempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" + "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" + coretypes "pkg.berachain.dev/polaris/eth/core/types" ) // Compile-time type assertion. @@ -38,6 +41,9 @@ type Plugin interface { core.TxPoolPlugin Start(*txpool.TxPool, client.Context) // Prepare(*big.Int, coretypes.Signer) + SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) + Pending(enforceTips bool) map[common.Address][]*txpool.LazyTransaction + TxPool() *txpool.TxPool } // plugin represents the transaction pool plugin. @@ -54,13 +60,23 @@ func NewPlugin(wrappedGethTxPool *mempool.WrappedGethTxPool) Plugin { } } +// GetHandler implements the Plugin interface. func (p *plugin) GetHandler() core.Handler { return p.handler } +func (p *plugin) TxPool() *txpool.TxPool { + return p.WrappedGethTxPool.TxPool +} + +func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) { + return p.serializer.SerializeToBytes(signedTx) +} + // Setup implements the Plugin interface. func (p *plugin) Start(txpool *txpool.TxPool, ctx client.Context) { p.serializer = newSerializer(ctx) + p.WrappedGethTxPool.TxPool = txpool // p.WrappedGethTxPool.Setup(txpool, p.serializer) p.handler = newHandler(ctx, txpool, p.serializer, log.NewNopLogger()) } diff --git a/cosmos/x/evm/plugins/txpool/subpool/mempool.go b/cosmos/x/evm/plugins/txpool/subpool/mempool.go index eec219c66..d0c7333fb 100644 --- a/cosmos/x/evm/plugins/txpool/subpool/mempool.go +++ b/cosmos/x/evm/plugins/txpool/subpool/mempool.go @@ -1,3 +1,23 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 subpool type WrappedGethTxPool struct{} diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 687aebf48..3b69c09a4 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -60,7 +60,6 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "pkg.berachain.dev/polaris/cosmos/abci" evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" @@ -222,9 +221,7 @@ func NewPolarisApp( // baseAppOptions = append(baseAppOptions, prepareOpt) app.App = appBuilder.Build(db, traceStore, append(baseAppOptions, baseapp.SetMempool(ethTxMempool))...) - proposalHandler := abci.NewDefaultProposalHandler(ethTxMempool, app) - app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) - app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) + proposalHandler := abci.NewDefaultProposalHandler(app) // read oracle config from app-opts, and construct oracle service polarisCfg, err := evmconfig.ReadConfigFromAppOpts(appOpts) @@ -241,6 +238,9 @@ func NewPolarisApp( app.CreateQueryContext, logger, ) + proposalHandler.SetPolaris(app.EVMKeeper.GetPolaris()) + app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) + app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) opt := ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, diff --git a/eth/core/chain_resources.go b/eth/core/chain_resources.go index f35e670b4..8593b26b8 100644 --- a/eth/core/chain_resources.go +++ b/eth/core/chain_resources.go @@ -36,7 +36,7 @@ type ChainResources interface { GetVMConfig() *vm.Config } -// StateAt returns a statedb configured to read what the state of the blockchain is/was at a given +// StateAt returns a statedb configured to read what the state of the blockchain is/was at a given. func (bc *blockchain) StateAt(common.Hash) (state.StateDBI, error) { return nil, errors.New("not implemented") } diff --git a/eth/core/host.go b/eth/core/host.go index 71c49bf11..1bbb39d32 100644 --- a/eth/core/host.go +++ b/eth/core/host.go @@ -134,11 +134,7 @@ type ( // TxPoolPlugin defines the methods that the chain running Polaris EVM should implement to // support the transaction pool. TxPoolPlugin interface { - // SetBaseFee sets the base fee of the transaction pool. - // SetBaseFee(*big.Int) - // SendTx submits the tx to the transaction pool. - // SendTx(tx *types.Transaction) error - // Pending returns all pending transactions in the transaction pool. + // GetHandler returns a handler that is used to broadcast transactions. GetHandler() Handler } diff --git a/eth/miner/miner.go b/eth/miner/miner.go index 50a879110..d5ac53ba4 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -26,8 +26,8 @@ import ( "github.com/ethereum/go-ethereum/consensus/misc/eip1559" "github.com/ethereum/go-ethereum/consensus/misc/eip4844" - "github.com/ethereum/go-ethereum/core/txpool" + "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/core/state" diff --git a/eth/miner/new_miner.go b/eth/miner/new_miner.go new file mode 100644 index 000000000..ff3e798e5 --- /dev/null +++ b/eth/miner/new_miner.go @@ -0,0 +1,28 @@ +package miner + +// func (w *miner) fillTransactions(interrupt *atomic.Int32, env *environment) error { +// pending := w.txPool.Pending(true) + +// // Split the pending transactions into locals and remotes. +// localTxs, remoteTxs := make(map[common.Address][]*txpool.LazyTransaction), pending +// for _, account := range w.txPool.Locals() { +// if txs := remoteTxs[account]; len(txs) > 0 { +// delete(remoteTxs, account) +// localTxs[account] = txs +// } +// } + +// // Fill the block with all available pending transactions. +// if len(localTxs) > 0 { +// txs := miner.NewTransactionsByPriceAndNonce(env.signer, localTxs, env.header.BaseFee) +// if err := w.commitTransactions(env, txs, interrupt); err != nil { +// return err +// } +// } +// if len(remoteTxs) > 0 { +// txs := miner.NewTransactionsByPriceAndNonce(env.signer, remoteTxs, env.header.BaseFee) +// if err := w.commitTransactions(env, txs, interrupt); err != nil { +// return err +// } +// } +// } diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index d121a41ca..4d5bd3fc5 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -26,11 +26,11 @@ import ( "time" "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/core/txpool" + "github.com/ethereum/go-ethereum/core/txpool/legacypool" "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/filters" - "github.com/ethereum/go-ethereum/core/txpool" - "github.com/ethereum/go-ethereum/core/txpool/legacypool" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/log" "pkg.berachain.dev/polaris/eth/miner" @@ -75,7 +75,6 @@ type Polaris struct { // core pieces of the polaris stack host core.PolarisHostChain blockchain core.Blockchain - handler core.Handler txPool *txpool.TxPool miner miner.Miner @@ -142,7 +141,6 @@ func (pl *Polaris) APIs() []rpc.API { // StartServices notifies the NetworkStack to spin up (i.e json-rpc). func (pl *Polaris) StartServices() error { - go func() { // TODO: unhack this. time.Sleep(2 * time.Second) //nolint:gomnd // we will fix this eventually. @@ -163,7 +161,7 @@ func (pl *Polaris) StartServices() error { // Register the filter API separately in order to get access to the filterSystem pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) - if err := pl.stack.Start(); err != nil { + if err = pl.stack.Start(); err != nil { panic(err) } }() From 79c9c5db17fec806698b226ec4a92da5dd10e8e6 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 14:50:27 -0400 Subject: [PATCH 05/94] init --- cosmos/x/evm/keeper/keeper.go | 4 ++++ eth/polar/config.go | 6 ++++++ eth/polar/polaris.go | 25 ++++++++++++++----------- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 0b7b30603..03d94749c 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -142,6 +142,10 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { continue } + if err := k.polaris.Init(); err != nil { + panic(err) + } + if err := k.polaris.StartServices(); err != nil { panic(err) } diff --git a/eth/polar/config.go b/eth/polar/config.go index 658f530ad..2ebe7e8df 100644 --- a/eth/polar/config.go +++ b/eth/polar/config.go @@ -28,6 +28,7 @@ import ( "github.com/BurntSushi/toml" + "github.com/ethereum/go-ethereum/core/txpool/legacypool" "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/gasprice" ) @@ -44,8 +45,10 @@ const ( func DefaultConfig() *Config { gpoConfig := ethconfig.FullNodeGPO gpoConfig.Default = big.NewInt(gpoDefault) + return &Config{ GPO: gpoConfig, + LegacyTxPool: legacypool.DefaultConfig, RPCGasCap: ethconfig.Defaults.RPCGasCap, RPCTxFeeCap: ethconfig.Defaults.RPCTxFeeCap, RPCEVMTimeout: ethconfig.Defaults.RPCEVMTimeout, @@ -57,6 +60,9 @@ type Config struct { // Gas Price Oracle config. GPO gasprice.Config + // Transaction pool options + LegacyTxPool legacypool.Config + // RPCGasCap is the global gas cap for eth-call variants. RPCGasCap uint64 `toml:""` diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 4d5bd3fc5..adca8bc0d 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -120,6 +120,19 @@ func NewWithNetworkingStack( return pl } +func (pl *Polaris) Init() error { + var err error + legacyPool := legacypool.New( + pl.cfg.LegacyTxPool, pl.Blockchain(), + ) + + pl.txPool, err = txpool.New(big.NewInt(0), pl.blockchain, []txpool.SubPool{legacyPool}) + if err != nil { + return err + } + return nil +} + // APIs return the collection of RPC services the polar package offers. // NOTE, some of these services probably need to be moved to somewhere else. func (pl *Polaris) APIs() []rpc.API { @@ -148,20 +161,10 @@ func (pl *Polaris) StartServices() error { // Register the JSON-RPCs with the networking stack. pl.stack.RegisterAPIs(pl.APIs()) - legacyPool := legacypool.New( - legacypool.DefaultConfig, pl.Blockchain(), - ) - - var err error - pl.txPool, err = txpool.New(big.NewInt(0), pl.blockchain, []txpool.SubPool{legacyPool}) - if err != nil { - panic(err) - } - // Register the filter API separately in order to get access to the filterSystem pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) - if err = pl.stack.Start(); err != nil { + if err := pl.stack.Start(); err != nil { panic(err) } }() From af584a0cd803c54c79681fae454daa76c83ebe0c Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 15:06:45 -0400 Subject: [PATCH 06/94] reduce some of the race conditions --- cosmos/abci/prepare/default.go | 6 ++++-- cosmos/x/evm/keeper/keeper.go | 3 +-- eth/miner/miner.go | 2 +- eth/miner/new_miner.go | 20 ++++++++++++++++++++ eth/polar/polaris.go | 32 ++++++++++++++++++++++++++------ 5 files changed, 52 insertions(+), 11 deletions(-) diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 198f6fb22..57ff9f260 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -25,9 +25,12 @@ import ( "math/big" abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/miner" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/eth/polar" ) @@ -62,7 +65,7 @@ func (h *Handler) SetPolaris(polaris *polar.Polaris) { h.polaris = polaris } -//nolint:gocognit // from sdk. + func (h *Handler) PrepareProposal( ctx sdk.Context, req *abci.RequestPrepareProposal, ) (*abci.ResponsePrepareProposal, error) { @@ -120,7 +123,6 @@ func (h *Handler) PrepareProposal( } byPriceAndNonce.Shift() - } // for iterator != nil { // memTx := iterator.Tx() diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 03d94749c..f4718d1bf 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -137,7 +137,7 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { // TODO: move this go func() { - // spin lock for a bit + // spin lock for a bit until begin block has been called (this is kinda hood) for ; k.lock; time.Sleep(2 * time.Second) { //nolint:gomnd // todo remove. continue } @@ -150,7 +150,6 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { panic(err) } - time.Sleep(3 * time.Second) //nolint:gomnd // TODO: this is hiding a race condition. txp := k.host.GetTxPoolPlugin().(txpool.Plugin) txp.Start( k.polaris.TxPool(), diff --git a/eth/miner/miner.go b/eth/miner/miner.go index d5ac53ba4..dc14756c6 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -84,7 +84,7 @@ type miner struct { } // NewMiner creates a new Miner instance. -func NewMiner(backend Backend) Miner { +func New(backend Backend) Miner { chain := backend.Blockchain() host := backend.Host() diff --git a/eth/miner/new_miner.go b/eth/miner/new_miner.go index ff3e798e5..5f1be6a05 100644 --- a/eth/miner/new_miner.go +++ b/eth/miner/new_miner.go @@ -1,3 +1,23 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 miner // func (w *miner) fillTransactions(interrupt *atomic.Int32, env *environment) error { diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index adca8bc0d..85a38fc55 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -113,23 +113,46 @@ func NewWithNetworkingStack( log.Root().SetHandler(logHandler) } - // Build and set the RPC Backend and other services. - pl.backend = NewBackend(pl, stack.ExtRPCEnabled(), cfg) - pl.miner = miner.NewMiner(pl) + // TODO: this needs to be moved to Init() + pl.miner = miner.New(pl) return pl } +// Init initializes the Polaris struct. func (pl *Polaris) Init() error { var err error legacyPool := legacypool.New( pl.cfg.LegacyTxPool, pl.Blockchain(), ) + // TODO REMOVE + for pl.blockchain == nil { + time.Sleep(1 * time.Second) + } + pl.txPool, err = txpool.New(big.NewInt(0), pl.blockchain, []txpool.SubPool{legacyPool}) if err != nil { return err } + + // pl.miner = miner.New(pl) + // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) + + // eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) + + // Build and set the RPC Backend and other services. + pl.backend = NewBackend(pl, pl.stack.ExtRPCEnabled(), pl.cfg) + // if eth.APIBackend.allowUnprotectedTxs { + // log.Info("Unprotected transactions allowed") + // } + + // Register the backend on the node + // Register the JSON-RPCs with the networking stack. + pl.stack.RegisterAPIs(pl.APIs()) + // stack.RegisterProtocols(eth.Protocols()) + // stack.RegisterLifecycle(eth) + return nil } @@ -158,9 +181,6 @@ func (pl *Polaris) StartServices() error { // TODO: unhack this. time.Sleep(2 * time.Second) //nolint:gomnd // we will fix this eventually. - // Register the JSON-RPCs with the networking stack. - pl.stack.RegisterAPIs(pl.APIs()) - // Register the filter API separately in order to get access to the filterSystem pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) From a0266c04cc1ac8a25a68d46df05eec03b6067057 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 15:09:22 -0400 Subject: [PATCH 07/94] reduce keeper interface --- cosmos/x/evm/genesis_test.go | 10 +++++----- cosmos/x/evm/keeper/keeper.go | 5 ----- cosmos/x/evm/keeper/processor_test.go | 10 +++++----- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 53fab8ce8..5f8b95a3f 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -111,17 +111,17 @@ var _ = Describe("", func() { Expect(err).ToNot(HaveOccurred()) }) It("should contain the same genesis header values", func() { - bp := k.GetHost().GetBlockPlugin() + bp := k.GetPolaris().Host().GetBlockPlugin() expectedHeader := ethGen.ToBlock().Header() Expect(bp.GetHeaderByNumber(0)).To(Equal(expectedHeader)) }) It("should contain the correct chain config", func() { - actualConfig := k.GetHost().GetConfigurationPlugin().ChainConfig() + actualConfig := k.GetPolaris().Host().GetConfigurationPlugin().ChainConfig() expectedConfig := ethGen.Config Expect(actualConfig).To(Equal(expectedConfig)) }) It("should have the correct balances", func() { - sp := k.GetHost().GetStatePlugin() + sp := k.GetPolaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { balance := sp.GetBalance(addr) cmp := balance.Cmp(acc.Balance) @@ -129,7 +129,7 @@ var _ = Describe("", func() { } }) It("should have the correct code", func() { - sp := k.GetHost().GetStatePlugin() + sp := k.GetPolaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { code := sp.GetCode(addr) cmp := bytes.Compare(code, acc.Code) @@ -137,7 +137,7 @@ var _ = Describe("", func() { } }) It("should have the correct hash", func() { - sp := k.GetHost().GetStatePlugin() + sp := k.GetPolaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { for key, expectedHash := range acc.Storage { actualHash := sp.GetState(addr, key) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index f4718d1bf..ce44093cf 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -121,11 +121,6 @@ func (k *Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With(types.ModuleName) } -// GetHost returns the Host that contains all plugins. -func (k *Keeper) GetHost() Host { - return k.host -} - // GetPolaris returns the Polaris instance. func (k *Keeper) GetPolaris() *polar.Polaris { return k.polaris diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 6a9d05318..300728886 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -97,7 +97,7 @@ var _ = Describe("Processor", func() { }, ) ctx = ctx.WithBlockHeight(0) - for _, plugin := range k.GetHost().GetAllPlugins() { + for _, plugin := range k.GetPolaris().Host().(keeper.Host).GetAllPlugins() { plugin, hasInitGenesis := utils.GetAs[plugins.HasGenesis](plugin) if hasInitGenesis { plugin.InitGenesis(ctx, core.DefaultGenesis) @@ -162,11 +162,11 @@ var _ = Describe("Processor", func() { tx := coretypes.MustSignNewTx(key, signer, legacyTxData) addr, err := signer.Sender(tx) Expect(err).ToNot(HaveOccurred()) - k.GetHost().GetStatePlugin().Reset(ctx) - k.GetHost().GetStatePlugin().CreateAccount(addr) - k.GetHost().GetStatePlugin().AddBalance(addr, + k.GetPolaris().Host().GetStatePlugin().Reset(ctx) + k.GetPolaris().Host().GetStatePlugin().CreateAccount(addr) + k.GetPolaris().Host().GetStatePlugin().AddBalance(addr, (&big.Int{}).Mul(big.NewInt(9000000000000000000), big.NewInt(999))) - k.GetHost().GetStatePlugin().Finalize() + k.GetPolaris().Host().GetStatePlugin().Finalize() // create the contract // Zero out the meters. From ff4045dba2216a7f0b0bc55d177e0e029f5be52c Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 15:15:57 -0400 Subject: [PATCH 08/94] ree --- cosmos/abci/prepare/default.go | 59 ++-------------------------------- cosmos/x/evm/keeper/abci.go | 4 +-- cosmos/x/evm/keeper/keeper.go | 13 ++------ e2e/testapp/app.go | 1 + 4 files changed, 7 insertions(+), 70 deletions(-) diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 57ff9f260..104e364ad 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -21,7 +21,6 @@ package prepare import ( - "fmt" "math/big" abci "github.com/cometbft/cometbft/abci/types" @@ -43,11 +42,6 @@ type ( PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) } - - // GasTx defines the contract that a transaction with a gas limit must implement. - GasTx interface { - GetGas() uint64 - } ) type Handler struct { @@ -65,7 +59,6 @@ func (h *Handler) SetPolaris(polaris *polar.Polaris) { h.polaris = polaris } - func (h *Handler) PrepareProposal( ctx sdk.Context, req *abci.RequestPrepareProposal, ) (*abci.ResponsePrepareProposal, error) { @@ -79,9 +72,9 @@ func (h *Handler) PrepareProposal( totalTxBytes int64 totalTxGas uint64 ) - fmt.Println("TODO FIX RACE NIL SHIT") + ctx.Logger().With("prepare-proposal").Error("NOTE: DEV, FIX RACE CONDITION HERE U CLOWN") pending := h.polaris.TxPool().Pending(false) - txp := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) + txp, _ := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) // If no transactions to propose, just continue if len(pending) == 0 { @@ -124,54 +117,6 @@ func (h *Handler) PrepareProposal( byPriceAndNonce.Shift() } - // for iterator != nil { - // memTx := iterator.Tx() - - // // NOTE: Since transaction verification was already executed in CheckTx, - // // which calls mempool.Insert, in theory everything in the pool should be - // // valid. But some mempool implementations may insert invalid txs, so we - // // check again. - // bz, err := h.txVerifier.PrepareProposalVerifyTx(memTx) - // if err != nil { //nolint:nestif // from sdk. - // err2 := h.mempool.Remove(memTx) - // if err2 != nil && !errors.Is(err2, sdkmempool.ErrTxNotFound) { - // return nil, err - // } - // } else { - // var txGasLimit uint64 - // txSize := int64(len(bz)) - - // gasTx, ok := memTx.(GasTx) - // if ok { - // txGasLimit = gasTx.GetGas() - // } - - // // only add the transaction to the proposal if we have enough capacity - // if (txSize + totalTxBytes) < req.MaxTxBytes { - // // If there is a max block gas limit, add the tx only if the limit has - // // not been met. - // if maxBlockGas > 0 { - // if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { - // totalTxGas += txGasLimit - // totalTxBytes += txSize - // selectedTxs = append(selectedTxs, bz) - // } - // } else { - // totalTxBytes += txSize - // selectedTxs = append(selectedTxs, bz) - // } - // } - - // // Check if we've reached capacity. If so, we cannot select any more - // // transactions. - // if totalTxBytes >= req.MaxTxBytes || - // (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { - // break - // } - // } - - // iterator = iterator.Next() - // } return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil } diff --git a/cosmos/x/evm/keeper/abci.go b/cosmos/x/evm/keeper/abci.go index b3582cf54..010c2ff4b 100644 --- a/cosmos/x/evm/keeper/abci.go +++ b/cosmos/x/evm/keeper/abci.go @@ -27,10 +27,8 @@ import ( ) func (k *Keeper) BeginBlocker(ctx context.Context) error { - sCtx := sdk.UnwrapSDKContext(ctx) // Prepare the Polaris Ethereum block. - k.lock = false - k.miner.Prepare(ctx, uint64(sCtx.BlockHeight())) + _ = k.miner.Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) return nil } diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index ce44093cf..7f93e6376 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -55,9 +55,6 @@ type Keeper struct { storeKey storetypes.StoreKey // The host contains various plugins that are are used to implement `core.PolarisHostChain`. host Host - - // temp syncing - lock bool } // NewKeeper creates new instances of the polaris Keeper. @@ -72,7 +69,6 @@ func NewKeeper( k := &Keeper{ ak: ak, storeKey: storeKey, - lock: true, } k.host = NewHost( @@ -132,11 +128,8 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { // TODO: move this go func() { - // spin lock for a bit until begin block has been called (this is kinda hood) - for ; k.lock; time.Sleep(2 * time.Second) { //nolint:gomnd // todo remove. - continue - } - + // TODO: remove race condition. + time.Sleep(2 * time.Second) //nolint:gomnd // i know i know.... if err := k.polaris.Init(); err != nil { panic(err) } @@ -145,7 +138,7 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { panic(err) } - txp := k.host.GetTxPoolPlugin().(txpool.Plugin) + txp, _ := k.host.GetTxPoolPlugin().(txpool.Plugin) txp.Start( k.polaris.TxPool(), clientContext, diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 3b69c09a4..13e74d245 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -60,6 +60,7 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + "pkg.berachain.dev/polaris/cosmos/abci" evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" From e79d154d0e346bb488e25c919fafc6ef7e4c90ae Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 15:33:00 -0400 Subject: [PATCH 09/94] ree --- cosmos/x/evm/keeper/processor_test.go | 9 +++++++-- go.work.sum | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 300728886..6f6287b6a 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -96,7 +96,12 @@ var _ = Describe("Processor", func() { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, ) + sc = staking.NewPrecompileContract(ak, &sk) ctx = ctx.WithBlockHeight(0) + cfg := config.DefaultConfig() + cfg.Node.DataDir = GinkgoT().TempDir() + cfg.Node.KeyStoreDir = GinkgoT().TempDir() + k.Setup(cfg, nil, log.NewTestLogger(GinkgoT())) for _, plugin := range k.GetPolaris().Host().(keeper.Host).GetAllPlugins() { plugin, hasInitGenesis := utils.GetAs[plugins.HasGenesis](plugin) if hasInitGenesis { @@ -107,8 +112,8 @@ var _ = Describe("Processor", func() { Expect(err).ToNot(HaveOccurred()) validator.Status = stakingtypes.Bonded Expect(sk.SetValidator(ctx, validator)).To(Succeed()) - sc = staking.NewPrecompileContract(ak, &sk) - cfg := config.DefaultConfig() + + cfg = config.DefaultConfig() cfg.Node.DataDir = GinkgoT().TempDir() cfg.Node.KeyStoreDir = GinkgoT().TempDir() k.Setup(cfg, nil, log.NewTestLogger(GinkgoT())) diff --git a/go.work.sum b/go.work.sum index 22633a6de..74755251b 100644 --- a/go.work.sum +++ b/go.work.sum @@ -120,6 +120,7 @@ github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= +github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= @@ -140,6 +141,7 @@ github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbE github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= @@ -240,8 +242,7 @@ github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SE github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= -github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= From 5b5d25ecc7d2544a5fea00427943e97e38a0b8b1 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 15:34:32 -0400 Subject: [PATCH 10/94] remove dead file --- eth/miner/new_miner.go | 48 ------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 eth/miner/new_miner.go diff --git a/eth/miner/new_miner.go b/eth/miner/new_miner.go deleted file mode 100644 index 5f1be6a05..000000000 --- a/eth/miner/new_miner.go +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 miner - -// func (w *miner) fillTransactions(interrupt *atomic.Int32, env *environment) error { -// pending := w.txPool.Pending(true) - -// // Split the pending transactions into locals and remotes. -// localTxs, remoteTxs := make(map[common.Address][]*txpool.LazyTransaction), pending -// for _, account := range w.txPool.Locals() { -// if txs := remoteTxs[account]; len(txs) > 0 { -// delete(remoteTxs, account) -// localTxs[account] = txs -// } -// } - -// // Fill the block with all available pending transactions. -// if len(localTxs) > 0 { -// txs := miner.NewTransactionsByPriceAndNonce(env.signer, localTxs, env.header.BaseFee) -// if err := w.commitTransactions(env, txs, interrupt); err != nil { -// return err -// } -// } -// if len(remoteTxs) > 0 { -// txs := miner.NewTransactionsByPriceAndNonce(env.signer, remoteTxs, env.header.BaseFee) -// if err := w.commitTransactions(env, txs, interrupt); err != nil { -// return err -// } -// } -// } From 8b8c92ea34a3521fe1ddd187f0b060259cfc9ea0 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 16:24:17 -0400 Subject: [PATCH 11/94] txpool config --- cosmos/config/config.go | 53 ++++++++++++++++++++++++ cosmos/config/flags.go | 11 +++++ cosmos/config/template.go | 36 ++++++++++++++++ cosmos/x/evm/keeper/keeper.go | 2 +- e2e/precompile/polard/config/app.toml | 38 ++++++++++++++++- e2e/testapp/docker/local/config/app.toml | 38 ++++++++++++++++- 6 files changed, 173 insertions(+), 5 deletions(-) diff --git a/cosmos/config/config.go b/cosmos/config/config.go index 3128a5bad..39f3f714c 100644 --- a/cosmos/config/config.go +++ b/cosmos/config/config.go @@ -31,6 +31,7 @@ import ( "github.com/ethereum/go-ethereum/node" + "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/polar" ) @@ -62,6 +63,15 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { } // Wrapping casting functions to return both value and error + getCommonAddressList := func(key string) []common.Address { + addresses := make([]common.Address, 0) + addressStrs := cast.ToStringSlice(opts.Get(key)) + for _, addressStr := range addressStrs { + address := common.HexToAddress(addressStr) + addresses = append(addresses, address) + } + return addresses + } getString := func(key string) (string, error) { return cast.ToStringE(opts.Get(key)) } getInt := func(key string) (int, error) { return cast.ToIntE(opts.Get(key)) } getInt64 := func(key string) (int64, error) { return cast.ToInt64E(opts.Get(key)) } @@ -110,6 +120,49 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { } conf.Polar.GPO.IgnorePrice = big.NewInt(val) + // LegacyPool + conf.Polar.LegacyTxPool.Locals = getCommonAddressList(flagDefault) + + if conf.Polar.LegacyTxPool.NoLocals, err = getBool(flagNoLocals); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.Journal, err = getString(flagJournal); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.Rejournal, err = getTimeDuration(flagReJournal); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.PriceLimit, err = getUint64(flagPriceLimit); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.PriceBump, err = getUint64(flagPriceBump); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.AccountSlots, err = getUint64(flagAccountSlots); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.GlobalSlots, err = getUint64(flagGlobalSlots); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.AccountQueue, err = getUint64(flagAccountQueue); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.GlobalQueue, err = getUint64(flagGlobalQueue); err != nil { + return nil, handleError(err) + } + + if conf.Polar.LegacyTxPool.Lifetime, err = getTimeDuration(flagLifetime); err != nil { + return nil, handleError(err) + } + // Node settings if conf.Node.Name, err = getString(flagName); err != nil { return nil, handleError(err) diff --git a/cosmos/config/flags.go b/cosmos/config/flags.go index 3b9758bd9..b7b6e30b3 100644 --- a/cosmos/config/flags.go +++ b/cosmos/config/flags.go @@ -70,4 +70,15 @@ const ( flagDefault = "polaris.node.http-timeouts.default" flagMaxPrice = "polaris.node.http-timeouts.max-price" flagIgnorePrice = "polaris.node.http-timeouts.ignore-price" + flagLocals = "polaris.polar.legacy-tx-pool.locals" + flagNoLocals = "polaris.polar.legacy-tx-pool.no-locals" + flagJournal = "polaris.polar.legacy-tx-pool.journal" + flagReJournal = "polaris.polar.legacy-tx-pool.rejournal" + flagPriceLimit = "polaris.polar.legacy-tx-pool.price-limit" + flagPriceBump = "polaris.polar.legacy-tx-pool.price-bump" + flagAccountSlots = "polaris.polar.legacy-tx-pool.account-slots" + flagGlobalSlots = "polaris.polar.legacy-tx-pool.global-slots" + flagAccountQueue = "polaris.polar.legacy-tx-pool.account-queue" + flagGlobalQueue = "polaris.polar.legacy-tx-pool.global-queue" + flagLifetime = "polaris.polar.legacy-tx-pool.lifetime" ) diff --git a/cosmos/config/template.go b/cosmos/config/template.go index 3703ddd5a..7886e7f87 100644 --- a/cosmos/config/template.go +++ b/cosmos/config/template.go @@ -63,6 +63,42 @@ max-price = "{{ .Polaris.Polar.GPO.MaxPrice }}" # Prices to ignore for gas price determination ignore-price = "{{ .Polaris.Polar.GPO.IgnorePrice }}" +# LegacyTxPool settings +[polaris.polar.legacy-tx-pool] + +# Addresses that should be treated by default as local +locals = {{ .Polaris.Polar.LegacyTxPool.Locals }} + +# Whether local transaction handling should be disabled +no-locals = {{ .Polaris.Polar.LegacyTxPool.NoLocals }} + +# Journal of local transactions to survive node restarts +journal = "{{ .Polaris.Polar.LegacyTxPool.Journal }}" + +# Time interval to regenerate the local transaction journal +rejournal = "{{ .Polaris.Polar.LegacyTxPool.Rejournal }}" + +# Minimum gas price to enforce for acceptance into the pool +price-limit = {{ .Polaris.Polar.LegacyTxPool.PriceLimit }} + +# Minimum price bump percentage to replace an already existing transaction (nonce) +price-bump = {{ .Polaris.Polar.LegacyTxPool.PriceBump }} + +# Number of executable transaction slots guaranteed per account +account-slots = {{ .Polaris.Polar.LegacyTxPool.AccountSlots }} + +# Maximum number of executable transaction slots for all accounts +account-queue = {{.Polaris.Polar.LegacyTxPool.AccountQueue }} + +# Maximum number of non-executable transaction slots permitted per account +global-slots = {{ .Polaris.Polar.LegacyTxPool.GlobalSlots }} + +# Maximum number of non-executable transaction slots for all accounts +global-queue = {{ .Polaris.Polar.LegacyTxPool.GlobalQueue }} + +# Maximum amount of time non-executable transaction are queued +lifetime = "{{ .Polaris.Polar.LegacyTxPool.Lifetime }}" + # Node-specific settings [polaris.node] diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 7f93e6376..96f9072c8 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -129,7 +129,7 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { // TODO: move this go func() { // TODO: remove race condition. - time.Sleep(2 * time.Second) //nolint:gomnd // i know i know.... + time.Sleep(3 * time.Second) //nolint:gomnd // i know i know.... if err := k.polaris.Init(); err != nil { panic(err) } diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index f48cfbbdc..33ddfe9dd 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -265,6 +265,41 @@ max-price = "500000000000" # Prices to ignore for gas price determination ignore-price = "2" +# LegacyTxPool settings +[polaris.polar.legacy-tx-pool] + +# Addresses that should be treated by default as local +locals = [] + +# Whether local transaction handling should be disabled +no-locals = false + +# Journal of local transactions to survive node restarts +journal = "transactions.rlp" + +# Time interval to regenerate the local transaction journal +rejournal = "1h0m0s" + +# Minimum gas price to enforce for acceptance into the pool +price-limit = 1 + +# Minimum price bump percentage to replace an already existing transaction (nonce) +price-bump = 10 + +# Number of executable transaction slots guaranteed per account +account-slots = 16 + +# Maximum number of executable transaction slots for all accounts +account-queue = 64 + +# Maximum number of non-executable transaction slots permitted per account +global-slots = 5120 + +# Maximum number of non-executable transaction slots for all accounts +global-queue = 1024 + +# Maximum amount of time non-executable transaction are queued +lifetime = "3h0m0s" # Node-specific settings [polaris.node] @@ -278,7 +313,7 @@ user-ident = "" version = "" # Directory for storing node data -data-dir = "" +data-dir = "/Users/dev/Library/Ethereum" # Directory for storing node keys key-store-dir = "" @@ -381,4 +416,3 @@ write-timeout = "30s" # Timeout for idle HTTP connections idle-timeout = "2m0s" - diff --git a/e2e/testapp/docker/local/config/app.toml b/e2e/testapp/docker/local/config/app.toml index a9cc4f72e..2da4b2d84 100644 --- a/e2e/testapp/docker/local/config/app.toml +++ b/e2e/testapp/docker/local/config/app.toml @@ -264,6 +264,41 @@ max-price = "500000000000" # Prices to ignore for gas price determination ignore-price = "2" +# LegacyTxPool settings +[polaris.polar.legacy-tx-pool] + +# Addresses that should be treated by default as local +locals = [] + +# Whether local transaction handling should be disabled +no-locals = false + +# Journal of local transactions to survive node restarts +journal = "transactions.rlp" + +# Time interval to regenerate the local transaction journal +rejournal = "1h0m0s" + +# Minimum gas price to enforce for acceptance into the pool +price-limit = 1 + +# Minimum price bump percentage to replace an already existing transaction (nonce) +price-bump = 10 + +# Number of executable transaction slots guaranteed per account +account-slots = 16 + +# Maximum number of executable transaction slots for all accounts +account-queue = 64 + +# Maximum number of non-executable transaction slots permitted per account +global-slots = 5120 + +# Maximum number of non-executable transaction slots for all accounts +global-queue = 1024 + +# Maximum amount of time non-executable transaction are queued +lifetime = "3h0m0s" # Node-specific settings [polaris.node] @@ -277,7 +312,7 @@ user-ident = "" version = "" # Directory for storing node data -data-dir = "" +data-dir = "/Users/dev/Library/Ethereum" # Directory for storing node keys key-store-dir = "" @@ -380,4 +415,3 @@ write-timeout = "30s" # Timeout for idle HTTP connections idle-timeout = "2m0s" - From 4fb9a05c60e9002cf2c340d00ccf666bd3b397dc Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 16:38:21 -0400 Subject: [PATCH 12/94] update app.toml --- e2e/hive/clients/polard/config/app.toml | 59 +++++++++++++++++++------ e2e/precompile/polard/config/app.toml | 21 +++++---- 2 files changed, 56 insertions(+), 24 deletions(-) diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index f48cfbbdc..2da4b2d84 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -8,7 +8,11 @@ # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination # specified in this config (e.g. 0.25token1;0.0001token2). -minimum-gas-prices = "0abera" +minimum-gas-prices = "0stake" + +# The maximum gas a query coming over rest/grpc may consume. +# If this is set to zero, the query can consume an unbounded amount of gas. +query-gas-limit = "0" # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) @@ -60,20 +64,15 @@ inter-block-cache = true index-events = [] # IavlCacheSize set the size of the iavl tree cache (in number of nodes). -iavl-cache-size = 781250 +iavl-cache-size = 10000 # IAVLDisableFastNode enables or disables the fast node feature of IAVL. # Default is false. iavl-disable-fastnode = false -# IAVLLazyLoading enable/disable the lazy loading of iavl store. -# Default is false. -iavl-lazy-loading = false - # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. -# First fallback is the deprecated compile-time types.DBBackend value. -# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in CometBFT's config.toml. +# The fallback is the db_backend value set in CometBFT's config.toml. app-db-backend = "" ############################################################################### @@ -123,7 +122,7 @@ enable = false swagger = false # Address defines the API server to listen on. -address = "tcp://0.0.0.0:1317" +address = "tcp://localhost:1317" # MaxOpenConnections defines the number of maximum open connections. max-open-connections = 1000 @@ -150,7 +149,7 @@ enabled-unsafe-cors = false enable = true # Address defines the gRPC server address to bind to. -address = "0.0.0.0:9090" +address = "localhost:9090" # MaxRecvMsgSize defines the max message size in bytes the server can receive. # The default value is 10MB. @@ -223,7 +222,7 @@ stop-node-on-err = true # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. -max-txs = "5000" +max-txs = 5000 ############################################################################### ### Polaris ### @@ -265,6 +264,41 @@ max-price = "500000000000" # Prices to ignore for gas price determination ignore-price = "2" +# LegacyTxPool settings +[polaris.polar.legacy-tx-pool] + +# Addresses that should be treated by default as local +locals = [] + +# Whether local transaction handling should be disabled +no-locals = false + +# Journal of local transactions to survive node restarts +journal = "transactions.rlp" + +# Time interval to regenerate the local transaction journal +rejournal = "1h0m0s" + +# Minimum gas price to enforce for acceptance into the pool +price-limit = 1 + +# Minimum price bump percentage to replace an already existing transaction (nonce) +price-bump = 10 + +# Number of executable transaction slots guaranteed per account +account-slots = 16 + +# Maximum number of executable transaction slots for all accounts +account-queue = 64 + +# Maximum number of non-executable transaction slots permitted per account +global-slots = 5120 + +# Maximum number of non-executable transaction slots for all accounts +global-queue = 1024 + +# Maximum amount of time non-executable transaction are queued +lifetime = "3h0m0s" # Node-specific settings [polaris.node] @@ -278,7 +312,7 @@ user-ident = "" version = "" # Directory for storing node data -data-dir = "" +data-dir = "/Users/dev/Library/Ethereum" # Directory for storing node keys key-store-dir = "" @@ -381,4 +415,3 @@ write-timeout = "30s" # Timeout for idle HTTP connections idle-timeout = "2m0s" - diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index 33ddfe9dd..2da4b2d84 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -8,7 +8,11 @@ # The minimum gas prices a validator is willing to accept for processing a # transaction. A transaction's fees must meet the minimum of any denomination # specified in this config (e.g. 0.25token1;0.0001token2). -minimum-gas-prices = "0abera" +minimum-gas-prices = "0stake" + +# The maximum gas a query coming over rest/grpc may consume. +# If this is set to zero, the query can consume an unbounded amount of gas. +query-gas-limit = "0" # default: the last 362880 states are kept, pruning at 10 block intervals # nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node) @@ -60,20 +64,15 @@ inter-block-cache = true index-events = [] # IavlCacheSize set the size of the iavl tree cache (in number of nodes). -iavl-cache-size = 781250 +iavl-cache-size = 10000 # IAVLDisableFastNode enables or disables the fast node feature of IAVL. # Default is false. iavl-disable-fastnode = false -# IAVLLazyLoading enable/disable the lazy loading of iavl store. -# Default is false. -iavl-lazy-loading = false - # AppDBBackend defines the database backend type to use for the application and snapshots DBs. # An empty string indicates that a fallback will be used. -# First fallback is the deprecated compile-time types.DBBackend value. -# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in CometBFT's config.toml. +# The fallback is the db_backend value set in CometBFT's config.toml. app-db-backend = "" ############################################################################### @@ -123,7 +122,7 @@ enable = false swagger = false # Address defines the API server to listen on. -address = "tcp://0.0.0.0:1317" +address = "tcp://localhost:1317" # MaxOpenConnections defines the number of maximum open connections. max-open-connections = 1000 @@ -150,7 +149,7 @@ enabled-unsafe-cors = false enable = true # Address defines the gRPC server address to bind to. -address = "0.0.0.0:9090" +address = "localhost:9090" # MaxRecvMsgSize defines the max message size in bytes the server can receive. # The default value is 10MB. @@ -223,7 +222,7 @@ stop-node-on-err = true # # Note, this configuration only applies to SDK built-in app-side mempool # implementations. -max-txs = "5000" +max-txs = 5000 ############################################################################### ### Polaris ### From 988e3409cf665cb3872d2e51c6978584eb93c1b7 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 17:10:13 -0400 Subject: [PATCH 13/94] back fee in sort of a jank way --- cosmos/abci/prepare/default.go | 16 ++++++++-------- eth/miner/miner.go | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 104e364ad..c1c822df1 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -21,8 +21,6 @@ package prepare import ( - "math/big" - abci "github.com/cometbft/cometbft/abci/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -72,18 +70,20 @@ func (h *Handler) PrepareProposal( totalTxBytes int64 totalTxGas uint64 ) - ctx.Logger().With("prepare-proposal").Error("NOTE: DEV, FIX RACE CONDITION HERE U CLOWN") - pending := h.polaris.TxPool().Pending(false) - txp, _ := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) - // If no transactions to propose, just continue - if len(pending) == 0 { + // TODO: this is definitely big bad and should be fixed. + // We should prime the blockchain object after app.Load(). + if h.polaris.TxPool() == nil { + ctx.Logger().Error("waiting for txpool to be initialized, proposing empty block") return &abci.ResponsePrepareProposal{}, nil } + pending := h.polaris.TxPool().Pending(false) + txp, _ := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) + byPriceAndNonce := miner.NewTransactionsByPriceAndNonce(types.LatestSigner( h.polaris.Host().GetConfigurationPlugin().ChainConfig(), - ), pending, big.NewInt(0)) // todo get baseFeeproperly + ), pending, h.polaris.Miner().NextBaseFee()) for _tx := byPriceAndNonce.Peek(); _tx != nil; _tx = byPriceAndNonce.Peek() { bz, err := txp.SerializeToBytes(_tx.Resolve()) diff --git a/eth/miner/miner.go b/eth/miner/miner.go index dc14756c6..474cf3bdc 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -58,6 +58,9 @@ type Miner interface { // Finalize is called after the last tx in the block. Finalize(context.Context) error + + // TODO: deprecate + NextBaseFee() *big.Int } // miner implements the Miner interface. @@ -108,6 +111,11 @@ func New(backend Backend) Miner { return m } +// TODO: deprecate and properly recalculate in prepare proposal, this is fine for now though. +func (m *miner) NextBaseFee() *big.Int { + return eip1559.CalcBaseFee(m.cp.ChainConfig(), m.pendingHeader) +} + // Prepare prepares the blockchain for processing a new block at the given height. // //nolint:funlen // todo:fix From def88152a2eef377de0cf4ca54b68abb4b13806f Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 18:06:08 -0400 Subject: [PATCH 14/94] bing bong --- cosmos/abci/prepare/default.go | 48 ++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index c1c822df1..0d8b8302e 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -22,12 +22,11 @@ package prepare import ( abci "github.com/cometbft/cometbft/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/miner" + sdk "github.com/cosmos/cosmos-sdk/types" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/eth/polar" ) @@ -71,28 +70,20 @@ func (h *Handler) PrepareProposal( totalTxGas uint64 ) - // TODO: this is definitely big bad and should be fixed. - // We should prime the blockchain object after app.Load(). - if h.polaris.TxPool() == nil { - ctx.Logger().Error("waiting for txpool to be initialized, proposing empty block") - return &abci.ResponsePrepareProposal{}, nil - } - - pending := h.polaris.TxPool().Pending(false) txp, _ := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) + txs := h.txPoolTransactions(ctx) - byPriceAndNonce := miner.NewTransactionsByPriceAndNonce(types.LatestSigner( - h.polaris.Host().GetConfigurationPlugin().ChainConfig(), - ), pending, h.polaris.Miner().NextBaseFee()) - - for _tx := byPriceAndNonce.Peek(); _tx != nil; _tx = byPriceAndNonce.Peek() { - bz, err := txp.SerializeToBytes(_tx.Resolve()) + for lazyTx := txs.Peek(); lazyTx != nil; lazyTx = txs.Peek() { + tx := lazyTx.Resolve() + bz, err := txp.SerializeToBytes(tx) if err != nil { - ctx.Logger().Error("Failed sdk.Tx Serialization", _tx.Resolve().Hash(), err) + ctx.Logger().Error("Failed sdk.Tx Serialization", tx.Hash(), err) continue } - txGasLimit := _tx.Tx.Gas() + + txGasLimit := tx.Gas() txSize := int64(len(bz)) + // only add the transaction to the proposal if we have enough capacity if (txSize + totalTxBytes) < req.MaxTxBytes { // If there is a max block gas limit, add the tx only if the limit has @@ -108,6 +99,7 @@ func (h *Handler) PrepareProposal( selectedTxs = append(selectedTxs, bz) } } + // Check if we've reached capacity. If so, we cannot select any more // transactions. if totalTxBytes >= req.MaxTxBytes || @@ -115,8 +107,24 @@ func (h *Handler) PrepareProposal( break } - byPriceAndNonce.Shift() + // Shift the transaction off the queue. + txs.Shift() } return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil } + +// txPoolTransactions returns a sorted list of transactions from the txpool. +func (h *Handler) txPoolTransactions(ctx sdk.Context) *miner.TransactionsByPriceAndNonce { + // TODO: this is definitely big bad and should be fixed. + // We should prime the blockchain object after app.Load(). + if h.polaris.TxPool() == nil { + ctx.Logger().Error("waiting for txpool to be initialized, proposing empty block") + return &miner.TransactionsByPriceAndNonce{} + } + + pending := h.polaris.TxPool().Pending(false) + return miner.NewTransactionsByPriceAndNonce(types.LatestSigner( + h.polaris.Host().GetConfigurationPlugin().ChainConfig(), + ), pending, h.polaris.Miner().NextBaseFee()) +} From 4bdfd421056c6795b0fb34ca6fec75491e337d10 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 18:10:21 -0400 Subject: [PATCH 15/94] remove more sleeps --- cosmos/x/evm/plugins/txpool/handler.go | 2 -- eth/polar/polaris.go | 5 ----- 2 files changed, 7 deletions(-) diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index 0fd0b4a81..9261ec697 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -22,7 +22,6 @@ package txpool import ( "sync" - "time" "cosmossdk.io/log" @@ -67,7 +66,6 @@ func newHandler( } h.wg.Add(1) h.txsCh = make(chan core.NewTxsEvent, txChanSize) - time.Sleep(15 * time.Second) //nolint:gomnd // todo remove. TODO: this is hiding a race condition. h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) h.logger.Info("handler started") go h.txBroadcastLoop() // start broadcast handlers diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 85a38fc55..cfa1be0b7 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -126,11 +126,6 @@ func (pl *Polaris) Init() error { pl.cfg.LegacyTxPool, pl.Blockchain(), ) - // TODO REMOVE - for pl.blockchain == nil { - time.Sleep(1 * time.Second) - } - pl.txPool, err = txpool.New(big.NewInt(0), pl.blockchain, []txpool.SubPool{legacyPool}) if err != nil { return err From 2293a2ad9d668bfbbf981eb757f7654c4c3d0493 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 26 Sep 2023 18:21:23 -0400 Subject: [PATCH 16/94] remove zi sleeps --- cosmos/abci/prepare/default.go | 5 +++-- cosmos/x/evm/keeper/keeper.go | 32 +++++++++++++------------------- eth/core/chain.go | 4 +++- eth/polar/polaris.go | 17 ++++++----------- 4 files changed, 25 insertions(+), 33 deletions(-) diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 0d8b8302e..1838bb7a8 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -22,11 +22,12 @@ package prepare import ( abci "github.com/cometbft/cometbft/abci/types" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/miner" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/miner" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/eth/polar" ) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 96f9072c8..315e7b065 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -22,7 +22,6 @@ package keeper import ( "math/big" - "time" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -126,24 +125,19 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { // k.host.GetTxPoolPlugin().(txpool.Plugin).SetClientContext(clientContext) k.host.GetEnginePlugin().(engine.Plugin).Start(clientContext) - // TODO: move this - go func() { - // TODO: remove race condition. - time.Sleep(3 * time.Second) //nolint:gomnd // i know i know.... - if err := k.polaris.Init(); err != nil { - panic(err) - } - - if err := k.polaris.StartServices(); err != nil { - panic(err) - } - - txp, _ := k.host.GetTxPoolPlugin().(txpool.Plugin) - txp.Start( - k.polaris.TxPool(), - clientContext, - ) - }() + if err := k.polaris.Init(); err != nil { + panic(err) + } + + if err := k.polaris.StartServices(); err != nil { + panic(err) + } + + txp, _ := k.host.GetTxPoolPlugin().(txpool.Plugin) + txp.Start( + k.polaris.TxPool(), + clientContext, + ) } // TODO: Remove these, because they're hacky af. diff --git a/eth/core/chain.go b/eth/core/chain.go index 49bcae0e2..a99fda985 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -21,10 +21,12 @@ package core import ( + "math/big" "sync/atomic" lru "github.com/ethereum/go-ethereum/common/lru" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/trie" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/state" @@ -118,7 +120,7 @@ func NewChain(host PolarisHostChain) *blockchain { //nolint:revive // only used logger: log.Root(), } bc.statedb = state.NewStateDB(bc.sp) - bc.currentBlock.Store(nil) + bc.currentBlock.Store(types.NewBlock(&types.Header{Number: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) bc.finalizedBlock.Store(nil) return bc diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index cfa1be0b7..6cf64dd9e 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -23,7 +23,6 @@ package polar import ( "math/big" "net/http" - "time" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/core/txpool" @@ -172,17 +171,13 @@ func (pl *Polaris) APIs() []rpc.API { // StartServices notifies the NetworkStack to spin up (i.e json-rpc). func (pl *Polaris) StartServices() error { - go func() { - // TODO: unhack this. - time.Sleep(2 * time.Second) //nolint:gomnd // we will fix this eventually. + // Register the filter API separately in order to get access to the filterSystem + pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) - // Register the filter API separately in order to get access to the filterSystem - pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) - - if err := pl.stack.Start(); err != nil { - panic(err) - } - }() + // Stack the networking stack. + if err := pl.stack.Start(); err != nil { + panic(err) + } return nil } From cfe5a937900fb8b39f06c119cf01e7e299c5a7ec Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 09:42:11 -0400 Subject: [PATCH 17/94] revert solidity change --- contracts/scripts/DeployAndCallERC20.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/scripts/DeployAndCallERC20.sol b/contracts/scripts/DeployAndCallERC20.sol index 30d01de50..b5a420015 100644 --- a/contracts/scripts/DeployAndCallERC20.sol +++ b/contracts/scripts/DeployAndCallERC20.sol @@ -36,7 +36,7 @@ contract DeployAndCallERC20 is Script { vm.startBroadcast(); SolmateERC20 drop = new SolmateERC20(); - for (uint256 i = 0; i < 62226; i++) { + for (uint256 i = 0; i < 66; i++) { drop.mint(dropAddress, quantity); } From 9148aa69661de13e6c3ec85d7c81356ac4f8e562 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 09:56:13 -0400 Subject: [PATCH 18/94] remove waitgroup in handler --- cosmos/x/evm/plugins/txpool/handler.go | 20 +++----------------- cosmos/x/evm/plugins/txpool/plugin.go | 7 ++++++- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index 9261ec697..550fa5474 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -21,8 +21,6 @@ package txpool import ( - "sync" - "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" @@ -51,7 +49,6 @@ type handler struct { txPool *txpool.TxPool txsCh chan core.NewTxsEvent txsSub event.Subscription - wg sync.WaitGroup } // newHandler creates a new handler and starts the broadcast loop. @@ -64,7 +61,6 @@ func newHandler( txPool: txPool, logger: logger, } - h.wg.Add(1) h.txsCh = make(chan core.NewTxsEvent, txChanSize) h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) h.logger.Info("handler started") @@ -79,23 +75,18 @@ func (h *handler) stop() { // Leave the channels. close(h.txsCh) - h.wg.Wait() - - // h.logger.Info("handler stopped") - - // h.txPool.Stop() } // txBroadcastLoop announces new transactions to connected peers. func (h *handler) txBroadcastLoop() { - defer h.wg.Done() + defer h.stop() for { select { case event := <-h.txsCh: h.broadcastTransactions(event.Txs) case <-h.txsSub.Err(): h.logger.Error("tx subscription error", "err", h.txsSub.Err()) - h.stop() // TODO: move this call into exit routine. + h.stop() return } } @@ -119,13 +110,8 @@ func (h *handler) broadcastTransactions(txs types.Transactions) { // If we see an ABCI response error. if rsp != nil && rsp.Code != 0 { h.logger.Error("failed to broadcast transaction", "rsp", rsp, "err", err) - continue - } - - // If we see any other type of error. - if err != nil { + } else if err != nil { h.logger.Error("error on transactions broadcast", "err", err) - continue } } } diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index fb3f386ca..ad67cb011 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -24,6 +24,7 @@ import ( "cosmossdk.io/log" "github.com/cosmos/cosmos-sdk/client" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/core/txpool" @@ -36,6 +37,11 @@ import ( // Compile-time type assertion. var _ Plugin = (*plugin)(nil) +type Serializer interface { + SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) + SerializeToSdkTx(signedTx *coretypes.Transaction) (sdk.Tx, error) +} + // Plugin defines the required functions of the transaction pool plugin. type Plugin interface { core.TxPoolPlugin @@ -77,6 +83,5 @@ func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, erro func (p *plugin) Start(txpool *txpool.TxPool, ctx client.Context) { p.serializer = newSerializer(ctx) p.WrappedGethTxPool.TxPool = txpool - // p.WrappedGethTxPool.Setup(txpool, p.serializer) p.handler = newHandler(ctx, txpool, p.serializer, log.NewNopLogger()) } From 977b3a0b7c3045c8499675cc72af3271a9bd5baf Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 11:11:24 -0400 Subject: [PATCH 19/94] add mockery --- .mockery.yaml | 9 ++ cosmos/cosmos.go | 1 + cosmos/x/evm/keeper/keeper.go | 2 + cosmos/x/evm/plugins/txpool/handler.go | 102 ++++++++++++++------ cosmos/x/evm/plugins/txpool/handler_test.go | 40 ++++++++ cosmos/x/evm/plugins/txpool/plugin.go | 6 +- go.work.sum | 6 +- magefiles/go.mod | 5 + magefiles/go.sum | 14 +++ magefiles/setup/setup.go | 5 +- magefiles/tools/tools.go | 1 + 11 files changed, 155 insertions(+), 36 deletions(-) create mode 100644 .mockery.yaml create mode 100644 cosmos/cosmos.go create mode 100644 cosmos/x/evm/plugins/txpool/handler_test.go diff --git a/.mockery.yaml b/.mockery.yaml new file mode 100644 index 000000000..028b973ac --- /dev/null +++ b/.mockery.yaml @@ -0,0 +1,9 @@ +dir: "{{.InterfaceDir}}/mocks" +mockname: "{{.InterfaceNameCamel}}" +filename: "{{.InterfaceNameSnake}}.go" +packages: + pkg.berachain.dev/polaris/cosmos: + config: + all: True + recursive: True + with-expecter: true \ No newline at end of file diff --git a/cosmos/cosmos.go b/cosmos/cosmos.go new file mode 100644 index 000000000..33a998464 --- /dev/null +++ b/cosmos/cosmos.go @@ -0,0 +1 @@ +package cosmos diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 315e7b065..22224f30f 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -22,6 +22,7 @@ package keeper import ( "math/big" + "os" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -135,6 +136,7 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { txp, _ := k.host.GetTxPoolPlugin().(txpool.Plugin) txp.Start( + log.NewLogger(os.Stdout), k.polaris.TxPool(), clientContext, ) diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index 550fa5474..5b0cae7a5 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -25,81 +25,123 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/core/txpool" "github.com/ethereum/go-ethereum/event" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/core/types" + coretypes "pkg.berachain.dev/polaris/eth/core/types" ) // txChanSize is the size of channel listening to NewTxsEvent. The number is referenced from the // size of tx pool. const txChanSize = 4096 +// TxSubProvider +type TxSubProvider interface { + SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription +} + +// TxSerializer provides an interface to Serialize Geth Transactions to Bytes (via sdk.Tx) +type TxSerializer interface { + SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) +} + +// Broadcaster provides an interface to broadcast TxBytes to the comet p2p layer. +type Broadcaster interface { + BroadcastTx(txBytes []byte) (res *sdk.TxResponse, err error) + WithBroadcastMode(mode string) client.Context +} + // handler listens for new insertions into the geth txpool and broadcasts them to the CometBFT // layer for p2p and ABCI. type handler struct { // Cosmos logger log.Logger - clientCtx client.Context - serializer *serializer + clientCtx Broadcaster + serializer TxSerializer // Ethereum - txPool *txpool.TxPool + txPool TxSubProvider txsCh chan core.NewTxsEvent + stopCh chan struct{} txsSub event.Subscription } // newHandler creates a new handler and starts the broadcast loop. func newHandler( - clientCtx client.Context, txPool *txpool.TxPool, serializer *serializer, logger log.Logger, + clientCtx Broadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, ) *handler { + txsCh := make(chan core.NewTxsEvent, txChanSize) h := &handler{ + logger: logger, clientCtx: clientCtx.WithBroadcastMode(flags.BroadcastSync), serializer: serializer, txPool: txPool, - logger: logger, + txsCh: txsCh, + stopCh: make(chan struct{}), } - h.txsCh = make(chan core.NewTxsEvent, txChanSize) - h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) - h.logger.Info("handler started") - go h.txBroadcastLoop() // start broadcast handlers return h } -// stop stops the handler. -func (h *handler) stop() { - // Triggers txBroadcastLoop to quit. - h.txsSub.Unsubscribe() - - // Leave the channels. - close(h.txsCh) +// Start starts the handler. +func (h *handler) Start() { + go h.start() } -// txBroadcastLoop announces new transactions to connected peers. -func (h *handler) txBroadcastLoop() { - defer h.stop() +// start handles the subscription to the txpool and broadcasts transactions. +func (h *handler) start() { + // Connect to the subscription. + h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) + + // Handle events. + var err error for { select { case event := <-h.txsCh: h.broadcastTransactions(event.Txs) - case <-h.txsSub.Err(): - h.logger.Error("tx subscription error", "err", h.txsSub.Err()) - h.stop() - return + case err = <-h.txsSub.Err(): + h.stopCh <- struct{}{} + case <-h.stopCh: + h.stop(err) } } } +// Stop stops the handler. +func (h *handler) Stop() { + h.stopCh <- struct{}{} +} + +// stop stops the handler. +func (h *handler) stop(err error) { + if err != nil { + h.logger.Error("tx subscription error", "err", err) + } + + // Triggers txBroadcastLoop to quit. + h.txsSub.Unsubscribe() + + // Leave the channels. + close(h.txsCh) +} + // broadcastTransactions will propagate a batch of transactions to the CometBFT mempool. func (h *handler) broadcastTransactions(txs types.Transactions) { - h.logger.Info("broadcasting transactions", "num_txs", len(txs)) + success, failures := h._broadcastTransactions(txs) + defer h.logger.With("module", "tx-handler").Info("broadcasting transactions done", "success", success, "failures", failures) + h.logger.With("module", "tx-handler").Info("broadcasting transactions", "num_txs", len(txs)) +} + +// broadcastTransactions will propagate a batch of transactions to the CometBFT mempool. +func (h *handler) _broadcastTransactions(txs types.Transactions) (uint64, uint64) { + failures := uint64(0) for _, signedEthTx := range txs { // Serialize the transaction to Bytes txBytes, err := h.serializer.SerializeToBytes(signedEthTx) if err != nil { - h.logger.Error("failed to serialize transaction", "err", err) + failures += 1 continue } @@ -108,10 +150,10 @@ func (h *handler) broadcastTransactions(txs types.Transactions) { rsp, err := h.clientCtx.BroadcastTx(txBytes) // If we see an ABCI response error. - if rsp != nil && rsp.Code != 0 { - h.logger.Error("failed to broadcast transaction", "rsp", rsp, "err", err) - } else if err != nil { - h.logger.Error("error on transactions broadcast", "err", err) + if rsp != nil && rsp.Code != 0 || err != nil { + failures += 1 } } + + return uint64(len(txs)) - failures, failures } diff --git a/cosmos/x/evm/plugins/txpool/handler_test.go b/cosmos/x/evm/plugins/txpool/handler_test.go new file mode 100644 index 000000000..b5a3c0d6c --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/handler_test.go @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 txpool + +// import ( +// "github.com/cosmos/cosmos-sdk/client" +// . "github.com/onsi/ginkgo/v2" +// . "github.com/onsi/gomega" +// ) + +// var _ = Describe("", func() { + +// h := newHandler(client.Context{}) +// BeforeEach(func() {}) + +// When("", func() { +// It("should start", func() { + +// }) +// }) + +// }) diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index ad67cb011..b84177c09 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -45,7 +45,7 @@ type Serializer interface { // Plugin defines the required functions of the transaction pool plugin. type Plugin interface { core.TxPoolPlugin - Start(*txpool.TxPool, client.Context) + Start(log.Logger, *txpool.TxPool, client.Context) // Prepare(*big.Int, coretypes.Signer) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) Pending(enforceTips bool) map[common.Address][]*txpool.LazyTransaction @@ -80,8 +80,8 @@ func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, erro } // Setup implements the Plugin interface. -func (p *plugin) Start(txpool *txpool.TxPool, ctx client.Context) { +func (p *plugin) Start(logger log.Logger, txpool *txpool.TxPool, ctx client.Context) { p.serializer = newSerializer(ctx) p.WrappedGethTxPool.TxPool = txpool - p.handler = newHandler(ctx, txpool, p.serializer, log.NewNopLogger()) + p.handler = newHandler(ctx, txpool, p.serializer, logger) } diff --git a/go.work.sum b/go.work.sum index 74755251b..37581b137 100644 --- a/go.work.sum +++ b/go.work.sum @@ -144,6 +144,7 @@ github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd3 github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= @@ -186,6 +187,7 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gofiber/fiber/v2 v2.48.0/go.mod h1:xqJgfqrc23FJuqGOW6DVgi3HyZEm2Mn9pRqUb2kHSX8= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= @@ -207,7 +209,6 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= @@ -245,6 +246,8 @@ github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= +github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= +github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= @@ -279,6 +282,7 @@ github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKn github.com/valyala/fasthttp v1.48.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vektra/mockery/v2 v2.23.1 h1:N59FENM2d/gWE6Ns5JPuf9a7jqQWeheGefZqvuvb1dM= github.com/vektra/mockery/v2 v2.23.1/go.mod h1:Zh3Kv1ckKs6FokhlVLcCu6UTyzfS3M8mpROz1lBNp+w= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= diff --git a/magefiles/go.mod b/magefiles/go.mod index 3c1a375af..d77155a55 100644 --- a/magefiles/go.mod +++ b/magefiles/go.mod @@ -14,6 +14,7 @@ require ( github.com/onsi/ginkgo/v2 v2.12.1 github.com/securego/gosec/v2 v2.17.0 github.com/segmentio/golines v0.11.0 + github.com/vektra/mockery/v2 v2.34.1 ) require ( @@ -63,6 +64,7 @@ require ( github.com/chavacava/garif v0.0.0-20230227094218-b8c73b2037b8 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.0 // indirect + github.com/chigopher/pathlib v0.15.0 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06 // indirect @@ -158,6 +160,7 @@ require ( github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/iancoleman/strcase v0.2.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/influxdata/influxdb-client-go/v2 v2.12.3 // indirect github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect @@ -167,6 +170,7 @@ require ( github.com/jgautheron/goconst v1.5.1 // indirect github.com/jhump/protoreflect v1.15.2 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect + github.com/jinzhu/copier v0.3.5 // indirect github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/julz/importas v0.1.0 // indirect @@ -234,6 +238,7 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.9.0 // indirect + github.com/rs/zerolog v1.29.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryancurrah/gomodguard v1.3.0 // indirect github.com/ryanrolds/sqlclosecheck v0.4.0 // indirect diff --git a/magefiles/go.sum b/magefiles/go.sum index f7abd4e74..b29f2a32f 100644 --- a/magefiles/go.sum +++ b/magefiles/go.sum @@ -160,6 +160,8 @@ github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d h1:77cEq6EriyTZ github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpVsBuRksnlj1mLy4AWzRNQYxauNi62uWcE3to6eA= github.com/chenzhuoyu/iasm v0.9.0 h1:9fhXjVzq5hUy2gkhhgHl95zG2cEAhw9OSGs8toWWAwo= github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chigopher/pathlib v0.15.0 h1:1pg96WL3iC1/YyWV4UJSl3E0GBf4B+h5amBtsbAAieY= +github.com/chigopher/pathlib v0.15.0/go.mod h1:3+YPPV21mU9vyw8Mjp+F33CyCfE6iOzinpiqBcccv7I= 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= @@ -183,6 +185,7 @@ github.com/consensys/gnark-crypto v0.11.2 h1:GJjjtWJ+db1xGao7vTsOgAOGgjfPe7eRGPL github.com/consensys/gnark-crypto v0.11.2/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2 h1:4mZery7L3ltSRUP0dKlJ5mIW7yi2hQcQsBjBYtlNxNI= github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2/go.mod h1:NV9RgyPGw3QjOHYKmruHuejnCZ9+fwBDruxTxJf2gak= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= @@ -332,6 +335,7 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= @@ -486,6 +490,8 @@ github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZm github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -507,6 +513,8 @@ github.com/jhump/protoreflect v1.15.2 h1:7YppbATX94jEt9KLAc5hICx4h6Yt3SaavhQRsIU github.com/jhump/protoreflect v1.15.2/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= +github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= @@ -593,6 +601,7 @@ github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwM github.com/matryer/moq v0.3.2 h1:z7oltmpTxiQ9nKNg0Jc7z45TM+eO7OhCVohxRxwaudM= github.com/matryer/moq v0.3.2/go.mod h1:RJ75ZZZD71hejp39j4crZLsEDszGk6iH4v4YsWFKH4s= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= 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.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= @@ -744,6 +753,9 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= +github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryancurrah/gomodguard v1.3.0 h1:q15RT/pd6UggBXVBuLps8BXRvl5GPBcwVA7BJHMLuTw= @@ -876,6 +888,8 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= +github.com/vektra/mockery/v2 v2.34.1 h1:H+wO4wTRlBjdY3yFUjv53GazCaDSEfhRKJugyo2aoNc= +github.com/vektra/mockery/v2 v2.34.1/go.mod h1:9lREs4VEeQiUS3rizYQx1saxHu2JiIhThP0q9+fDegM= github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= github.com/xen0n/gosmopolitan v1.2.1 h1:3pttnTuFumELBRSh+KQs1zcz4fN6Zy7aB0xlnQSn1Iw= diff --git a/magefiles/setup/setup.go b/magefiles/setup/setup.go index ec9c07454..bf49ad08f 100644 --- a/magefiles/setup/setup.go +++ b/magefiles/setup/setup.go @@ -45,12 +45,13 @@ var ( golines = "github.com/segmentio/golines" rlpgen = "github.com/ethereum/go-ethereum/rlp/rlpgen" abigen = "github.com/ethereum/go-ethereum/cmd/abigen" + mockery = "github.com/vektra/mockery/v2" - ciTools = []string{buf, gosec, golangcilint, addlicense, ginkgo, golines} + ciTools = []string{buf, gosec, golangcilint, addlicense, ginkgo, golines, mockery} allTools = append(ciTools, []string{moq, rlpgen, abigen}...) ) -// Setup runs the setup script for the current OS. +// Setup runs the setup script for the curremocknt OS. func main() { var err error diff --git a/magefiles/tools/tools.go b/magefiles/tools/tools.go index 43ce69a77..842810be7 100644 --- a/magefiles/tools/tools.go +++ b/magefiles/tools/tools.go @@ -45,4 +45,5 @@ import ( _ "github.com/onsi/ginkgo/v2/ginkgo" _ "github.com/securego/gosec/v2/cmd/gosec" _ "github.com/segmentio/golines" + _ "github.com/vektra/mockery/v2" ) From fdf5b21f2ac43e310dbd94ffe4bbcd74b0b5f9ca Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 12:27:22 -0400 Subject: [PATCH 20/94] improve handler --- .mockery.yaml | 5 +- cosmos/cosmos.go | 20 ++ cosmos/x/evm/plugins/txpool/handler.go | 56 ++-- cosmos/x/evm/plugins/txpool/handler_test.go | 76 ++++- .../x/evm/plugins/txpool/mock/broadcaster.go | 90 ++++++ .../txpool/mock/configuration_plugin.go | 73 +++++ cosmos/x/evm/plugins/txpool/mock/plugin.go | 264 ++++++++++++++++++ .../x/evm/plugins/txpool/mock/serializer.go | 145 ++++++++++ .../x/evm/plugins/txpool/mock/subscription.go | 107 +++++++ .../evm/plugins/txpool/mock/tx_serializer.go | 90 ++++++ .../plugins/txpool/mock/tx_sub_provider.go | 81 ++++++ 11 files changed, 965 insertions(+), 42 deletions(-) create mode 100644 cosmos/x/evm/plugins/txpool/mock/broadcaster.go create mode 100644 cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go create mode 100644 cosmos/x/evm/plugins/txpool/mock/plugin.go create mode 100644 cosmos/x/evm/plugins/txpool/mock/serializer.go create mode 100644 cosmos/x/evm/plugins/txpool/mock/subscription.go create mode 100644 cosmos/x/evm/plugins/txpool/mock/tx_serializer.go create mode 100644 cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go diff --git a/.mockery.yaml b/.mockery.yaml index 028b973ac..465f70fd6 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1,8 +1,9 @@ -dir: "{{.InterfaceDir}}/mocks" +dir: "{{.InterfaceDir}}/mock" mockname: "{{.InterfaceNameCamel}}" filename: "{{.InterfaceNameSnake}}.go" +outpkg: "mock" packages: - pkg.berachain.dev/polaris/cosmos: + pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool: config: all: True recursive: True diff --git a/cosmos/cosmos.go b/cosmos/cosmos.go index 33a998464..ac123cf2e 100644 --- a/cosmos/cosmos.go +++ b/cosmos/cosmos.go @@ -1 +1,21 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 cosmos diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index 5b0cae7a5..e69463532 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -23,14 +23,11 @@ package txpool import ( "cosmossdk.io/log" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/event" "pkg.berachain.dev/polaris/eth/core" - "pkg.berachain.dev/polaris/eth/core/types" coretypes "pkg.berachain.dev/polaris/eth/core/types" ) @@ -38,20 +35,24 @@ import ( // size of tx pool. const txChanSize = 4096 -// TxSubProvider +// TxSubProvider. type TxSubProvider interface { SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription } -// TxSerializer provides an interface to Serialize Geth Transactions to Bytes (via sdk.Tx) +// TxSerializer provides an interface to Serialize Geth Transactions to Bytes (via sdk.Tx). type TxSerializer interface { SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) } // Broadcaster provides an interface to broadcast TxBytes to the comet p2p layer. type Broadcaster interface { - BroadcastTx(txBytes []byte) (res *sdk.TxResponse, err error) - WithBroadcastMode(mode string) client.Context + BroadcastTxSync(txBytes []byte) (res *sdk.TxResponse, err error) +} + +// Subscription represents a subscription to the txpool. +type Subscription interface { + event.Subscription } // handler listens for new insertions into the geth txpool and broadcasts them to the CometBFT @@ -63,10 +64,11 @@ type handler struct { serializer TxSerializer // Ethereum - txPool TxSubProvider - txsCh chan core.NewTxsEvent - stopCh chan struct{} - txsSub event.Subscription + txPool TxSubProvider + txsCh chan core.NewTxsEvent + stopCh chan struct{} + txsSub Subscription + running bool } // newHandler creates a new handler and starts the broadcast loop. @@ -76,7 +78,7 @@ func newHandler( txsCh := make(chan core.NewTxsEvent, txChanSize) h := &handler{ logger: logger, - clientCtx: clientCtx.WithBroadcastMode(flags.BroadcastSync), + clientCtx: clientCtx, serializer: serializer, txPool: txPool, txsCh: txsCh, @@ -94,6 +96,7 @@ func (h *handler) Start() { func (h *handler) start() { // Connect to the subscription. h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) + h.running = true // Handle events. var err error @@ -109,6 +112,11 @@ func (h *handler) start() { } } +// Running returns true if the handler is running. +func (h *handler) Running() bool { + return h.running +} + // Stop stops the handler. func (h *handler) Stop() { h.stopCh <- struct{}{} @@ -122,38 +130,32 @@ func (h *handler) stop(err error) { // Triggers txBroadcastLoop to quit. h.txsSub.Unsubscribe() + h.running = false // Leave the channels. close(h.txsCh) } // broadcastTransactions will propagate a batch of transactions to the CometBFT mempool. -func (h *handler) broadcastTransactions(txs types.Transactions) { - success, failures := h._broadcastTransactions(txs) - defer h.logger.With("module", "tx-handler").Info("broadcasting transactions done", "success", success, "failures", failures) - h.logger.With("module", "tx-handler").Info("broadcasting transactions", "num_txs", len(txs)) -} - -// broadcastTransactions will propagate a batch of transactions to the CometBFT mempool. -func (h *handler) _broadcastTransactions(txs types.Transactions) (uint64, uint64) { - failures := uint64(0) +func (h *handler) broadcastTransactions(txs coretypes.Transactions) { + h.logger.Debug("broadcasting transactions", "num_txs", len(txs)) for _, signedEthTx := range txs { // Serialize the transaction to Bytes txBytes, err := h.serializer.SerializeToBytes(signedEthTx) if err != nil { - failures += 1 + h.logger.Error("failed to serialize transaction", "err", err) continue } // Send the transaction to the CometBFT mempool, which will gossip it to peers via // CometBFT's p2p layer. - rsp, err := h.clientCtx.BroadcastTx(txBytes) + rsp, err := h.clientCtx.BroadcastTxSync(txBytes) // If we see an ABCI response error. - if rsp != nil && rsp.Code != 0 || err != nil { - failures += 1 + if rsp != nil && rsp.Code != 0 { + h.logger.Error("failed to broadcast transaction", "rsp", rsp, "err", err) + } else if err != nil { + h.logger.Error("error on transactions broadcast", "err", err) } } - - return uint64(len(txs)) - failures, failures } diff --git a/cosmos/x/evm/plugins/txpool/handler_test.go b/cosmos/x/evm/plugins/txpool/handler_test.go index b5a3c0d6c..49a45c0bc 100644 --- a/cosmos/x/evm/plugins/txpool/handler_test.go +++ b/cosmos/x/evm/plugins/txpool/handler_test.go @@ -20,21 +20,71 @@ package txpool -// import ( -// "github.com/cosmos/cosmos-sdk/client" -// . "github.com/onsi/ginkgo/v2" -// . "github.com/onsi/gomega" -// ) +import ( + "time" -// var _ = Describe("", func() { + tmock "github.com/stretchr/testify/mock" -// h := newHandler(client.Context{}) -// BeforeEach(func() {}) + "cosmossdk.io/log" -// When("", func() { -// It("should start", func() { + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mock" + "pkg.berachain.dev/polaris/eth/core" + coretypes "pkg.berachain.dev/polaris/eth/core/types" -// }) -// }) + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) -// }) +var _ = Describe("", func() { + var h *handler + t := GinkgoT() + + var subscription *mock.Subscription + var serializer *mock.TxSerializer + var broadcaster *mock.Broadcaster + var subprovider *mock.TxSubProvider + + BeforeEach(func() { + subscription = mock.NewSubscription(t) + subscription.On("Err").Return(nil) + subscription.On("Unsubscribe").Return() + broadcaster = mock.NewBroadcaster(t) + subprovider = mock.NewTxSubProvider(t) + subprovider.On("SubscribeNewTxsEvent", tmock.Anything).Return(subscription) + serializer = mock.NewTxSerializer(t) + h = newHandler(broadcaster, subprovider, serializer, log.NewTestLogger(t)) + h.Start() + // Wait for handler to start. + time.Sleep(300 * time.Millisecond) + }) + + AfterEach(func() { + h.Stop() + // Wait for handler to stop + time.Sleep(300 * time.Millisecond) + }) + + When("", func() { + It("should start", func() { + Expect(h.Running()).To(BeTrue()) + }) + + It("should handle 1 tx", func() { + serializer.On("SerializeToBytes", tmock.Anything).Return([]byte{123}, nil).Once() + broadcaster.On("BroadcastTxSync", []byte{123}).Return(nil, nil).Once() + + h.txsCh <- core.NewTxsEvent{Txs: []*coretypes.Transaction{coretypes.NewTx(&coretypes.LegacyTx{Nonce: 5})}} + }) + + It("should handle multiple tx", func() { + serializer.On("SerializeToBytes", tmock.Anything).Return([]byte{123}, nil).Twice() + broadcaster.On("BroadcastTxSync", []byte{123}).Return(nil, nil).Twice() + + h.txsCh <- core.NewTxsEvent{Txs: []*coretypes.Transaction{ + coretypes.NewTx(&coretypes.LegacyTx{Nonce: 5}), + coretypes.NewTx(&coretypes.LegacyTx{Nonce: 6}), + }} + }) + }) + +}) diff --git a/cosmos/x/evm/plugins/txpool/mock/broadcaster.go b/cosmos/x/evm/plugins/txpool/mock/broadcaster.go new file mode 100644 index 000000000..7b7857c0b --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/broadcaster.go @@ -0,0 +1,90 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import ( + mock "github.com/stretchr/testify/mock" + + types "github.com/cosmos/cosmos-sdk/types" +) + +// Broadcaster is an autogenerated mock type for the Broadcaster type +type Broadcaster struct { + mock.Mock +} + +type Broadcaster_Expecter struct { + mock *mock.Mock +} + +func (_m *Broadcaster) EXPECT() *Broadcaster_Expecter { + return &Broadcaster_Expecter{mock: &_m.Mock} +} + +// BroadcastTxSync provides a mock function with given fields: txBytes +func (_m *Broadcaster) BroadcastTxSync(txBytes []byte) (*types.TxResponse, error) { + ret := _m.Called(txBytes) + + var r0 *types.TxResponse + var r1 error + if rf, ok := ret.Get(0).(func([]byte) (*types.TxResponse, error)); ok { + return rf(txBytes) + } + if rf, ok := ret.Get(0).(func([]byte) *types.TxResponse); ok { + r0 = rf(txBytes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.TxResponse) + } + } + + if rf, ok := ret.Get(1).(func([]byte) error); ok { + r1 = rf(txBytes) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Broadcaster_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' +type Broadcaster_BroadcastTxSync_Call struct { + *mock.Call +} + +// BroadcastTxSync is a helper method to define mock.On call +// - txBytes []byte +func (_e *Broadcaster_Expecter) BroadcastTxSync(txBytes interface{}) *Broadcaster_BroadcastTxSync_Call { + return &Broadcaster_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", txBytes)} +} + +func (_c *Broadcaster_BroadcastTxSync_Call) Run(run func(txBytes []byte)) *Broadcaster_BroadcastTxSync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *Broadcaster_BroadcastTxSync_Call) Return(res *types.TxResponse, err error) *Broadcaster_BroadcastTxSync_Call { + _c.Call.Return(res, err) + return _c +} + +func (_c *Broadcaster_BroadcastTxSync_Call) RunAndReturn(run func([]byte) (*types.TxResponse, error)) *Broadcaster_BroadcastTxSync_Call { + _c.Call.Return(run) + return _c +} + +// NewBroadcaster creates a new instance of Broadcaster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewBroadcaster(t interface { + mock.TestingT + Cleanup(func()) +}) *Broadcaster { + mock := &Broadcaster{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go b/cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go new file mode 100644 index 000000000..2d0b317f2 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go @@ -0,0 +1,73 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import mock "github.com/stretchr/testify/mock" + +// ConfigurationPlugin is an autogenerated mock type for the ConfigurationPlugin type +type ConfigurationPlugin struct { + mock.Mock +} + +type ConfigurationPlugin_Expecter struct { + mock *mock.Mock +} + +func (_m *ConfigurationPlugin) EXPECT() *ConfigurationPlugin_Expecter { + return &ConfigurationPlugin_Expecter{mock: &_m.Mock} +} + +// GetEvmDenom provides a mock function with given fields: +func (_m *ConfigurationPlugin) GetEvmDenom() string { + ret := _m.Called() + + var r0 string + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + return r0 +} + +// ConfigurationPlugin_GetEvmDenom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEvmDenom' +type ConfigurationPlugin_GetEvmDenom_Call struct { + *mock.Call +} + +// GetEvmDenom is a helper method to define mock.On call +func (_e *ConfigurationPlugin_Expecter) GetEvmDenom() *ConfigurationPlugin_GetEvmDenom_Call { + return &ConfigurationPlugin_GetEvmDenom_Call{Call: _e.mock.On("GetEvmDenom")} +} + +func (_c *ConfigurationPlugin_GetEvmDenom_Call) Run(run func()) *ConfigurationPlugin_GetEvmDenom_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *ConfigurationPlugin_GetEvmDenom_Call) Return(_a0 string) *ConfigurationPlugin_GetEvmDenom_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *ConfigurationPlugin_GetEvmDenom_Call) RunAndReturn(run func() string) *ConfigurationPlugin_GetEvmDenom_Call { + _c.Call.Return(run) + return _c +} + +// NewConfigurationPlugin creates a new instance of ConfigurationPlugin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewConfigurationPlugin(t interface { + mock.TestingT + Cleanup(func()) +}) *ConfigurationPlugin { + mock := &ConfigurationPlugin{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/plugins/txpool/mock/plugin.go b/cosmos/x/evm/plugins/txpool/mock/plugin.go new file mode 100644 index 000000000..4d6d309b8 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/plugin.go @@ -0,0 +1,264 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import ( + client "github.com/cosmos/cosmos-sdk/client" + common "github.com/ethereum/go-ethereum/common" + + core "pkg.berachain.dev/polaris/eth/core" + + coretxpool "github.com/ethereum/go-ethereum/core/txpool" + + log "cosmossdk.io/log" + + mock "github.com/stretchr/testify/mock" + + types "github.com/ethereum/go-ethereum/core/types" +) + +// Plugin is an autogenerated mock type for the Plugin type +type Plugin struct { + mock.Mock +} + +type Plugin_Expecter struct { + mock *mock.Mock +} + +func (_m *Plugin) EXPECT() *Plugin_Expecter { + return &Plugin_Expecter{mock: &_m.Mock} +} + +// GetHandler provides a mock function with given fields: +func (_m *Plugin) GetHandler() core.Handler { + ret := _m.Called() + + var r0 core.Handler + if rf, ok := ret.Get(0).(func() core.Handler); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(core.Handler) + } + } + + return r0 +} + +// Plugin_GetHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHandler' +type Plugin_GetHandler_Call struct { + *mock.Call +} + +// GetHandler is a helper method to define mock.On call +func (_e *Plugin_Expecter) GetHandler() *Plugin_GetHandler_Call { + return &Plugin_GetHandler_Call{Call: _e.mock.On("GetHandler")} +} + +func (_c *Plugin_GetHandler_Call) Run(run func()) *Plugin_GetHandler_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Plugin_GetHandler_Call) Return(_a0 core.Handler) *Plugin_GetHandler_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Plugin_GetHandler_Call) RunAndReturn(run func() core.Handler) *Plugin_GetHandler_Call { + _c.Call.Return(run) + return _c +} + +// Pending provides a mock function with given fields: enforceTips +func (_m *Plugin) Pending(enforceTips bool) map[common.Address][]*coretxpool.LazyTransaction { + ret := _m.Called(enforceTips) + + var r0 map[common.Address][]*coretxpool.LazyTransaction + if rf, ok := ret.Get(0).(func(bool) map[common.Address][]*coretxpool.LazyTransaction); ok { + r0 = rf(enforceTips) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[common.Address][]*coretxpool.LazyTransaction) + } + } + + return r0 +} + +// Plugin_Pending_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pending' +type Plugin_Pending_Call struct { + *mock.Call +} + +// Pending is a helper method to define mock.On call +// - enforceTips bool +func (_e *Plugin_Expecter) Pending(enforceTips interface{}) *Plugin_Pending_Call { + return &Plugin_Pending_Call{Call: _e.mock.On("Pending", enforceTips)} +} + +func (_c *Plugin_Pending_Call) Run(run func(enforceTips bool)) *Plugin_Pending_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(bool)) + }) + return _c +} + +func (_c *Plugin_Pending_Call) Return(_a0 map[common.Address][]*coretxpool.LazyTransaction) *Plugin_Pending_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Plugin_Pending_Call) RunAndReturn(run func(bool) map[common.Address][]*coretxpool.LazyTransaction) *Plugin_Pending_Call { + _c.Call.Return(run) + return _c +} + +// SerializeToBytes provides a mock function with given fields: signedTx +func (_m *Plugin) SerializeToBytes(signedTx *types.Transaction) ([]byte, error) { + ret := _m.Called(signedTx) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(*types.Transaction) ([]byte, error)); ok { + return rf(signedTx) + } + if rf, ok := ret.Get(0).(func(*types.Transaction) []byte); ok { + r0 = rf(signedTx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { + r1 = rf(signedTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Plugin_SerializeToBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToBytes' +type Plugin_SerializeToBytes_Call struct { + *mock.Call +} + +// SerializeToBytes is a helper method to define mock.On call +// - signedTx *types.Transaction +func (_e *Plugin_Expecter) SerializeToBytes(signedTx interface{}) *Plugin_SerializeToBytes_Call { + return &Plugin_SerializeToBytes_Call{Call: _e.mock.On("SerializeToBytes", signedTx)} +} + +func (_c *Plugin_SerializeToBytes_Call) Run(run func(signedTx *types.Transaction)) *Plugin_SerializeToBytes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*types.Transaction)) + }) + return _c +} + +func (_c *Plugin_SerializeToBytes_Call) Return(_a0 []byte, _a1 error) *Plugin_SerializeToBytes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Plugin_SerializeToBytes_Call) RunAndReturn(run func(*types.Transaction) ([]byte, error)) *Plugin_SerializeToBytes_Call { + _c.Call.Return(run) + return _c +} + +// Start provides a mock function with given fields: _a0, _a1, _a2 +func (_m *Plugin) Start(_a0 log.Logger, _a1 *coretxpool.TxPool, _a2 client.Context) { + _m.Called(_a0, _a1, _a2) +} + +// Plugin_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Plugin_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +// - _a0 log.Logger +// - _a1 *coretxpool.TxPool +// - _a2 client.Context +func (_e *Plugin_Expecter) Start(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Plugin_Start_Call { + return &Plugin_Start_Call{Call: _e.mock.On("Start", _a0, _a1, _a2)} +} + +func (_c *Plugin_Start_Call) Run(run func(_a0 log.Logger, _a1 *coretxpool.TxPool, _a2 client.Context)) *Plugin_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(log.Logger), args[1].(*coretxpool.TxPool), args[2].(client.Context)) + }) + return _c +} + +func (_c *Plugin_Start_Call) Return() *Plugin_Start_Call { + _c.Call.Return() + return _c +} + +func (_c *Plugin_Start_Call) RunAndReturn(run func(log.Logger, *coretxpool.TxPool, client.Context)) *Plugin_Start_Call { + _c.Call.Return(run) + return _c +} + +// TxPool provides a mock function with given fields: +func (_m *Plugin) TxPool() *coretxpool.TxPool { + ret := _m.Called() + + var r0 *coretxpool.TxPool + if rf, ok := ret.Get(0).(func() *coretxpool.TxPool); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*coretxpool.TxPool) + } + } + + return r0 +} + +// Plugin_TxPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxPool' +type Plugin_TxPool_Call struct { + *mock.Call +} + +// TxPool is a helper method to define mock.On call +func (_e *Plugin_Expecter) TxPool() *Plugin_TxPool_Call { + return &Plugin_TxPool_Call{Call: _e.mock.On("TxPool")} +} + +func (_c *Plugin_TxPool_Call) Run(run func()) *Plugin_TxPool_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Plugin_TxPool_Call) Return(_a0 *coretxpool.TxPool) *Plugin_TxPool_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Plugin_TxPool_Call) RunAndReturn(run func() *coretxpool.TxPool) *Plugin_TxPool_Call { + _c.Call.Return(run) + return _c +} + +// NewPlugin creates a new instance of Plugin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewPlugin(t interface { + mock.TestingT + Cleanup(func()) +}) *Plugin { + mock := &Plugin{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/plugins/txpool/mock/serializer.go b/cosmos/x/evm/plugins/txpool/mock/serializer.go new file mode 100644 index 000000000..a6ef87e74 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/serializer.go @@ -0,0 +1,145 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import ( + cosmos_sdktypes "github.com/cosmos/cosmos-sdk/types" + mock "github.com/stretchr/testify/mock" + + types "github.com/ethereum/go-ethereum/core/types" +) + +// Serializer is an autogenerated mock type for the Serializer type +type Serializer struct { + mock.Mock +} + +type Serializer_Expecter struct { + mock *mock.Mock +} + +func (_m *Serializer) EXPECT() *Serializer_Expecter { + return &Serializer_Expecter{mock: &_m.Mock} +} + +// SerializeToBytes provides a mock function with given fields: signedTx +func (_m *Serializer) SerializeToBytes(signedTx *types.Transaction) ([]byte, error) { + ret := _m.Called(signedTx) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(*types.Transaction) ([]byte, error)); ok { + return rf(signedTx) + } + if rf, ok := ret.Get(0).(func(*types.Transaction) []byte); ok { + r0 = rf(signedTx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { + r1 = rf(signedTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Serializer_SerializeToBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToBytes' +type Serializer_SerializeToBytes_Call struct { + *mock.Call +} + +// SerializeToBytes is a helper method to define mock.On call +// - signedTx *types.Transaction +func (_e *Serializer_Expecter) SerializeToBytes(signedTx interface{}) *Serializer_SerializeToBytes_Call { + return &Serializer_SerializeToBytes_Call{Call: _e.mock.On("SerializeToBytes", signedTx)} +} + +func (_c *Serializer_SerializeToBytes_Call) Run(run func(signedTx *types.Transaction)) *Serializer_SerializeToBytes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*types.Transaction)) + }) + return _c +} + +func (_c *Serializer_SerializeToBytes_Call) Return(_a0 []byte, _a1 error) *Serializer_SerializeToBytes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Serializer_SerializeToBytes_Call) RunAndReturn(run func(*types.Transaction) ([]byte, error)) *Serializer_SerializeToBytes_Call { + _c.Call.Return(run) + return _c +} + +// SerializeToSdkTx provides a mock function with given fields: signedTx +func (_m *Serializer) SerializeToSdkTx(signedTx *types.Transaction) (cosmos_sdktypes.Tx, error) { + ret := _m.Called(signedTx) + + var r0 cosmos_sdktypes.Tx + var r1 error + if rf, ok := ret.Get(0).(func(*types.Transaction) (cosmos_sdktypes.Tx, error)); ok { + return rf(signedTx) + } + if rf, ok := ret.Get(0).(func(*types.Transaction) cosmos_sdktypes.Tx); ok { + r0 = rf(signedTx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(cosmos_sdktypes.Tx) + } + } + + if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { + r1 = rf(signedTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Serializer_SerializeToSdkTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToSdkTx' +type Serializer_SerializeToSdkTx_Call struct { + *mock.Call +} + +// SerializeToSdkTx is a helper method to define mock.On call +// - signedTx *types.Transaction +func (_e *Serializer_Expecter) SerializeToSdkTx(signedTx interface{}) *Serializer_SerializeToSdkTx_Call { + return &Serializer_SerializeToSdkTx_Call{Call: _e.mock.On("SerializeToSdkTx", signedTx)} +} + +func (_c *Serializer_SerializeToSdkTx_Call) Run(run func(signedTx *types.Transaction)) *Serializer_SerializeToSdkTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*types.Transaction)) + }) + return _c +} + +func (_c *Serializer_SerializeToSdkTx_Call) Return(_a0 cosmos_sdktypes.Tx, _a1 error) *Serializer_SerializeToSdkTx_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *Serializer_SerializeToSdkTx_Call) RunAndReturn(run func(*types.Transaction) (cosmos_sdktypes.Tx, error)) *Serializer_SerializeToSdkTx_Call { + _c.Call.Return(run) + return _c +} + +// NewSerializer creates a new instance of Serializer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewSerializer(t interface { + mock.TestingT + Cleanup(func()) +}) *Serializer { + mock := &Serializer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/plugins/txpool/mock/subscription.go b/cosmos/x/evm/plugins/txpool/mock/subscription.go new file mode 100644 index 000000000..f308a0166 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/subscription.go @@ -0,0 +1,107 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import mock "github.com/stretchr/testify/mock" + +// Subscription is an autogenerated mock type for the Subscription type +type Subscription struct { + mock.Mock +} + +type Subscription_Expecter struct { + mock *mock.Mock +} + +func (_m *Subscription) EXPECT() *Subscription_Expecter { + return &Subscription_Expecter{mock: &_m.Mock} +} + +// Err provides a mock function with given fields: +func (_m *Subscription) Err() <-chan error { + ret := _m.Called() + + var r0 <-chan error + if rf, ok := ret.Get(0).(func() <-chan error); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan error) + } + } + + return r0 +} + +// Subscription_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' +type Subscription_Err_Call struct { + *mock.Call +} + +// Err is a helper method to define mock.On call +func (_e *Subscription_Expecter) Err() *Subscription_Err_Call { + return &Subscription_Err_Call{Call: _e.mock.On("Err")} +} + +func (_c *Subscription_Err_Call) Run(run func()) *Subscription_Err_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Subscription_Err_Call) Return(_a0 <-chan error) *Subscription_Err_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Subscription_Err_Call) RunAndReturn(run func() <-chan error) *Subscription_Err_Call { + _c.Call.Return(run) + return _c +} + +// Unsubscribe provides a mock function with given fields: +func (_m *Subscription) Unsubscribe() { + _m.Called() +} + +// Subscription_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' +type Subscription_Unsubscribe_Call struct { + *mock.Call +} + +// Unsubscribe is a helper method to define mock.On call +func (_e *Subscription_Expecter) Unsubscribe() *Subscription_Unsubscribe_Call { + return &Subscription_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe")} +} + +func (_c *Subscription_Unsubscribe_Call) Run(run func()) *Subscription_Unsubscribe_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Subscription_Unsubscribe_Call) Return() *Subscription_Unsubscribe_Call { + _c.Call.Return() + return _c +} + +func (_c *Subscription_Unsubscribe_Call) RunAndReturn(run func()) *Subscription_Unsubscribe_Call { + _c.Call.Return(run) + return _c +} + +// NewSubscription creates a new instance of Subscription. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewSubscription(t interface { + mock.TestingT + Cleanup(func()) +}) *Subscription { + mock := &Subscription{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/plugins/txpool/mock/tx_serializer.go b/cosmos/x/evm/plugins/txpool/mock/tx_serializer.go new file mode 100644 index 000000000..9dc2766ce --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/tx_serializer.go @@ -0,0 +1,90 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import ( + mock "github.com/stretchr/testify/mock" + + types "github.com/ethereum/go-ethereum/core/types" +) + +// TxSerializer is an autogenerated mock type for the TxSerializer type +type TxSerializer struct { + mock.Mock +} + +type TxSerializer_Expecter struct { + mock *mock.Mock +} + +func (_m *TxSerializer) EXPECT() *TxSerializer_Expecter { + return &TxSerializer_Expecter{mock: &_m.Mock} +} + +// SerializeToBytes provides a mock function with given fields: signedTx +func (_m *TxSerializer) SerializeToBytes(signedTx *types.Transaction) ([]byte, error) { + ret := _m.Called(signedTx) + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(*types.Transaction) ([]byte, error)); ok { + return rf(signedTx) + } + if rf, ok := ret.Get(0).(func(*types.Transaction) []byte); ok { + r0 = rf(signedTx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { + r1 = rf(signedTx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TxSerializer_SerializeToBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToBytes' +type TxSerializer_SerializeToBytes_Call struct { + *mock.Call +} + +// SerializeToBytes is a helper method to define mock.On call +// - signedTx *types.Transaction +func (_e *TxSerializer_Expecter) SerializeToBytes(signedTx interface{}) *TxSerializer_SerializeToBytes_Call { + return &TxSerializer_SerializeToBytes_Call{Call: _e.mock.On("SerializeToBytes", signedTx)} +} + +func (_c *TxSerializer_SerializeToBytes_Call) Run(run func(signedTx *types.Transaction)) *TxSerializer_SerializeToBytes_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*types.Transaction)) + }) + return _c +} + +func (_c *TxSerializer_SerializeToBytes_Call) Return(_a0 []byte, _a1 error) *TxSerializer_SerializeToBytes_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *TxSerializer_SerializeToBytes_Call) RunAndReturn(run func(*types.Transaction) ([]byte, error)) *TxSerializer_SerializeToBytes_Call { + _c.Call.Return(run) + return _c +} + +// NewTxSerializer creates a new instance of TxSerializer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewTxSerializer(t interface { + mock.TestingT + Cleanup(func()) +}) *TxSerializer { + mock := &TxSerializer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go b/cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go new file mode 100644 index 000000000..51dfff6e1 --- /dev/null +++ b/cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go @@ -0,0 +1,81 @@ +// Code generated by mockery v2.34.1. DO NOT EDIT. + +package mock + +import ( + core "github.com/ethereum/go-ethereum/core" + event "github.com/ethereum/go-ethereum/event" + + mock "github.com/stretchr/testify/mock" +) + +// TxSubProvider is an autogenerated mock type for the TxSubProvider type +type TxSubProvider struct { + mock.Mock +} + +type TxSubProvider_Expecter struct { + mock *mock.Mock +} + +func (_m *TxSubProvider) EXPECT() *TxSubProvider_Expecter { + return &TxSubProvider_Expecter{mock: &_m.Mock} +} + +// SubscribeNewTxsEvent provides a mock function with given fields: ch +func (_m *TxSubProvider) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription { + ret := _m.Called(ch) + + var r0 event.Subscription + if rf, ok := ret.Get(0).(func(chan<- core.NewTxsEvent) event.Subscription); ok { + r0 = rf(ch) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + return r0 +} + +// TxSubProvider_SubscribeNewTxsEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewTxsEvent' +type TxSubProvider_SubscribeNewTxsEvent_Call struct { + *mock.Call +} + +// SubscribeNewTxsEvent is a helper method to define mock.On call +// - ch chan<- core.NewTxsEvent +func (_e *TxSubProvider_Expecter) SubscribeNewTxsEvent(ch interface{}) *TxSubProvider_SubscribeNewTxsEvent_Call { + return &TxSubProvider_SubscribeNewTxsEvent_Call{Call: _e.mock.On("SubscribeNewTxsEvent", ch)} +} + +func (_c *TxSubProvider_SubscribeNewTxsEvent_Call) Run(run func(ch chan<- core.NewTxsEvent)) *TxSubProvider_SubscribeNewTxsEvent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(chan<- core.NewTxsEvent)) + }) + return _c +} + +func (_c *TxSubProvider_SubscribeNewTxsEvent_Call) Return(_a0 event.Subscription) *TxSubProvider_SubscribeNewTxsEvent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *TxSubProvider_SubscribeNewTxsEvent_Call) RunAndReturn(run func(chan<- core.NewTxsEvent) event.Subscription) *TxSubProvider_SubscribeNewTxsEvent_Call { + _c.Call.Return(run) + return _c +} + +// NewTxSubProvider creates a new instance of TxSubProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewTxSubProvider(t interface { + mock.TestingT + Cleanup(func()) +}) *TxSubProvider { + mock := &TxSubProvider{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From 0b75544d41685e2648be34c4db9142c1a38512fc Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 12:28:57 -0400 Subject: [PATCH 21/94] undo contract changes --- contracts/bindings/cosmos/lib/cosmos_types.abigen.go | 2 +- contracts/bindings/testing/consume_gas.abigen.go | 2 +- .../bindings/testing/distribution_testing_helper.abigen.go | 2 +- .../bindings/testing/governance/governance_wrapper.abigen.go | 2 +- contracts/bindings/testing/liquid_staking.abigen.go | 2 +- contracts/bindings/testing/precompile_constructor.abigen.go | 2 +- contracts/bindings/testing/solmate_erc20.abigen.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go index c4ee848a6..8a80c42ac 100644 --- a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go +++ b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go @@ -53,7 +53,7 @@ type CosmosPageResponse struct { // CosmosTypesMetaData contains all meta data concerning the CosmosTypes contract. var CosmosTypesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"coin\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structCosmos.PageRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageRequest\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"nextKey\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structCosmos.PageResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageResponse\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea264697066735822122015e30edb9e27c41d56fb4bfa53a31f05390368387a2fc2162a847aff41cbd03f64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea2646970667358221220cd938f1594be90a76ff4980bf8e5eaf239e05e8867ea7e669197172d39f7515c64736f6c63430008140033", } // CosmosTypesABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/consume_gas.abigen.go b/contracts/bindings/testing/consume_gas.abigen.go index e6a63d51a..a9094d2e4 100644 --- a/contracts/bindings/testing/consume_gas.abigen.go +++ b/contracts/bindings/testing/consume_gas.abigen.go @@ -32,7 +32,7 @@ var ( // ConsumeGasMetaData contains all meta data concerning the ConsumeGas contract. var ConsumeGasMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"name\":\"GasConsumed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetGas\",\"type\":\"uint256\"}],\"name\":\"consumeGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220cf53a89b858bcd89a9f376c9fc26e35242e2b2c6d3caa86630baa63414ba767d64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220e4c37c223937988a35267edfbba61b52336e1dcb9878edd519edc3eb1881ec2a64736f6c63430008140033", } // ConsumeGasABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/distribution_testing_helper.abigen.go b/contracts/bindings/testing/distribution_testing_helper.abigen.go index 7b666b045..fb1bc5865 100644 --- a/contracts/bindings/testing/distribution_testing_helper.abigen.go +++ b/contracts/bindings/testing/distribution_testing_helper.abigen.go @@ -32,7 +32,7 @@ var ( // DistributionWrapperMetaData contains all meta data concerning the DistributionWrapper contract. var DistributionWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_distributionprecompile\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingprecompile\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validator\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"contractIDistributionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawAddress\",\"type\":\"address\"}],\"name\":\"setWithdrawAddress\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_validatorAddress\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea26469706673582212202e148d4d850cdba2cbe51678ae1a7f68fe0fa2f96b110fc952cd1dda2cd446f064736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea2646970667358221220d6420ed9fe47b1dded4517a423e78839a9dd77daf8059b956323723ecfd6fbaa64736f6c63430008140033", } // DistributionWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/governance/governance_wrapper.abigen.go b/contracts/bindings/testing/governance/governance_wrapper.abigen.go index 18c2f176a..078e0b533 100644 --- a/contracts/bindings/testing/governance/governance_wrapper.abigen.go +++ b/contracts/bindings/testing/governance/governance_wrapper.abigen.go @@ -63,7 +63,7 @@ type IGovernanceModuleTallyResult struct { // GovernanceWrapperMetaData contains all meta data concerning the GovernanceWrapper contract. var GovernanceWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governanceModule\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"bank\",\"outputs\":[{\"internalType\":\"contractIBankModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"cancelProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"proposalStatus\",\"type\":\"int32\"}],\"name\":\"getProposals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceModule\",\"outputs\":[{\"internalType\":\"contractIGovernanceModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposal\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"submit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"option\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212200f262c3e6b8ff76d92a1e14eccc8782c65e08fa4ac303d2cc597f07cbb2108e564736f6c63430008140033", + Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212201f67eaa333db58f67fd67829d4572725e7b6f8e219b7fff6db0569c9cde8c99064736f6c63430008140033", } // GovernanceWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/liquid_staking.abigen.go b/contracts/bindings/testing/liquid_staking.abigen.go index 3564e4d87..b21677f25 100644 --- a/contracts/bindings/testing/liquid_staking.abigen.go +++ b/contracts/bindings/testing/liquid_staking.abigen.go @@ -32,7 +32,7 @@ var ( // LiquidStakingMetaData contains all meta data concerning the LiquidStaking contract. var LiquidStakingMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Data\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"Success\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"}],\"name\":\"totalDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212203dcda167560f1c8fb3c11f4a89b20e181e1e50d985f93a819a0df6da03697e7564736f6c63430008140033", + Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212207fe4477c3d859b2693554fce34aa78b5b6178fed4358006f6720363c82c3e61a64736f6c63430008140033", } // LiquidStakingABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/precompile_constructor.abigen.go b/contracts/bindings/testing/precompile_constructor.abigen.go index 6de916b48..b797846d5 100644 --- a/contracts/bindings/testing/precompile_constructor.abigen.go +++ b/contracts/bindings/testing/precompile_constructor.abigen.go @@ -32,7 +32,7 @@ var ( // PrecompileConstructorMetaData contains all meta data concerning the PrecompileConstructor contract. var PrecompileConstructorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"stakingModule\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea2646970667358221220a82988036ad4b985661f0390de6424b0e38ace000700a265b64053cd745ef6a664736f6c63430008140033", + Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea264697066735822122046e77f6a88a4be3cbc9d7ea46351722a7a2d37b3318c5b6d0788e34350d484aa64736f6c63430008140033", } // PrecompileConstructorABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/solmate_erc20.abigen.go b/contracts/bindings/testing/solmate_erc20.abigen.go index 044cae7c7..b05c3b6da 100644 --- a/contracts/bindings/testing/solmate_erc20.abigen.go +++ b/contracts/bindings/testing/solmate_erc20.abigen.go @@ -32,7 +32,7 @@ var ( // SolmateERC20MetaData contains all meta data concerning the SolmateERC20 contract. var SolmateERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea26469706673582212205e042b28d312604c9eb9f461fa6a115a942807f99d76a60aa48515134e1ded3e64736f6c63430008140033", + Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea2646970667358221220383dcd14dbb4c0b9470e469c942780d9bdeb224d65a2dfb2a8153bcffc7cd73064736f6c63430008140033", } // SolmateERC20ABI is the input ABI used to generate the binding from. From 9088795c35eb7ddd336731a1b93e7d76a9efbc4f Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 12:32:33 -0400 Subject: [PATCH 22/94] mockery to mage --- .mockery.yaml | 4 +-- .../cosmos/lib/cosmos_types.abigen.go | 2 +- .../bindings/testing/consume_gas.abigen.go | 2 +- .../distribution_testing_helper.abigen.go | 2 +- .../governance/governance_wrapper.abigen.go | 2 +- .../bindings/testing/liquid_staking.abigen.go | 2 +- .../testing/precompile_constructor.abigen.go | 2 +- .../bindings/testing/solmate_erc20.abigen.go | 2 +- cosmos/x/evm/plugins/txpool/handler_test.go | 26 +++++++++---------- .../txpool/{mock => mocks}/broadcaster.go | 2 +- .../{mock => mocks}/configuration_plugin.go | 2 +- .../plugins/txpool/{mock => mocks}/plugin.go | 2 +- .../txpool/{mock => mocks}/serializer.go | 2 +- .../txpool/{mock => mocks}/subscription.go | 2 +- .../txpool/{mock => mocks}/tx_serializer.go | 2 +- .../txpool/{mock => mocks}/tx_sub_provider.go | 2 +- magefiles/constants.go | 1 + magefiles/tools.go | 4 +++ 18 files changed, 34 insertions(+), 29 deletions(-) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/broadcaster.go (99%) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/configuration_plugin.go (99%) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/plugin.go (99%) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/serializer.go (99%) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/subscription.go (99%) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/tx_serializer.go (99%) rename cosmos/x/evm/plugins/txpool/{mock => mocks}/tx_sub_provider.go (99%) diff --git a/.mockery.yaml b/.mockery.yaml index 465f70fd6..5cca3454c 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -1,7 +1,7 @@ -dir: "{{.InterfaceDir}}/mock" +dir: "{{.InterfaceDir}}/mocks" mockname: "{{.InterfaceNameCamel}}" filename: "{{.InterfaceNameSnake}}.go" -outpkg: "mock" +outpkg: "mocks" packages: pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool: config: diff --git a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go index 8a80c42ac..c4ee848a6 100644 --- a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go +++ b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go @@ -53,7 +53,7 @@ type CosmosPageResponse struct { // CosmosTypesMetaData contains all meta data concerning the CosmosTypes contract. var CosmosTypesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"coin\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structCosmos.PageRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageRequest\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"nextKey\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structCosmos.PageResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageResponse\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea2646970667358221220cd938f1594be90a76ff4980bf8e5eaf239e05e8867ea7e669197172d39f7515c64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea264697066735822122015e30edb9e27c41d56fb4bfa53a31f05390368387a2fc2162a847aff41cbd03f64736f6c63430008140033", } // CosmosTypesABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/consume_gas.abigen.go b/contracts/bindings/testing/consume_gas.abigen.go index a9094d2e4..e6a63d51a 100644 --- a/contracts/bindings/testing/consume_gas.abigen.go +++ b/contracts/bindings/testing/consume_gas.abigen.go @@ -32,7 +32,7 @@ var ( // ConsumeGasMetaData contains all meta data concerning the ConsumeGas contract. var ConsumeGasMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"name\":\"GasConsumed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetGas\",\"type\":\"uint256\"}],\"name\":\"consumeGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220e4c37c223937988a35267edfbba61b52336e1dcb9878edd519edc3eb1881ec2a64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220cf53a89b858bcd89a9f376c9fc26e35242e2b2c6d3caa86630baa63414ba767d64736f6c63430008140033", } // ConsumeGasABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/distribution_testing_helper.abigen.go b/contracts/bindings/testing/distribution_testing_helper.abigen.go index fb1bc5865..7b666b045 100644 --- a/contracts/bindings/testing/distribution_testing_helper.abigen.go +++ b/contracts/bindings/testing/distribution_testing_helper.abigen.go @@ -32,7 +32,7 @@ var ( // DistributionWrapperMetaData contains all meta data concerning the DistributionWrapper contract. var DistributionWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_distributionprecompile\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingprecompile\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validator\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"contractIDistributionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawAddress\",\"type\":\"address\"}],\"name\":\"setWithdrawAddress\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_validatorAddress\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea2646970667358221220d6420ed9fe47b1dded4517a423e78839a9dd77daf8059b956323723ecfd6fbaa64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea26469706673582212202e148d4d850cdba2cbe51678ae1a7f68fe0fa2f96b110fc952cd1dda2cd446f064736f6c63430008140033", } // DistributionWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/governance/governance_wrapper.abigen.go b/contracts/bindings/testing/governance/governance_wrapper.abigen.go index 078e0b533..18c2f176a 100644 --- a/contracts/bindings/testing/governance/governance_wrapper.abigen.go +++ b/contracts/bindings/testing/governance/governance_wrapper.abigen.go @@ -63,7 +63,7 @@ type IGovernanceModuleTallyResult struct { // GovernanceWrapperMetaData contains all meta data concerning the GovernanceWrapper contract. var GovernanceWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governanceModule\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"bank\",\"outputs\":[{\"internalType\":\"contractIBankModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"cancelProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"proposalStatus\",\"type\":\"int32\"}],\"name\":\"getProposals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceModule\",\"outputs\":[{\"internalType\":\"contractIGovernanceModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposal\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"submit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"option\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212201f67eaa333db58f67fd67829d4572725e7b6f8e219b7fff6db0569c9cde8c99064736f6c63430008140033", + Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212200f262c3e6b8ff76d92a1e14eccc8782c65e08fa4ac303d2cc597f07cbb2108e564736f6c63430008140033", } // GovernanceWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/liquid_staking.abigen.go b/contracts/bindings/testing/liquid_staking.abigen.go index b21677f25..3564e4d87 100644 --- a/contracts/bindings/testing/liquid_staking.abigen.go +++ b/contracts/bindings/testing/liquid_staking.abigen.go @@ -32,7 +32,7 @@ var ( // LiquidStakingMetaData contains all meta data concerning the LiquidStaking contract. var LiquidStakingMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Data\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"Success\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"}],\"name\":\"totalDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212207fe4477c3d859b2693554fce34aa78b5b6178fed4358006f6720363c82c3e61a64736f6c63430008140033", + Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212203dcda167560f1c8fb3c11f4a89b20e181e1e50d985f93a819a0df6da03697e7564736f6c63430008140033", } // LiquidStakingABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/precompile_constructor.abigen.go b/contracts/bindings/testing/precompile_constructor.abigen.go index b797846d5..6de916b48 100644 --- a/contracts/bindings/testing/precompile_constructor.abigen.go +++ b/contracts/bindings/testing/precompile_constructor.abigen.go @@ -32,7 +32,7 @@ var ( // PrecompileConstructorMetaData contains all meta data concerning the PrecompileConstructor contract. var PrecompileConstructorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"stakingModule\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea264697066735822122046e77f6a88a4be3cbc9d7ea46351722a7a2d37b3318c5b6d0788e34350d484aa64736f6c63430008140033", + Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea2646970667358221220a82988036ad4b985661f0390de6424b0e38ace000700a265b64053cd745ef6a664736f6c63430008140033", } // PrecompileConstructorABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/solmate_erc20.abigen.go b/contracts/bindings/testing/solmate_erc20.abigen.go index b05c3b6da..044cae7c7 100644 --- a/contracts/bindings/testing/solmate_erc20.abigen.go +++ b/contracts/bindings/testing/solmate_erc20.abigen.go @@ -32,7 +32,7 @@ var ( // SolmateERC20MetaData contains all meta data concerning the SolmateERC20 contract. var SolmateERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea2646970667358221220383dcd14dbb4c0b9470e469c942780d9bdeb224d65a2dfb2a8153bcffc7cd73064736f6c63430008140033", + Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea26469706673582212205e042b28d312604c9eb9f461fa6a115a942807f99d76a60aa48515134e1ded3e64736f6c63430008140033", } // SolmateERC20ABI is the input ABI used to generate the binding from. diff --git a/cosmos/x/evm/plugins/txpool/handler_test.go b/cosmos/x/evm/plugins/txpool/handler_test.go index 49a45c0bc..7a686e77e 100644 --- a/cosmos/x/evm/plugins/txpool/handler_test.go +++ b/cosmos/x/evm/plugins/txpool/handler_test.go @@ -23,11 +23,11 @@ package txpool import ( "time" - tmock "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/mock" "cosmossdk.io/log" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mock" + "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mocks" "pkg.berachain.dev/polaris/eth/core" coretypes "pkg.berachain.dev/polaris/eth/core/types" @@ -39,19 +39,19 @@ var _ = Describe("", func() { var h *handler t := GinkgoT() - var subscription *mock.Subscription - var serializer *mock.TxSerializer - var broadcaster *mock.Broadcaster - var subprovider *mock.TxSubProvider + var subscription *mocks.Subscription + var serializer *mocks.TxSerializer + var broadcaster *mocks.Broadcaster + var subprovider *mocks.TxSubProvider BeforeEach(func() { - subscription = mock.NewSubscription(t) + subscription = mocks.NewSubscription(t) subscription.On("Err").Return(nil) subscription.On("Unsubscribe").Return() - broadcaster = mock.NewBroadcaster(t) - subprovider = mock.NewTxSubProvider(t) - subprovider.On("SubscribeNewTxsEvent", tmock.Anything).Return(subscription) - serializer = mock.NewTxSerializer(t) + broadcaster = mocks.NewBroadcaster(t) + subprovider = mocks.NewTxSubProvider(t) + subprovider.On("SubscribeNewTxsEvent", mock.Anything).Return(subscription) + serializer = mocks.NewTxSerializer(t) h = newHandler(broadcaster, subprovider, serializer, log.NewTestLogger(t)) h.Start() // Wait for handler to start. @@ -70,14 +70,14 @@ var _ = Describe("", func() { }) It("should handle 1 tx", func() { - serializer.On("SerializeToBytes", tmock.Anything).Return([]byte{123}, nil).Once() + serializer.On("SerializeToBytes", mock.Anything).Return([]byte{123}, nil).Once() broadcaster.On("BroadcastTxSync", []byte{123}).Return(nil, nil).Once() h.txsCh <- core.NewTxsEvent{Txs: []*coretypes.Transaction{coretypes.NewTx(&coretypes.LegacyTx{Nonce: 5})}} }) It("should handle multiple tx", func() { - serializer.On("SerializeToBytes", tmock.Anything).Return([]byte{123}, nil).Twice() + serializer.On("SerializeToBytes", mock.Anything).Return([]byte{123}, nil).Twice() broadcaster.On("BroadcastTxSync", []byte{123}).Return(nil, nil).Twice() h.txsCh <- core.NewTxsEvent{Txs: []*coretypes.Transaction{ diff --git a/cosmos/x/evm/plugins/txpool/mock/broadcaster.go b/cosmos/x/evm/plugins/txpool/mocks/broadcaster.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/broadcaster.go rename to cosmos/x/evm/plugins/txpool/mocks/broadcaster.go index 7b7857c0b..e76ce6ce1 100644 --- a/cosmos/x/evm/plugins/txpool/mock/broadcaster.go +++ b/cosmos/x/evm/plugins/txpool/mocks/broadcaster.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import ( mock "github.com/stretchr/testify/mock" diff --git a/cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go b/cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go rename to cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go index 2d0b317f2..1cd007d7f 100644 --- a/cosmos/x/evm/plugins/txpool/mock/configuration_plugin.go +++ b/cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import mock "github.com/stretchr/testify/mock" diff --git a/cosmos/x/evm/plugins/txpool/mock/plugin.go b/cosmos/x/evm/plugins/txpool/mocks/plugin.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/plugin.go rename to cosmos/x/evm/plugins/txpool/mocks/plugin.go index 4d6d309b8..a84ccd5b4 100644 --- a/cosmos/x/evm/plugins/txpool/mock/plugin.go +++ b/cosmos/x/evm/plugins/txpool/mocks/plugin.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import ( client "github.com/cosmos/cosmos-sdk/client" diff --git a/cosmos/x/evm/plugins/txpool/mock/serializer.go b/cosmos/x/evm/plugins/txpool/mocks/serializer.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/serializer.go rename to cosmos/x/evm/plugins/txpool/mocks/serializer.go index a6ef87e74..9a96d934c 100644 --- a/cosmos/x/evm/plugins/txpool/mock/serializer.go +++ b/cosmos/x/evm/plugins/txpool/mocks/serializer.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import ( cosmos_sdktypes "github.com/cosmos/cosmos-sdk/types" diff --git a/cosmos/x/evm/plugins/txpool/mock/subscription.go b/cosmos/x/evm/plugins/txpool/mocks/subscription.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/subscription.go rename to cosmos/x/evm/plugins/txpool/mocks/subscription.go index f308a0166..e1513660d 100644 --- a/cosmos/x/evm/plugins/txpool/mock/subscription.go +++ b/cosmos/x/evm/plugins/txpool/mocks/subscription.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import mock "github.com/stretchr/testify/mock" diff --git a/cosmos/x/evm/plugins/txpool/mock/tx_serializer.go b/cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/tx_serializer.go rename to cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go index 9dc2766ce..e93219295 100644 --- a/cosmos/x/evm/plugins/txpool/mock/tx_serializer.go +++ b/cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import ( mock "github.com/stretchr/testify/mock" diff --git a/cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go b/cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go similarity index 99% rename from cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go rename to cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go index 51dfff6e1..a983f0bfe 100644 --- a/cosmos/x/evm/plugins/txpool/mock/tx_sub_provider.go +++ b/cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go @@ -1,6 +1,6 @@ // Code generated by mockery v2.34.1. DO NOT EDIT. -package mock +package mocks import ( core "github.com/ethereum/go-ethereum/core" diff --git a/magefiles/constants.go b/magefiles/constants.go index b77b98672..c42e98d3b 100644 --- a/magefiles/constants.go +++ b/magefiles/constants.go @@ -58,6 +58,7 @@ var ( goWorkSync = RunCmdV("go", "work", "sync") gitDiff = RunCmdV("git", "diff", "--stat", "--exit-code", ".", "':(exclude)*.mod' ':(exclude)*.sum'") + mockery = RunCmdV("mockery") ) /* -------------------------------------------------------------------------- */ diff --git a/magefiles/tools.go b/magefiles/tools.go index 45f98b532..e35bcdc2c 100644 --- a/magefiles/tools.go +++ b/magefiles/tools.go @@ -39,6 +39,10 @@ import ( // Runs `go generate` on the entire project. func Generate() error { + utils.LogGreen("Running 'mockery'") + if err := mockery(); err != nil { + return err + } utils.LogGreen("Running 'go generate' on the entire project...") if err := goInstall(moq); err != nil { return err From cd7ac663d6e5cdd80bf51d54b43965461247c457 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 12:33:31 -0400 Subject: [PATCH 23/94] improve test a bit --- cosmos/x/evm/plugins/txpool/handler_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cosmos/x/evm/plugins/txpool/handler_test.go b/cosmos/x/evm/plugins/txpool/handler_test.go index 7a686e77e..aa954e946 100644 --- a/cosmos/x/evm/plugins/txpool/handler_test.go +++ b/cosmos/x/evm/plugins/txpool/handler_test.go @@ -56,19 +56,17 @@ var _ = Describe("", func() { h.Start() // Wait for handler to start. time.Sleep(300 * time.Millisecond) + Expect(h.Running()).To(BeTrue()) }) AfterEach(func() { h.Stop() // Wait for handler to stop time.Sleep(300 * time.Millisecond) + Expect(h.Running()).To(BeFalse()) }) When("", func() { - It("should start", func() { - Expect(h.Running()).To(BeTrue()) - }) - It("should handle 1 tx", func() { serializer.On("SerializeToBytes", mock.Anything).Return([]byte{123}, nil).Once() broadcaster.On("BroadcastTxSync", []byte{123}).Return(nil, nil).Once() From 54eca2b970dedde381a886626027a33ff96e9e52 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 12:36:32 -0400 Subject: [PATCH 24/94] fix starting handler --- cosmos/x/evm/plugins/txpool/handler.go | 2 +- cosmos/x/evm/plugins/txpool/plugin.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index e69463532..0a8a69108 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -71,7 +71,7 @@ type handler struct { running bool } -// newHandler creates a new handler and starts the broadcast loop. +// newHandler creates a new handler. func newHandler( clientCtx Broadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, ) *handler { diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index b84177c09..9d616c3f3 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -84,4 +84,7 @@ func (p *plugin) Start(logger log.Logger, txpool *txpool.TxPool, ctx client.Cont p.serializer = newSerializer(ctx) p.WrappedGethTxPool.TxPool = txpool p.handler = newHandler(ctx, txpool, p.serializer, logger) + + // TODO: register all these starting things somewhere better. + p.handler.Start() } From 4a73964e87af1440cb2abc3f22304518b1bfa28f Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 12:40:52 -0400 Subject: [PATCH 25/94] empty data dir --- e2e/hive/clients/polard/config/app.toml | 2 +- e2e/precompile/polard/config/app.toml | 2 +- e2e/testapp/docker/local/config/app.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index 2da4b2d84..883dcffa1 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -312,7 +312,7 @@ user-ident = "" version = "" # Directory for storing node data -data-dir = "/Users/dev/Library/Ethereum" +data-dir = "" # Directory for storing node keys key-store-dir = "" diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index 2da4b2d84..883dcffa1 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -312,7 +312,7 @@ user-ident = "" version = "" # Directory for storing node data -data-dir = "/Users/dev/Library/Ethereum" +data-dir = "" # Directory for storing node keys key-store-dir = "" diff --git a/e2e/testapp/docker/local/config/app.toml b/e2e/testapp/docker/local/config/app.toml index 2da4b2d84..883dcffa1 100644 --- a/e2e/testapp/docker/local/config/app.toml +++ b/e2e/testapp/docker/local/config/app.toml @@ -312,7 +312,7 @@ user-ident = "" version = "" # Directory for storing node data -data-dir = "/Users/dev/Library/Ethereum" +data-dir = "" # Directory for storing node keys key-store-dir = "" From b33abd594820fca9e6d05dd88eec0266d611f5a5 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 13:17:00 -0400 Subject: [PATCH 26/94] cleanup in keeper --- cosmos/x/evm/keeper/abci.go | 4 ++-- cosmos/x/evm/keeper/host.go | 18 ++++++++---------- cosmos/x/evm/keeper/keeper.go | 17 ++++++----------- cosmos/x/evm/keeper/processor.go | 2 +- 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/cosmos/x/evm/keeper/abci.go b/cosmos/x/evm/keeper/abci.go index 010c2ff4b..00d952577 100644 --- a/cosmos/x/evm/keeper/abci.go +++ b/cosmos/x/evm/keeper/abci.go @@ -28,11 +28,11 @@ import ( func (k *Keeper) BeginBlocker(ctx context.Context) error { // Prepare the Polaris Ethereum block. - _ = k.miner.Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) + _ = k.GetPolaris().Miner().Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) return nil } func (k *Keeper) EndBlock(ctx context.Context) error { // Finalize the Polaris Ethereum block. - return k.miner.Finalize(ctx) + return k.GetPolaris().Miner().Finalize(ctx) } diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 26c0ab14b..ac5a7066c 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -50,9 +50,6 @@ type Host interface { core.PolarisHostChain GetAllPlugins() []any Setup( - storetypes.StoreKey, - storetypes.StoreKey, - state.AccountKeeper, func(height int64, prove bool) (sdk.Context, error), ) } @@ -68,12 +65,15 @@ type host struct { sp state.Plugin txp txpool.Plugin - pcs func() *ethprecompile.Injector + ak state.AccountKeeper + storeKey storetypes.StoreKey + pcs func() *ethprecompile.Injector } // Newhost creates new instances of the plugin host. func NewHost( storeKey storetypes.StoreKey, + ak state.AccountKeeper, sk block.StakingKeeper, ethTxMempool sdkmempool.Mempool, precompiles func() *ethprecompile.Injector, @@ -88,23 +88,21 @@ func NewHost( h.gp = gas.NewPlugin() h.txp = txpool.NewPlugin(utils.MustGetAs[*mempool.WrappedGethTxPool](ethTxMempool)) h.pcs = precompiles - + h.storeKey = storeKey + h.ak = ak return h } // Setup sets up the precompile and state plugins with the given precompiles and keepers. It also // sets the query context function for the block and state plugins (to support historical queries). func (h *host) Setup( - storeKey storetypes.StoreKey, - _ storetypes.StoreKey, - ak state.AccountKeeper, qc func(height int64, prove bool) (sdk.Context, error), ) { // Setup the state, precompile, historical, and txpool plugins - h.sp = state.NewPlugin(ak, storeKey, log.NewFactory(h.pcs().GetPrecompiles())) + h.sp = state.NewPlugin(h.ak, h.storeKey, log.NewFactory(h.pcs().GetPrecompiles())) h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) // TODO: re-enable historical plugin using ABCI listener. - h.hp = historical.NewPlugin(h.cp, h.bp, nil, storeKey) + h.hp = historical.NewPlugin(h.cp, h.bp, nil, h.storeKey) // h.txp.SetNonceRetriever(h.sp) // Set the query context function for the block and state plugins diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 22224f30f..c70616c8a 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -40,21 +40,18 @@ import ( "pkg.berachain.dev/polaris/eth/common" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" ethlog "pkg.berachain.dev/polaris/eth/log" - "pkg.berachain.dev/polaris/eth/miner" "pkg.berachain.dev/polaris/eth/polar" ) type Keeper struct { - // ak is the reference to the AccountKeeper. - ak state.AccountKeeper // provider is the struct that houses the Polaris EVM. polaris *polar.Polaris - // miner is used to mine blocks - miner miner.Miner - // The (unexposed) key used to access the store from the Context. - storeKey storetypes.StoreKey + // The host contains various plugins that are are used to implement `core.PolarisHostChain`. host Host + + // The (unexposed) key used to access the store from the Context. + storeKey storetypes.StoreKey } // NewKeeper creates new instances of the polaris Keeper. @@ -67,12 +64,12 @@ func NewKeeper( ) *Keeper { // We setup the keeper with some Cosmos standard sauce. k := &Keeper{ - ak: ak, storeKey: storeKey, } k.host = NewHost( storeKey, + ak, sk, ethTxMempool, pcs, @@ -87,7 +84,7 @@ func (k *Keeper) Setup( logger log.Logger, ) { // Setup plugins in the Host - k.host.Setup(k.storeKey, nil, k.ak, qc) + k.host.Setup(qc) node, err := polar.NewGethNetworkingStack(&cfg.Node) if err != nil { @@ -108,8 +105,6 @@ func (k *Keeper) Setup( return nil }), ) - - k.miner = k.polaris.Miner() } // Logger returns a module-specific logger. diff --git a/cosmos/x/evm/keeper/processor.go b/cosmos/x/evm/keeper/processor.go index 4da3dd2de..b1165a3e4 100644 --- a/cosmos/x/evm/keeper/processor.go +++ b/cosmos/x/evm/keeper/processor.go @@ -40,7 +40,7 @@ func (k *Keeper) ProcessTransaction(ctx context.Context, tx *coretypes.Transacti "reset gas meter prior to ethereum state transition") // Process the transaction and return the EVM's execution result. - receipt, err := k.miner.ProcessTransaction(ctx, tx) + receipt, err := k.GetPolaris().Miner().ProcessTransaction(ctx, tx) if err != nil { k.Logger(sCtx).Error("failed to process transaction", "err", err) return nil, err From 0f6c2d27d86a786bc02aba2846f87f55155c3eec Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 13:18:38 -0400 Subject: [PATCH 27/94] move store package --- cosmos/{x/evm => }/store/cachekv/readonly_store.go | 0 cosmos/{x/evm => }/store/cachekv/readonly_store_test.go | 2 +- cosmos/{x/evm => }/store/snapmulti/store.go | 2 +- cosmos/{x/evm => }/store/snapmulti/store_test.go | 0 cosmos/x/evm/plugins/state/plugin.go | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename cosmos/{x/evm => }/store/cachekv/readonly_store.go (100%) rename cosmos/{x/evm => }/store/cachekv/readonly_store_test.go (97%) rename cosmos/{x/evm => }/store/snapmulti/store.go (98%) rename cosmos/{x/evm => }/store/snapmulti/store_test.go (100%) diff --git a/cosmos/x/evm/store/cachekv/readonly_store.go b/cosmos/store/cachekv/readonly_store.go similarity index 100% rename from cosmos/x/evm/store/cachekv/readonly_store.go rename to cosmos/store/cachekv/readonly_store.go diff --git a/cosmos/x/evm/store/cachekv/readonly_store_test.go b/cosmos/store/cachekv/readonly_store_test.go similarity index 97% rename from cosmos/x/evm/store/cachekv/readonly_store_test.go rename to cosmos/store/cachekv/readonly_store_test.go index afcd1cd21..427a70f5c 100644 --- a/cosmos/x/evm/store/cachekv/readonly_store_test.go +++ b/cosmos/store/cachekv/readonly_store_test.go @@ -26,8 +26,8 @@ import ( sdkcachekv "cosmossdk.io/store/cachekv" storetypes "cosmossdk.io/store/types" + "pkg.berachain.dev/polaris/cosmos/store/cachekv" "pkg.berachain.dev/polaris/cosmos/testing/types/mock" - "pkg.berachain.dev/polaris/cosmos/x/evm/store/cachekv" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" diff --git a/cosmos/x/evm/store/snapmulti/store.go b/cosmos/store/snapmulti/store.go similarity index 98% rename from cosmos/x/evm/store/snapmulti/store.go rename to cosmos/store/snapmulti/store.go index f7383e861..842d253df 100644 --- a/cosmos/x/evm/store/snapmulti/store.go +++ b/cosmos/store/snapmulti/store.go @@ -24,7 +24,7 @@ import ( "cosmossdk.io/store/cachekv" storetypes "cosmossdk.io/store/types" - polariscachekv "pkg.berachain.dev/polaris/cosmos/x/evm/store/cachekv" + polariscachekv "pkg.berachain.dev/polaris/cosmos/store/cachekv" "pkg.berachain.dev/polaris/lib/ds" "pkg.berachain.dev/polaris/lib/ds/stack" "pkg.berachain.dev/polaris/lib/utils" diff --git a/cosmos/x/evm/store/snapmulti/store_test.go b/cosmos/store/snapmulti/store_test.go similarity index 100% rename from cosmos/x/evm/store/snapmulti/store_test.go rename to cosmos/store/snapmulti/store_test.go diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index bf6504c8f..797fee06a 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -30,9 +30,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" + "pkg.berachain.dev/polaris/cosmos/store/snapmulti" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state/events" - "pkg.berachain.dev/polaris/cosmos/x/evm/store/snapmulti" "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" From 1b91ff5f5a7502b6bc98c8facd12dd22c9898cca Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 13:21:15 -0400 Subject: [PATCH 28/94] reconfigure configuration plugin --- .../configuration/configuration_test.go | 33 -------- cosmos/x/evm/plugins/configuration/genesis.go | 41 ---------- cosmos/x/evm/plugins/configuration/plugin.go | 33 ++++++++ .../evm/plugins/configuration/plugin_test.go | 26 +++++++ cosmos/x/evm/plugins/configuration/store.go | 47 ------------ .../x/evm/plugins/configuration/store_test.go | 76 ------------------- 6 files changed, 59 insertions(+), 197 deletions(-) delete mode 100644 cosmos/x/evm/plugins/configuration/configuration_test.go delete mode 100644 cosmos/x/evm/plugins/configuration/genesis.go delete mode 100644 cosmos/x/evm/plugins/configuration/store.go delete mode 100644 cosmos/x/evm/plugins/configuration/store_test.go diff --git a/cosmos/x/evm/plugins/configuration/configuration_test.go b/cosmos/x/evm/plugins/configuration/configuration_test.go deleted file mode 100644 index dfaeab8bc..000000000 --- a/cosmos/x/evm/plugins/configuration/configuration_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 configuration_test - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestConfigurationPlugin(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "cosmos/x/evm/plugins/configuration") -} diff --git a/cosmos/x/evm/plugins/configuration/genesis.go b/cosmos/x/evm/plugins/configuration/genesis.go deleted file mode 100644 index dea4b22ec..000000000 --- a/cosmos/x/evm/plugins/configuration/genesis.go +++ /dev/null @@ -1,41 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 configuration - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "pkg.berachain.dev/polaris/eth/core" -) - -// InitGenesis performs genesis initialization for the evm module. It returns -// no validator updates. -func (p *plugin) InitGenesis(ctx sdk.Context, ethGen *core.Genesis) { - p.Prepare(ctx) - p.SetChainConfig(ethGen.Config) -} - -// ExportGenesis returns the exported genesis state as raw bytes for the evm -// module. -func (p *plugin) ExportGenesis(ctx sdk.Context, ethGen *core.Genesis) { - p.Prepare(ctx) - ethGen.Config = p.ChainConfig() -} diff --git a/cosmos/x/evm/plugins/configuration/plugin.go b/cosmos/x/evm/plugins/configuration/plugin.go index 1f93dad1c..504af0fd8 100644 --- a/cosmos/x/evm/plugins/configuration/plugin.go +++ b/cosmos/x/evm/plugins/configuration/plugin.go @@ -28,8 +28,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" + "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/params" + "pkg.berachain.dev/polaris/lib/encoding" ) // Plugin is the interface that must be implemented by the plugin. @@ -52,8 +54,39 @@ func NewPlugin(storeKey storetypes.StoreKey) Plugin { } } +// InitGenesis performs genesis initialization for the evm module. It returns +// no validator updates. +func (p *plugin) InitGenesis(ctx sdk.Context, ethGen *core.Genesis) { + p.Prepare(ctx) + p.SetChainConfig(ethGen.Config) +} + +// ExportGenesis returns the exported genesis state as raw bytes for the evm +// module. +func (p *plugin) ExportGenesis(ctx sdk.Context, ethGen *core.Genesis) { + p.Prepare(ctx) + ethGen.Config = p.ChainConfig() +} + // Prepare implements the core.ConfigurationPlugin interface. func (p *plugin) Prepare(ctx context.Context) { sCtx := sdk.UnwrapSDKContext(ctx) p.paramsStore = sCtx.KVStore(p.storeKey) } + +// GetChainConfig is used to get the genesis info of the Ethereum chain. +func (p *plugin) ChainConfig() *params.ChainConfig { + bz := p.paramsStore.Get([]byte{types.ChainConfigPrefix}) + if bz == nil { + return nil + } + return encoding.MustUnmarshalJSON[params.ChainConfig](bz) +} + +// GetEthGenesis is used to get the genesis info of the Ethereum chain. +func (p *plugin) SetChainConfig(chainConfig *params.ChainConfig) { + p.paramsStore.Set( + []byte{types.ChainConfigPrefix}, + encoding.MustMarshalJSON[params.ChainConfig](*chainConfig), + ) +} diff --git a/cosmos/x/evm/plugins/configuration/plugin_test.go b/cosmos/x/evm/plugins/configuration/plugin_test.go index 2aea75993..aba8f3518 100644 --- a/cosmos/x/evm/plugins/configuration/plugin_test.go +++ b/cosmos/x/evm/plugins/configuration/plugin_test.go @@ -21,16 +21,24 @@ package configuration import ( + "testing" + storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" testutil "pkg.berachain.dev/polaris/cosmos/testing/utils" + "pkg.berachain.dev/polaris/eth/params" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) +func TestConfigurationPlugin(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "cosmos/x/evm/plugins/configuration") +} + var _ = Describe("Plugin", func() { var ( p *plugin @@ -49,9 +57,27 @@ var _ = Describe("Plugin", func() { Describe("Prepare", func() { It("should initialize the params store", func() { p.Prepare(ctx) + // Check that the params store is initialized. expect := ctx.KVStore(p.storeKey) Expect(p.paramsStore).To(Equal(expect)) }) }) + + Describe("ChainConfig", func() { + Context("when the params store is empty", func() { + It("should return nil", func() { + config := p.ChainConfig() + Expect(config).To(BeNil()) + }) + }) + + Context("when the params store contains valid params", func() { + It("should return the chain config", func() { + p.SetChainConfig(params.DefaultChainConfig) + config := p.ChainConfig() + Expect(config).To(Equal(params.DefaultChainConfig)) + }) + }) + }) }) diff --git a/cosmos/x/evm/plugins/configuration/store.go b/cosmos/x/evm/plugins/configuration/store.go deleted file mode 100644 index 5c959c572..000000000 --- a/cosmos/x/evm/plugins/configuration/store.go +++ /dev/null @@ -1,47 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 configuration - -import ( - "encoding/json" - - "pkg.berachain.dev/polaris/cosmos/x/evm/types" - "pkg.berachain.dev/polaris/eth/params" - "pkg.berachain.dev/polaris/lib/encoding" -) - -// GetChainConfig is used to get the genesis info of the Ethereum chain. -func (p *plugin) ChainConfig() *params.ChainConfig { - bz := p.paramsStore.Get([]byte{types.ChainConfigPrefix}) - if bz == nil { - return nil - } - return encoding.MustUnmarshalJSON[params.ChainConfig](bz) -} - -// GetEthGenesis is used to get the genesis info of the Ethereum chain. -func (p *plugin) SetChainConfig(chainConfig *params.ChainConfig) { - bz, err := json.Marshal(chainConfig) - if err != nil { - panic(err) - } - p.paramsStore.Set([]byte{types.ChainConfigPrefix}, bz) -} diff --git a/cosmos/x/evm/plugins/configuration/store_test.go b/cosmos/x/evm/plugins/configuration/store_test.go deleted file mode 100644 index 5b42c7b68..000000000 --- a/cosmos/x/evm/plugins/configuration/store_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 configuration - -import ( - storetypes "cosmossdk.io/store/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - testutil "pkg.berachain.dev/polaris/cosmos/testing/utils" - "pkg.berachain.dev/polaris/eth/params" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -var _ = Describe("Plugin", func() { - var ( - p *plugin - ctx sdk.Context - ) - - BeforeEach(func() { - ctx = testutil.NewContext() - storeKey := storetypes.NewKVStoreKey("evm") - p = &plugin{ - storeKey: storeKey, - paramsStore: ctx.KVStore(storeKey), - } - }) - - Describe("Prepare", func() { - It("should initialize the params store", func() { - p.Prepare(ctx) - - // Check that the params store is initialized. - expect := ctx.KVStore(p.storeKey) - Expect(p.paramsStore).To(Equal(expect)) - }) - }) - - Describe("ChainConfig", func() { - Context("when the params store is empty", func() { - It("should return nil", func() { - config := p.ChainConfig() - Expect(config).To(BeNil()) - }) - }) - - Context("when the params store contains valid params", func() { - It("should return the chain config", func() { - p.SetChainConfig(params.DefaultChainConfig) - config := p.ChainConfig() - Expect(config).To(Equal(params.DefaultChainConfig)) - }) - }) - }) -}) From 3f710051fd4ecfb9c65b6f61f8854b17a542f7f9 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 13:40:15 -0400 Subject: [PATCH 29/94] giga cleanup --- cosmos/x/evm/depinject.go | 13 ++++- cosmos/x/evm/genesis_test.go | 12 ++-- cosmos/x/evm/keeper/abci.go | 4 +- cosmos/x/evm/keeper/host.go | 7 +-- cosmos/x/evm/keeper/keeper.go | 14 ++--- cosmos/x/evm/keeper/processor.go | 2 +- cosmos/x/evm/keeper/processor_test.go | 14 ++--- .../x/evm/plugins/txpool/mempool/mempool.go | 57 ------------------- cosmos/x/evm/plugins/txpool/plugin.go | 19 +++---- .../x/evm/plugins/txpool/subpool/mempool.go | 23 -------- e2e/testapp/app.go | 22 ++----- e2e/testapp/polard/cmd/root.go | 3 +- eth/polar/polaris.go | 1 + 13 files changed, 48 insertions(+), 143 deletions(-) delete mode 100644 cosmos/x/evm/plugins/txpool/mempool/mempool.go delete mode 100644 cosmos/x/evm/plugins/txpool/subpool/mempool.go diff --git a/cosmos/x/evm/depinject.go b/cosmos/x/evm/depinject.go index 8a74c6d68..2bf3af849 100644 --- a/cosmos/x/evm/depinject.go +++ b/cosmos/x/evm/depinject.go @@ -25,9 +25,10 @@ import ( "cosmossdk.io/depinject" store "cosmossdk.io/store/types" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" + servertypes "github.com/cosmos/cosmos-sdk/server/types" modulev1alpha1 "pkg.berachain.dev/polaris/cosmos/api/polaris/evm/module/v1alpha1" + evmconfig "pkg.berachain.dev/polaris/cosmos/config" "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" ) @@ -46,8 +47,8 @@ type DepInjectInput struct { ModuleKey depinject.OwnModuleKey Config *modulev1alpha1.Module Key *store.KVStoreKey + AppOpts servertypes.AppOptions - Mempool sdkmempool.Mempool CustomPrecompiles func() *ethprecompile.Injector `optional:"true"` AccountKeeper AccountKeeper @@ -69,12 +70,18 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { in.CustomPrecompiles = func() *ethprecompile.Injector { return ðprecompile.Injector{} } } + // read oracle config from app-opts, and construct oracle service + polarisCfg, err := evmconfig.ReadConfigFromAppOpts(in.AppOpts) + if err != nil { + panic(err) + } + k := keeper.NewKeeper( in.AccountKeeper, in.StakingKeeper, in.Key, - in.Mempool, in.CustomPrecompiles, + polarisCfg, ) m := NewAppModule(k, in.AccountKeeper) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 5f8b95a3f..37b683cae 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -38,7 +38,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm" "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" - evmmempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" @@ -64,18 +63,19 @@ var _ = Describe("", func() { ctx, ak, _, sk = testutil.SetupMinimalKeepers() ctx = ctx.WithBlockHeight(0) sc = staking.NewPrecompileContract(ak, &sk) + cfg := config.DefaultConfig() + cfg.Node.DataDir = GinkgoT().TempDir() + cfg.Node.KeyStoreDir = GinkgoT().TempDir() k = keeper.NewKeeper( ak, sk, storetypes.NewKVStoreKey("evm"), - &evmmempool.WrappedGethTxPool{}, func() *ethprecompile.Injector { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, + cfg, ) - cfg := config.DefaultConfig() - cfg.Node.DataDir = GinkgoT().TempDir() - cfg.Node.KeyStoreDir = GinkgoT().TempDir() - k.Setup(cfg, nil, log.NewTestLogger(GinkgoT())) + + k.Setup(nil, log.NewTestLogger(GinkgoT())) am = evm.NewAppModule(k, ak) }) diff --git a/cosmos/x/evm/keeper/abci.go b/cosmos/x/evm/keeper/abci.go index 00d952577..eadf27e39 100644 --- a/cosmos/x/evm/keeper/abci.go +++ b/cosmos/x/evm/keeper/abci.go @@ -28,11 +28,11 @@ import ( func (k *Keeper) BeginBlocker(ctx context.Context) error { // Prepare the Polaris Ethereum block. - _ = k.GetPolaris().Miner().Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) + _ = k.polaris.Miner().Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) return nil } func (k *Keeper) EndBlock(ctx context.Context) error { // Finalize the Polaris Ethereum block. - return k.GetPolaris().Miner().Finalize(ctx) + return k.polaris.Miner().Finalize(ctx) } diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index ac5a7066c..3b3accf5b 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -24,7 +24,6 @@ import ( storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/configuration" @@ -35,10 +34,8 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" - "pkg.berachain.dev/polaris/lib/utils" ) // Compile-time interface assertion. @@ -75,7 +72,6 @@ func NewHost( storeKey storetypes.StoreKey, ak state.AccountKeeper, sk block.StakingKeeper, - ethTxMempool sdkmempool.Mempool, precompiles func() *ethprecompile.Injector, ) Host { // We setup the host with some Cosmos standard sauce. @@ -86,7 +82,7 @@ func NewHost( h.cp = configuration.NewPlugin(storeKey) h.ep = engine.NewPlugin() h.gp = gas.NewPlugin() - h.txp = txpool.NewPlugin(utils.MustGetAs[*mempool.WrappedGethTxPool](ethTxMempool)) + h.txp = txpool.NewPlugin() h.pcs = precompiles h.storeKey = storeKey h.ak = ak @@ -103,7 +99,6 @@ func (h *host) Setup( h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) // TODO: re-enable historical plugin using ABCI listener. h.hp = historical.NewPlugin(h.cp, h.bp, nil, h.storeKey) - // h.txp.SetNonceRetriever(h.sp) // Set the query context function for the block and state plugins h.sp.SetQueryContextFn(qc) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index c70616c8a..e69fa8407 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -29,7 +29,6 @@ import ( "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" - sdkmempool "github.com/cosmos/cosmos-sdk/types/mempool" "pkg.berachain.dev/polaris/cosmos/config" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" @@ -52,6 +51,8 @@ type Keeper struct { // The (unexposed) key used to access the store from the Context. storeKey storetypes.StoreKey + + polarisCfg *config.Config } // NewKeeper creates new instances of the polaris Keeper. @@ -59,19 +60,19 @@ func NewKeeper( ak state.AccountKeeper, sk block.StakingKeeper, storeKey storetypes.StoreKey, - ethTxMempool sdkmempool.Mempool, pcs func() *ethprecompile.Injector, + polarisCfg *config.Config, ) *Keeper { // We setup the keeper with some Cosmos standard sauce. k := &Keeper{ - storeKey: storeKey, + storeKey: storeKey, + polarisCfg: polarisCfg, } k.host = NewHost( storeKey, ak, sk, - ethTxMempool, pcs, ) return k @@ -79,19 +80,18 @@ func NewKeeper( // Setup sets up the plugins in the Host. It also build the Polaris EVM Provider. func (k *Keeper) Setup( - cfg *config.Config, qc func(height int64, prove bool) (sdk.Context, error), logger log.Logger, ) { // Setup plugins in the Host k.host.Setup(qc) - node, err := polar.NewGethNetworkingStack(&cfg.Node) + node, err := polar.NewGethNetworkingStack(&k.polarisCfg.Node) if err != nil { panic(err) } - k.polaris = polar.NewWithNetworkingStack(&cfg.Polar, k.host, node, ethlog.FuncHandler( + k.polaris = polar.NewWithNetworkingStack(&k.polarisCfg.Polar, k.host, node, ethlog.FuncHandler( func(r *ethlog.Record) error { polarisGethLogger := logger.With("module", "polaris-geth") switch r.Lvl { //nolint:nolintlint,exhaustive // linter is bugged. diff --git a/cosmos/x/evm/keeper/processor.go b/cosmos/x/evm/keeper/processor.go index b1165a3e4..2e256a6e3 100644 --- a/cosmos/x/evm/keeper/processor.go +++ b/cosmos/x/evm/keeper/processor.go @@ -40,7 +40,7 @@ func (k *Keeper) ProcessTransaction(ctx context.Context, tx *coretypes.Transacti "reset gas meter prior to ethereum state transition") // Process the transaction and return the EVM's execution result. - receipt, err := k.GetPolaris().Miner().ProcessTransaction(ctx, tx) + receipt, err := k.polaris.Miner().ProcessTransaction(ctx, tx) if err != nil { k.Logger(sCtx).Error("failed to process transaction", "err", err) return nil, err diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 6f6287b6a..44343de8d 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -40,7 +40,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" - evmmempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" "pkg.berachain.dev/polaris/eth/accounts/abi" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" @@ -88,20 +87,21 @@ var _ = Describe("Processor", func() { // before chain, init genesis state ctx, ak, _, sk = testutil.SetupMinimalKeepers() + cfg := config.DefaultConfig() + cfg.Node.DataDir = GinkgoT().TempDir() + cfg.Node.KeyStoreDir = GinkgoT().TempDir() k = keeper.NewKeeper( ak, sk, storetypes.NewKVStoreKey("evm"), - &evmmempool.WrappedGethTxPool{}, func() *ethprecompile.Injector { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, + cfg, ) sc = staking.NewPrecompileContract(ak, &sk) ctx = ctx.WithBlockHeight(0) - cfg := config.DefaultConfig() - cfg.Node.DataDir = GinkgoT().TempDir() - cfg.Node.KeyStoreDir = GinkgoT().TempDir() - k.Setup(cfg, nil, log.NewTestLogger(GinkgoT())) + + k.Setup(nil, log.NewTestLogger(GinkgoT())) for _, plugin := range k.GetPolaris().Host().(keeper.Host).GetAllPlugins() { plugin, hasInitGenesis := utils.GetAs[plugins.HasGenesis](plugin) if hasInitGenesis { @@ -116,7 +116,7 @@ var _ = Describe("Processor", func() { cfg = config.DefaultConfig() cfg.Node.DataDir = GinkgoT().TempDir() cfg.Node.KeyStoreDir = GinkgoT().TempDir() - k.Setup(cfg, nil, log.NewTestLogger(GinkgoT())) + k.Setup(nil, log.NewTestLogger(GinkgoT())) _ = sk.SetParams(ctx, stakingtypes.DefaultParams()) // Set validator with consensus address. diff --git a/cosmos/x/evm/plugins/txpool/mempool/mempool.go b/cosmos/x/evm/plugins/txpool/mempool/mempool.go deleted file mode 100644 index c36ce376f..000000000 --- a/cosmos/x/evm/plugins/txpool/mempool/mempool.go +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mempool - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/mempool" - - "github.com/ethereum/go-ethereum/core/txpool" -) - -var _ mempool.Mempool = (*WrappedGethTxPool)(nil) - -type WrappedGethTxPool struct { - *txpool.TxPool -} - -// func (wgtp *WrappedGethTxPool) commitTransactions() error { - -// } - -func (wgtp *WrappedGethTxPool) CountTx() int { - return 0 -} - -func (wgtp *WrappedGethTxPool) Insert(_ context.Context, _ sdk.Tx) error { - return nil -} - -func (wgtp *WrappedGethTxPool) Select(context.Context, [][]byte) mempool.Iterator { - return nil -} - -func (wgtp *WrappedGethTxPool) Remove(sdk.Tx) error { - // intentionally a no-op - return nil -} diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index 9d616c3f3..faf34ff65 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -28,8 +28,6 @@ import ( "github.com/ethereum/go-ethereum/core/txpool" - mempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" - "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" coretypes "pkg.berachain.dev/polaris/eth/core/types" ) @@ -48,22 +46,19 @@ type Plugin interface { Start(log.Logger, *txpool.TxPool, client.Context) // Prepare(*big.Int, coretypes.Signer) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) - Pending(enforceTips bool) map[common.Address][]*txpool.LazyTransaction - TxPool() *txpool.TxPool + GetTxPool() *txpool.TxPool } // plugin represents the transaction pool plugin. type plugin struct { - *mempool.WrappedGethTxPool + *txpool.TxPool *handler serializer *serializer } // NewPlugin returns a new transaction pool plugin. -func NewPlugin(wrappedGethTxPool *mempool.WrappedGethTxPool) Plugin { - return &plugin{ - WrappedGethTxPool: wrappedGethTxPool, - } +func NewPlugin() Plugin { + return &plugin{} } // GetHandler implements the Plugin interface. @@ -71,8 +66,8 @@ func (p *plugin) GetHandler() core.Handler { return p.handler } -func (p *plugin) TxPool() *txpool.TxPool { - return p.WrappedGethTxPool.TxPool +func (p *plugin) GetTxPool() *txpool.TxPool { + return p.TxPool } func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) { @@ -82,7 +77,7 @@ func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, erro // Setup implements the Plugin interface. func (p *plugin) Start(logger log.Logger, txpool *txpool.TxPool, ctx client.Context) { p.serializer = newSerializer(ctx) - p.WrappedGethTxPool.TxPool = txpool + p.TxPool = txpool p.handler = newHandler(ctx, txpool, p.serializer, logger) // TODO: register all these starting things somewhere better. diff --git a/cosmos/x/evm/plugins/txpool/subpool/mempool.go b/cosmos/x/evm/plugins/txpool/subpool/mempool.go deleted file mode 100644 index d0c7333fb..000000000 --- a/cosmos/x/evm/plugins/txpool/subpool/mempool.go +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 subpool - -type WrappedGethTxPool struct{} diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 13e74d245..cdc4746fa 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -62,11 +62,9 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "pkg.berachain.dev/polaris/cosmos/abci" - evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" - evmmempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" ) @@ -133,9 +131,8 @@ func NewPolarisApp( baseAppOptions ...func(*baseapp.BaseApp), ) *SimApp { var ( - app = &SimApp{} - appBuilder *runtime.AppBuilder - ethTxMempool = &evmmempool.WrappedGethTxPool{} + app = &SimApp{} + appBuilder *runtime.AppBuilder // merge the AppConfig and other configuration in one config appConfig = depinject.Configs( MakeAppConfig(bech32Prefix), @@ -145,8 +142,6 @@ func NewPolarisApp( appOpts, // supply the logger logger, - // supply the mempool - ethTxMempool, // ADVANCED CONFIGURATION PrecompilesToInject(app), // @@ -221,21 +216,14 @@ func NewPolarisApp( // } // baseAppOptions = append(baseAppOptions, prepareOpt) - app.App = appBuilder.Build(db, traceStore, append(baseAppOptions, baseapp.SetMempool(ethTxMempool))...) + app.App = appBuilder.Build(db, traceStore, baseAppOptions...) proposalHandler := abci.NewDefaultProposalHandler(app) - // read oracle config from app-opts, and construct oracle service - polarisCfg, err := evmconfig.ReadConfigFromAppOpts(appOpts) - if err != nil { - panic(err) - } - // TODO: MOVE EVM SETUP // ----- BEGIN EVM SETUP ---------------------------------------------- // setup evm keeper and all of its plugins. app.EVMKeeper.Setup( - polarisCfg, app.CreateQueryContext, logger, ) @@ -260,7 +248,7 @@ func NewPolarisApp( // ----- END EVM SETUP ------------------------------------------------- // register streaming services - if err = app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { + if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { panic(err) } @@ -286,7 +274,7 @@ func NewPolarisApp( app.sm.RegisterStoreDecoders() - if err = app.Load(loadLatest); err != nil { + if err := app.Load(loadLatest); err != nil { panic(err) } diff --git a/e2e/testapp/polard/cmd/root.go b/e2e/testapp/polard/cmd/root.go index 751b3cff2..d0d21a006 100644 --- a/e2e/testapp/polard/cmd/root.go +++ b/e2e/testapp/polard/cmd/root.go @@ -62,7 +62,6 @@ import ( evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" "pkg.berachain.dev/polaris/cosmos/crypto/keyring" - evmmempool "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool/mempool" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" testapp "pkg.berachain.dev/polaris/e2e/testapp" ) @@ -82,7 +81,7 @@ func NewRootCmd() *cobra.Command { if err := depinject.Inject(depinject.Configs( testapp.MakeAppConfig(""), - depinject.Supply(&evmmempool.WrappedGethTxPool{}, log.NewNopLogger()), + depinject.Supply(log.NewNopLogger()), depinject.Provide(evmtypes.ProvideEthereumTransactionGetSigners)), &interfaceRegistry, &appCodec, diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 6cf64dd9e..0a733dc2f 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -178,6 +178,7 @@ func (pl *Polaris) StartServices() error { if err := pl.stack.Start(); err != nil { panic(err) } + return nil } From 4ad1acf04607383f9393eea5976515c12dbaf04f Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 13:42:10 -0400 Subject: [PATCH 30/94] fix tests --- cosmos/x/evm/keeper/processor_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 44343de8d..5d442c2f1 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -90,6 +90,7 @@ var _ = Describe("Processor", func() { cfg := config.DefaultConfig() cfg.Node.DataDir = GinkgoT().TempDir() cfg.Node.KeyStoreDir = GinkgoT().TempDir() + sc = staking.NewPrecompileContract(ak, &sk) k = keeper.NewKeeper( ak, sk, storetypes.NewKVStoreKey("evm"), @@ -98,10 +99,10 @@ var _ = Describe("Processor", func() { }, cfg, ) - sc = staking.NewPrecompileContract(ak, &sk) + k.Setup(nil, log.NewTestLogger(GinkgoT())) + ctx = ctx.WithBlockHeight(0) - k.Setup(nil, log.NewTestLogger(GinkgoT())) for _, plugin := range k.GetPolaris().Host().(keeper.Host).GetAllPlugins() { plugin, hasInitGenesis := utils.GetAs[plugins.HasGenesis](plugin) if hasInitGenesis { @@ -113,10 +114,6 @@ var _ = Describe("Processor", func() { validator.Status = stakingtypes.Bonded Expect(sk.SetValidator(ctx, validator)).To(Succeed()) - cfg = config.DefaultConfig() - cfg.Node.DataDir = GinkgoT().TempDir() - cfg.Node.KeyStoreDir = GinkgoT().TempDir() - k.Setup(nil, log.NewTestLogger(GinkgoT())) _ = sk.SetParams(ctx, stakingtypes.DefaultParams()) // Set validator with consensus address. From 5554a20ccc0812985d3c98fed0f2bc9519389207 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 14:24:21 -0400 Subject: [PATCH 31/94] bing bong --- cosmos/x/evm/depinject.go | 10 +++++++--- cosmos/x/evm/genesis_test.go | 3 ++- cosmos/x/evm/keeper/host.go | 12 ++---------- cosmos/x/evm/keeper/keeper.go | 7 +++---- cosmos/x/evm/keeper/processor_test.go | 3 ++- cosmos/x/evm/plugins/block/header.go | 4 ++-- cosmos/x/evm/plugins/block/header_test.go | 2 +- cosmos/x/evm/plugins/block/plugin.go | 4 ++-- cosmos/x/evm/plugins/state/plugin.go | 8 ++++---- e2e/testapp/app.go | 3 ++- e2e/testapp/{precompiles.go => helpers.go} | 9 +++++++++ e2e/testapp/polard/cmd/root.go | 18 ++++++++++++++++-- 12 files changed, 52 insertions(+), 31 deletions(-) rename e2e/testapp/{precompiles.go => helpers.go} (87%) diff --git a/cosmos/x/evm/depinject.go b/cosmos/x/evm/depinject.go index 2bf3af849..09cf78de2 100644 --- a/cosmos/x/evm/depinject.go +++ b/cosmos/x/evm/depinject.go @@ -26,6 +26,7 @@ import ( store "cosmossdk.io/store/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" + sdk "github.com/cosmos/cosmos-sdk/types" modulev1alpha1 "pkg.berachain.dev/polaris/cosmos/api/polaris/evm/module/v1alpha1" evmconfig "pkg.berachain.dev/polaris/cosmos/config" @@ -47,9 +48,10 @@ type DepInjectInput struct { ModuleKey depinject.OwnModuleKey Config *modulev1alpha1.Module Key *store.KVStoreKey - AppOpts servertypes.AppOptions + AppOpts servertypes.AppOptions CustomPrecompiles func() *ethprecompile.Injector `optional:"true"` + QueryContextFn func() func(height int64, prove bool) (sdk.Context, error) AccountKeeper AccountKeeper StakingKeeper StakingKeeper @@ -73,7 +75,9 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { // read oracle config from app-opts, and construct oracle service polarisCfg, err := evmconfig.ReadConfigFromAppOpts(in.AppOpts) if err != nil { - panic(err) + // TODO: this is required because of depinject in root.go. + // TODO: fix. + polarisCfg = evmconfig.DefaultConfig() } k := keeper.NewKeeper( @@ -81,9 +85,9 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { in.StakingKeeper, in.Key, in.CustomPrecompiles, + in.QueryContextFn, polarisCfg, ) - m := NewAppModule(k, in.AccountKeeper) return DepInjectOutput{ diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 37b683cae..1b3731881 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -72,10 +72,11 @@ var _ = Describe("", func() { func() *ethprecompile.Injector { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, + nil, cfg, ) - k.Setup(nil, log.NewTestLogger(GinkgoT())) + k.Setup(log.NewTestLogger(GinkgoT())) am = evm.NewAppModule(k, ak) }) diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 3b3accf5b..2eb8f24b0 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -46,9 +46,6 @@ var _ core.PolarisHostChain = (*host)(nil) type Host interface { core.PolarisHostChain GetAllPlugins() []any - Setup( - func(height int64, prove bool) (sdk.Context, error), - ) } type host struct { @@ -73,6 +70,7 @@ func NewHost( ak state.AccountKeeper, sk block.StakingKeeper, precompiles func() *ethprecompile.Injector, + qc func() func(height int64, prove bool) (sdk.Context, error), ) Host { // We setup the host with some Cosmos standard sauce. h := &host{} @@ -86,14 +84,7 @@ func NewHost( h.pcs = precompiles h.storeKey = storeKey h.ak = ak - return h -} -// Setup sets up the precompile and state plugins with the given precompiles and keepers. It also -// sets the query context function for the block and state plugins (to support historical queries). -func (h *host) Setup( - qc func(height int64, prove bool) (sdk.Context, error), -) { // Setup the state, precompile, historical, and txpool plugins h.sp = state.NewPlugin(h.ak, h.storeKey, log.NewFactory(h.pcs().GetPrecompiles())) h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) @@ -103,6 +94,7 @@ func (h *host) Setup( // Set the query context function for the block and state plugins h.sp.SetQueryContextFn(qc) h.bp.SetQueryContextFn(qc) + return h } // GetBlockPlugin returns the header plugin. diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index e69fa8407..f67bc6c89 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -61,6 +61,7 @@ func NewKeeper( sk block.StakingKeeper, storeKey storetypes.StoreKey, pcs func() *ethprecompile.Injector, + qc func() func(height int64, prove bool) (sdk.Context, error), polarisCfg *config.Config, ) *Keeper { // We setup the keeper with some Cosmos standard sauce. @@ -74,18 +75,16 @@ func NewKeeper( ak, sk, pcs, + qc, ) + return k } // Setup sets up the plugins in the Host. It also build the Polaris EVM Provider. func (k *Keeper) Setup( - qc func(height int64, prove bool) (sdk.Context, error), logger log.Logger, ) { - // Setup plugins in the Host - k.host.Setup(qc) - node, err := polar.NewGethNetworkingStack(&k.polarisCfg.Node) if err != nil { panic(err) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 5d442c2f1..d6621bdbb 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -97,9 +97,10 @@ var _ = Describe("Processor", func() { func() *ethprecompile.Injector { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, + nil, cfg, ) - k.Setup(nil, log.NewTestLogger(GinkgoT())) + k.Setup(log.NewTestLogger(GinkgoT())) ctx = ctx.WithBlockHeight(0) diff --git a/cosmos/x/evm/plugins/block/header.go b/cosmos/x/evm/plugins/block/header.go index 060653830..a4f72e99c 100644 --- a/cosmos/x/evm/plugins/block/header.go +++ b/cosmos/x/evm/plugins/block/header.go @@ -42,7 +42,7 @@ const prevHeaderHashes = 256 // ===========================================================================. // SetQueryContextFn sets the query context func for the plugin. -func (p *plugin) SetQueryContextFn(gqc func(height int64, prove bool) (sdk.Context, error)) { +func (p *plugin) SetQueryContextFn(gqc func() func(height int64, prove bool) (sdk.Context, error)) { p.getQueryContext = gqc } @@ -144,7 +144,7 @@ func (p *plugin) readHeaderBytes(number uint64) ([]byte, error) { number = uint64(p.ctx.BlockHeight()) } - ctx, err := p.getQueryContext(int64(number), false) + ctx, err := p.getQueryContext()(int64(number), false) if err != nil { return nil, errorslib.Wrap(err, "GetHeader: failed to use query context") } diff --git a/cosmos/x/evm/plugins/block/header_test.go b/cosmos/x/evm/plugins/block/header_test.go index 988c66bd1..2d248894e 100644 --- a/cosmos/x/evm/plugins/block/header_test.go +++ b/cosmos/x/evm/plugins/block/header_test.go @@ -47,7 +47,7 @@ var _ = Describe("Header", func() { _, _, _, sk := testutil.SetupMinimalKeepers() ctx = testutil.NewContext().WithBlockGasMeter(storetypes.NewGasMeter(uint64(10000))) p = utils.MustGetAs[*plugin](NewPlugin(testutil.EvmKey, sk)) - p.SetQueryContextFn(mockQueryContext) + p.SetQueryContextFn(func() func(height int64, prove bool) (sdk.Context, error) { return mockQueryContext }) p.Prepare(ctx) // on block 0 (genesis) }) diff --git a/cosmos/x/evm/plugins/block/plugin.go b/cosmos/x/evm/plugins/block/plugin.go index 7c3dc733a..f6984ea91 100644 --- a/cosmos/x/evm/plugins/block/plugin.go +++ b/cosmos/x/evm/plugins/block/plugin.go @@ -39,7 +39,7 @@ type Plugin interface { core.BlockPlugin // SetQueryContextFn sets the function used for querying historical block headers. - SetQueryContextFn(fn func(height int64, prove bool) (sdk.Context, error)) + SetQueryContextFn(fn func() func(height int64, prove bool) (sdk.Context, error)) } type plugin struct { @@ -48,7 +48,7 @@ type plugin struct { // storekey is the store key for the header store. storekey storetypes.StoreKey // getQueryContext allows for querying block headers. - getQueryContext func(height int64, prove bool) (sdk.Context, error) + getQueryContext func() func(height int64, prove bool) (sdk.Context, error) // sk represents the cosmos staking keeper. sk StakingKeeper } diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index 797fee06a..ad066a079 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -56,7 +56,7 @@ type Plugin interface { plugins.HasGenesis core.StatePlugin // SetQueryContextFn sets the query context func for the plugin. - SetQueryContextFn(fn func(height int64, prove bool) (sdk.Context, error)) + SetQueryContextFn(fn func() func(height int64, prove bool) (sdk.Context, error)) // IterateBalances iterates over the balances of all accounts and calls the given callback function. IterateBalances(fn func(common.Address, *big.Int) bool) // IterateState iterates over the state of all accounts and calls the given callback function. @@ -106,7 +106,7 @@ type plugin struct { ak AccountKeeper // getQueryContext allows for querying state a historical height. - getQueryContext func(height int64, prove bool) (sdk.Context, error) + getQueryContext func() func(height int64, prove bool) (sdk.Context, error) // savedErr stores any error that is returned from state modifications on the underlying // keepers. @@ -515,7 +515,7 @@ func (p *plugin) IterateBalances(fn func(common.Address, *big.Int) bool) { // ============================================================================= // SetQueryContextFn sets the query context func for the plugin. -func (p *plugin) SetQueryContextFn(gqc func(height int64, prove bool) (sdk.Context, error)) { +func (p *plugin) SetQueryContextFn(gqc func() func(height int64, prove bool) (sdk.Context, error)) { p.getQueryContext = gqc } @@ -536,7 +536,7 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { } else { // Get the query context at the given height. var err error - ctx, err = p.getQueryContext(int64Number, false) + ctx, err = p.getQueryContext()(int64Number, false) if err != nil { return nil, err } diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index cdc4746fa..f2d92535e 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -138,6 +138,7 @@ func NewPolarisApp( MakeAppConfig(bech32Prefix), depinject.Provide(evmtypes.ProvideEthereumTransactionGetSigners), depinject.Supply( + QueryContextFn(app), // supply the application options appOpts, // supply the logger @@ -224,9 +225,9 @@ func NewPolarisApp( // setup evm keeper and all of its plugins. app.EVMKeeper.Setup( - app.CreateQueryContext, logger, ) + proposalHandler.SetPolaris(app.EVMKeeper.GetPolaris()) app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) diff --git a/e2e/testapp/precompiles.go b/e2e/testapp/helpers.go similarity index 87% rename from e2e/testapp/precompiles.go rename to e2e/testapp/helpers.go index 4e6e4196c..cd6e6c408 100644 --- a/e2e/testapp/precompiles.go +++ b/e2e/testapp/helpers.go @@ -21,6 +21,7 @@ package testapp import ( + sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" @@ -64,3 +65,11 @@ func PrecompilesToInject(app *SimApp, customPcs ...ethprecompile.Registrable) fu return pcs } } + +// PrecompilesToInject returns a function that provides the initialization of the standard +// set of precompiles. +func QueryContextFn(app *SimApp) func() func(height int64, prove bool) (sdk.Context, error) { + return func() func(height int64, prove bool) (sdk.Context, error) { + return app.BaseApp.CreateQueryContext + } +} diff --git a/e2e/testapp/polard/cmd/root.go b/e2e/testapp/polard/cmd/root.go index d0d21a006..5bb319d0e 100644 --- a/e2e/testapp/polard/cmd/root.go +++ b/e2e/testapp/polard/cmd/root.go @@ -50,6 +50,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli" @@ -58,7 +59,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" - evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" "pkg.berachain.dev/polaris/cosmos/crypto/keyring" @@ -81,7 +81,11 @@ func NewRootCmd() *cobra.Command { if err := depinject.Inject(depinject.Configs( testapp.MakeAppConfig(""), - depinject.Supply(log.NewNopLogger()), + depinject.Supply( + testapp.QueryContextFn((&testapp.SimApp{})), + log.NewNopLogger(), + simtestutil.NewAppOptionsWithFlagHome(tempDir()), + ), depinject.Provide(evmtypes.ProvideEthereumTransactionGetSigners)), &interfaceRegistry, &appCodec, @@ -347,3 +351,13 @@ func appExport( return testApp.ExportAppStateAndValidators(forZeroHeight, jailAllowedAddrs, modulesToExport) } + +var tempDir = func() string { + dir, err := os.MkdirTemp("", "polard") + if err != nil { + dir = testapp.DefaultNodeHome + } + defer os.RemoveAll(dir) + + return dir +} From 9ffc9dd6931d4ecb6321a4ad4bf2dc0acaea7e65 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 14:25:22 -0400 Subject: [PATCH 32/94] lint --- contracts/bindings/cosmos/lib/cosmos_types.abigen.go | 2 +- contracts/bindings/testing/consume_gas.abigen.go | 2 +- .../bindings/testing/distribution_testing_helper.abigen.go | 2 +- .../bindings/testing/governance/governance_wrapper.abigen.go | 2 +- contracts/bindings/testing/liquid_staking.abigen.go | 2 +- contracts/bindings/testing/precompile_constructor.abigen.go | 2 +- contracts/bindings/testing/solmate_erc20.abigen.go | 2 +- e2e/testapp/polard/cmd/root.go | 1 + 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go index c4ee848a6..8a80c42ac 100644 --- a/contracts/bindings/cosmos/lib/cosmos_types.abigen.go +++ b/contracts/bindings/cosmos/lib/cosmos_types.abigen.go @@ -53,7 +53,7 @@ type CosmosPageResponse struct { // CosmosTypesMetaData contains all meta data concerning the CosmosTypes contract. var CosmosTypesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"coin\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"offset\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"limit\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"countTotal\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"reverse\",\"type\":\"bool\"}],\"internalType\":\"structCosmos.PageRequest\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageRequest\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"string\",\"name\":\"nextKey\",\"type\":\"string\"},{\"internalType\":\"uint64\",\"name\":\"total\",\"type\":\"uint64\"}],\"internalType\":\"structCosmos.PageResponse\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"pageResponse\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea264697066735822122015e30edb9e27c41d56fb4bfa53a31f05390368387a2fc2162a847aff41cbd03f64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506102118061001d5f395ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c80631acc976f146100435780632ff6e5df1461005f578063426ce1a91461007b575b5f80fd5b61005d600480360381019061005891906100ca565b610097565b005b6100796004803603810190610074919061012f565b61009a565b005b61009560048036038101906100909190610194565b61009d565b005b50565b50565b50565b5f80fd5b5f80fd5b5f80fd5b5f60a082840312156100c1576100c06100a8565b5b81905092915050565b5f602082840312156100df576100de6100a0565b5b5f82013567ffffffffffffffff8111156100fc576100fb6100a4565b5b610108848285016100ac565b91505092915050565b5f60408284031215610126576101256100a8565b5b81905092915050565b5f60208284031215610144576101436100a0565b5b5f82013567ffffffffffffffff811115610161576101606100a4565b5b61016d84828501610111565b91505092915050565b5f6040828403121561018b5761018a6100a8565b5b81905092915050565b5f602082840312156101a9576101a86100a0565b5b5f82013567ffffffffffffffff8111156101c6576101c56100a4565b5b6101d284828501610176565b9150509291505056fea2646970667358221220cd938f1594be90a76ff4980bf8e5eaf239e05e8867ea7e669197172d39f7515c64736f6c63430008140033", } // CosmosTypesABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/consume_gas.abigen.go b/contracts/bindings/testing/consume_gas.abigen.go index e6a63d51a..a9094d2e4 100644 --- a/contracts/bindings/testing/consume_gas.abigen.go +++ b/contracts/bindings/testing/consume_gas.abigen.go @@ -32,7 +32,7 @@ var ( // ConsumeGasMetaData contains all meta data concerning the ConsumeGas contract. var ConsumeGasMetaData = &bind.MetaData{ ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"}],\"name\":\"GasConsumed\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"targetGas\",\"type\":\"uint256\"}],\"name\":\"consumeGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220cf53a89b858bcd89a9f376c9fc26e35242e2b2c6d3caa86630baa63414ba767d64736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b506101cb8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063a329e8de1461002d575b5f80fd5b610047600480360381019061004291906100e2565b610049565b005b5f5a90505b818161005a919061013a565b5a1161004e575f5a8261006d919061013a565b90507f1a2dc18f5a2dabdf3809a83ec652290b81d97d915bf5561908090bad91deffc48160405161009e919061017c565b60405180910390a1505050565b5f80fd5b5f819050919050565b6100c1816100af565b81146100cb575f80fd5b50565b5f813590506100dc816100b8565b92915050565b5f602082840312156100f7576100f66100ab565b5b5f610104848285016100ce565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610144826100af565b915061014f836100af565b92508282039050818111156101675761016661010d565b5b92915050565b610176816100af565b82525050565b5f60208201905061018f5f83018461016d565b9291505056fea2646970667358221220e4c37c223937988a35267edfbba61b52336e1dcb9878edd519edc3eb1881ec2a64736f6c63430008140033", } // ConsumeGasABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/distribution_testing_helper.abigen.go b/contracts/bindings/testing/distribution_testing_helper.abigen.go index 7b666b045..fb1bc5865 100644 --- a/contracts/bindings/testing/distribution_testing_helper.abigen.go +++ b/contracts/bindings/testing/distribution_testing_helper.abigen.go @@ -32,7 +32,7 @@ var ( // DistributionWrapperMetaData contains all meta data concerning the DistributionWrapper contract. var DistributionWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_distributionprecompile\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingprecompile\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validator\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distribution\",\"outputs\":[{\"internalType\":\"contractIDistributionModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_withdrawAddress\",\"type\":\"address\"}],\"name\":\"setWithdrawAddress\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_validatorAddress\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea26469706673582212202e148d4d850cdba2cbe51678ae1a7f68fe0fa2f96b110fc952cd1dda2cd446f064736f6c63430008140033", + Bin: "0x608060405234801561000f575f80fd5b50604051610bf8380380610bf8833981810160405281019061003191906101b2565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614801561009757505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b156100ce576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506101f0565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61018182610158565b9050919050565b61019181610177565b811461019b575f80fd5b50565b5f815190506101ac81610188565b92915050565b5f80604083850312156101c8576101c7610154565b5b5f6101d58582860161019e565b92505060206101e68582860161019e565b9150509250929050565b6109fb806101fd5f395ff3fe608060405260043610610054575f3560e01c806339cc4c86146100585780633ab1a494146100825780634cf088d9146100be5780635c19a95c146100e85780635ee58efc14610104578063e20981ca1461012e575b5f80fd5b348015610063575f80fd5b5061006c610156565b604051610079919061042e565b60405180910390f35b34801561008d575f80fd5b506100a860048036038101906100a391906104b2565b6101e9565b6040516100b5919061042e565b60405180910390f35b3480156100c9575f80fd5b506100d261028a565b6040516100df9190610538565b60405180910390f35b61010260048036038101906100fd91906104b2565b6102af565b005b34801561010f575f80fd5b5061011861034f565b6040516101259190610571565b60405180910390f35b348015610139575f80fd5b50610154600480360381019061014f919061058a565b610372565b005b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166339cc4c866040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101c0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101e491906105f2565b905090565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633ab1a494836040518263ffffffff1660e01b8152600401610243919061062c565b6020604051808303815f875af115801561025f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061028391906105f2565b9050919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026e402b82346040518363ffffffff1660e01b815260040161030b92919061065d565b6020604051808303815f875af1158015610327573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034b91906105f2565b5050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663562c67a483836040518363ffffffff1660e01b81526004016103cc929190610684565b5f604051808303815f875af11580156103e7573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061040f919061097e565b505050565b5f8115159050919050565b61042881610414565b82525050565b5f6020820190506104415f83018461041f565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61048182610458565b9050919050565b61049181610477565b811461049b575f80fd5b50565b5f813590506104ac81610488565b92915050565b5f602082840312156104c7576104c6610450565b5b5f6104d48482850161049e565b91505092915050565b5f819050919050565b5f6105006104fb6104f684610458565b6104dd565b610458565b9050919050565b5f610511826104e6565b9050919050565b5f61052282610507565b9050919050565b61053281610518565b82525050565b5f60208201905061054b5f830184610529565b92915050565b5f61055b82610507565b9050919050565b61056b81610551565b82525050565b5f6020820190506105845f830184610562565b92915050565b5f80604083850312156105a05761059f610450565b5b5f6105ad8582860161049e565b92505060206105be8582860161049e565b9150509250929050565b6105d181610414565b81146105db575f80fd5b50565b5f815190506105ec816105c8565b92915050565b5f6020828403121561060757610606610450565b5b5f610614848285016105de565b91505092915050565b61062681610477565b82525050565b5f60208201905061063f5f83018461061d565b92915050565b5f819050919050565b61065781610645565b82525050565b5f6040820190506106705f83018561061d565b61067d602083018461064e565b9392505050565b5f6040820190506106975f83018561061d565b6106a4602083018461061d565b9392505050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6106f5826106af565b810181811067ffffffffffffffff82111715610714576107136106bf565b5b80604052505050565b5f610726610447565b905061073282826106ec565b919050565b5f67ffffffffffffffff821115610751576107506106bf565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b61077781610645565b8114610781575f80fd5b50565b5f815190506107928161076e565b92915050565b5f80fd5b5f67ffffffffffffffff8211156107b6576107b56106bf565b5b6107bf826106af565b9050602081019050919050565b5f5b838110156107e95780820151818401526020810190506107ce565b5f8484015250505050565b5f6108066108018461079c565b61071d565b90508281526020810184848401111561082257610821610798565b5b61082d8482856107cc565b509392505050565b5f82601f830112610849576108486106ab565b5b81516108598482602086016107f4565b91505092915050565b5f6040828403121561087757610876610766565b5b610881604061071d565b90505f61089084828501610784565b5f83015250602082015167ffffffffffffffff8111156108b3576108b261076a565b5b6108bf84828501610835565b60208301525092915050565b5f6108dd6108d884610737565b61071d565b90508083825260208201905060208402830185811115610900576108ff610762565b5b835b8181101561094757805167ffffffffffffffff811115610925576109246106ab565b5b8086016109328982610862565b85526020850194505050602081019050610902565b5050509392505050565b5f82601f830112610965576109646106ab565b5b81516109758482602086016108cb565b91505092915050565b5f6020828403121561099357610992610450565b5b5f82015167ffffffffffffffff8111156109b0576109af610454565b5b6109bc84828501610951565b9150509291505056fea2646970667358221220d6420ed9fe47b1dded4517a423e78839a9dd77daf8059b956323723ecfd6fbaa64736f6c63430008140033", } // DistributionWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/governance/governance_wrapper.abigen.go b/contracts/bindings/testing/governance/governance_wrapper.abigen.go index 18c2f176a..078e0b533 100644 --- a/contracts/bindings/testing/governance/governance_wrapper.abigen.go +++ b/contracts/bindings/testing/governance/governance_wrapper.abigen.go @@ -63,7 +63,7 @@ type IGovernanceModuleTallyResult struct { // GovernanceWrapperMetaData contains all meta data concerning the GovernanceWrapper contract. var GovernanceWrapperMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_governanceModule\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"bank\",\"outputs\":[{\"internalType\":\"contractIBankModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"cancelProposal\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"}],\"name\":\"getProposal\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"int32\",\"name\":\"proposalStatus\",\"type\":\"int32\"}],\"name\":\"getProposals\",\"outputs\":[{\"components\":[{\"internalType\":\"uint64\",\"name\":\"id\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"int32\",\"name\":\"status\",\"type\":\"int32\"},{\"components\":[{\"internalType\":\"string\",\"name\":\"yesCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"abstainCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noCount\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"noWithVetoCount\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.TallyResult\",\"name\":\"finalTallyResult\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"submitTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"depositEndTime\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"totalDeposit\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"votingStartTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"votingEndTime\",\"type\":\"uint64\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"title\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"summary\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"proposer\",\"type\":\"string\"}],\"internalType\":\"structIGovernanceModule.Proposal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governanceModule\",\"outputs\":[{\"internalType\":\"contractIGovernanceModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"proposal\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"submit\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"proposalId\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"option\",\"type\":\"int32\"},{\"internalType\":\"string\",\"name\":\"metadata\",\"type\":\"string\"}],\"name\":\"vote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212200f262c3e6b8ff76d92a1e14eccc8782c65e08fa4ac303d2cc597f07cbb2108e564736f6c63430008140033", + Bin: "0x60a0604052734381dc2ab14285160c808659aee005d51255add773ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff1681525034801562000057575f80fd5b5060405162001ec038038062001ec083398181016040528101906200007d91906200018e565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000e3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001be565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000158826200012d565b9050919050565b6200016a816200014c565b811462000175575f80fd5b50565b5f8151905062000188816200015f565b92915050565b5f60208284031215620001a657620001a562000129565b5b5f620001b58482850162000178565b91505092915050565b608051611ce9620001d75f395f6104e90152611ce95ff3fe608060405260043610610073575f3560e01c8063566fbd001161004d578063566fbd001461012157806376cdb03b14610151578063b5828df21461017b578063f1610a28146101b75761007a565b806319f7a0fb1461007e5780632b0a7032146100ba57806337a9a59e146100e45761007a565b3661007a57005b5f80fd5b348015610089575f80fd5b506100a4600480360381019061009f919061094a565b6101f3565b6040516100b191906109d0565b60405180910390f35b3480156100c5575f80fd5b506100ce61029a565b6040516100db9190610a63565b60405180910390f35b3480156100ef575f80fd5b5061010a60048036038101906101059190610a7c565b6102bd565b604051610118929190610ab6565b60405180910390f35b61013b60048036038101906101369190610bc2565b61035f565b6040516101489190610c53565b60405180910390f35b34801561015c575f80fd5b506101656104e7565b6040516101729190610c8c565b60405180910390f35b348015610186575f80fd5b506101a1600480360381019061019c9190610ca5565b61050b565b6040516101ae919061112e565b60405180910390f35b3480156101c2575f80fd5b506101dd60048036038101906101d89190610a7c565b6105c0565b6040516101ea919061128e565b60405180910390f35b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319f7a0fb8585856040518463ffffffff1660e01b815260040161025193929190611305565b6020604051808303815f875af115801561026d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610291919061136b565b90509392505050565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166337a9a59e846040518263ffffffff1660e01b81526004016103179190610c53565b60408051808303815f875af1158015610332573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061035691906113aa565b91509150915091565b5f80600167ffffffffffffffff81111561037c5761037b610826565b5b6040519080825280602002602001820160405280156103b557816020015b6103a2610669565b81526020019060019003908161039a5790505b50905084848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f82011690508083019250505050505050815f8151811061040f5761040e6113e8565b5b60200260200101516020018190525082815f81518110610432576104316113e8565b5b60200260200101515f0181815250505f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d238313688886040518363ffffffff1660e01b815260040161049b929190611451565b6020604051808303815f875af11580156104b7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104db9190611473565b91505095945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060610515610682565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663917c9d9285846040518363ffffffff1660e01b8152600401610571929190611520565b5f60405180830381865afa15801561058b573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906105b39190611bf6565b5090508092505050919050565b6105c86106c5565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f1610a28836040518263ffffffff1660e01b81526004016106209190610c53565b5f60405180830381865afa15801561063a573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906106629190611c6c565b9050919050565b60405180604001604052805f8152602001606081525090565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b604051806101a001604052805f67ffffffffffffffff168152602001606081526020015f60030b81526020016106f9610762565b81526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff168152602001606081526020016060815260200160608152602001606081525090565b6040518060800160405280606081526020016060815260200160608152602001606081525090565b5f604051905090565b5f80fd5b5f80fd5b5f67ffffffffffffffff82169050919050565b6107b78161079b565b81146107c1575f80fd5b50565b5f813590506107d2816107ae565b92915050565b5f8160030b9050919050565b6107ed816107d8565b81146107f7575f80fd5b50565b5f81359050610808816107e4565b92915050565b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61085c82610816565b810181811067ffffffffffffffff8211171561087b5761087a610826565b5b80604052505050565b5f61088d61078a565b90506108998282610853565b919050565b5f67ffffffffffffffff8211156108b8576108b7610826565b5b6108c182610816565b9050602081019050919050565b828183375f83830152505050565b5f6108ee6108e98461089e565b610884565b90508281526020810184848401111561090a57610909610812565b5b6109158482856108ce565b509392505050565b5f82601f8301126109315761093061080e565b5b81356109418482602086016108dc565b91505092915050565b5f805f6060848603121561096157610960610793565b5b5f61096e868287016107c4565b935050602061097f868287016107fa565b925050604084013567ffffffffffffffff8111156109a05761099f610797565b5b6109ac8682870161091d565b9150509250925092565b5f8115159050919050565b6109ca816109b6565b82525050565b5f6020820190506109e35f8301846109c1565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f610a2b610a26610a21846109e9565b610a08565b6109e9565b9050919050565b5f610a3c82610a11565b9050919050565b5f610a4d82610a32565b9050919050565b610a5d81610a43565b82525050565b5f602082019050610a765f830184610a54565b92915050565b5f60208284031215610a9157610a90610793565b5b5f610a9e848285016107c4565b91505092915050565b610ab08161079b565b82525050565b5f604082019050610ac95f830185610aa7565b610ad66020830184610aa7565b9392505050565b5f80fd5b5f80fd5b5f8083601f840112610afa57610af961080e565b5b8235905067ffffffffffffffff811115610b1757610b16610add565b5b602083019150836001820283011115610b3357610b32610ae1565b5b9250929050565b5f8083601f840112610b4f57610b4e61080e565b5b8235905067ffffffffffffffff811115610b6c57610b6b610add565b5b602083019150836001820283011115610b8857610b87610ae1565b5b9250929050565b5f819050919050565b610ba181610b8f565b8114610bab575f80fd5b50565b5f81359050610bbc81610b98565b92915050565b5f805f805f60608688031215610bdb57610bda610793565b5b5f86013567ffffffffffffffff811115610bf857610bf7610797565b5b610c0488828901610ae5565b9550955050602086013567ffffffffffffffff811115610c2757610c26610797565b5b610c3388828901610b3a565b93509350506040610c4688828901610bae565b9150509295509295909350565b5f602082019050610c665f830184610aa7565b92915050565b5f610c7682610a32565b9050919050565b610c8681610c6c565b82525050565b5f602082019050610c9f5f830184610c7d565b92915050565b5f60208284031215610cba57610cb9610793565b5b5f610cc7848285016107fa565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610d028161079b565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610d3f578082015181840152602081019050610d24565b5f8484015250505050565b5f610d5482610d08565b610d5e8185610d12565b9350610d6e818560208601610d22565b610d7781610816565b840191505092915050565b610d8b816107d8565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f610db582610d91565b610dbf8185610d9b565b9350610dcf818560208601610d22565b610dd881610816565b840191505092915050565b5f608083015f8301518482035f860152610dfd8282610dab565b91505060208301518482036020860152610e178282610dab565b91505060408301518482036040860152610e318282610dab565b91505060608301518482036060860152610e4b8282610dab565b9150508091505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b610e8a81610b8f565b82525050565b5f604083015f830151610ea55f860182610e81565b5060208301518482036020860152610ebd8282610dab565b9150508091505092915050565b5f610ed58383610e90565b905092915050565b5f602082019050919050565b5f610ef382610e58565b610efd8185610e62565b935083602082028501610f0f85610e72565b805f5b85811015610f4a5784840389528151610f2b8582610eca565b9450610f3683610edd565b925060208a01995050600181019050610f12565b50829750879550505050505092915050565b5f6101a083015f830151610f725f860182610cf9565b5060208301518482036020860152610f8a8282610d4a565b9150506040830151610f9f6040860182610d82565b5060608301518482036060860152610fb78282610de3565b9150506080830151610fcc6080860182610cf9565b5060a0830151610fdf60a0860182610cf9565b5060c083015184820360c0860152610ff78282610ee9565b91505060e083015161100c60e0860182610cf9565b50610100830151611021610100860182610cf9565b5061012083015184820361012086015261103b8282610dab565b9150506101408301518482036101408601526110578282610dab565b9150506101608301518482036101608601526110738282610dab565b91505061018083015184820361018086015261108f8282610dab565b9150508091505092915050565b5f6110a78383610f5c565b905092915050565b5f602082019050919050565b5f6110c582610cd0565b6110cf8185610cda565b9350836020820285016110e185610cea565b805f5b8581101561111c57848403895281516110fd858261109c565b9450611108836110af565b925060208a019950506001810190506110e4565b50829750879550505050505092915050565b5f6020820190508181035f83015261114681846110bb565b905092915050565b5f6101a083015f8301516111645f860182610cf9565b506020830151848203602086015261117c8282610d4a565b91505060408301516111916040860182610d82565b50606083015184820360608601526111a98282610de3565b91505060808301516111be6080860182610cf9565b5060a08301516111d160a0860182610cf9565b5060c083015184820360c08601526111e98282610ee9565b91505060e08301516111fe60e0860182610cf9565b50610100830151611213610100860182610cf9565b5061012083015184820361012086015261122d8282610dab565b9150506101408301518482036101408601526112498282610dab565b9150506101608301518482036101608601526112658282610dab565b9150506101808301518482036101808601526112818282610dab565b9150508091505092915050565b5f6020820190508181035f8301526112a6818461114e565b905092915050565b6112b7816107d8565b82525050565b5f82825260208201905092915050565b5f6112d782610d91565b6112e181856112bd565b93506112f1818560208601610d22565b6112fa81610816565b840191505092915050565b5f6060820190506113185f830186610aa7565b61132560208301856112ae565b818103604083015261133781846112cd565b9050949350505050565b61134a816109b6565b8114611354575f80fd5b50565b5f8151905061136581611341565b92915050565b5f602082840312156113805761137f610793565b5b5f61138d84828501611357565b91505092915050565b5f815190506113a4816107ae565b92915050565b5f80604083850312156113c0576113bf610793565b5b5f6113cd85828601611396565b92505060206113de85828601611396565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f82825260208201905092915050565b5f6114308385611415565b935061143d8385846108ce565b61144683610816565b840190509392505050565b5f6020820190508181035f83015261146a818486611425565b90509392505050565b5f6020828403121561148857611487610793565b5b5f61149584828501611396565b91505092915050565b6114a7816109b6565b82525050565b5f60a083015f8301518482035f8601526114c78282610dab565b91505060208301516114dc6020860182610cf9565b5060408301516114ef6040860182610cf9565b506060830151611502606086018261149e565b506080830151611515608086018261149e565b508091505092915050565b5f6040820190506115335f8301856112ae565b818103602083015261154581846114ad565b90509392505050565b5f67ffffffffffffffff82111561156857611567610826565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561159b5761159a610826565b5b6115a482610816565b9050602081019050919050565b5f6115c36115be84611581565b610884565b9050828152602081018484840111156115df576115de610812565b5b6115ea848285610d22565b509392505050565b5f82601f8301126116065761160561080e565b5b81516116168482602086016115b1565b91505092915050565b5f8151905061162d816107e4565b92915050565b5f6116456116408461089e565b610884565b90508281526020810184848401111561166157611660610812565b5b61166c848285610d22565b509392505050565b5f82601f8301126116885761168761080e565b5b8151611698848260208601611633565b91505092915050565b5f608082840312156116b6576116b5611579565b5b6116c06080610884565b90505f82015167ffffffffffffffff8111156116df576116de61157d565b5b6116eb84828501611674565b5f83015250602082015167ffffffffffffffff81111561170e5761170d61157d565b5b61171a84828501611674565b602083015250604082015167ffffffffffffffff81111561173e5761173d61157d565b5b61174a84828501611674565b604083015250606082015167ffffffffffffffff81111561176e5761176d61157d565b5b61177a84828501611674565b60608301525092915050565b5f67ffffffffffffffff8211156117a05761179f610826565b5b602082029050602081019050919050565b5f815190506117bf81610b98565b92915050565b5f604082840312156117da576117d9611579565b5b6117e46040610884565b90505f6117f3848285016117b1565b5f83015250602082015167ffffffffffffffff8111156118165761181561157d565b5b61182284828501611674565b60208301525092915050565b5f61184061183b84611786565b610884565b9050808382526020820190506020840283018581111561186357611862610ae1565b5b835b818110156118aa57805167ffffffffffffffff8111156118885761188761080e565b5b80860161189589826117c5565b85526020850194505050602081019050611865565b5050509392505050565b5f82601f8301126118c8576118c761080e565b5b81516118d884826020860161182e565b91505092915050565b5f6101a082840312156118f7576118f6611579565b5b6119026101a0610884565b90505f61191184828501611396565b5f83015250602082015167ffffffffffffffff8111156119345761193361157d565b5b611940848285016115f2565b60208301525060406119548482850161161f565b604083015250606082015167ffffffffffffffff8111156119785761197761157d565b5b611984848285016116a1565b606083015250608061199884828501611396565b60808301525060a06119ac84828501611396565b60a08301525060c082015167ffffffffffffffff8111156119d0576119cf61157d565b5b6119dc848285016118b4565b60c08301525060e06119f084828501611396565b60e083015250610100611a0584828501611396565b6101008301525061012082015167ffffffffffffffff811115611a2b57611a2a61157d565b5b611a3784828501611674565b6101208301525061014082015167ffffffffffffffff811115611a5d57611a5c61157d565b5b611a6984828501611674565b6101408301525061016082015167ffffffffffffffff811115611a8f57611a8e61157d565b5b611a9b84828501611674565b6101608301525061018082015167ffffffffffffffff811115611ac157611ac061157d565b5b611acd84828501611674565b6101808301525092915050565b5f611aec611ae78461154e565b610884565b90508083825260208201905060208402830185811115611b0f57611b0e610ae1565b5b835b81811015611b5657805167ffffffffffffffff811115611b3457611b3361080e565b5b808601611b4189826118e1565b85526020850194505050602081019050611b11565b5050509392505050565b5f82601f830112611b7457611b7361080e565b5b8151611b84848260208601611ada565b91505092915050565b5f60408284031215611ba257611ba1611579565b5b611bac6040610884565b90505f82015167ffffffffffffffff811115611bcb57611bca61157d565b5b611bd784828501611674565b5f830152506020611bea84828501611396565b60208301525092915050565b5f8060408385031215611c0c57611c0b610793565b5b5f83015167ffffffffffffffff811115611c2957611c28610797565b5b611c3585828601611b60565b925050602083015167ffffffffffffffff811115611c5657611c55610797565b5b611c6285828601611b8d565b9150509250929050565b5f60208284031215611c8157611c80610793565b5b5f82015167ffffffffffffffff811115611c9e57611c9d610797565b5b611caa848285016118e1565b9150509291505056fea26469706673582212201f67eaa333db58f67fd67829d4572725e7b6f8e219b7fff6db0569c9cde8c99064736f6c63430008140033", } // GovernanceWrapperABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/liquid_staking.abigen.go b/contracts/bindings/testing/liquid_staking.abigen.go index 3564e4d87..b21677f25 100644 --- a/contracts/bindings/testing/liquid_staking.abigen.go +++ b/contracts/bindings/testing/liquid_staking.abigen.go @@ -32,7 +32,7 @@ var ( // LiquidStakingMetaData contains all meta data concerning the LiquidStaking contract. var LiquidStakingMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Data\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"name\":\"Success\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getActiveValidators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staking\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"validatorAddress\",\"type\":\"address\"}],\"name\":\"totalDelegated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212203dcda167560f1c8fb3c11f4a89b20e181e1e50d985f93a819a0df6da03697e7564736f6c63430008140033", + Bin: "0x61010060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660e09073ffffffffffffffffffffffffffffffffffffffff1681525034801562000058575f80fd5b50604051620031d7380380620031d783398181016040528101906200007e9190620002f0565b81816012825f9081620000929190620005aa565b508160019081620000a49190620005aa565b508060ff1660808160ff16815250504660a08181525050620000cb620000dd60201b60201c565b60c08181525050505050505062000817565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010f919062000736565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200162000150959493929190620007bc565b60405160208183030381529060405280519060200120905090565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620001cc8262000184565b810181811067ffffffffffffffff82111715620001ee57620001ed62000194565b5b80604052505050565b5f620002026200016b565b9050620002108282620001c1565b919050565b5f67ffffffffffffffff82111562000232576200023162000194565b5b6200023d8262000184565b9050602081019050919050565b5f5b83811015620002695780820151818401526020810190506200024c565b5f8484015250505050565b5f6200028a620002848462000215565b620001f7565b905082815260208101848484011115620002a957620002a862000180565b5b620002b68482856200024a565b509392505050565b5f82601f830112620002d557620002d46200017c565b5b8151620002e784826020860162000274565b91505092915050565b5f806040838503121562000309576200030862000174565b5b5f83015167ffffffffffffffff81111562000329576200032862000178565b5b6200033785828601620002be565b925050602083015167ffffffffffffffff8111156200035b576200035a62000178565b5b6200036985828601620002be565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620003c257607f821691505b602082108103620003d857620003d76200037d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200043c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620003ff565b620004488683620003ff565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004926200048c620004868462000460565b62000469565b62000460565b9050919050565b5f819050919050565b620004ad8362000472565b620004c5620004bc8262000499565b8484546200040b565b825550505050565b5f90565b620004db620004cd565b620004e8818484620004a2565b505050565b5b818110156200050f57620005035f82620004d1565b600181019050620004ee565b5050565b601f8211156200055e576200052881620003de565b6200053384620003f0565b8101602085101562000543578190505b6200055b6200055285620003f0565b830182620004ed565b50505b505050565b5f82821c905092915050565b5f620005805f198460080262000563565b1980831691505092915050565b5f6200059a83836200056f565b9150826002028217905092915050565b620005b58262000373565b67ffffffffffffffff811115620005d157620005d062000194565b5b620005dd8254620003aa565b620005ea82828562000513565b5f60209050601f83116001811462000620575f84156200060b578287015190505b6200061785826200058d565b86555062000686565b601f1984166200063086620003de565b5f5b82811015620006595784890151825560018201915060208501945060208101905062000632565b8683101562000679578489015162000675601f8916826200056f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620006b881620003aa565b620006c481866200068e565b9450600182165f8114620006e15760018114620006f7576200072d565b60ff19831686528115158202860193506200072d565b620007028562000698565b5f5b83811015620007255781548189015260018201915060208101905062000704565b838801955050505b50505092915050565b5f620007438284620006aa565b915081905092915050565b5f819050919050565b62000762816200074e565b82525050565b620007738162000460565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620007a48262000779565b9050919050565b620007b68162000798565b82525050565b5f60a082019050620007d15f83018862000757565b620007e0602083018762000757565b620007ef604083018662000757565b620007fe606083018562000768565b6200080d6080830184620007ab565b9695505050505050565b60805160a05160c05160e051612970620008675f395f8181610907015281816109ec01528181610bac01528181610c6c015261117501525f6108e001525f6108ac01525f61088701526129705ff3fe608060405260043610610101575f3560e01c806370a08231116100945780639fa6dd35116100635780639fa6dd351461034a578063a9059cbb14610366578063d505accf146103a2578063dd62ed3e146103ca578063f639187e1461040657610108565b806370a082311461027e5780637ecebe00146102ba57806395d89b41146102f65780639de702581461032057610108565b80632e1a7d4d116100d05780632e1a7d4d146101d8578063313ce567146102005780633644e5151461022a5780634cf088d91461025457610108565b806306fdde031461010c578063095ea7b31461013657806318160ddd1461017257806323b872dd1461019c57610108565b3661010857005b5f80fd5b348015610117575f80fd5b50610120610442565b60405161012d9190611501565b60405180910390f35b348015610141575f80fd5b5061015c600480360381019061015791906115bf565b6104cd565b6040516101699190611617565b60405180910390f35b34801561017d575f80fd5b506101866105ba565b604051610193919061163f565b60405180910390f35b3480156101a7575f80fd5b506101c260048036038101906101bd9190611658565b6105c0565b6040516101cf9190611617565b60405180910390f35b3480156101e3575f80fd5b506101fe60048036038101906101f991906116a8565b6107fb565b005b34801561020b575f80fd5b50610214610885565b60405161022191906116ee565b60405180910390f35b348015610235575f80fd5b5061023e6108a9565b60405161024b919061171f565b60405180910390f35b34801561025f575f80fd5b50610268610905565b6040516102759190611793565b60405180910390f35b348015610289575f80fd5b506102a4600480360381019061029f91906117ac565b610929565b6040516102b1919061163f565b60405180910390f35b3480156102c5575f80fd5b506102e060048036038101906102db91906117ac565b61093e565b6040516102ed919061163f565b60405180910390f35b348015610301575f80fd5b5061030a610953565b6040516103179190611501565b60405180910390f35b34801561032b575f80fd5b506103346109df565b604051610341919061188e565b60405180910390f35b610364600480360381019061035f91906116a8565b610b68565b005b348015610371575f80fd5b5061038c600480360381019061038791906115bf565b610d58565b6040516103999190611617565b60405180910390f35b3480156103ad575f80fd5b506103c860048036038101906103c39190611902565b610e65565b005b3480156103d5575f80fd5b506103f060048036038101906103eb919061199f565b611152565b6040516103fd919061163f565b60405180910390f35b348015610411575f80fd5b5061042c600480360381019061042791906117ac565b611172565b604051610439919061163f565b60405180910390f35b5f805461044e90611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461047a90611a0a565b80156104c55780601f1061049c576101008083540402835291602001916104c5565b820191905f5260205f20905b8154815290600101906020018083116104a857829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516105a8919061163f565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146106ed5782816106709190611a67565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546107399190611a67565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516107e7919061163f565b60405180910390a360019150509392505050565b5f8103610834576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61083e3382611214565b3373ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015610881573d5f803e3d5ffd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146108de576108d96112df565b610900565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461096090611a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461098c90611a0a565b80156109d75780601f106109ae576101008083540402835291602001916109d7565b820191905f5260205f20905b8154815290600101906020018083116109ba57829003601f168201915b505050505081565b60606109e9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610a439190611b86565b5f60405180830381865afa158015610a5d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610a8591906123e3565b5090505f815167ffffffffffffffff811115610aa457610aa3611baa565b5b604051908082528060200260200182016040528015610ad25781602001602082028036833780820191505090505b5090505f5b8251811015610b5e57828181518110610af357610af2612459565b5b60200260200101515f0151828281518110610b1157610b10612459565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610b5690612486565b915050610ad7565b5080935050505090565b5f8103610ba1576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba9611434565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cf3f2340836040518263ffffffff1660e01b8152600401610c039190611b86565b5f60405180830381865afa158015610c1d573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610c4591906123e3565b5090505f815f81518110610c5c57610c5b612459565b5b60200260200101515f015190505f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663026e402b83876040518363ffffffff1660e01b8152600401610cc59291906124dc565b6020604051808303815f875af1158015610ce1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d059190612503565b905080610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90612578565b60405180910390fd5b610d513386611369565b5050505050565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610da59190611a67565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e53919061163f565b60405180910390a36001905092915050565b42841015610ea8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9f906125e0565b60405180910390fd5b5f6001610eb36108a9565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b604051602001610f38969594939291906125fe565b60405160208183030381529060405280519060200120604051602001610f5f9291906126d1565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610f949493929190612707565b6020604051602081039080840390855afa158015610fb4573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561102757508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105d90612794565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611141919061163f565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166315049a5a30846040518363ffffffff1660e01b81526004016111ce9291906127b2565b602060405180830381865afa1580156111e9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061120d91906127d9565b9050919050565b8060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546112609190611a67565b925050819055508060025f82825403925050819055505f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516112d3919061163f565b60405180910390a35050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f60405161130f91906128a0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6463060405160200161134e9594939291906128b6565b60405160208183030381529060405280519060200120905090565b8060025f82825461137a9190612907565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611428919061163f565b60405180910390a35050565b6040518060a00160405280606081526020015f67ffffffffffffffff1681526020015f67ffffffffffffffff1681526020015f151581526020015f151581525090565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156114ae578082015181840152602081019050611493565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6114d382611477565b6114dd8185611481565b93506114ed818560208601611491565b6114f6816114b9565b840191505092915050565b5f6020820190508181035f83015261151981846114c9565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61155b82611532565b9050919050565b61156b81611551565b8114611575575f80fd5b50565b5f8135905061158681611562565b92915050565b5f819050919050565b61159e8161158c565b81146115a8575f80fd5b50565b5f813590506115b981611595565b92915050565b5f80604083850312156115d5576115d461152a565b5b5f6115e285828601611578565b92505060206115f3858286016115ab565b9150509250929050565b5f8115159050919050565b611611816115fd565b82525050565b5f60208201905061162a5f830184611608565b92915050565b6116398161158c565b82525050565b5f6020820190506116525f830184611630565b92915050565b5f805f6060848603121561166f5761166e61152a565b5b5f61167c86828701611578565b935050602061168d86828701611578565b925050604061169e868287016115ab565b9150509250925092565b5f602082840312156116bd576116bc61152a565b5b5f6116ca848285016115ab565b91505092915050565b5f60ff82169050919050565b6116e8816116d3565b82525050565b5f6020820190506117015f8301846116df565b92915050565b5f819050919050565b61171981611707565b82525050565b5f6020820190506117325f830184611710565b92915050565b5f819050919050565b5f61175b61175661175184611532565b611738565b611532565b9050919050565b5f61176c82611741565b9050919050565b5f61177d82611762565b9050919050565b61178d81611773565b82525050565b5f6020820190506117a65f830184611784565b92915050565b5f602082840312156117c1576117c061152a565b5b5f6117ce84828501611578565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b61180981611551565b82525050565b5f61181a8383611800565b60208301905092915050565b5f602082019050919050565b5f61183c826117d7565b61184681856117e1565b9350611851836117f1565b805f5b83811015611881578151611868888261180f565b975061187383611826565b925050600181019050611854565b5085935050505092915050565b5f6020820190508181035f8301526118a68184611832565b905092915050565b6118b7816116d3565b81146118c1575f80fd5b50565b5f813590506118d2816118ae565b92915050565b6118e181611707565b81146118eb575f80fd5b50565b5f813590506118fc816118d8565b92915050565b5f805f805f805f60e0888a03121561191d5761191c61152a565b5b5f61192a8a828b01611578565b975050602061193b8a828b01611578565b965050604061194c8a828b016115ab565b955050606061195d8a828b016115ab565b945050608061196e8a828b016118c4565b93505060a061197f8a828b016118ee565b92505060c06119908a828b016118ee565b91505092959891949750929550565b5f80604083850312156119b5576119b461152a565b5b5f6119c285828601611578565b92505060206119d385828601611578565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680611a2157607f821691505b602082108103611a3457611a336119dd565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a718261158c565b9150611a7c8361158c565b9250828203905081811115611a9457611a93611a3a565b5b92915050565b5f82825260208201905092915050565b5f611ab482611477565b611abe8185611a9a565b9350611ace818560208601611491565b611ad7816114b9565b840191505092915050565b5f67ffffffffffffffff82169050919050565b611afe81611ae2565b82525050565b611b0d816115fd565b82525050565b5f60a083015f8301518482035f860152611b2d8282611aaa565b9150506020830151611b426020860182611af5565b506040830151611b556040860182611af5565b506060830151611b686060860182611b04565b506080830151611b7b6080860182611b04565b508091505092915050565b5f6020820190508181035f830152611b9e8184611b13565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611be0826114b9565b810181811067ffffffffffffffff82111715611bff57611bfe611baa565b5b80604052505050565b5f611c11611521565b9050611c1d8282611bd7565b919050565b5f67ffffffffffffffff821115611c3c57611c3b611baa565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f80fd5b5f81519050611c6781611562565b92915050565b5f80fd5b5f67ffffffffffffffff821115611c8b57611c8a611baa565b5b611c94826114b9565b9050602081019050919050565b5f611cb3611cae84611c71565b611c08565b905082815260208101848484011115611ccf57611cce611c6d565b5b611cda848285611491565b509392505050565b5f82601f830112611cf657611cf5611ba6565b5b8151611d06848260208601611ca1565b91505092915050565b611d18816115fd565b8114611d22575f80fd5b50565b5f81519050611d3381611d0f565b92915050565b5f67ffffffffffffffff821115611d5357611d52611baa565b5b611d5c826114b9565b9050602081019050919050565b5f611d7b611d7684611d39565b611c08565b905082815260208101848484011115611d9757611d96611c6d565b5b611da2848285611491565b509392505050565b5f82601f830112611dbe57611dbd611ba6565b5b8151611dce848260208601611d69565b91505092915050565b5f81519050611de581611595565b92915050565b5f60a08284031215611e0057611dff611c51565b5b611e0a60a0611c08565b90505f82015167ffffffffffffffff811115611e2957611e28611c55565b5b611e3584828501611daa565b5f83015250602082015167ffffffffffffffff811115611e5857611e57611c55565b5b611e6484828501611daa565b602083015250604082015167ffffffffffffffff811115611e8857611e87611c55565b5b611e9484828501611daa565b604083015250606082015167ffffffffffffffff811115611eb857611eb7611c55565b5b611ec484828501611daa565b606083015250608082015167ffffffffffffffff811115611ee857611ee7611c55565b5b611ef484828501611daa565b60808301525092915050565b5f8160070b9050919050565b611f1581611f00565b8114611f1f575f80fd5b50565b5f81519050611f3081611f0c565b92915050565b5f60608284031215611f4b57611f4a611c51565b5b611f556060611c08565b90505f611f6484828501611dd7565b5f830152506020611f7784828501611dd7565b6020830152506040611f8b84828501611dd7565b60408301525092915050565b5f60808284031215611fac57611fab611c51565b5b611fb66040611c08565b90505f611fc584828501611f36565b5f83015250606082015167ffffffffffffffff811115611fe857611fe7611c55565b5b611ff484828501611daa565b60208301525092915050565b5f67ffffffffffffffff82111561201a57612019611baa565b5b602082029050602081019050919050565b61203481611ae2565b811461203e575f80fd5b50565b5f8151905061204f8161202b565b92915050565b5f61206761206284612000565b611c08565b9050808382526020820190506020840283018581111561208a57612089611c4d565b5b835b818110156120b3578061209f8882612041565b84526020840193505060208101905061208c565b5050509392505050565b5f82601f8301126120d1576120d0611ba6565b5b81516120e1848260208601612055565b91505092915050565b5f6101a08284031215612100576120ff611c51565b5b61210b6101a0611c08565b90505f61211a84828501611c59565b5f83015250602082015167ffffffffffffffff81111561213d5761213c611c55565b5b61214984828501611ce2565b602083015250604061215d84828501611d25565b604083015250606082015167ffffffffffffffff81111561218157612180611c55565b5b61218d84828501611daa565b60608301525060806121a184828501611dd7565b60808301525060a06121b584828501611dd7565b60a08301525060c082015167ffffffffffffffff8111156121d9576121d8611c55565b5b6121e584828501611deb565b60c08301525060e06121f984828501611f22565b60e08301525061010082015167ffffffffffffffff81111561221e5761221d611c55565b5b61222a84828501611daa565b6101008301525061012082015167ffffffffffffffff8111156122505761224f611c55565b5b61225c84828501611f97565b6101208301525061014061227284828501611dd7565b6101408301525061016061228884828501611f22565b6101608301525061018082015167ffffffffffffffff8111156122ae576122ad611c55565b5b6122ba848285016120bd565b6101808301525092915050565b5f6122d96122d484611c22565b611c08565b905080838252602082019050602084028301858111156122fc576122fb611c4d565b5b835b8181101561234357805167ffffffffffffffff81111561232157612320611ba6565b5b80860161232e89826120ea565b855260208501945050506020810190506122fe565b5050509392505050565b5f82601f83011261236157612360611ba6565b5b81516123718482602086016122c7565b91505092915050565b5f6040828403121561238f5761238e611c51565b5b6123996040611c08565b90505f82015167ffffffffffffffff8111156123b8576123b7611c55565b5b6123c484828501611daa565b5f8301525060206123d784828501612041565b60208301525092915050565b5f80604083850312156123f9576123f861152a565b5b5f83015167ffffffffffffffff8111156124165761241561152e565b5b6124228582860161234d565b925050602083015167ffffffffffffffff8111156124435761244261152e565b5b61244f8582860161237a565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6124908261158c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036124c2576124c1611a3a565b5b600182019050919050565b6124d681611551565b82525050565b5f6040820190506124ef5f8301856124cd565b6124fc6020830184611630565b9392505050565b5f602082840312156125185761251761152a565b5b5f61252584828501611d25565b91505092915050565b7f4661696c656420746f2064656c656761746500000000000000000000000000005f82015250565b5f612562601283611481565b915061256d8261252e565b602082019050919050565b5f6020820190508181035f83015261258f81612556565b9050919050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f6125ca601783611481565b91506125d582612596565b602082019050919050565b5f6020820190508181035f8301526125f7816125be565b9050919050565b5f60c0820190506126115f830189611710565b61261e60208301886124cd565b61262b60408301876124cd565b6126386060830186611630565b6126456080830185611630565b61265260a0830184611630565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61269b60028361265d565b91506126a682612667565b600282019050919050565b5f819050919050565b6126cb6126c682611707565b6126b1565b82525050565b5f6126db8261268f565b91506126e782856126ba565b6020820191506126f782846126ba565b6020820191508190509392505050565b5f60808201905061271a5f830187611710565b61272760208301866116df565b6127346040830185611710565b6127416060830184611710565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f61277e600e83611481565b91506127898261274a565b602082019050919050565b5f6020820190508181035f8301526127ab81612772565b9050919050565b5f6040820190506127c55f8301856124cd565b6127d260208301846124cd565b9392505050565b5f602082840312156127ee576127ed61152a565b5b5f6127fb84828501611dd7565b91505092915050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461282c81611a0a565b6128368186612804565b9450600182165f8114612850576001811461286557612897565b60ff1983168652811515820286019350612897565b61286e8561280e565b5f5b8381101561288f57815481890152600182019150602081019050612870565b838801955050505b50505092915050565b5f6128ab8284612820565b915081905092915050565b5f60a0820190506128c95f830188611710565b6128d66020830187611710565b6128e36040830186611710565b6128f06060830185611630565b6128fd60808301846124cd565b9695505050505050565b5f6129118261158c565b915061291c8361158c565b925082820190508082111561293457612933611a3a565b5b9291505056fea26469706673582212207fe4477c3d859b2693554fce34aa78b5b6178fed4358006f6720363c82c3e61a64736f6c63430008140033", } // LiquidStakingABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/precompile_constructor.abigen.go b/contracts/bindings/testing/precompile_constructor.abigen.go index 6de916b48..b797846d5 100644 --- a/contracts/bindings/testing/precompile_constructor.abigen.go +++ b/contracts/bindings/testing/precompile_constructor.abigen.go @@ -32,7 +32,7 @@ var ( // PrecompileConstructorMetaData contains all meta data concerning the PrecompileConstructor contract. var PrecompileConstructorMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"stakingModule\",\"outputs\":[{\"internalType\":\"contractIStakingModule\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea2646970667358221220a82988036ad4b985661f0390de6424b0e38ace000700a265b64053cd745ef6a664736f6c63430008140033", + Bin: "0x60a060405273d9a998cac66092748ffec7cfbd155aae1737c2ff73ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610056575f80fd5b5060805173ffffffffffffffffffffffffffffffffffffffff1663dcaf464a6040518163ffffffff1660e01b81526004015f60405180830381865afa1580156100a1573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906100c9919061028a565b506102d1565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61012a826100e4565b810181811067ffffffffffffffff82111715610149576101486100f4565b5b80604052505050565b5f61015b6100cf565b90506101678282610121565b919050565b5f67ffffffffffffffff821115610186576101856100f4565b5b602082029050602081019050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101c48261019b565b9050919050565b6101d4816101ba565b81146101de575f80fd5b50565b5f815190506101ef816101cb565b92915050565b5f6102076102028461016c565b610152565b9050808382526020820190506020840283018581111561022a57610229610197565b5b835b81811015610253578061023f88826101e1565b84526020840193505060208101905061022c565b5050509392505050565b5f82601f830112610271576102706100e0565b5b81516102818482602086016101f5565b91505092915050565b5f6020828403121561029f5761029e6100d8565b5b5f82015167ffffffffffffffff8111156102bc576102bb6100dc565b5b6102c88482850161025d565b91505092915050565b6080516101236102e85f395f604601526101235ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c8063504b82bf14602a575b5f80fd5b60306044565b604051603b919060d6565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000081565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f60a460a0609c846068565b6087565b6068565b9050919050565b5f60b3826090565b9050919050565b5f60c28260ab565b9050919050565b60d08160ba565b82525050565b5f60208201905060e75f83018460c9565b9291505056fea264697066735822122046e77f6a88a4be3cbc9d7ea46351722a7a2d37b3318c5b6d0788e34350d484aa64736f6c63430008140033", } // PrecompileConstructorABI is the input ABI used to generate the binding from. diff --git a/contracts/bindings/testing/solmate_erc20.abigen.go b/contracts/bindings/testing/solmate_erc20.abigen.go index 044cae7c7..b05c3b6da 100644 --- a/contracts/bindings/testing/solmate_erc20.abigen.go +++ b/contracts/bindings/testing/solmate_erc20.abigen.go @@ -32,7 +32,7 @@ var ( // SolmateERC20MetaData contains all meta data concerning the SolmateERC20 contract. var SolmateERC20MetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea26469706673582212205e042b28d312604c9eb9f461fa6a115a942807f99d76a60aa48515134e1ded3e64736f6c63430008140033", + Bin: "0x60e060405234801562000010575f80fd5b506040518060400160405280600581526020017f546f6b656e0000000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f544b0000000000000000000000000000000000000000000000000000000000008152506012825f90816200008f9190620003ca565b508160019081620000a19190620003ca565b508060ff1660808160ff16815250504660a08181525050620000c8620000d860201b60201c565b60c0818152505050505062000637565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f6040516200010a919062000556565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc646306040516020016200014b959493929190620005dc565b60405160208183030381529060405280519060200120905090565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620001e257607f821691505b602082108103620001f857620001f76200019d565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200025c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200021f565b6200026886836200021f565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620002b2620002ac620002a68462000280565b62000289565b62000280565b9050919050565b5f819050919050565b620002cd8362000292565b620002e5620002dc82620002b9565b8484546200022b565b825550505050565b5f90565b620002fb620002ed565b62000308818484620002c2565b505050565b5b818110156200032f57620003235f82620002f1565b6001810190506200030e565b5050565b601f8211156200037e576200034881620001fe565b620003538462000210565b8101602085101562000363578190505b6200037b620003728562000210565b8301826200030d565b50505b505050565b5f82821c905092915050565b5f620003a05f198460080262000383565b1980831691505092915050565b5f620003ba83836200038f565b9150826002028217905092915050565b620003d58262000166565b67ffffffffffffffff811115620003f157620003f062000170565b5b620003fd8254620001ca565b6200040a82828562000333565b5f60209050601f83116001811462000440575f84156200042b578287015190505b620004378582620003ad565b865550620004a6565b601f1984166200045086620001fe565b5f5b82811015620004795784890151825560018201915060208501945060208101905062000452565b8683101562000499578489015162000495601f8916826200038f565b8355505b6001600288020188555050505b505050505050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f8154620004d881620001ca565b620004e48186620004ae565b9450600182165f811462000501576001811462000517576200054d565b60ff19831686528115158202860193506200054d565b6200052285620004b8565b5f5b83811015620005455781548189015260018201915060208101905062000524565b838801955050505b50505092915050565b5f620005638284620004ca565b915081905092915050565b5f819050919050565b62000582816200056e565b82525050565b620005938162000280565b82525050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005c48262000599565b9050919050565b620005d681620005b8565b82525050565b5f60a082019050620005f15f83018862000577565b62000600602083018762000577565b6200060f604083018662000577565b6200061e606083018562000588565b6200062d6080830184620005cb565b9695505050505050565b60805160a05160c0516115b0620006625f395f6106d301525f61069f01525f61067a01526115b05ff3fe608060405234801561000f575f80fd5b50600436106100cd575f3560e01c806340c10f191161008a57806395d89b411161006457806395d89b4114610225578063a9059cbb14610243578063d505accf14610273578063dd62ed3e1461028f576100cd565b806340c10f19146101a957806370a08231146101c55780637ecebe00146101f5576100cd565b806306fdde03146100d1578063095ea7b3146100ef57806318160ddd1461011f57806323b872dd1461013d578063313ce5671461016d5780633644e5151461018b575b5f80fd5b6100d96102bf565b6040516100e69190610e03565b60405180910390f35b61010960048036038101906101049190610eb4565b61034a565b6040516101169190610f0c565b60405180910390f35b610127610437565b6040516101349190610f34565b60405180910390f35b61015760048036038101906101529190610f4d565b61043d565b6040516101649190610f0c565b60405180910390f35b610175610678565b6040516101829190610fb8565b60405180910390f35b61019361069c565b6040516101a09190610fe9565b60405180910390f35b6101c360048036038101906101be9190610eb4565b6106f8565b005b6101df60048036038101906101da9190611002565b610754565b6040516101ec9190610f34565b60405180910390f35b61020f600480360381019061020a9190611002565b610769565b60405161021c9190610f34565b60405180910390f35b61022d61077e565b60405161023a9190610e03565b60405180910390f35b61025d60048036038101906102589190610eb4565b61080a565b60405161026a9190610f0c565b60405180910390f35b61028d60048036038101906102889190611081565b610917565b005b6102a960048036038101906102a4919061111e565b610c04565b6040516102b69190610f34565b60405180910390f35b5f80546102cb90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546102f790611189565b80156103425780601f1061031957610100808354040283529160200191610342565b820191905f5260205f20905b81548152906001019060200180831161032557829003601f168201915b505050505081565b5f8160045f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104259190610f34565b60405180910390a36001905092915050565b60025481565b5f8060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461056a5782816104ed91906111e6565b60045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505b8260035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546105b691906111e6565b925050819055508260035f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516106649190610f34565b60405180910390a360019150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b5f7f000000000000000000000000000000000000000000000000000000000000000046146106d1576106cc610c24565b6106f3565b7f00000000000000000000000000000000000000000000000000000000000000005b905090565b6107028282610cae565b8173ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040516107489190610f34565b60405180910390a25050565b6003602052805f5260405f205f915090505481565b6005602052805f5260405f205f915090505481565b6001805461078b90611189565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790611189565b80156108025780601f106107d957610100808354040283529160200191610802565b820191905f5260205f20905b8154815290600101906020018083116107e557829003601f168201915b505050505081565b5f8160035f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461085791906111e6565b925050819055508160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516109059190610f34565b60405180910390a36001905092915050565b4284101561095a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095190611263565b60405180910390fd5b5f600161096561069c565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98a8a8a60055f8f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f815480929190600101919050558b6040516020016109ea96959493929190611290565b60405160208183030381529060405280519060200120604051602001610a11929190611363565b604051602081830303815290604052805190602001208585856040515f8152602001604052604051610a469493929190611399565b6020604051602081039080840390855afa158015610a66573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015610ad957508773ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90611426565b60405180910390fd5b8560045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051610bf39190610f34565b60405180910390a350505050505050565b6004602052815f5260405f20602052805f5260405f205f91509150505481565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f5f604051610c5491906114e0565b60405180910390207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc64630604051602001610c939594939291906114f6565b60405160208183030381529060405280519060200120905090565b8060025f828254610cbf9190611547565b925050819055508060035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d6d9190610f34565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015610db0578082015181840152602081019050610d95565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610dd582610d79565b610ddf8185610d83565b9350610def818560208601610d93565b610df881610dbb565b840191505092915050565b5f6020820190508181035f830152610e1b8184610dcb565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610e5082610e27565b9050919050565b610e6081610e46565b8114610e6a575f80fd5b50565b5f81359050610e7b81610e57565b92915050565b5f819050919050565b610e9381610e81565b8114610e9d575f80fd5b50565b5f81359050610eae81610e8a565b92915050565b5f8060408385031215610eca57610ec9610e23565b5b5f610ed785828601610e6d565b9250506020610ee885828601610ea0565b9150509250929050565b5f8115159050919050565b610f0681610ef2565b82525050565b5f602082019050610f1f5f830184610efd565b92915050565b610f2e81610e81565b82525050565b5f602082019050610f475f830184610f25565b92915050565b5f805f60608486031215610f6457610f63610e23565b5b5f610f7186828701610e6d565b9350506020610f8286828701610e6d565b9250506040610f9386828701610ea0565b9150509250925092565b5f60ff82169050919050565b610fb281610f9d565b82525050565b5f602082019050610fcb5f830184610fa9565b92915050565b5f819050919050565b610fe381610fd1565b82525050565b5f602082019050610ffc5f830184610fda565b92915050565b5f6020828403121561101757611016610e23565b5b5f61102484828501610e6d565b91505092915050565b61103681610f9d565b8114611040575f80fd5b50565b5f813590506110518161102d565b92915050565b61106081610fd1565b811461106a575f80fd5b50565b5f8135905061107b81611057565b92915050565b5f805f805f805f60e0888a03121561109c5761109b610e23565b5b5f6110a98a828b01610e6d565b97505060206110ba8a828b01610e6d565b96505060406110cb8a828b01610ea0565b95505060606110dc8a828b01610ea0565b94505060806110ed8a828b01611043565b93505060a06110fe8a828b0161106d565b92505060c061110f8a828b0161106d565b91505092959891949750929550565b5f806040838503121561113457611133610e23565b5b5f61114185828601610e6d565b925050602061115285828601610e6d565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806111a057607f821691505b6020821081036111b3576111b261115c565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6111f082610e81565b91506111fb83610e81565b9250828203905081811115611213576112126111b9565b5b92915050565b7f5045524d49545f444541444c494e455f455850495245440000000000000000005f82015250565b5f61124d601783610d83565b915061125882611219565b602082019050919050565b5f6020820190508181035f83015261127a81611241565b9050919050565b61128a81610e46565b82525050565b5f60c0820190506112a35f830189610fda565b6112b06020830188611281565b6112bd6040830187611281565b6112ca6060830186610f25565b6112d76080830185610f25565b6112e460a0830184610f25565b979650505050505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f61132d6002836112ef565b9150611338826112f9565b600282019050919050565b5f819050919050565b61135d61135882610fd1565b611343565b82525050565b5f61136d82611321565b9150611379828561134c565b602082019150611389828461134c565b6020820191508190509392505050565b5f6080820190506113ac5f830187610fda565b6113b96020830186610fa9565b6113c66040830185610fda565b6113d36060830184610fda565b95945050505050565b7f494e56414c49445f5349474e45520000000000000000000000000000000000005f82015250565b5f611410600e83610d83565b915061141b826113dc565b602082019050919050565b5f6020820190508181035f83015261143d81611404565b9050919050565b5f81905092915050565b5f819050815f5260205f209050919050565b5f815461146c81611189565b6114768186611444565b9450600182165f811461149057600181146114a5576114d7565b60ff19831686528115158202860193506114d7565b6114ae8561144e565b5f5b838110156114cf578154818901526001820191506020810190506114b0565b838801955050505b50505092915050565b5f6114eb8284611460565b915081905092915050565b5f60a0820190506115095f830188610fda565b6115166020830187610fda565b6115236040830186610fda565b6115306060830185610f25565b61153d6080830184611281565b9695505050505050565b5f61155182610e81565b915061155c83610e81565b9250828201905080821115611574576115736111b9565b5b9291505056fea2646970667358221220383dcd14dbb4c0b9470e469c942780d9bdeb224d65a2dfb2a8153bcffc7cd73064736f6c63430008140033", } // SolmateERC20ABI is the input ABI used to generate the binding from. diff --git a/e2e/testapp/polard/cmd/root.go b/e2e/testapp/polard/cmd/root.go index 5bb319d0e..9013f999d 100644 --- a/e2e/testapp/polard/cmd/root.go +++ b/e2e/testapp/polard/cmd/root.go @@ -59,6 +59,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/cosmos/cosmos-sdk/x/crisis" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" + evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" "pkg.berachain.dev/polaris/cosmos/crypto/keyring" From 511eb6c0d212503a0ea0391cff00d36f30e2d9b2 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 14:31:15 -0400 Subject: [PATCH 33/94] bing bong --- cosmos/config/config.go | 6 +++++- cosmos/x/evm/depinject.go | 3 +++ cosmos/x/evm/genesis_test.go | 3 +-- cosmos/x/evm/keeper/keeper.go | 20 ++++++-------------- cosmos/x/evm/keeper/processor_test.go | 3 +-- e2e/testapp/app.go | 11 ++--------- 6 files changed, 18 insertions(+), 28 deletions(-) diff --git a/cosmos/config/config.go b/cosmos/config/config.go index 39f3f714c..29dae1bce 100644 --- a/cosmos/config/config.go +++ b/cosmos/config/config.go @@ -27,6 +27,7 @@ import ( "github.com/spf13/cast" + "github.com/cosmos/cosmos-sdk/client/flags" servertypes "github.com/cosmos/cosmos-sdk/server/types" "github.com/ethereum/go-ethereum/node" @@ -177,7 +178,10 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { return nil, handleError(err) } if conf.Node.DataDir == "" { - conf.Node.DataDir = node.DefaultDataDir() + conf.Node.DataDir, err = getString(flags.FlagHome) + if err != nil { + return nil, handleError(err) + } } if conf.Node.KeyStoreDir, err = getString(flagKeyStoreDir); err != nil { return nil, handleError(err) diff --git a/cosmos/x/evm/depinject.go b/cosmos/x/evm/depinject.go index 09cf78de2..bfbb0cf8d 100644 --- a/cosmos/x/evm/depinject.go +++ b/cosmos/x/evm/depinject.go @@ -23,6 +23,7 @@ package evm import ( "cosmossdk.io/core/appmodule" "cosmossdk.io/depinject" + "cosmossdk.io/log" store "cosmossdk.io/store/types" servertypes "github.com/cosmos/cosmos-sdk/server/types" @@ -50,6 +51,7 @@ type DepInjectInput struct { Key *store.KVStoreKey AppOpts servertypes.AppOptions + Logger log.Logger CustomPrecompiles func() *ethprecompile.Injector `optional:"true"` QueryContextFn func() func(height int64, prove bool) (sdk.Context, error) @@ -86,6 +88,7 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { in.Key, in.CustomPrecompiles, in.QueryContextFn, + in.Logger, polarisCfg, ) m := NewAppModule(k, in.AccountKeeper) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 1b3731881..7de88f795 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -73,11 +73,10 @@ var _ = Describe("", func() { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, nil, + log.NewTestLogger(GinkgoT()), cfg, ) - k.Setup(log.NewTestLogger(GinkgoT())) - am = evm.NewAppModule(k, ak) }) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index f67bc6c89..6a1a2f639 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -51,8 +51,6 @@ type Keeper struct { // The (unexposed) key used to access the store from the Context. storeKey storetypes.StoreKey - - polarisCfg *config.Config } // NewKeeper creates new instances of the polaris Keeper. @@ -62,12 +60,12 @@ func NewKeeper( storeKey storetypes.StoreKey, pcs func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), + logger log.Logger, polarisCfg *config.Config, ) *Keeper { // We setup the keeper with some Cosmos standard sauce. k := &Keeper{ - storeKey: storeKey, - polarisCfg: polarisCfg, + storeKey: storeKey, } k.host = NewHost( @@ -78,19 +76,12 @@ func NewKeeper( qc, ) - return k -} - -// Setup sets up the plugins in the Host. It also build the Polaris EVM Provider. -func (k *Keeper) Setup( - logger log.Logger, -) { - node, err := polar.NewGethNetworkingStack(&k.polarisCfg.Node) + node, err := polar.NewGethNetworkingStack(&polarisCfg.Node) if err != nil { panic(err) } - k.polaris = polar.NewWithNetworkingStack(&k.polarisCfg.Polar, k.host, node, ethlog.FuncHandler( + k.polaris = polar.NewWithNetworkingStack(&polarisCfg.Polar, k.host, node, ethlog.FuncHandler( func(r *ethlog.Record) error { polarisGethLogger := logger.With("module", "polaris-geth") switch r.Lvl { //nolint:nolintlint,exhaustive // linter is bugged. @@ -104,6 +95,8 @@ func (k *Keeper) Setup( return nil }), ) + + return k } // Logger returns a module-specific logger. @@ -117,7 +110,6 @@ func (k *Keeper) GetPolaris() *polar.Polaris { } func (k *Keeper) SetClientCtx(clientContext client.Context) { - // k.host.GetTxPoolPlugin().(txpool.Plugin).SetClientContext(clientContext) k.host.GetEnginePlugin().(engine.Plugin).Start(clientContext) if err := k.polaris.Init(); err != nil { diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index d6621bdbb..190871bb2 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -98,10 +98,9 @@ var _ = Describe("Processor", func() { return ethprecompile.NewPrecompiles([]ethprecompile.Registrable{sc}...) }, nil, + log.NewTestLogger(GinkgoT()), cfg, ) - k.Setup(log.NewTestLogger(GinkgoT())) - ctx = ctx.WithBlockHeight(0) for _, plugin := range k.GetPolaris().Host().(keeper.Host).GetAllPlugins() { diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index f2d92535e..ce3becd9d 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -219,18 +219,11 @@ func NewPolarisApp( app.App = appBuilder.Build(db, traceStore, baseAppOptions...) proposalHandler := abci.NewDefaultProposalHandler(app) - - // TODO: MOVE EVM SETUP - // ----- BEGIN EVM SETUP ---------------------------------------------- - - // setup evm keeper and all of its plugins. - app.EVMKeeper.Setup( - logger, - ) - proposalHandler.SetPolaris(app.EVMKeeper.GetPolaris()) + app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) + opt := ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, From 8e7d4972829ca2d5cd0a1bfc97a5729b9cb8b573 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 14:32:05 -0400 Subject: [PATCH 34/94] order --- e2e/testapp/app.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index ce3becd9d..3313c0954 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -138,13 +138,14 @@ func NewPolarisApp( MakeAppConfig(bech32Prefix), depinject.Provide(evmtypes.ProvideEthereumTransactionGetSigners), depinject.Supply( - QueryContextFn(app), + // supply the application options appOpts, // supply the logger logger, // ADVANCED CONFIGURATION PrecompilesToInject(app), + QueryContextFn(app), // // AUTH // From 61b8e274d608216a645224baca11dfb8029a1293 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 14:56:41 -0400 Subject: [PATCH 35/94] format --- cosmos/x/evm/genesis_test.go | 10 +++++----- cosmos/x/evm/keeper/keeper.go | 21 ++++++++++----------- cosmos/x/evm/keeper/processor_test.go | 10 +++++----- e2e/testapp/app.go | 4 ++-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 7de88f795..9fc0494b7 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -111,17 +111,17 @@ var _ = Describe("", func() { Expect(err).ToNot(HaveOccurred()) }) It("should contain the same genesis header values", func() { - bp := k.GetPolaris().Host().GetBlockPlugin() + bp := k.Polaris().Host().GetBlockPlugin() expectedHeader := ethGen.ToBlock().Header() Expect(bp.GetHeaderByNumber(0)).To(Equal(expectedHeader)) }) It("should contain the correct chain config", func() { - actualConfig := k.GetPolaris().Host().GetConfigurationPlugin().ChainConfig() + actualConfig := k.Polaris().Host().GetConfigurationPlugin().ChainConfig() expectedConfig := ethGen.Config Expect(actualConfig).To(Equal(expectedConfig)) }) It("should have the correct balances", func() { - sp := k.GetPolaris().Host().GetStatePlugin() + sp := k.Polaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { balance := sp.GetBalance(addr) cmp := balance.Cmp(acc.Balance) @@ -129,7 +129,7 @@ var _ = Describe("", func() { } }) It("should have the correct code", func() { - sp := k.GetPolaris().Host().GetStatePlugin() + sp := k.Polaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { code := sp.GetCode(addr) cmp := bytes.Compare(code, acc.Code) @@ -137,7 +137,7 @@ var _ = Describe("", func() { } }) It("should have the correct hash", func() { - sp := k.GetPolaris().Host().GetStatePlugin() + sp := k.Polaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { for key, expectedHash := range acc.Storage { actualHash := sp.GetState(addr, key) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 6a1a2f639..2e54dd61a 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -46,10 +46,10 @@ type Keeper struct { // provider is the struct that houses the Polaris EVM. polaris *polar.Polaris - // The host contains various plugins that are are used to implement `core.PolarisHostChain`. + // host represents the host chain host Host - // The (unexposed) key used to access the store from the Context. + // TODO: remove this, because it's hacky af. storeKey storetypes.StoreKey } @@ -63,12 +63,7 @@ func NewKeeper( logger log.Logger, polarisCfg *config.Config, ) *Keeper { - // We setup the keeper with some Cosmos standard sauce. - k := &Keeper{ - storeKey: storeKey, - } - - k.host = NewHost( + host := NewHost( storeKey, ak, sk, @@ -81,7 +76,7 @@ func NewKeeper( panic(err) } - k.polaris = polar.NewWithNetworkingStack(&polarisCfg.Polar, k.host, node, ethlog.FuncHandler( + polaris := polar.NewWithNetworkingStack(&polarisCfg.Polar, host, node, ethlog.FuncHandler( func(r *ethlog.Record) error { polarisGethLogger := logger.With("module", "polaris-geth") switch r.Lvl { //nolint:nolintlint,exhaustive // linter is bugged. @@ -96,7 +91,11 @@ func NewKeeper( }), ) - return k + return &Keeper{ + polaris: polaris, + host: host, + storeKey: storeKey, + } } // Logger returns a module-specific logger. @@ -105,7 +104,7 @@ func (k *Keeper) Logger(ctx sdk.Context) log.Logger { } // GetPolaris returns the Polaris instance. -func (k *Keeper) GetPolaris() *polar.Polaris { +func (k *Keeper) Polaris() *polar.Polaris { return k.polaris } diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 190871bb2..fd2028ecd 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -103,7 +103,7 @@ var _ = Describe("Processor", func() { ) ctx = ctx.WithBlockHeight(0) - for _, plugin := range k.GetPolaris().Host().(keeper.Host).GetAllPlugins() { + for _, plugin := range k.Polaris().Host().(keeper.Host).GetAllPlugins() { plugin, hasInitGenesis := utils.GetAs[plugins.HasGenesis](plugin) if hasInitGenesis { plugin.InitGenesis(ctx, core.DefaultGenesis) @@ -164,11 +164,11 @@ var _ = Describe("Processor", func() { tx := coretypes.MustSignNewTx(key, signer, legacyTxData) addr, err := signer.Sender(tx) Expect(err).ToNot(HaveOccurred()) - k.GetPolaris().Host().GetStatePlugin().Reset(ctx) - k.GetPolaris().Host().GetStatePlugin().CreateAccount(addr) - k.GetPolaris().Host().GetStatePlugin().AddBalance(addr, + k.Polaris().Host().GetStatePlugin().Reset(ctx) + k.Polaris().Host().GetStatePlugin().CreateAccount(addr) + k.Polaris().Host().GetStatePlugin().AddBalance(addr, (&big.Int{}).Mul(big.NewInt(9000000000000000000), big.NewInt(999))) - k.GetPolaris().Host().GetStatePlugin().Finalize() + k.Polaris().Host().GetStatePlugin().Finalize() // create the contract // Zero out the meters. diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 3313c0954..308c5a9f2 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -220,7 +220,7 @@ func NewPolarisApp( app.App = appBuilder.Build(db, traceStore, baseAppOptions...) proposalHandler := abci.NewDefaultProposalHandler(app) - proposalHandler.SetPolaris(app.EVMKeeper.GetPolaris()) + proposalHandler.SetPolaris(app.EVMKeeper.Polaris()) app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) @@ -353,7 +353,7 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon } func (app *SimApp) Close() error { - if pl := app.EVMKeeper.GetPolaris(); pl != nil { + if pl := app.EVMKeeper.Polaris(); pl != nil { return pl.StopServices() } return nil From a4a40a311f69662d8602ea478ed76dc2d00b9c85 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 17:07:04 -0400 Subject: [PATCH 36/94] some cleanup --- cosmos/abci/prepare/default.go | 17 ++-- cosmos/config/config.go | 98 ++++++++++++++++++- cosmos/config/flags.go | 26 +++++ cosmos/config/template.go | 74 ++++++++++++++ cosmos/x/evm/depinject.go | 3 + cosmos/x/evm/genesis_test.go | 1 + cosmos/x/evm/keeper/host.go | 8 +- cosmos/x/evm/keeper/keeper.go | 11 ++- cosmos/x/evm/keeper/processor_test.go | 1 + cosmos/x/evm/plugins/configuration/plugin.go | 50 ++-------- .../evm/plugins/configuration/plugin_test.go | 83 ---------------- cosmos/x/evm/plugins/state/plugin.go | 15 ++- cosmos/x/evm/plugins/txpool/plugin.go | 7 +- cosmos/x/evm/plugins/txpool/serializer.go | 12 +-- e2e/testapp/app.go | 1 - eth/miner/miner.go | 3 + eth/polar/config.go | 29 ++---- 17 files changed, 260 insertions(+), 179 deletions(-) delete mode 100644 cosmos/x/evm/plugins/configuration/plugin_test.go diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 1838bb7a8..447eafc54 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -70,9 +70,11 @@ func (h *Handler) PrepareProposal( totalTxBytes int64 totalTxGas uint64 ) - - txp, _ := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) - txs := h.txPoolTransactions(ctx) + txs := h.txPoolTransactions() + txp, ok := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) + if !ok { + panic("big bad wolf") + } for lazyTx := txs.Peek(); lazyTx != nil; lazyTx = txs.Peek() { tx := lazyTx.Resolve() @@ -116,14 +118,7 @@ func (h *Handler) PrepareProposal( } // txPoolTransactions returns a sorted list of transactions from the txpool. -func (h *Handler) txPoolTransactions(ctx sdk.Context) *miner.TransactionsByPriceAndNonce { - // TODO: this is definitely big bad and should be fixed. - // We should prime the blockchain object after app.Load(). - if h.polaris.TxPool() == nil { - ctx.Logger().Error("waiting for txpool to be initialized, proposing empty block") - return &miner.TransactionsByPriceAndNonce{} - } - +func (h *Handler) txPoolTransactions() *miner.TransactionsByPriceAndNonce { pending := h.polaris.TxPool().Pending(false) return miner.NewTransactionsByPriceAndNonce(types.LatestSigner( h.polaris.Host().GetConfigurationPlugin().ChainConfig(), diff --git a/cosmos/config/config.go b/cosmos/config/config.go index 29dae1bce..639324c72 100644 --- a/cosmos/config/config.go +++ b/cosmos/config/config.go @@ -38,9 +38,12 @@ import ( // DefaultConfig returns the default configuration for a polaris chain. func DefaultConfig() *Config { + nodeCfg := *polar.DefaultGethNodeConfig() + nodeCfg.DataDir = "" + nodeCfg.KeyStoreDir = "" return &Config{ Polar: *polar.DefaultConfig(), - Node: *polar.DefaultGethNodeConfig(), + Node: nodeCfg, } } @@ -77,6 +80,24 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { getInt := func(key string) (int, error) { return cast.ToIntE(opts.Get(key)) } getInt64 := func(key string) (int64, error) { return cast.ToInt64E(opts.Get(key)) } getUint64 := func(key string) (uint64, error) { return cast.ToUint64E(opts.Get(key)) } + getUint64Ptr := func(key string) (*uint64, error) { + num, _err := cast.ToUint64E(opts.Get(key)) + if _err != nil { + return nil, _err + } + return &num, nil + } + getBigInt := func(key string) (*big.Int, error) { + str, _err := cast.ToStringE(opts.Get(key)) + if _err != nil { + return nil, _err + } + num, ok := new(big.Int).SetString(str, 10) //nolint:gomnd // base 10. + if !ok { + return nil, fmt.Errorf("invalid big.Int string: %s", str) + } + return num, nil + } getFloat64 := func(key string) (float64, error) { return cast.ToFloat64E(opts.Get(key)) } getBool := func(key string) (bool, error) { return cast.ToBoolE(opts.Get(key)) } getStringSlice := func(key string) ([]string, error) { return cast.ToStringSliceE(opts.Get(key)) } @@ -93,6 +114,81 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { return nil, handleError(err) } + // Polar Chain settings + if conf.Polar.Chain.ChainID, err = getBigInt(flagChainID); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.HomesteadBlock, err = getBigInt(flagHomesteadBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.DAOForkBlock, err = getBigInt(flagDAOForkBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.DAOForkSupport, err = getBool(flagDAOForkSupport); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.EIP150Block, err = getBigInt(flagEIP150Block); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.EIP155Block, err = getBigInt(flagEIP155Block); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.EIP158Block, err = getBigInt(flagEIP158Block); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.ByzantiumBlock, err = getBigInt(flagByzantiumBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.ConstantinopleBlock, err = getBigInt(flagConstantinopleBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.PetersburgBlock, err = getBigInt(flagPetersburgBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.IstanbulBlock, err = getBigInt(flagIstanbulBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.MuirGlacierBlock, err = getBigInt(flagMuirGlacierBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.BerlinBlock, err = getBigInt(flagBerlinBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.LondonBlock, err = getBigInt(flagLondonBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.ArrowGlacierBlock, err = getBigInt(flagArrowGlacierBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.GrayGlacierBlock, err = getBigInt(flagGrayGlacierBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.MergeNetsplitBlock, err = getBigInt(flagMergeNetsplitBlock); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.ShanghaiTime, err = getUint64Ptr(flagShanghaiTime); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.CancunTime, err = getUint64Ptr(flagCancunTime); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.PragueTime, err = getUint64Ptr(flagPragueTime); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.VerkleTime, err = getUint64Ptr(flagVerkleTime); err != nil { + return nil, handleError(err) + } + + if conf.Polar.Chain.TerminalTotalDifficulty, err = getBigInt(flagTerminalTotalDifficulty); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.TerminalTotalDifficultyPassed, err = getBool(flagTerminalTotalDifficultyPassed); err != nil { + return nil, handleError(err) + } + if conf.Polar.Chain.IsDevMode, err = getBool(flagIsDevMode); err != nil { + return nil, handleError(err) + } + // Polar.GPO settings if conf.Polar.GPO.Blocks, err = getInt(flagBlocks); err != nil { return nil, handleError(err) diff --git a/cosmos/config/flags.go b/cosmos/config/flags.go index b7b6e30b3..0386d1386 100644 --- a/cosmos/config/flags.go +++ b/cosmos/config/flags.go @@ -81,4 +81,30 @@ const ( flagAccountQueue = "polaris.polar.legacy-tx-pool.account-queue" flagGlobalQueue = "polaris.polar.legacy-tx-pool.global-queue" flagLifetime = "polaris.polar.legacy-tx-pool.lifetime" + + // ethereum. + flagChainID = "polaris.polar.chain.chain-id" + flagHomesteadBlock = "polaris.polar.chain.homestead-block" + flagDAOForkBlock = "polaris.polar.chain.dao-fork-block" + flagDAOForkSupport = "polaris.polar.chain.dao-fork-support" + flagEIP150Block = "polaris.polar.chain.eip150-block" + flagEIP155Block = "polaris.polar.chain.eip155-block" + flagEIP158Block = "polaris.polar.chain.eip158-block" + flagByzantiumBlock = "polaris.polar.chain.byzantium-block" + flagConstantinopleBlock = "polaris.polar.chain.constantinople-block" + flagPetersburgBlock = "polaris.polar.chain.petersburg-block" + flagIstanbulBlock = "polaris.polar.chain.istanbul-block" + flagMuirGlacierBlock = "polaris.polar.chain.muir-glacier-block" + flagBerlinBlock = "polaris.polar.chain.berlin-block" + flagLondonBlock = "polaris.polar.chain.london-block" + flagArrowGlacierBlock = "polaris.polar.chain.arrow-glacier-block" + flagGrayGlacierBlock = "polaris.polar.chain.gray-glacier-block" + flagMergeNetsplitBlock = "polaris.polar.chain.merge-netsplit-block" + flagShanghaiTime = "polaris.polar.chain.shanghai-time" + flagCancunTime = "polaris.polar.chain.cancun-time" + flagPragueTime = "polaris.polar.chain.prague-time" + flagVerkleTime = "polaris.polar.chain.verkle-time" + flagTerminalTotalDifficulty = "polaris.polar.chain.terminal-total-difficulty" + flagTerminalTotalDifficultyPassed = "polaris.polar.chain.terminal-total-difficulty-passed" + flagIsDevMode = "polaris.polar.chain.is-dev-mode" ) diff --git a/cosmos/config/template.go b/cosmos/config/template.go index 7886e7f87..25fc28470 100644 --- a/cosmos/config/template.go +++ b/cosmos/config/template.go @@ -29,6 +29,80 @@ const ( # General Polaris settings [polaris] +[polaris.polar.chain] +chain-id = "{{ .Polaris.Polar.Chain.ChainID }}" + +# Homestead switch block +homestead-block = "{{ .Polaris.Polar.Chain.HomesteadBlock }}" + +# DAO fork switch block +dao-fork-block = "{{ .Polaris.Polar.Chain.DAOForkBlock }}" + +# Whether to support DAO fork +dao-fork-support = {{ .Polaris.Polar.Chain.DAOForkSupport }} + +# EIP150 switch block +eip150-block = "{{ .Polaris.Polar.Chain.EIP150Block }}" + +# EIP155 switch block +eip155-block = "{{ .Polaris.Polar.Chain.EIP155Block }}" + +# EIP158 switch block +eip158-block = "{{ .Polaris.Polar.Chain.EIP158Block }}" + +# Byzanitum switch block +byzantium-block = "{{ .Polaris.Polar.Chain.ByzantiumBlock }}" + +# Constantinople switch block +constantinople-block = "{{ .Polaris.Polar.Chain.ConstantinopleBlock }}" + +# Petersburg switch block +petersburg-block = "{{ .Polaris.Polar.Chain.PetersburgBlock }}" + +# Istanbul switch block +istanbul-block = "{{ .Polaris.Polar.Chain.IstanbulBlock }}" + +# Muir Glacier switch block +muir-glacier-block = "{{ .Polaris.Polar.Chain.MuirGlacierBlock }}" + +# Berlin switch block +berlin-block = "{{ .Polaris.Polar.Chain.BerlinBlock }}" + +# London switch block +london-block = "{{ .Polaris.Polar.Chain.LondonBlock }}" + +# Arrow Glacier switch block +arrow-glacier-block = "{{ .Polaris.Polar.Chain.ArrowGlacierBlock }}" + +# Gray Glacier switch block +gray-glacier-block = "{{ .Polaris.Polar.Chain.GrayGlacierBlock }}" + +# Merge Netsplit switch block +merge-netsplit-block = "{{ .Polaris.Polar.Chain.MergeNetsplitBlock }}" + +# Shanghai switch time (nil == no fork, 0 = already on shanghai) +shanghai-time = "{{ .Polaris.Polar.Chain.ShanghaiTime }}" + +# Cancun switch time (nil == no fork, 0 = already on cancun) +cancun-time = "{{ .Polaris.Polar.Chain.CancunTime }}" + +# Prague switch time (nil == no fork, 0 = already on prague) +prague-time = "{{ .Polaris.Polar.Chain.PragueTime }}" + +# Verkle switch time (nil == no fork, 0 = already on verkle) +verkle-time = "{{ .Polaris.Polar.Chain.VerkleTime }}" + +# Terminal total difficulty +terminal-total-difficulty = "{{ .Polaris.Polar.Chain.TerminalTotalDifficulty }}" + +# Whether terminal total difficulty has passed +terminal-total-difficulty-passed = {{ .Polaris.Polar.Chain.TerminalTotalDifficultyPassed }} + +# DevMode enabled +is-dev-mode = {{ .Polaris.Polar.Chain.IsDevMode }} + + + [polaris.polar] # Gas cap for RPC requests rpc-gas-cap = "{{ .Polaris.Polar.RPCGasCap }}" diff --git a/cosmos/x/evm/depinject.go b/cosmos/x/evm/depinject.go index bfbb0cf8d..2535273b1 100644 --- a/cosmos/x/evm/depinject.go +++ b/cosmos/x/evm/depinject.go @@ -26,6 +26,7 @@ import ( "cosmossdk.io/log" store "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/client" servertypes "github.com/cosmos/cosmos-sdk/server/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -54,6 +55,7 @@ type DepInjectInput struct { Logger log.Logger CustomPrecompiles func() *ethprecompile.Injector `optional:"true"` QueryContextFn func() func(height int64, prove bool) (sdk.Context, error) + TxConfig client.TxConfig AccountKeeper AccountKeeper StakingKeeper StakingKeeper @@ -89,6 +91,7 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { in.CustomPrecompiles, in.QueryContextFn, in.Logger, + in.TxConfig, polarisCfg, ) m := NewAppModule(k, in.AccountKeeper) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 9fc0494b7..036d94382 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -74,6 +74,7 @@ var _ = Describe("", func() { }, nil, log.NewTestLogger(GinkgoT()), + nil, cfg, ) diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 2eb8f24b0..085785630 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -23,8 +23,10 @@ package keeper import ( storetypes "cosmossdk.io/store/types" + "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" + "pkg.berachain.dev/polaris/cosmos/config" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/configuration" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine" @@ -66,21 +68,23 @@ type host struct { // Newhost creates new instances of the plugin host. func NewHost( + cfg config.Config, storeKey storetypes.StoreKey, ak state.AccountKeeper, sk block.StakingKeeper, precompiles func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), + txConfig client.TxConfig, ) Host { // We setup the host with some Cosmos standard sauce. h := &host{} // Build the Plugins h.bp = block.NewPlugin(storeKey, sk) - h.cp = configuration.NewPlugin(storeKey) + h.cp = configuration.NewPlugin(&cfg.Polar.Chain) h.ep = engine.NewPlugin() h.gp = gas.NewPlugin() - h.txp = txpool.NewPlugin() + h.txp = txpool.NewPlugin(txConfig) h.pcs = precompiles h.storeKey = storeKey h.ak = ak diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 2e54dd61a..96401abfd 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -61,14 +61,17 @@ func NewKeeper( pcs func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), logger log.Logger, + txConfig client.TxConfig, polarisCfg *config.Config, ) *Keeper { host := NewHost( + *polarisCfg, storeKey, ak, sk, pcs, qc, + txConfig, ) node, err := polar.NewGethNetworkingStack(&polarisCfg.Node) @@ -91,6 +94,10 @@ func NewKeeper( }), ) + if err = polaris.Init(); err != nil { + panic(err) + } + return &Keeper{ polaris: polaris, host: host, @@ -111,10 +118,6 @@ func (k *Keeper) Polaris() *polar.Polaris { func (k *Keeper) SetClientCtx(clientContext client.Context) { k.host.GetEnginePlugin().(engine.Plugin).Start(clientContext) - if err := k.polaris.Init(); err != nil { - panic(err) - } - if err := k.polaris.StartServices(); err != nil { panic(err) } diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index fd2028ecd..d721ad6d8 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -99,6 +99,7 @@ var _ = Describe("Processor", func() { }, nil, log.NewTestLogger(GinkgoT()), + nil, cfg, ) ctx = ctx.WithBlockHeight(0) diff --git a/cosmos/x/evm/plugins/configuration/plugin.go b/cosmos/x/evm/plugins/configuration/plugin.go index 504af0fd8..5e34e8c08 100644 --- a/cosmos/x/evm/plugins/configuration/plugin.go +++ b/cosmos/x/evm/plugins/configuration/plugin.go @@ -23,70 +23,32 @@ package configuration import ( "context" - storetypes "cosmossdk.io/store/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" - "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/params" - "pkg.berachain.dev/polaris/lib/encoding" ) // Plugin is the interface that must be implemented by the plugin. type Plugin interface { - plugins.HasGenesis core.ConfigurationPlugin - SetChainConfig(*params.ChainConfig) } // plugin implements the core.ConfigurationPlugin interface. type plugin struct { - storeKey storetypes.StoreKey - paramsStore storetypes.KVStore + chainConfig *params.ChainConfig } // NewPlugin returns a new plugin instance. -func NewPlugin(storeKey storetypes.StoreKey) Plugin { +func NewPlugin(chainConfig *params.ChainConfig) Plugin { return &plugin{ - storeKey: storeKey, + chainConfig: chainConfig, } } -// InitGenesis performs genesis initialization for the evm module. It returns -// no validator updates. -func (p *plugin) InitGenesis(ctx sdk.Context, ethGen *core.Genesis) { - p.Prepare(ctx) - p.SetChainConfig(ethGen.Config) -} - -// ExportGenesis returns the exported genesis state as raw bytes for the evm -// module. -func (p *plugin) ExportGenesis(ctx sdk.Context, ethGen *core.Genesis) { - p.Prepare(ctx) - ethGen.Config = p.ChainConfig() -} - -// Prepare implements the core.ConfigurationPlugin interface. -func (p *plugin) Prepare(ctx context.Context) { - sCtx := sdk.UnwrapSDKContext(ctx) - p.paramsStore = sCtx.KVStore(p.storeKey) +func (p *plugin) Prepare(context.Context) { + // no-op } // GetChainConfig is used to get the genesis info of the Ethereum chain. func (p *plugin) ChainConfig() *params.ChainConfig { - bz := p.paramsStore.Get([]byte{types.ChainConfigPrefix}) - if bz == nil { - return nil - } - return encoding.MustUnmarshalJSON[params.ChainConfig](bz) -} - -// GetEthGenesis is used to get the genesis info of the Ethereum chain. -func (p *plugin) SetChainConfig(chainConfig *params.ChainConfig) { - p.paramsStore.Set( - []byte{types.ChainConfigPrefix}, - encoding.MustMarshalJSON[params.ChainConfig](*chainConfig), - ) + return p.chainConfig } diff --git a/cosmos/x/evm/plugins/configuration/plugin_test.go b/cosmos/x/evm/plugins/configuration/plugin_test.go deleted file mode 100644 index aba8f3518..000000000 --- a/cosmos/x/evm/plugins/configuration/plugin_test.go +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 configuration - -import ( - "testing" - - storetypes "cosmossdk.io/store/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - testutil "pkg.berachain.dev/polaris/cosmos/testing/utils" - "pkg.berachain.dev/polaris/eth/params" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestConfigurationPlugin(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "cosmos/x/evm/plugins/configuration") -} - -var _ = Describe("Plugin", func() { - var ( - p *plugin - ctx sdk.Context - ) - - BeforeEach(func() { - ctx = testutil.NewContext() - storeKey := storetypes.NewKVStoreKey("evm") - p = &plugin{ - storeKey: storeKey, - paramsStore: ctx.KVStore(storeKey), - } - }) - - Describe("Prepare", func() { - It("should initialize the params store", func() { - p.Prepare(ctx) - - // Check that the params store is initialized. - expect := ctx.KVStore(p.storeKey) - Expect(p.paramsStore).To(Equal(expect)) - }) - }) - - Describe("ChainConfig", func() { - Context("when the params store is empty", func() { - It("should return nil", func() { - config := p.ChainConfig() - Expect(config).To(BeNil()) - }) - }) - - Context("when the params store contains valid params", func() { - It("should return the chain config", func() { - p.SetChainConfig(params.DefaultChainConfig) - config := p.ChainConfig() - Expect(config).To(Equal(params.DefaultChainConfig)) - }) - }) - }) -}) diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index ad066a079..99b34aade 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -26,6 +26,11 @@ import ( "math/big" "sync" + dbm "github.com/cosmos/cosmos-db" + + "cosmossdk.io/log" + "cosmossdk.io/store" + storemetrics "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -532,7 +537,15 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { // TODO: the GTE may be hiding a larger issue with the timing of the NewHead channel stuff. // Investigate and hopefully remove this GTE. if int64Number >= p.ctx.BlockHeight() { - ctx, _ = p.ctx.CacheContext() + // Should only happen at chain startup + if p.ctx.MultiStore() == nil { + // TODO: HACKY AF + ctx = ctx.WithMultiStore( + store.NewCommitMultiStore(dbm.NewMemDB(), log.NewNopLogger(), storemetrics.NewNoOpMetrics())). + WithEventManager(sdk.NewEventManager()) + } else { + ctx, _ = p.ctx.CacheContext() + } } else { // Get the query context at the given height. var err error diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index faf34ff65..890924281 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -57,8 +57,10 @@ type plugin struct { } // NewPlugin returns a new transaction pool plugin. -func NewPlugin() Plugin { - return &plugin{} +func NewPlugin(txConfig client.TxConfig) Plugin { + return &plugin{ + serializer: newSerializer(txConfig), + } } // GetHandler implements the Plugin interface. @@ -76,7 +78,6 @@ func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, erro // Setup implements the Plugin interface. func (p *plugin) Start(logger log.Logger, txpool *txpool.TxPool, ctx client.Context) { - p.serializer = newSerializer(ctx) p.TxPool = txpool p.handler = newHandler(ctx, txpool, p.serializer, logger) diff --git a/cosmos/x/evm/plugins/txpool/serializer.go b/cosmos/x/evm/plugins/txpool/serializer.go index bacf686a0..a4b393313 100644 --- a/cosmos/x/evm/plugins/txpool/serializer.go +++ b/cosmos/x/evm/plugins/txpool/serializer.go @@ -31,12 +31,12 @@ import ( ) type serializer struct { - clientCtx client.Context + txConfig client.TxConfig } -func newSerializer(clientCtx client.Context) *serializer { +func newSerializer(txConfig client.TxConfig) *serializer { return &serializer{ - clientCtx: clientCtx, + txConfig: txConfig, } } @@ -44,9 +44,9 @@ func newSerializer(clientCtx client.Context) *serializer { func (s *serializer) SerializeToSdkTx(signedTx *coretypes.Transaction) (sdk.Tx, error) { // TODO: do we really need to use extensions for anything? Since we // are using the standard ante handler stuff I don't think we actually need to. - tx := s.clientCtx.TxConfig.NewTxBuilder() + tx := s.txConfig.NewTxBuilder() - // We can also retrieve the gaslimit for the transaction from the ethereum transaction. + // We can also retrievepothe gaslimit for the transaction from the ethereum transaction. tx.SetGasLimit(signedTx.Gas()) // Thirdly, we set the nonce equal to the nonce of the transaction and also derive the PubKey @@ -103,7 +103,7 @@ func (s *serializer) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, } // Then we use the clientCtx.TxConfig.TxEncoder() to encode the Cosmos transaction into bytes. - txBytes, err := s.clientCtx.TxConfig.TxEncoder()(cosmosTx) + txBytes, err := s.txConfig.TxEncoder()(cosmosTx) if err != nil { return nil, err } diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 308c5a9f2..abcd87fc1 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -138,7 +138,6 @@ func NewPolarisApp( MakeAppConfig(bech32Prefix), depinject.Provide(evmtypes.ProvideEthereumTransactionGetSigners), depinject.Supply( - // supply the application options appOpts, // supply the logger diff --git a/eth/miner/miner.go b/eth/miner/miner.go index 474cf3bdc..1356f6929 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -113,6 +113,9 @@ func New(backend Backend) Miner { // TODO: deprecate and properly recalculate in prepare proposal, this is fine for now though. func (m *miner) NextBaseFee() *big.Int { + if m.pendingHeader == nil { + return big.NewInt(0) + } return eip1559.CalcBaseFee(m.cp.ChainConfig(), m.pendingHeader) } diff --git a/eth/polar/config.go b/eth/polar/config.go index 2ebe7e8df..96b9d7096 100644 --- a/eth/polar/config.go +++ b/eth/polar/config.go @@ -21,16 +21,14 @@ package polar import ( - "fmt" "math/big" - "os" "time" - "github.com/BurntSushi/toml" - "github.com/ethereum/go-ethereum/core/txpool/legacypool" "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/gasprice" + + "pkg.berachain.dev/polaris/eth/params" ) const ( @@ -45,8 +43,8 @@ const ( func DefaultConfig() *Config { gpoConfig := ethconfig.FullNodeGPO gpoConfig.Default = big.NewInt(gpoDefault) - return &Config{ + Chain: *params.DefaultChainConfig, GPO: gpoConfig, LegacyTxPool: legacypool.DefaultConfig, RPCGasCap: ethconfig.Defaults.RPCGasCap, @@ -57,6 +55,9 @@ func DefaultConfig() *Config { // Config represents the configurable parameters for Polaris. type Config struct { + // The chain configuration to use. + Chain params.ChainConfig + // Gas Price Oracle config. GPO gasprice.Config @@ -73,21 +74,3 @@ type Config struct { // send-transaction variants. The unit is ether. RPCTxFeeCap float64 `toml:""` } - -// LoadConfigFromFilePath reads in a Polaris config file from the fileystem. -func LoadConfigFromFilePath(filename string) (*Config, error) { - var config Config - - // Read the TOML file - bytes, err := os.ReadFile(filename) //#nosec: G304 // required. - if err != nil { - return nil, fmt.Errorf("error reading file %s: %w", filename, err) - } - - // Unmarshal the TOML data into a struct - if err = toml.Unmarshal(bytes, &config); err != nil { - return nil, fmt.Errorf("error parsing TOML data: %w", err) - } - - return &config, nil -} From 065a61a1449daff4e9af0801bcfdc0e571c7e3f0 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 21:24:57 -0400 Subject: [PATCH 37/94] push --- eth/miner/miner.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eth/miner/miner.go b/eth/miner/miner.go index 1356f6929..a8dce1ecd 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -222,10 +222,6 @@ func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { m.pendingHeader, ) - // // We update the base fee in the txpool to the next base fee. - // // TODO: Move to prepare proposal - // m.txPool.SetBaseFee(m.pendingHeader.BaseFee) - return m.pendingHeader } From 558edc7635cfa4d874b42b36c646921a29adc059 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 21:28:24 -0400 Subject: [PATCH 38/94] remove chain config test from genesis --- cosmos/x/evm/genesis_test.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 036d94382..ece8ed552 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -116,11 +116,6 @@ var _ = Describe("", func() { expectedHeader := ethGen.ToBlock().Header() Expect(bp.GetHeaderByNumber(0)).To(Equal(expectedHeader)) }) - It("should contain the correct chain config", func() { - actualConfig := k.Polaris().Host().GetConfigurationPlugin().ChainConfig() - expectedConfig := ethGen.Config - Expect(actualConfig).To(Equal(expectedConfig)) - }) It("should have the correct balances", func() { sp := k.Polaris().Host().GetStatePlugin() for addr, acc := range ethGen.Alloc { From 5cb4afffabf5a9e031d5ad6859692131f1a49967 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 21:55:50 -0400 Subject: [PATCH 39/94] bing bong --- cosmos/go.mod | 9 ++++++--- cosmos/go.sum | 4 ++-- cosmos/x/evm/plugins/state/plugin.go | 15 +++------------ e2e/localnet/go.mod | 2 +- e2e/localnet/go.sum | 4 ++-- e2e/precompile/go.mod | 2 +- e2e/precompile/go.sum | 4 ++-- e2e/testapp/go.mod | 2 +- eth/go.mod | 3 +-- eth/go.sum | 6 ++---- 10 files changed, 21 insertions(+), 30 deletions(-) diff --git a/cosmos/go.mod b/cosmos/go.mod index b62befdf3..cefc33e12 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) @@ -47,7 +47,10 @@ require ( pkg.berachain.dev/polaris/lib v0.0.0-20230925142347-326426fa61f6 ) -require github.com/spf13/cast v1.5.1 +require ( + github.com/spf13/cast v1.5.1 + github.com/stretchr/testify v1.8.4 +) require ( filippo.io/edwards25519 v1.0.0 // indirect @@ -209,7 +212,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/status-im/keycard-go v0.2.0 // indirect - github.com/stretchr/testify v1.8.4 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect diff --git a/cosmos/go.sum b/cosmos/go.sum index d1817da28..5bd9e84d1 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -113,8 +113,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= -github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index 99b34aade..3938b7e40 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -26,11 +26,6 @@ import ( "math/big" "sync" - dbm "github.com/cosmos/cosmos-db" - - "cosmossdk.io/log" - "cosmossdk.io/store" - storemetrics "cosmossdk.io/store/metrics" storetypes "cosmossdk.io/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -537,15 +532,11 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { // TODO: the GTE may be hiding a larger issue with the timing of the NewHead channel stuff. // Investigate and hopefully remove this GTE. if int64Number >= p.ctx.BlockHeight() { - // Should only happen at chain startup if p.ctx.MultiStore() == nil { - // TODO: HACKY AF - ctx = ctx.WithMultiStore( - store.NewCommitMultiStore(dbm.NewMemDB(), log.NewNopLogger(), storemetrics.NewNoOpMetrics())). - WithEventManager(sdk.NewEventManager()) - } else { - ctx, _ = p.ctx.CacheContext() + return nil, errors.New("no multi-store set in host chain") } + + ctx, _ = p.ctx.CacheContext() } else { // Get the query context at the given height. var err error diff --git a/e2e/localnet/go.mod b/e2e/localnet/go.mod index 75248f471..e6af9b87b 100644 --- a/e2e/localnet/go.mod +++ b/e2e/localnet/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/e2e/localnet go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e require ( github.com/docker/docker v24.0.5+incompatible diff --git a/e2e/localnet/go.sum b/e2e/localnet/go.sum index b5a6189f4..51bc6f115 100644 --- a/e2e/localnet/go.sum +++ b/e2e/localnet/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= -github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/precompile/go.mod b/e2e/precompile/go.mod index 084b2e0ba..a3190ddaa 100644 --- a/e2e/precompile/go.mod +++ b/e2e/precompile/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/e2e/precompile/go.sum b/e2e/precompile/go.sum index fdaa68b76..bf8d0fbdc 100644 --- a/e2e/precompile/go.sum +++ b/e2e/precompile/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= -github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index dc17268fa..fefaba3b5 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/eth/go.mod b/eth/go.mod index 1bc552924..94a5df89a 100644 --- a/eth/go.mod +++ b/eth/go.mod @@ -3,10 +3,9 @@ module pkg.berachain.dev/polaris/eth go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50 +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e require ( - github.com/BurntSushi/toml v1.3.2 github.com/ethereum/go-ethereum v1.13.1 github.com/holiman/uint256 v1.2.3 github.com/onsi/ginkgo/v2 v2.12.1 diff --git a/eth/go.sum b/eth/go.sum index e7cd9e06f..548c9a657 100644 --- a/eth/go.sum +++ b/eth/go.sum @@ -1,5 +1,3 @@ -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -14,8 +12,8 @@ github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7D github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= 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/polaris-geth v0.0.0-20230926021825-5556e5557a50 h1:E9s3qjJk9VJsWV2VA+I2dVdpsCg/6VO7TNDVmlBhU2E= -github.com/berachain/polaris-geth v0.0.0-20230926021825-5556e5557a50/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= +github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= From 935315805851ec19f6685297d94653892ac6417c Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 22:15:42 -0400 Subject: [PATCH 40/94] update app.tomls --- cosmos/config/template.go | 1 - e2e/hive/clients/polard/config/app.toml | 74 ++++++++++++++++++++++++ e2e/precompile/polard/config/app.toml | 74 ++++++++++++++++++++++++ e2e/testapp/docker/local/config/app.toml | 74 ++++++++++++++++++++++++ e2e/testapp/entrypoint.sh | 4 +- 5 files changed, 224 insertions(+), 3 deletions(-) diff --git a/cosmos/config/template.go b/cosmos/config/template.go index 25fc28470..1d6ff6743 100644 --- a/cosmos/config/template.go +++ b/cosmos/config/template.go @@ -102,7 +102,6 @@ terminal-total-difficulty-passed = {{ .Polaris.Polar.Chain.TerminalTotalDifficul is-dev-mode = {{ .Polaris.Polar.Chain.IsDevMode }} - [polaris.polar] # Gas cap for RPC requests rpc-gas-cap = "{{ .Polaris.Polar.RPCGasCap }}" diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index 883dcffa1..d6c0ff9c5 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -230,6 +230,79 @@ max-txs = 5000 # General Polaris settings [polaris] +[polaris.polar.chain] +chain-id = "2061" + +# Homestead switch block +homestead-block = "0" + +# DAO fork switch block +dao-fork-block = "0" + +# Whether to support DAO fork +dao-fork-support = true + +# EIP150 switch block +eip150-block = "0" + +# EIP155 switch block +eip155-block = "0" + +# EIP158 switch block +eip158-block = "0" + +# Byzanitum switch block +byzantium-block = "0" + +# Constantinople switch block +constantinople-block = "0" + +# Petersburg switch block +petersburg-block = "0" + +# Istanbul switch block +istanbul-block = "0" + +# Muir Glacier switch block +muir-glacier-block = "" + +# Berlin switch block +berlin-block = "0" + +# London switch block +london-block = "0" + +# Arrow Glacier switch block +arrow-glacier-block = "0" + +# Gray Glacier switch block +gray-glacier-block = "0" + +# Merge Netsplit switch block +merge-netsplit-block = "0" + +# Shanghai switch time (nil == no fork, 0 = already on shanghai) +shanghai-time = "0" + +# Cancun switch time (nil == no fork, 0 = already on cancun) +cancun-time = "" + +# Prague switch time (nil == no fork, 0 = already on prague) +prague-time = "" + +# Verkle switch time (nil == no fork, 0 = already on verkle) +verkle-time = "" + +# Terminal total difficulty +terminal-total-difficulty = "0" + +# Whether terminal total difficulty has passed +terminal-total-difficulty-passed = true + +# DevMode enabled +is-dev-mode = false + + [polaris.polar] # Gas cap for RPC requests rpc-gas-cap = "50000000" @@ -300,6 +373,7 @@ global-queue = 1024 # Maximum amount of time non-executable transaction are queued lifetime = "3h0m0s" + # Node-specific settings [polaris.node] # Name of the node diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index 883dcffa1..d6c0ff9c5 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -230,6 +230,79 @@ max-txs = 5000 # General Polaris settings [polaris] +[polaris.polar.chain] +chain-id = "2061" + +# Homestead switch block +homestead-block = "0" + +# DAO fork switch block +dao-fork-block = "0" + +# Whether to support DAO fork +dao-fork-support = true + +# EIP150 switch block +eip150-block = "0" + +# EIP155 switch block +eip155-block = "0" + +# EIP158 switch block +eip158-block = "0" + +# Byzanitum switch block +byzantium-block = "0" + +# Constantinople switch block +constantinople-block = "0" + +# Petersburg switch block +petersburg-block = "0" + +# Istanbul switch block +istanbul-block = "0" + +# Muir Glacier switch block +muir-glacier-block = "" + +# Berlin switch block +berlin-block = "0" + +# London switch block +london-block = "0" + +# Arrow Glacier switch block +arrow-glacier-block = "0" + +# Gray Glacier switch block +gray-glacier-block = "0" + +# Merge Netsplit switch block +merge-netsplit-block = "0" + +# Shanghai switch time (nil == no fork, 0 = already on shanghai) +shanghai-time = "0" + +# Cancun switch time (nil == no fork, 0 = already on cancun) +cancun-time = "" + +# Prague switch time (nil == no fork, 0 = already on prague) +prague-time = "" + +# Verkle switch time (nil == no fork, 0 = already on verkle) +verkle-time = "" + +# Terminal total difficulty +terminal-total-difficulty = "0" + +# Whether terminal total difficulty has passed +terminal-total-difficulty-passed = true + +# DevMode enabled +is-dev-mode = false + + [polaris.polar] # Gas cap for RPC requests rpc-gas-cap = "50000000" @@ -300,6 +373,7 @@ global-queue = 1024 # Maximum amount of time non-executable transaction are queued lifetime = "3h0m0s" + # Node-specific settings [polaris.node] # Name of the node diff --git a/e2e/testapp/docker/local/config/app.toml b/e2e/testapp/docker/local/config/app.toml index 883dcffa1..d6c0ff9c5 100644 --- a/e2e/testapp/docker/local/config/app.toml +++ b/e2e/testapp/docker/local/config/app.toml @@ -230,6 +230,79 @@ max-txs = 5000 # General Polaris settings [polaris] +[polaris.polar.chain] +chain-id = "2061" + +# Homestead switch block +homestead-block = "0" + +# DAO fork switch block +dao-fork-block = "0" + +# Whether to support DAO fork +dao-fork-support = true + +# EIP150 switch block +eip150-block = "0" + +# EIP155 switch block +eip155-block = "0" + +# EIP158 switch block +eip158-block = "0" + +# Byzanitum switch block +byzantium-block = "0" + +# Constantinople switch block +constantinople-block = "0" + +# Petersburg switch block +petersburg-block = "0" + +# Istanbul switch block +istanbul-block = "0" + +# Muir Glacier switch block +muir-glacier-block = "" + +# Berlin switch block +berlin-block = "0" + +# London switch block +london-block = "0" + +# Arrow Glacier switch block +arrow-glacier-block = "0" + +# Gray Glacier switch block +gray-glacier-block = "0" + +# Merge Netsplit switch block +merge-netsplit-block = "0" + +# Shanghai switch time (nil == no fork, 0 = already on shanghai) +shanghai-time = "0" + +# Cancun switch time (nil == no fork, 0 = already on cancun) +cancun-time = "" + +# Prague switch time (nil == no fork, 0 = already on prague) +prague-time = "" + +# Verkle switch time (nil == no fork, 0 = already on verkle) +verkle-time = "" + +# Terminal total difficulty +terminal-total-difficulty = "0" + +# Whether terminal total difficulty has passed +terminal-total-difficulty-passed = true + +# DevMode enabled +is-dev-mode = false + + [polaris.polar] # Gas cap for RPC requests rpc-gas-cap = "50000000" @@ -300,6 +373,7 @@ global-queue = 1024 # Maximum amount of time non-executable transaction are queued lifetime = "3h0m0s" + # Node-specific settings [polaris.node] # Name of the node diff --git a/e2e/testapp/entrypoint.sh b/e2e/testapp/entrypoint.sh index 1494e347f..386756720 100755 --- a/e2e/testapp/entrypoint.sh +++ b/e2e/testapp/entrypoint.sh @@ -65,8 +65,8 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then # Set moniker and chain-id (Moniker can be anything, chain-id must be an integer) ./bin/polard init $MONIKER -o --chain-id $CHAINID --home "$HOMEDIR" - cp ./e2e/testapp/docker/local/config/app.toml "$APP_TOML" - cp ./e2e/testapp/docker/local/config/config.toml "$CONFIG_TOML" + # cp ./e2e/testapp/docker/local/config/app.toml "$APP_TOML" + # cp ./e2e/testapp/docker/local/config/config.toml "$CONFIG_TOML" # Set client config ./bin/polard config set client keyring-backend $KEYRING --home "$HOMEDIR" From 88d75689d2bb0d4abae0731baf87adbcdc12f6c2 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 22:18:36 -0400 Subject: [PATCH 41/94] some cleanup --- eth/miner/miner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/miner/miner.go b/eth/miner/miner.go index a8dce1ecd..94d6d3577 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -121,7 +121,7 @@ func (m *miner) NextBaseFee() *big.Int { // Prepare prepares the blockchain for processing a new block at the given height. // -//nolint:funlen // todo:fix + func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { // Prepare the State, Block, Configuration, Gas, and Historical plugins for the block. m.sp.Prepare(ctx) From 4b5b391bb094f1b5caf95ec28d167cf9a0d9bf69 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 22:33:27 -0400 Subject: [PATCH 42/94] ree --- cosmos/go.mod | 2 +- cosmos/go.sum | 4 ++-- e2e/hive/clients/polard/config/genesis.json | 1 - e2e/hive/simulators/rpc-compat/tests/genesis.json | 1 - e2e/localnet/go.mod | 2 +- e2e/localnet/go.sum | 4 ++-- e2e/precompile/go.mod | 2 +- e2e/precompile/go.sum | 4 ++-- e2e/testapp/go.mod | 2 +- eth/core/chain.go | 4 +--- eth/go.mod | 2 +- eth/go.sum | 4 ++-- 12 files changed, 14 insertions(+), 18 deletions(-) diff --git a/cosmos/go.mod b/cosmos/go.mod index cefc33e12..8541c2938 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/cosmos/go.sum b/cosmos/go.sum index 5bd9e84d1..dc0e83dae 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -113,8 +113,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= -github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/hive/clients/polard/config/genesis.json b/e2e/hive/clients/polard/config/genesis.json index 1f1243393..95d86e9c5 100644 --- a/e2e/hive/clients/polard/config/genesis.json +++ b/e2e/hive/clients/polard/config/genesis.json @@ -139,7 +139,6 @@ "daoForkBlock": 0, "daoForkSupport": true, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, diff --git a/e2e/hive/simulators/rpc-compat/tests/genesis.json b/e2e/hive/simulators/rpc-compat/tests/genesis.json index 2cbc5bf45..cbda65608 100644 --- a/e2e/hive/simulators/rpc-compat/tests/genesis.json +++ b/e2e/hive/simulators/rpc-compat/tests/genesis.json @@ -3,7 +3,6 @@ "chainId": 1337, "homesteadBlock": 0, "eip150Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, diff --git a/e2e/localnet/go.mod b/e2e/localnet/go.mod index e6af9b87b..be483cabc 100644 --- a/e2e/localnet/go.mod +++ b/e2e/localnet/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/e2e/localnet go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f require ( github.com/docker/docker v24.0.5+incompatible diff --git a/e2e/localnet/go.sum b/e2e/localnet/go.sum index 51bc6f115..c4e7e7d8f 100644 --- a/e2e/localnet/go.sum +++ b/e2e/localnet/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= -github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/precompile/go.mod b/e2e/precompile/go.mod index a3190ddaa..717041cd9 100644 --- a/e2e/precompile/go.mod +++ b/e2e/precompile/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/e2e/precompile/go.sum b/e2e/precompile/go.sum index bf8d0fbdc..ebd87aefd 100644 --- a/e2e/precompile/go.sum +++ b/e2e/precompile/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= -github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index fefaba3b5..6a1162c2c 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/eth/core/chain.go b/eth/core/chain.go index a99fda985..f4c19ad7e 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -21,12 +21,10 @@ package core import ( - "math/big" "sync/atomic" lru "github.com/ethereum/go-ethereum/common/lru" "github.com/ethereum/go-ethereum/event" - "github.com/ethereum/go-ethereum/trie" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/state" @@ -120,7 +118,7 @@ func NewChain(host PolarisHostChain) *blockchain { //nolint:revive // only used logger: log.Root(), } bc.statedb = state.NewStateDB(bc.sp) - bc.currentBlock.Store(types.NewBlock(&types.Header{Number: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) + bc.currentBlock.Store(nil) //types.NewBlock(&types.Header{Number: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) bc.finalizedBlock.Store(nil) return bc diff --git a/eth/go.mod b/eth/go.mod index 94a5df89a..6e6f1ea72 100644 --- a/eth/go.mod +++ b/eth/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/eth go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f require ( github.com/ethereum/go-ethereum v1.13.1 diff --git a/eth/go.sum b/eth/go.sum index 548c9a657..11722e221 100644 --- a/eth/go.sum +++ b/eth/go.sum @@ -12,8 +12,8 @@ github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7D github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= 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/polaris-geth v0.0.0-20230928015354-c8dcceccf25e h1:ZtEHEVQrMDEn2IBSwkVjjChCfpLcPQ6MwyID5EQYhpA= -github.com/berachain/polaris-geth v0.0.0-20230928015354-c8dcceccf25e/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= +github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= From d002197f89871a27c4a5523591dfa0bb08e96ff1 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 27 Sep 2023 22:40:14 -0400 Subject: [PATCH 43/94] comment as reminder to fix hive tomorrow --- e2e/hive/clients/polard/config/app.toml | 2 +- e2e/hive/clients/polard/hive-init.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index d6c0ff9c5..4cb8e1bae 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -231,7 +231,7 @@ max-txs = 5000 [polaris] [polaris.polar.chain] -chain-id = "2061" +chain-id = "1337" # Homestead switch block homestead-block = "0" diff --git a/e2e/hive/clients/polard/hive-init.sh b/e2e/hive/clients/polard/hive-init.sh index f86509e08..7fa7401b9 100644 --- a/e2e/hive/clients/polard/hive-init.sh +++ b/e2e/hive/clients/polard/hive-init.sh @@ -67,6 +67,7 @@ echo "eth_gen dump: " echo $ETH_GENESIS_SOURCE # Change eth_genesis in config/genesis.json +# TODO FIX TO SETUP APP.TOML STUFF updated_genesis=$(echo "$temp_genesis" | jq --argjson eth_gen "$ETH_GENESIS_SOURCE" '.app_state["evm"] = $eth_gen') echo "$updated_genesis" > "$GENESIS" From 2e0e42a24d604262eca1eaf359db74e2f1512746 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 10:33:02 -0400 Subject: [PATCH 44/94] merge main --- cosmos/go.mod | 6 +- cosmos/go.sum | 12 +- e2e/testapp/go.mod | 7 +- go.work.sum | 479 ++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 459 insertions(+), 45 deletions(-) diff --git a/cosmos/go.mod b/cosmos/go.mod index edbecef3f..955b386b6 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -42,9 +42,9 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect google.golang.org/grpc v1.58.1 google.golang.org/protobuf v1.31.0 - pkg.berachain.dev/polaris/contracts v0.0.0-20230925142347-326426fa61f6 - pkg.berachain.dev/polaris/eth v0.0.0-20230925142347-326426fa61f6 - pkg.berachain.dev/polaris/lib v0.0.0-20230925142347-326426fa61f6 + pkg.berachain.dev/polaris/contracts v0.0.0-20230928142528-23cc5f141354 + pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354 + pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354 ) require ( diff --git a/cosmos/go.sum b/cosmos/go.sum index dc0e83dae..4ef2424ee 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -1492,12 +1492,12 @@ nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0 nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= -pkg.berachain.dev/polaris/contracts v0.0.0-20230925142347-326426fa61f6 h1:U5wpPv/ZitKJCZkHWVsWOzAfX3orlnHHhn5rYGJ1DPA= -pkg.berachain.dev/polaris/contracts v0.0.0-20230925142347-326426fa61f6/go.mod h1:aM6e6GYmu5YPNUWGs0Qy3pL8N5MsRHO3QvcUruwF2Rc= -pkg.berachain.dev/polaris/eth v0.0.0-20230925142347-326426fa61f6 h1:0dIN2V+giVZmUOPvDyOxnXfTgZIoBOqjZTpXn704edY= -pkg.berachain.dev/polaris/eth v0.0.0-20230925142347-326426fa61f6/go.mod h1:XDIlhb6eOL2Rq81b0OPzke5IFQyqgbD7f60NRomcmXc= -pkg.berachain.dev/polaris/lib v0.0.0-20230925142347-326426fa61f6 h1:ZvjvAvaPEZr+Og4GABn1AGM7RPD6lIW12j3qouVDFvI= -pkg.berachain.dev/polaris/lib v0.0.0-20230925142347-326426fa61f6/go.mod h1:Qe/PmVj+gplJrsJsmdcWFTHw+DyraM67wk9nqFMnHmk= +pkg.berachain.dev/polaris/contracts v0.0.0-20230928142528-23cc5f141354 h1:ot7e/6InxTBcPq8Rg/4cog4JbsAxnPakaghUaI+vYXY= +pkg.berachain.dev/polaris/contracts v0.0.0-20230928142528-23cc5f141354/go.mod h1:aM6e6GYmu5YPNUWGs0Qy3pL8N5MsRHO3QvcUruwF2Rc= +pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354 h1:xVRqWkLJmjExDCWHg/mCGFqSif51+eucyP8TJuLseiM= +pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354/go.mod h1:eI+YNq3Nc4J9Di6RyZNOif5ejWGHmWfxRi/dS8gSE6A= +pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354 h1:QcNeLF3LUwwaEOsV6fdILiLH+BAsCcO+Um/nU1NsZ1w= +pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354/go.mod h1:PyX74/6+6XhSJ9gXmE/xFYp1gZCcQ36suVk8hh4s36M= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index 6a1162c2c..6a848dca0 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -15,8 +15,9 @@ require ( cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508 cosmossdk.io/x/upgrade v0.0.0-20230915171831-2196edacb99d github.com/stretchr/testify v1.8.4 - pkg.berachain.dev/polaris/cosmos v0.0.0-20230925142347-326426fa61f6 - pkg.berachain.dev/polaris/eth v0.0.0-20230925142347-326426fa61f6 + pkg.berachain.dev/polaris/cosmos v0.0.0-20230928142528-23cc5f141354 + pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354 + pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354 ) require ( @@ -272,8 +273,6 @@ require ( gotest.tools/v3 v3.5.0 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect - pkg.berachain.dev/polaris/contracts v0.0.0-20230919154905-0c53dfe1360a // indirect - pkg.berachain.dev/polaris/lib v0.0.0-20230919154905-0c53dfe1360a // indirect rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.work.sum b/go.work.sum index 1c9964959..554bde431 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,333 +1,748 @@ +cloud.google.com/go/accessapproval v1.7.1 h1:/5YjNhR6lzCvmJZAnByYkfEgWjfAKwYP6nkuTk6nKFE= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accesscontextmanager v1.8.1 h1:WIAt9lW9AXtqw/bnvrEUaE8VG/7bAAeMzRCBGMkc4+w= cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/aiplatform v1.48.0 h1:M5davZWCTzE043rJCn+ZLW6hSxfG1KAx4vJTtas2/ec= cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/analytics v0.21.3 h1:TFBC1ZAqX9/jL56GEXdLrVe5vT3I22bDVWyDwZX4IEg= cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/apigateway v1.6.1 h1:aBSwCQPcp9rZ0zVEUeJbR623palnqtvxJlUyvzsKGQc= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigeeconnect v1.6.1 h1:6u/jj0P2c3Mcm+H9qLsXI7gYcTiG9ueyQL3n6vCmFJM= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeregistry v0.7.1 h1:hgq0ANLDx7t2FDZDJQrCMtCtddR/pjCqVuvQWGrQbXw= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/appengine v1.8.1 h1:J+aaUZ6IbTpBegXbmEsh8qZZy864ZVnOoWyfa1XSNbI= cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/area120 v0.8.1 h1:wiOq3KDpdqXmaHzvZwKdpoM+3lDcqsI2Lwhyac7stss= cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/artifactregistry v1.14.1 h1:k6hNqab2CubhWlGcSzunJ7kfxC7UzpAfQ1UPb9PDCKI= cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/asset v1.14.1 h1:vlHdznX70eYW4V1y1PxocvF6tEwxJTTarwIGwOhFF3U= cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/assuredworkloads v1.11.1 h1:yaO0kwS+SnhVSTF7BqTyVGt3DTocI6Jqo+S3hHmCwNk= cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/automl v1.13.1 h1:iP9iQurb0qbz+YOOMfKSEjhONA/WcoOIjt6/m+6pIgo= cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/baremetalsolution v1.1.1 h1:0Ge9PQAy6cZ1tRrkc44UVgYV15nw2TVnzJzYsMHXF+E= cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= +cloud.google.com/go/batch v1.3.1 h1:uE0Q//W7FOGPjf7nuPiP0zoE8wOT3ngoIO2HIet0ilY= cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= +cloud.google.com/go/beyondcorp v1.0.0 h1:VPg+fZXULQjs8LiMeWdLaB5oe8G9sEoZ0I0j6IMiG1Q= cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/bigquery v1.53.0 h1:K3wLbjbnSlxhuG5q4pntHv5AEbQM1QqHKGYgwFIqOTg= cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/billing v1.16.0 h1:1iktEAIZ2uA6KpebC235zi/rCXDdDYQ0bTXTNetSL80= cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/binaryauthorization v1.6.1 h1:cAkOhf1ic92zEN4U1zRoSupTmwmxHfklcp1X7CCBKvE= cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/certificatemanager v1.7.1 h1:uKsohpE0hiobx1Eak9jNcPCznwfB6gvyQCcS28Ah9E8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/channel v1.16.0 h1:dqRkK2k7Ll/HHeYGxv18RrfhozNxuTJRkspW0iaFZoY= cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/cloudbuild v1.13.0 h1:YBbAWcvE4x6xPWTyS+OU4eiUpz5rCS3VCM/aqmfddPA= cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/clouddms v1.6.1 h1:rjR1nV6oVf2aNNB7B5uz1PDIlBjlOiBgR+q5n7bbB7M= cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/cloudtasks v1.12.1 h1:cMh9Q6dkvh+Ry5LAPbD/U2aw6KAqdiU6FttwhbTo69w= cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/contactcenterinsights v1.10.0 h1:YR2aPedGVQPpFBZXJnPkqRj8M//8veIZZH5ZvICoXnI= cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/container v1.24.0 h1:N51t/cgQJFqDD/W7Mb+IvmAPHrf8AbPx7Bb7aF4lROE= cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/containeranalysis v0.10.1 h1:SM/ibWHWp4TYyJMwrILtcBtYKObyupwOVeceI9pNblw= cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/datacatalog v1.16.0 h1:qVeQcw1Cz93/cGu2E7TYUPh8Lz5dn5Ws2siIuQ17Vng= cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/dataflow v0.9.1 h1:VzG2tqsk/HbmOtq/XSfdF4cBvUWRK+S+oL9k4eWkENQ= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataform v0.8.1 h1:xcWso0hKOoxeW72AjBSIp/UfkvpqHNzzS0/oygHlcqY= cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/datafusion v1.7.1 h1:eX9CZoyhKQW6g1Xj7+RONeDj1mV8KQDKEB9KLELX9/8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datalabeling v0.8.1 h1:zxsCD/BLKXhNuRssen8lVXChUj8VxF3ofN06JfdWOXw= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/dataplex v1.9.0 h1:yoBWuuUZklYp7nx26evIhzq8+i/nvKYuZr1jka9EqLs= cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataproc/v2 v2.0.1 h1:4OpSiPMMGV3XmtPqskBU/RwYpj3yMFjtMLj/exi425Q= cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= +cloud.google.com/go/dataqna v0.8.1 h1:ITpUJep04hC9V7C+gcK390HO++xesQFSUJ7S4nSnF3U= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +cloud.google.com/go/datastore v1.13.0 h1:ktbC66bOQB3HJPQe8qNI1/aiQ77PMu7hD4mzE6uxe3w= cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastream v1.10.0 h1:ra/+jMv36zTAGPfi8TRne1hXme+UsKtdcK4j6bnqQiw= cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/deploy v1.13.0 h1:A+w/xpWgz99EYzB6e31gMGAI/P5jTZ2UO7veQK5jQ8o= cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/dialogflow v1.40.0 h1:sCJbaXt6ogSbxWQnERKAzos57f02PP6WkGbOZvXUdwc= cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dlp v1.10.1 h1:tF3wsJ2QulRhRLWPzWVkeDz3FkOGVoMl6cmDUHtfYxw= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/documentai v1.22.0 h1:dW8ex9yb3oT9s1yD2+yLcU8Zq15AquRZ+wd0U+TkxFw= cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/domains v0.9.1 h1:rqz6KY7mEg7Zs/69U6m6LMbB7PxFDWmT3QWNXIqhHm0= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/edgecontainer v1.1.1 h1:zhHWnLzg6AqzE+I3gzJqiIwHfjEBhWctNQEzqb+FaRo= cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= +cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.6.2 h1:OEJ0MLXXCW/tX1fkxzEZOsv/wRfyFsvDVNaHWBAvoV0= cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/eventarc v1.13.0 h1:xIP3XZi0Xawx8DEfh++mE2lrIi5kQmCr/KcWhJ1q0J4= cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/filestore v1.7.1 h1:Eiz8xZzMJc5ppBWkuaod/PUdUZGCFR8ku0uS+Ah2fRw= cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= +cloud.google.com/go/firestore v1.11.0 h1:PPgtwcYUOXV2jFe1bV3nda3RCrOa8cvBjTOn2MQVfW8= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/functions v1.15.1 h1:LtAyqvO1TFmNLcROzHZhV0agEJfBi+zfMZsF4RT/a7U= cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= +cloud.google.com/go/gaming v1.6.0 h1:PKggmegChZulPW8yvtziF8P9UOuVFwbvylbEucTNups= +cloud.google.com/go/gkebackup v1.3.0 h1:lgyrpdhtJKV7l1GM15YFt+OCyHMxsQZuSydyNmS0Pxo= cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkeconnect v0.8.1 h1:a1ckRvVznnuvDWESM2zZDzSVFvggeBaVY5+BVB8tbT0= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkehub v0.14.1 h1:2BLSb8i+Co1P05IYCKATXy5yaaIw/ZqGvVSBTLdzCQo= cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkemulticloud v1.0.0 h1:MluqhtPVZReoriP5+adGIw+ij/RIeRik8KApCW2WMTw= cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= +cloud.google.com/go/grafeas v0.2.0 h1:CYjC+xzdPvbV65gi6Dr4YowKcmLo045pm18L0DhdELM= +cloud.google.com/go/gsuiteaddons v1.6.1 h1:mi9jxZpzVjLQibTS/XfPZvl+Jr6D5Bs8pGqUjllRb00= cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/iap v1.8.1 h1:X1tcp+EoJ/LGX6cUPt3W2D4H2Kbqq0pLAsldnsCjLlE= cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/ids v1.4.1 h1:khXYmSoDDhWGEVxHl4c4IgbwSRR+qE/L4hzP3vaU9Hc= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/iot v1.7.1 h1:yrH0OSmicD5bqGBoMlWG8UltzdLkYzNUwNVUVz7OT54= cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/kms v1.15.0 h1:xYl5WEaSekKYN5gGRyhjvZKM22GVBBCzegGNVPy+aIs= cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/language v1.10.1 h1:3MXeGEv8AlX+O2LyV4pO4NGpodanc26AmXwOuipEym0= cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/lifesciences v0.9.1 h1:axkANGx1wiBXHiPcJZAE+TDjjYoJRIDzbHC/WYllCBU= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= +cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/managedidentities v1.6.1 h1:2/qZuOeLgUHorSdxSQGtnOu9xQkBn37+j+oZQv/KHJY= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/maps v1.4.0 h1:PdfgpBLhAoSzZrQXP+/zBc78fIPLZSJp5y8+qSMn2UU= cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/mediatranslation v0.8.1 h1:50cF7c1l3BanfKrpnTCaTvhf+Fo6kdF21DG0byG7gYU= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/memcache v1.10.1 h1:7lkLsF0QF+Mre0O/NvkD9Q5utUNwtzvIYjrOLOs0HO0= cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/metastore v1.12.0 h1:+9DsxUOHvsqvC0ylrRc/JwzbXJaaBpfIK3tX0Lx8Tcc= cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/monitoring v1.15.1 h1:65JhLMd+JiYnXr6j5Z63dUYCuOg770p8a/VC+gil/58= cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/networkconnectivity v1.12.1 h1:LnrYM6lBEeTq+9f2lR4DjBhv31EROSAQi/P5W4Q0AEc= cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkmanagement v1.8.0 h1:/3xP37eMxnyvkfLrsm1nv1b2FbMMSAEAOlECTvoeCq4= cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networksecurity v0.9.1 h1:TBLEkMp3AE+6IV/wbIGRNTxnqLXHCTEQWoxRVC18TzY= cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/notebooks v1.9.1 h1:CUqMNEtv4EHFnbogV+yGHQH5iAQLmijOx191innpOcs= cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/optimization v1.4.1 h1:pEwOAmO00mxdbesCRSsfj8Sd4rKY9kBrYW7Vd3Pq7cA= cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/orchestration v1.8.1 h1:KmN18kE/xa1n91cM5jhCh7s1/UfIguSCisw7nTMUzgE= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orgpolicy v1.11.1 h1:I/7dHICQkNwym9erHqmlb50LRU588NPCvkfIY0Bx9jI= cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/osconfig v1.12.1 h1:dgyEHdfqML6cUW6/MkihNdTVc0INQst0qSE8Ou1ub9c= cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/oslogin v1.10.1 h1:LdSuG3xBYu2Sgr3jTUULL1XCl5QBx6xwzGqzoDUw1j0= cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/phishingprotection v0.8.1 h1:aK/lNmSd1vtbft/vLe2g7edXK72sIQbqr2QyrZN/iME= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/policytroubleshooter v1.8.0 h1:XTMHy31yFmXgQg57CB3w9YQX8US7irxDX0Fl0VwlZyY= cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= +cloud.google.com/go/privatecatalog v0.9.1 h1:B/18xGo+E0EMS9LOEQ0zXz7F2asMgmVgTYGSI89MHOA= cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= +cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsublite v1.8.1 h1:pX+idpWMIH30/K7c0epN6V703xpIcMXWRjKJsz0tYGY= cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= +cloud.google.com/go/recaptchaenterprise v1.3.1 h1:u6EznTGzIdsyOsvm+Xkw0aSuKFXQlyjGE9a4exk6iNQ= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.2 h1:IGkbudobsTXAwmkEYOzPCQPApUCsN4Gbq3ndGVhHQpI= cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recommendationengine v0.8.1 h1:nMr1OEVHuDambRn+/y4RmNAmnR/pXCuHtH0Y4tCgGRQ= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommender v1.10.1 h1:UKp94UH5/Lv2WXSQe9+FttqV07x/2p1hFTMMYVFtilg= cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/redis v1.13.1 h1:YrjQnCC7ydk+k30op7DSjSHw1yAYhqYXFcOq1bSXRYA= cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/resourcemanager v1.9.1 h1:QIAMfndPOHR6yTmMUB0ZN+HSeRmPjR/21Smq5/xwghI= cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcesettings v1.6.1 h1:Fdyq418U69LhvNPFdlEO29w+DRRjwDA4/pFamm4ksAg= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/retail v1.14.1 h1:gYBrb9u/Hc5s5lUTFXX1Vsbc/9BEvgtioY6ZKaK0DK8= cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/run v1.2.0 h1:kHeIG8q+N6Zv0nDkBjSOYfK2eWqa5FnaiDPH/7/HirE= cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= +cloud.google.com/go/scheduler v1.10.1 h1:yoZbZR8880KgPGLmACOMCiY2tPk+iX4V/dkxqTirlz8= cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/secretmanager v1.11.1 h1:cLTCwAjFh9fKvU6F13Y4L9vPcx9yiWPyWXE4+zkuEQs= cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/security v1.15.1 h1:jR3itwycg/TgGA0uIgTItcVhA55hKWiNJxaNNpQJaZE= cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/securitycenter v1.23.0 h1:XOGJ9OpnDtqg8izd7gYk/XUhj8ytjIalyjjsR6oyG0M= cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/servicedirectory v1.11.0 h1:pBWpjCFVGWkzVTkqN3TBBIqNSoSHY86/6RL0soSQ4z8= cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/shell v1.7.1 h1:aHbwH9LSqs4r2rbay9f6fKEls61TAjT63jSyglsw7sI= cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/spanner v1.47.0 h1:aqiMP8dhsEXgn9K5EZBWxPG7dxIiyM2VaikqeU4iteg= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/speech v1.19.0 h1:MCagaq8ObV2tr1kZJcJYgXYbIn8Ai5rp42tyGYw9rls= cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/storagetransfer v1.10.0 h1:+ZLkeXx0K0Pk5XdDmG0MnUVqIR18lllsihU/yq39I8Q= cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/talent v1.6.2 h1:j46ZgD6N2YdpFPux9mc7OAf4YK3tiBCsbLKc8rQx+bU= cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/texttospeech v1.7.1 h1:S/pR/GZT9p15R7Y2dk2OXD/3AufTct/NSxT4a7nxByw= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/tpu v1.6.1 h1:kQf1jgPY04UJBYYjNUO+3GrZtIb57MfGAW2bwgLbR3A= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/trace v1.10.1 h1:EwGdOLCNfYOOPtgqo+D2sDLZmRCEO1AagRTJCU6ztdg= cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/translate v1.8.2 h1:PQHamiOzlehqLBJMnM72lXk/OsMQewZB12BKJ8zXrU0= cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/video v1.19.0 h1:BRyyS+wU+Do6VOXnb8WfPr42ZXti9hzmLKLUCkggeK4= cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/videointelligence v1.11.1 h1:MBMWnkQ78GQnRz5lfdTAbBq/8QMCF3wahgtHh3s/J+k= cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= +cloud.google.com/go/vision v1.2.0 h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4= +cloud.google.com/go/vision/v2 v2.7.2 h1:ccK6/YgPfGHR/CyESz1mvIbsht5Y2xRsWCPqmTNydEw= cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vmmigration v1.7.1 h1:gnjIclgqbEMc+cF5IJuPxp53wjBIlqZ8h9hE8Rkwp7A= cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmwareengine v1.0.0 h1:qsJ0CPlOQu/3MFBGklu752v3AkD+Pdu091UmXJ+EjTA= cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vpcaccess v1.7.1 h1:ram0GzjNWElmbxXMIzeOZUkQ9J8ZAahD6V8ilPGqX0Y= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/webrisk v1.9.1 h1:Ssy3MkOMOnyRV5H2bkMQ13Umv7CwB/kugo3qkAX83Fk= cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/websecurityscanner v1.6.1 h1:CfEF/vZ+xXyAR3zC9iaC/QRdf1MEgS20r5UR17Q4gOg= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/workflows v1.11.1 h1:2akeQ/PgtRhrNuD/n1WvJd5zb7YyuDZrlOanBj2ihPg= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= +github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= +github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= +github.com/RaveNoX/go-jsoncommentstrip v1.0.0 h1:t527LHHE3HmiHrq74QMpNPZpGCIJzTx+apLkMKt4HC0= +github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= +github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= +github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= +github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= +github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= +github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= +github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= +github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= +github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.1.1 h1:ZAoq32boMzcaTW9bcUacBswAmHTbvlvDJICgHFZuECo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= +github.com/aws/aws-sdk-go-v2/credentials v1.1.1 h1:NbvWIM1Mx6sNPTxowHgS2ewXCRp+NGTzUYb/96FZJbY= github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2 h1:EtEU7WRaWliitZh2nmuxEXrN0Cb8EgPUFGIoTMeqbzI= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1 h1:w/fPGB0t5rWwA43mux4e9ozFSH5zF1moQemlA131PWc= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2 h1:4AH9fFjUlVktQMznF+YN33aWNXaR4VgDXyP28qokJC0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= +github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1 h1:cKr6St+CtC3/dl/rEBJvlk7A/IN5D5F02GNkGzfbtVU= github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= +github.com/aws/aws-sdk-go-v2/service/sso v1.1.1 h1:37QubsarExl5ZuCBlnRP+7l1tNwZPBSTqpTBrPH98RU= github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= +github.com/aws/aws-sdk-go-v2/service/sts v1.1.1 h1:TJoIfnIFubCX0ACVeJ0w46HEH5MwjwYN4iFhuYIhfIY= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= +github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= -github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= +github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= +github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= +github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= +github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= +github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= +github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= +github.com/casbin/casbin/v2 v2.37.0 h1:/poEwPSovi4bTOcP752/CsTQiRz2xycyVKFG7GUhbDw= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= +github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= +github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= +github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89 h1:aPflPkRFkVwbW6dmcVqfgwp1i+UWGFH6VgR1Jim5Ygc= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= +github.com/chromedp/chromedp v0.9.2 h1:dKtNz4kApb06KuSXoTQIyUC2TrA0fhGDwNZf3bcgfKw= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= +github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic= github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= +github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= +github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= +github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= +github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= +github.com/cloudflare/circl v1.3.1 h1:4OVCZRL62ijwEwxnF6I7hLwxvIYi3VaZt8TflkqtrtA= github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= +github.com/cloudflare/cloudflare-go v0.14.0 h1:gFqGlGl/5f9UGXAaKapCGUfaTCgRKKnzu2VvzMZlOFA= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= +github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= +github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= +github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= +github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80 h1:DuBDHVjgGMPki7bAyh91+3cF1Vh34sAEdH8JQgbc2R0= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= +github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6 h1:uKuolOJonQOb/2+z/wFSJeVREP6fSoigr/X4Wlfhwwg= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6/go.mod h1:jN7ZJM5YSVtD3SHmkAdN/cOC1dXiqg2Y9K5Sr5a8Nxw= +github.com/cristalhq/acmd v0.11.1 h1:DJ4fh2Pv0nPKmqT646IU/0Vh5FNdGblxvF+3/W3NAUI= github.com/cristalhq/acmd v0.11.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= +github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= +github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780 h1:tFh1tRc4CA31yP6qDcu+Trax5wW5GuMxvkIba07qVLY= +github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e h1:bBLctRc7kr01YGvaDfgLbTwjFNW5jdp5y5rj8XXBHfY= github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= +github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= +github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= +github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 h1:IZqZOB2fydHte3kUgxrzK5E1fW7RQGeDwE8F/ZZnUYc= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= +github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b h1:vMT47RYsrftsHSTQhqXwC3BYflo38OLC3Y4LtXtLyU0= github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= +github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= +github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= +github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= +github.com/gofiber/fiber/v2 v2.48.0 h1:cRVMCb9aUJDsyHxGFLwz/sGzDggdailZZyptU9F9cU0= github.com/gofiber/fiber/v2 v2.48.0/go.mod h1:xqJgfqrc23FJuqGOW6DVgi3HyZEm2Mn9pRqUb2kHSX8= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/google/go-pkcs11 v0.2.0 h1:5meDPB26aJ98f+K9G21f0AqZwo/S5BJMJh8nuhMbdsI= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= +github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= +github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= +github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/guptarohit/asciigraph v0.5.5 h1:ccFnUF8xYIOUPPY3tmdvRyHqmn1MYI9iv1pLKX+/ZkQ= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= +github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= +github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= +github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= +github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= +github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= +github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= +github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= +github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= +github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hudl/fargo v1.4.0 h1:ZDDILMbB37UlAVLlWcJ2Iz1XuahZZTDZfdCKeclfq2s= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/hydrogen18/memlistener v1.0.0 h1:JR7eDj8HD6eXrc5fWLbSUnfcQFL06PYvCc0DKQnWfaU= github.com/hydrogen18/memlistener v1.0.0/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab h1:BA4a7pe6ZTd9F8kXETBoijjFJ/ntaa//1wiH9BZu4zU= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= +github.com/informalsystems/tm-load-test v1.3.0 h1:FGjKy7vBw6mXNakt+wmNWKggQZRsKkEYpaFk/zR64VA= github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= +github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 h1:TMtDYDHKYY15rFihtRfck/bfFqNfvcabqvXAFQfAUpY= github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= +github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= +github.com/jhump/gopoet v0.1.0 h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= +github.com/jhump/goprotoc v0.5.0 h1:Y1UgUX+txUznfqcGdDef8ZOVlyQvnV0pKWZH08RmZuo= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= +github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= +github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d h1:c93kUJDtVAXFEhsCh5jSxyOJmFHuzcihnslQiX8Urwo= +github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= +github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c h1:AqsttAyEyIEsNz5WLRwuRwjiT5CMDUfLk6cFJDVPebs= github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= +github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= +github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= +github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= +github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= +github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= +github.com/klauspost/cpuid v1.2.0 h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE= +github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs= +github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= +github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= +github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= +github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= +github.com/lestrrat-go/jwx v1.2.26 h1:4iFo8FPRZGDYe1t19mQP0zTRqA7n8HnJ5lkIiDvJcB0= github.com/lestrrat-go/jwx v1.2.26/go.mod h1:MaiCdGbn3/cckbOFSCluJlJMmp9dmZm5hDuIkx8ftpQ= +github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= +github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= +github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= +github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= +github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= +github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= +github.com/mmcloughlin/profile v0.1.1 h1:jhDmAqPyebOsVDOCICJoINoLb/AnLBaUw58nFzxWS2w= +github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5 h1:0KqC6/sLy7fDpBdybhVkkv4Yz+PmB7c9Dz9z3dLW804= github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4= +github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76 h1:0xuRacu/Zr+jX+KyLLPPktbwXqyOvnOPUQmMLzX1jxU= +github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= +github.com/nats-io/jwt/v2 v2.0.3 h1:i/O6cmIsjpcQyWDYNcq2JyZ3/VTF8SJ4JWluI5OhpvI= github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= +github.com/nats-io/nats-server/v2 v2.5.0 h1:wsnVaaXH9VRSg+A2MVg5Q727/CqxnmPLGFQ3YZYKTQg= github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.12.1 h1:+0ndxwUPz3CmQ2vjbXdkC1fo3FdiOQDim4gl3Mge8Qo= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= +github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= +github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= +github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= +github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= +github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= +github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= +github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= +github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= +github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= +github.com/performancecopilot/speed/v4 v4.0.0 h1:VxEDCmdkfbQYDlcr/GC9YoN9PQ6p8ulk9xVsepYy9ZY= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= +github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= +github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3 h1:hUmXhbljNFtrH5hzV9kiRoddZ5nfPTq3K0Sb2hYYiqE= github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3/go.mod h1:q5NXNGzqj5uPnVuhGkZfmgHqNUhf15VLi6L9kW0VEc0= +github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4 h1:RHHRCZeaNyBXdYPMjZNH8/XHDBH38TZzw8izrW7dmBE= github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4/go.mod h1:RdR1j20Aj5pB6+fw6Y9Ur7lMHpegTEjY1vc19hEZL40= +github.com/pointlander/peg v1.0.1 h1:mgA/GQE8TeS9MdkU6Xn6iEzBmQUQCNuWD7rHCK6Mjs0= github.com/pointlander/peg v1.0.1/go.mod h1:5hsGDQR2oZI4QoWz0/Kdg3VSVEC31iJw/b7WjqCBGRI= +github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7 h1:cZC+usqsYgHtlBaGulVnZ1hfKAi8iWtujBnRLQE698c= github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod h1:IToEjHuttnUzwZI5KBSM/LOOW3qLbbrHOEfp3SbECGY= +github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71 h1:CNooiryw5aisadVfzneSZPswRWvnVW8hF1bS/vo8ReI= github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5 h1:CvqZS4QYHBRvx7AeFdimd16HCbLlYsvQMcKDACpJW/c= github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= +github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96 h1:J8J/cgLDRuqXJnwIrRDBvtl+LLsdg7De74znW/BRRq4= github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= +github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e h1:eTWZyPUnHcuGRDiryS/l2I7FfKjbU3IBx3IjqHPxuKU= github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= -github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww= +github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= +github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= +github.com/sagikazarmark/crypt v0.10.0 h1:96E1qrToLBU6fGzo+PRRz7KGOc9FkYFiPnR3/zf8Smg= github.com/sagikazarmark/crypt v0.10.0/go.mod h1:gwTNHQVoOS3xp9Xvz5LLR+1AauC5M6880z5NWzdhOyQ= +github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= +github.com/shirou/gopsutil/v3 v3.23.7 h1:C+fHO8hfIppoJ1WdsVm1RoI0RwXoNdfTK7yWXV0wVj4= github.com/shirou/gopsutil/v3 v3.23.7/go.mod h1:c4gnmoRC0hQuaLqvxnx1//VXQ0Ms/X9UnJF8pddY5z4= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= +github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= +github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= +github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= +github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= +github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad h1:fiWzISvDn0Csy5H0iwgAuJGQTUpVfEMJJd4nRFXogbc= +github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e h1:mOtuXaRAbVZsxAHVdPR3IjfmN8T1h2iczJLynhLybf8= github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= +github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE= github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= +github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ= github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= +github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/fasthttp v1.48.0 h1:oJWvHb9BIZToTQS3MuQ2R3bJZiNSa2KiNdeI8A+79Tc= github.com/valyala/fasthttp v1.48.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= +github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netlink v1.1.0 h1:1iyaYNBLmP6L0220aDnYQpo1QEV4t4hJ+xEEhhJH8j0= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= +github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= +go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= +go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= +go.etcd.io/etcd/client/v2 v2.305.7 h1:AELPkjNR3/igjbO7CjyF1fPuVPjrblliiKj+Y6xSGOU= go.etcd.io/etcd/client/v2 v2.305.7/go.mod h1:GQGT5Z3TBuAQGvgPfhR7VPySu/SudxmEkRq9BgzFU6s= +go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771 h1:gm8vsVR64Jx1GxHY8M+p8YA2bxU/H/lymcutB2l7l9s= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771/go.mod h1:3QoBVwTHkXbY1oRGzlhwhOykfcATQN43LJ6iT8Wy8kE= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= +gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo= +gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= +gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +nullprogram.com/x/optparse v1.0.0 h1:xGFgVi5ZaWOnYdac2foDT3vg0ZZC9ErXFV57mr4OHrI= pkg.berachain.dev/polaris/contracts v0.0.0-20230925142347-326426fa61f6/go.mod h1:aM6e6GYmu5YPNUWGs0Qy3pL8N5MsRHO3QvcUruwF2Rc= -pkg.berachain.dev/polaris/cosmos v0.0.0-20230919154905-0c53dfe1360a/go.mod h1:iOYy1eb3YLCOwnsoo7THyx7qny9Qt3zWpBRmtP6cNSU= -pkg.berachain.dev/polaris/e2e/localnet v0.0.0-20230919154905-0c53dfe1360a/go.mod h1:TZhwmadAUlnyf450t7suO5sN3AGRNE3qziXldP58rUs= -pkg.berachain.dev/polaris/eth v0.0.0-20230919154905-0c53dfe1360a/go.mod h1:joeZS5xk3XFpcKlvA1YrETzc6MX6lGkbXZEL+ifKsiM= +pkg.berachain.dev/polaris/cosmos v0.0.0-20230928142528-23cc5f141354/go.mod h1:9aoV2M/XfS/kryhjpJWNjhGMDsZe28k5g8uLBsMB7aA= pkg.berachain.dev/polaris/lib v0.0.0-20230925142347-326426fa61f6/go.mod h1:Qe/PmVj+gplJrsJsmdcWFTHw+DyraM67wk9nqFMnHmk= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= +rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= +sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= From 95cd953455c8a8e86658c50084fc587cf400a329 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 14:00:20 -0400 Subject: [PATCH 45/94] fix config import --- cosmos/config/config.go | 186 ++++++++++-------- cosmos/config/flags.go | 4 +- cosmos/config/template.go | 44 ++--- cosmos/x/evm/depinject.go | 13 +- cosmos/x/evm/genesis.go | 26 +-- cosmos/x/evm/keeper/genesis.go | 3 + e2e/hive/clients/polard/Dockerfile | 2 +- e2e/hive/clients/polard/config/app.toml | 45 +++-- e2e/hive/clients/polard/config/config.toml | 10 +- e2e/hive/clients/polard/hive-init.sh | 65 +++++- .../simulators/rpc-compat/tests/genesis.json | 6 +- e2e/hive/simulators/rpc/init/genesis.json | 1 + e2e/precompile/polard/config/app.toml | 43 ++-- e2e/precompile/polard/config/config.toml | 12 +- e2e/testapp/app.go | 26 +-- e2e/testapp/docker/local/config/app.toml | 43 ++-- e2e/testapp/docker/local/config/config.toml | 12 +- e2e/testapp/helpers.go | 7 + e2e/testapp/polard/cmd/root.go | 1 + eth/core/chain.go | 2 +- eth/core/genesis.go | 19 +- eth/params/chain_config.go | 9 +- eth/polar/config.go | 6 +- eth/polar/polaris.go | 11 +- 24 files changed, 337 insertions(+), 259 deletions(-) diff --git a/cosmos/config/config.go b/cosmos/config/config.go index 639324c72..b2cbb92cd 100644 --- a/cosmos/config/config.go +++ b/cosmos/config/config.go @@ -52,6 +52,14 @@ type Config struct { Node node.Config } +func MustReadConfigFromAppOpts(opts servertypes.AppOptions) *Config { + cfg, err := ReadConfigFromAppOpts(opts) + if err != nil { + panic(err) + } + return cfg +} + //nolint:funlen,gocognit,gocyclo,cyclop // TODO break up later. func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { var err error @@ -59,9 +67,9 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { conf := &Config{} // Define little error handler. - var handleError = func(err error) error { + var handleError = func(err error, flag string) error { if err != nil { - return fmt.Errorf("error while reading configuration: %w", err) + return fmt.Errorf("error while reading configuration: %w flag: %s", err, flag) } return nil } @@ -81,7 +89,11 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { getInt64 := func(key string) (int64, error) { return cast.ToInt64E(opts.Get(key)) } getUint64 := func(key string) (uint64, error) { return cast.ToUint64E(opts.Get(key)) } getUint64Ptr := func(key string) (*uint64, error) { - num, _err := cast.ToUint64E(opts.Get(key)) + if num, _ := cast.ToStringE((opts.Get(key))); num == "" || num == "null" { + return nil, nil //nolint:nilnil // intentional. + } + + num, _err := cast.ToUint64E((opts.Get(key))) if _err != nil { return nil, _err } @@ -105,115 +117,115 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { // Polar settings if conf.Polar.RPCGasCap, err = getUint64(flagRPCGasCap); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagRPCGasCap) } if conf.Polar.RPCEVMTimeout, err = getTimeDuration(flagRPCEvmTimeout); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagRPCEvmTimeout) } if conf.Polar.RPCTxFeeCap, err = getFloat64(flagRPCTxFeeCap); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagRPCTxFeeCap) } // Polar Chain settings if conf.Polar.Chain.ChainID, err = getBigInt(flagChainID); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagChainID) } if conf.Polar.Chain.HomesteadBlock, err = getBigInt(flagHomesteadBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHomesteadBlock) } if conf.Polar.Chain.DAOForkBlock, err = getBigInt(flagDAOForkBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagDAOForkBlock) } if conf.Polar.Chain.DAOForkSupport, err = getBool(flagDAOForkSupport); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagDAOForkSupport) } if conf.Polar.Chain.EIP150Block, err = getBigInt(flagEIP150Block); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagEIP150Block) } if conf.Polar.Chain.EIP155Block, err = getBigInt(flagEIP155Block); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagEIP155Block) } if conf.Polar.Chain.EIP158Block, err = getBigInt(flagEIP158Block); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagEIP158Block) } if conf.Polar.Chain.ByzantiumBlock, err = getBigInt(flagByzantiumBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagByzantiumBlock) } if conf.Polar.Chain.ConstantinopleBlock, err = getBigInt(flagConstantinopleBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagConstantinopleBlock) } if conf.Polar.Chain.PetersburgBlock, err = getBigInt(flagPetersburgBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagPetersburgBlock) } if conf.Polar.Chain.IstanbulBlock, err = getBigInt(flagIstanbulBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagIstanbulBlock) } if conf.Polar.Chain.MuirGlacierBlock, err = getBigInt(flagMuirGlacierBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagMuirGlacierBlock) } if conf.Polar.Chain.BerlinBlock, err = getBigInt(flagBerlinBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagBerlinBlock) } if conf.Polar.Chain.LondonBlock, err = getBigInt(flagLondonBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagLondonBlock) } if conf.Polar.Chain.ArrowGlacierBlock, err = getBigInt(flagArrowGlacierBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagArrowGlacierBlock) } if conf.Polar.Chain.GrayGlacierBlock, err = getBigInt(flagGrayGlacierBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagGrayGlacierBlock) } if conf.Polar.Chain.MergeNetsplitBlock, err = getBigInt(flagMergeNetsplitBlock); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagMergeNetsplitBlock) } if conf.Polar.Chain.ShanghaiTime, err = getUint64Ptr(flagShanghaiTime); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagShanghaiTime) } if conf.Polar.Chain.CancunTime, err = getUint64Ptr(flagCancunTime); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagCancunTime) } if conf.Polar.Chain.PragueTime, err = getUint64Ptr(flagPragueTime); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagPragueTime) } if conf.Polar.Chain.VerkleTime, err = getUint64Ptr(flagVerkleTime); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagVerkleTime) } if conf.Polar.Chain.TerminalTotalDifficulty, err = getBigInt(flagTerminalTotalDifficulty); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagTerminalTotalDifficulty) } if conf.Polar.Chain.TerminalTotalDifficultyPassed, err = getBool(flagTerminalTotalDifficultyPassed); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagTerminalTotalDifficultyPassed) } if conf.Polar.Chain.IsDevMode, err = getBool(flagIsDevMode); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagIsDevMode) } // Polar.GPO settings if conf.Polar.GPO.Blocks, err = getInt(flagBlocks); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagBlocks) } if conf.Polar.GPO.Percentile, err = getInt(flagPercentile); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagPercentile) } if conf.Polar.GPO.MaxHeaderHistory, err = getUint64(flagMaxHeaderHistory); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagMaxHeaderHistory) } if conf.Polar.GPO.MaxBlockHistory, err = getUint64(flagMaxBlockHistory); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagMaxBlockHistory) } if val, err = getInt64(flagDefault); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagDefault) } conf.Polar.GPO.Default = big.NewInt(val) - if val, err = getInt64(flagDefault); err != nil { - return nil, handleError(err) + if val, err = getInt64(flagMaxPrice); err != nil { + return nil, handleError(err, flagMaxPrice) } conf.Polar.GPO.MaxPrice = big.NewInt(val) - if val, err = getInt64(flagDefault); err != nil { - return nil, handleError(err) + if val, err = getInt64(flagIgnorePrice); err != nil { + return nil, handleError(err, flagIgnorePrice) } conf.Polar.GPO.IgnorePrice = big.NewInt(val) @@ -221,164 +233,164 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { conf.Polar.LegacyTxPool.Locals = getCommonAddressList(flagDefault) if conf.Polar.LegacyTxPool.NoLocals, err = getBool(flagNoLocals); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagNoLocals) } if conf.Polar.LegacyTxPool.Journal, err = getString(flagJournal); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagJournal) } if conf.Polar.LegacyTxPool.Rejournal, err = getTimeDuration(flagReJournal); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagReJournal) } if conf.Polar.LegacyTxPool.PriceLimit, err = getUint64(flagPriceLimit); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagPriceLimit) } if conf.Polar.LegacyTxPool.PriceBump, err = getUint64(flagPriceBump); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagPriceBump) } if conf.Polar.LegacyTxPool.AccountSlots, err = getUint64(flagAccountSlots); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagAccountSlots) } if conf.Polar.LegacyTxPool.GlobalSlots, err = getUint64(flagGlobalSlots); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagGlobalSlots) } if conf.Polar.LegacyTxPool.AccountQueue, err = getUint64(flagAccountQueue); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagAccountQueue) } if conf.Polar.LegacyTxPool.GlobalQueue, err = getUint64(flagGlobalQueue); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagGlobalQueue) } if conf.Polar.LegacyTxPool.Lifetime, err = getTimeDuration(flagLifetime); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagLifetime) } // Node settings if conf.Node.Name, err = getString(flagName); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagName) } if conf.Node.UserIdent, err = getString(flagUserIdent); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagUserIdent) } if conf.Node.Version, err = getString(flagVersion); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagVersion) } if conf.Node.DataDir, err = getString(flagDataDir); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagDataDir) } if conf.Node.DataDir == "" { conf.Node.DataDir, err = getString(flags.FlagHome) if err != nil { - return nil, handleError(err) + return nil, handleError(err, flags.FlagHome) } } if conf.Node.KeyStoreDir, err = getString(flagKeyStoreDir); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagKeyStoreDir) } if conf.Node.ExternalSigner, err = getString(flagExternalSigner); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagExternalSigner) } if conf.Node.UseLightweightKDF, err = getBool(flagUseLightweightKdf); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagUseLightweightKdf) } if conf.Node.InsecureUnlockAllowed, err = getBool(flagInsecureUnlockAllowed); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagInsecureUnlockAllowed) } if conf.Node.USB, err = getBool(flagUsb); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagUsb) } if conf.Node.SmartCardDaemonPath, err = getString(flagSmartCardDaemonPath); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagSmartCardDaemonPath) } if conf.Node.IPCPath, err = getString(flagIpcPath); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagIpcPath) } if conf.Node.HTTPHost, err = getString(flagHTTPHost); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHTTPHost) } if conf.Node.HTTPPort, err = getInt(flagHTTPPort); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHTTPPort) } if conf.Node.HTTPCors, err = getStringSlice(flagHTTPCors); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHTTPCors) } if conf.Node.HTTPVirtualHosts, err = getStringSlice(flagHTTPVirtualHosts); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHTTPVirtualHosts) } if conf.Node.HTTPModules, err = getStringSlice(flagHTTPModules); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHTTPModules) } if conf.Node.HTTPPathPrefix, err = getString(flagHTTPPathPrefix); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagHTTPPathPrefix) } if conf.Node.AuthAddr, err = getString(flagAuthAddr); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagAuthAddr) } if conf.Node.AuthPort, err = getInt(flagAuthPort); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagAuthPort) } if conf.Node.AuthVirtualHosts, err = getStringSlice(flagAuthVirtualHosts); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagAuthVirtualHosts) } if conf.Node.WSHost, err = getString(flagWsHost); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWsHost) } if conf.Node.WSPort, err = getInt(flagWsPort); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWsPort) } if conf.Node.WSPathPrefix, err = getString(flagWsPathPrefix); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWsPathPrefix) } if conf.Node.WSOrigins, err = getStringSlice(flagWsOrigins); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWsOrigins) } if conf.Node.WSModules, err = getStringSlice(flagWsModules); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWsModules) } if conf.Node.WSExposeAll, err = getBool(flagWsExposeAll); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWsExposeAll) } if conf.Node.GraphQLCors, err = getStringSlice(flagGraphqlCors); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagGraphqlCors) } if conf.Node.GraphQLVirtualHosts, err = getStringSlice(flagGraphqlVirtualHosts); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagGraphqlVirtualHosts) } if conf.Node.AllowUnprotectedTxs, err = getBool(flagAllowUnprotectedTxs); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagAllowUnprotectedTxs) } if conf.Node.BatchRequestLimit, err = getInt(flagBatchRequestLimit); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagBatchRequestLimit) } if conf.Node.BatchResponseMaxSize, err = getInt(flagBatchResponseMaxSize); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagBatchResponseMaxSize) } if conf.Node.JWTSecret, err = getString(flagJwtSecret); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagJwtSecret) } if conf.Node.DBEngine, err = getString(flagDBEngine); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagDBEngine) } // Node.HTTPTimeouts settings if conf.Node.HTTPTimeouts.ReadTimeout, err = getTimeDuration(flagReadTimeout); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagReadTimeout) } if conf.Node.HTTPTimeouts.ReadHeaderTimeout, err = getTimeDuration(flagReadHeaderTimeout); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagReadHeaderTimeout) } if conf.Node.HTTPTimeouts.WriteTimeout, err = getTimeDuration(flagWriteTimeout); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagWriteTimeout) } if conf.Node.HTTPTimeouts.IdleTimeout, err = getTimeDuration(flagIdleTimeout); err != nil { - return nil, handleError(err) + return nil, handleError(err, flagIdleTimeout) } return conf, nil diff --git a/cosmos/config/flags.go b/cosmos/config/flags.go index 0386d1386..4e6ee616a 100644 --- a/cosmos/config/flags.go +++ b/cosmos/config/flags.go @@ -51,6 +51,8 @@ const ( flagWsHost = "polaris.node.ws-host" flagName = "polaris.node.name" flagRPCEvmTimeout = "polaris.polar.rpc-evm-timeout" + flagRPCTxFeeCap = "polaris.polar.rpc-tx-fee-cap" + flagRPCGasCap = "polaris.polar.rpc-gas-cap" flagAuthVirtualHosts = "polaris.node.auth-virtual-hosts" flagAuthPort = "polaris.node.auth-port" flagUsb = "polaris.node.usb" @@ -58,14 +60,12 @@ const ( flagBatchResponseMaxSize = "polaris.node.batch-response-max-size" flagVersion = "polaris.node.version" flagHTTPVirtualHosts = "polaris.node.http-virtual-hosts" - flagRPCTxFeeCap = "polaris.polar.rpc-tx-fee-cap" flagMaxHeaderHistory = "polaris.polar.gpo.max-header-history" flagExternalSigner = "polaris.node.external-signer" flagHTTPPathPrefix = "polaris.node.http-path-prefix" flagWriteTimeout = "polaris.node.http-timeouts.write-timeout" flagReadHeaderTimeout = "polaris.node.http-timeouts.read-header-timeout" flagHTTPModules = "polaris.node.http-modules" - flagRPCGasCap = "polaris.polar.rpc-gas-cap" flagWsOrigins = "polaris.node.ws-origins" flagDefault = "polaris.node.http-timeouts.default" flagMaxPrice = "polaris.node.http-timeouts.max-price" diff --git a/cosmos/config/template.go b/cosmos/config/template.go index 1d6ff6743..0c3bccd13 100644 --- a/cosmos/config/template.go +++ b/cosmos/config/template.go @@ -29,6 +29,17 @@ const ( # General Polaris settings [polaris] +[polaris.polar] +# Gas cap for RPC requests +rpc-gas-cap = "{{ .Polaris.Polar.RPCGasCap }}" + +# Timeout setting for EVM operations via RPC +rpc-evm-timeout = "{{ .Polaris.Polar.RPCEVMTimeout }}" + +# Transaction fee cap for RPC requests +rpc-tx-fee-cap = "{{ .Polaris.Polar.RPCTxFeeCap }}" + + [polaris.polar.chain] chain-id = "{{ .Polaris.Polar.Chain.ChainID }}" @@ -96,36 +107,25 @@ verkle-time = "{{ .Polaris.Polar.Chain.VerkleTime }}" terminal-total-difficulty = "{{ .Polaris.Polar.Chain.TerminalTotalDifficulty }}" # Whether terminal total difficulty has passed -terminal-total-difficulty-passed = {{ .Polaris.Polar.Chain.TerminalTotalDifficultyPassed }} +terminal-total-difficulty-passed = "{{ .Polaris.Polar.Chain.TerminalTotalDifficultyPassed }}" # DevMode enabled is-dev-mode = {{ .Polaris.Polar.Chain.IsDevMode }} -[polaris.polar] -# Gas cap for RPC requests -rpc-gas-cap = "{{ .Polaris.Polar.RPCGasCap }}" - -# Timeout setting for EVM operations via RPC -rpc-evm-timeout = "{{ .Polaris.Polar.RPCEVMTimeout }}" - -# Transaction fee cap for RPC requests -rpc-tx-fee-cap = "{{ .Polaris.Polar.RPCTxFeeCap }}" - - # Gas price oracle settings for Polaris [polaris.polar.gpo] # Number of blocks to check for gas prices -blocks = {{ .Polaris.Polar.GPO.Blocks }} +blocks = "{{ .Polaris.Polar.GPO.Blocks }}" # Percentile of gas price to use -percentile = {{ .Polaris.Polar.GPO.Percentile }} +percentile = "{{ .Polaris.Polar.GPO.Percentile }}" # Maximum header history for gas price determination -max-header-history = {{ .Polaris.Polar.GPO.MaxHeaderHistory }} +max-header-history = "{{ .Polaris.Polar.GPO.MaxHeaderHistory }}" # Maximum block history for gas price determination -max-block-history = {{ .Polaris.Polar.GPO.MaxBlockHistory }} +max-block-history = "{{ .Polaris.Polar.GPO.MaxBlockHistory }}" # Default gas price value default = "{{ .Polaris.Polar.GPO.Default }}" @@ -152,22 +152,22 @@ journal = "{{ .Polaris.Polar.LegacyTxPool.Journal }}" rejournal = "{{ .Polaris.Polar.LegacyTxPool.Rejournal }}" # Minimum gas price to enforce for acceptance into the pool -price-limit = {{ .Polaris.Polar.LegacyTxPool.PriceLimit }} +price-limit = "{{ .Polaris.Polar.LegacyTxPool.PriceLimit }}" # Minimum price bump percentage to replace an already existing transaction (nonce) -price-bump = {{ .Polaris.Polar.LegacyTxPool.PriceBump }} +price-bump = "{{ .Polaris.Polar.LegacyTxPool.PriceBump }}" # Number of executable transaction slots guaranteed per account -account-slots = {{ .Polaris.Polar.LegacyTxPool.AccountSlots }} +account-slots = "{{ .Polaris.Polar.LegacyTxPool.AccountSlots }}" # Maximum number of executable transaction slots for all accounts -account-queue = {{.Polaris.Polar.LegacyTxPool.AccountQueue }} +account-queue = "{{.Polaris.Polar.LegacyTxPool.AccountQueue }}" # Maximum number of non-executable transaction slots permitted per account -global-slots = {{ .Polaris.Polar.LegacyTxPool.GlobalSlots }} +global-slots = "{{ .Polaris.Polar.LegacyTxPool.GlobalSlots }}" # Maximum number of non-executable transaction slots for all accounts -global-queue = {{ .Polaris.Polar.LegacyTxPool.GlobalQueue }} +global-queue = "{{ .Polaris.Polar.LegacyTxPool.GlobalQueue }}" # Maximum amount of time non-executable transaction are queued lifetime = "{{ .Polaris.Polar.LegacyTxPool.Lifetime }}" diff --git a/cosmos/x/evm/depinject.go b/cosmos/x/evm/depinject.go index 2535273b1..528f53311 100644 --- a/cosmos/x/evm/depinject.go +++ b/cosmos/x/evm/depinject.go @@ -31,7 +31,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" modulev1alpha1 "pkg.berachain.dev/polaris/cosmos/api/polaris/evm/module/v1alpha1" - evmconfig "pkg.berachain.dev/polaris/cosmos/config" + "pkg.berachain.dev/polaris/cosmos/config" "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" ) @@ -53,6 +53,7 @@ type DepInjectInput struct { AppOpts servertypes.AppOptions Logger log.Logger + PolarisCfg func() *config.Config CustomPrecompiles func() *ethprecompile.Injector `optional:"true"` QueryContextFn func() func(height int64, prove bool) (sdk.Context, error) TxConfig client.TxConfig @@ -76,14 +77,6 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { in.CustomPrecompiles = func() *ethprecompile.Injector { return ðprecompile.Injector{} } } - // read oracle config from app-opts, and construct oracle service - polarisCfg, err := evmconfig.ReadConfigFromAppOpts(in.AppOpts) - if err != nil { - // TODO: this is required because of depinject in root.go. - // TODO: fix. - polarisCfg = evmconfig.DefaultConfig() - } - k := keeper.NewKeeper( in.AccountKeeper, in.StakingKeeper, @@ -92,7 +85,7 @@ func ProvideModule(in DepInjectInput) DepInjectOutput { in.QueryContextFn, in.Logger, in.TxConfig, - polarisCfg, + in.PolarisCfg(), ) m := NewAppModule(k, in.AccountKeeper) diff --git a/cosmos/x/evm/genesis.go b/cosmos/x/evm/genesis.go index 4a2c532f0..0c1022021 100644 --- a/cosmos/x/evm/genesis.go +++ b/cosmos/x/evm/genesis.go @@ -22,8 +22,6 @@ package evm import ( "encoding/json" - "fmt" - "math/big" abci "github.com/cometbft/cometbft/abci/types" @@ -37,11 +35,12 @@ import ( // DefaultGenesis returns default genesis state as raw bytes for the evm // module. func (AppModuleBasic) DefaultGenesis(_ codec.JSONCodec) json.RawMessage { - ethGen, err := core.DefaultGenesis.MarshalJSON() + ethGen := core.DefaultGenesis + rawGenesis, err := ethGen.MarshalJSON() if err != nil { panic(err) } - return ethGen + return rawGenesis } // ValidateGenesis performs genesis state validation for the evm module. @@ -51,15 +50,16 @@ func (AppModuleBasic) ValidateGenesis(_ codec.JSONCodec, _ client.TxEncodingConf return err } - for address, account := range ethGen.Alloc { - if ethGen.Config.IsEIP155(big.NewInt(0)) && account.Code != nil && account.Nonce == 0 { - // NOTE: EIP 161 was released at the same block as EIP 155. - return fmt.Errorf( - "EIP-161 requires an account with code (%s) to have nonce of at least 1, given (0)", - address.Hex(), - ) - } - } + // TODO: reintroduce (use geth fgunction?) + // for address, account := range ethGen.Alloc { + // if ethGen.Config.IsEIP155(big.NewInt(0)) && account.Code != nil && account.Nonce == 0 { + // // NOTE: EIP 161 was released at the same block as EIP 155. + // return fmt.Errorf( + // "EIP-161 requires an account with code (%s) to have nonce of at least 1, given (0)", + // address.Hex(), + // ) + // } + // } return nil } diff --git a/cosmos/x/evm/keeper/genesis.go b/cosmos/x/evm/keeper/genesis.go index 617889139..355074b2b 100644 --- a/cosmos/x/evm/keeper/genesis.go +++ b/cosmos/x/evm/keeper/genesis.go @@ -30,6 +30,9 @@ import ( // InitGenesis is called during the InitGenesis. func (k *Keeper) InitGenesis(ctx sdk.Context, genState *core.Genesis) error { + // TODO: Feels jank as fuck lol, but it works. + genState.Config = k.host.GetConfigurationPlugin().ChainConfig() + // Initialize all the plugins. for _, plugin := range k.host.GetAllPlugins() { // checks whether plugin implements methods of HasGenesis and executes them if it does diff --git a/e2e/hive/clients/polard/Dockerfile b/e2e/hive/clients/polard/Dockerfile index 65a9d01fd..edfc95e70 100644 --- a/e2e/hive/clients/polard/Dockerfile +++ b/e2e/hive/clients/polard/Dockerfile @@ -16,7 +16,7 @@ # Use the latest foundry image FROM polard/base:v0.0.0 as polaris-hive -RUN apk add --no-cache bash jq +RUN apk add --no-cache bash jq sed WORKDIR / diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index 4cb8e1bae..a1cee97b3 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -106,8 +106,7 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] ############################################################################### ### API Configuration ### @@ -230,8 +229,19 @@ max-txs = 5000 # General Polaris settings [polaris] -[polaris.polar.chain] -chain-id = "1337" +[polaris.polar] +# Gas cap for RPC requests +rpc-gas-cap = "50000000" + +# Timeout setting for EVM operations via RPC +rpc-evm-timeout = "5s" + +# Transaction fee cap for RPC requests +rpc-tx-fee-cap = "1" + + +[polaris.polar.chain] +chain-id = "2061" # Homestead switch block homestead-block = "0" @@ -264,7 +274,7 @@ petersburg-block = "0" istanbul-block = "0" # Muir Glacier switch block -muir-glacier-block = "" +muir-glacier-block = "0" # Berlin switch block berlin-block = "0" @@ -282,17 +292,17 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = "0" +shanghai-time = 0 -# Cancun switch time (nil == no fork, 0 = already on cancun) -cancun-time = "" +cancun-time = "null" -# Prague switch time (nil == no fork, 0 = already on prague) -prague-time = "" +prague-time = "null" -# Verkle switch time (nil == no fork, 0 = already on verkle) -verkle-time = "" +verkle-time = "null" +# Cancun switch time (nil == no fork, 0 = already on cancun) +# Prague switch time (nil == no fork, 0 = already on prague) +# Verkle switch time (nil == no fork, 0 = already on verkle) # Terminal total difficulty terminal-total-difficulty = "0" @@ -303,17 +313,6 @@ terminal-total-difficulty-passed = true is-dev-mode = false -[polaris.polar] -# Gas cap for RPC requests -rpc-gas-cap = "50000000" - -# Timeout setting for EVM operations via RPC -rpc-evm-timeout = "5s" - -# Transaction fee cap for RPC requests -rpc-tx-fee-cap = "1" - - # Gas price oracle settings for Polaris [polaris.polar.gpo] # Number of blocks to check for gas prices diff --git a/e2e/hive/clients/polard/config/config.toml b/e2e/hive/clients/polard/config/config.toml index 9cf131454..e31ceeef2 100644 --- a/e2e/hive/clients/polard/config/config.toml +++ b/e2e/hive/clients/polard/config/config.toml @@ -99,10 +99,16 @@ laddr = "tcp://0.0.0.0:26657" cors_allowed_origins = [] # A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] +cors_allowed_methods = ["HEAD", "GET", "POST"] # A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] +cors_allowed_headers = [ + "Origin", + "Accept", + "Content-Type", + "X-Requested-With", + "X-Server-Time", +] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit diff --git a/e2e/hive/clients/polard/hive-init.sh b/e2e/hive/clients/polard/hive-init.sh index 7fa7401b9..0d6317772 100644 --- a/e2e/hive/clients/polard/hive-init.sh +++ b/e2e/hive/clients/polard/hive-init.sh @@ -43,7 +43,7 @@ GENESIS=$HOMEDIR/config/genesis.json TMP_GENESIS=$HOMEDIR/config/tmp_genesis.json # used to exit on first error (any non-zero exit code) -set -e +set # Reinstall daemon # mage build @@ -62,15 +62,19 @@ for KEY in "${KEYS[@]}"; do done ETH_GENESIS_SOURCE=$(cat genesis.json) +JSON_FILE="genesis.json" temp_genesis=$(cat $GENESIS) echo "eth_gen dump: " echo $ETH_GENESIS_SOURCE -# Change eth_genesis in config/genesis.json -# TODO FIX TO SETUP APP.TOML STUFF + +# # # Change eth_genesis in config/genesis.json +# # # TODO FIX TO SETUP APP.TOML STUFF updated_genesis=$(echo "$temp_genesis" | jq --argjson eth_gen "$ETH_GENESIS_SOURCE" '.app_state["evm"] = $eth_gen') echo "$updated_genesis" > "$GENESIS" +# echo "UPDATED FILE" + # Change parameter token denominations to abera jq '.app_state["staking"]["params"]["bond_denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" jq '.app_state["crisis"]["constant_fee"]["denom"]="abera"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" @@ -79,8 +83,8 @@ jq '.app_state["mint"]["params"]["mint_denom"]="abera"' "$GENESIS" >"$TMP_GENESI jq '.consensus["params"]["block"]["max_gas"]="30000000"' "$GENESIS" >"$TMP_GENESIS" && mv "$TMP_GENESIS" "$GENESIS" # Dump genesis -echo "genesis state:" -cat $GENESIS +# echo "genesis state:" +# cat $GENESIS # Allocate genesis accounts (cosmos formatted addresses) for KEY in "${KEYS[@]}"; do @@ -106,5 +110,56 @@ if [[ $1 == "pending" ]]; then echo "pending mode is on, please wait for the first block committed." fi +# Read values from JSON +CHAIN_ID=$(jq '.config.chainId' $JSON_FILE) +HOMESTEAD_BLOCK=$(jq '.config.homesteadBlock' $JSON_FILE) +DAO_FORK_BLOCK=$(jq '.config.daoForkBlock' $JSON_FILE) +DAO_FORK_SUPPORT=$(jq '.config.daoForkSupport' $JSON_FILE) +EIP150_BLOCK=$(jq '.config.eip150Block' $JSON_FILE) +EIP155_BLOCK=$(jq '.config.eip155Block' $JSON_FILE) +EIP158_BLOCK=$(jq '.config.eip158Block' $JSON_FILE) +BYZANTIUM_BLOCK=$(jq '.config.byzantiumBlock' $JSON_FILE) +CONSTANTINOPLE_BLOCK=$(jq '.config.constantinopleBlock' $JSON_FILE) +PETERSBURG_BLOCK=$(jq '.config.petersburgBlock' $JSON_FILE) +ISTANBUL_BLOCK=$(jq '.config.istanbulBlock' $JSON_FILE) +BERLIN_BLOCK=$(jq '.config.berlinBlock' $JSON_FILE) +LONDON_BLOCK=$(jq '.config.londonBlock' $JSON_FILE) +MUIR_GLACIER_BLOCK=$(jq '.config.muirGlacierBlock' $JSON_FILE) +ARROW_GLACIER_BLOCK=$(jq '.config.arrowGlacierBlock' $JSON_FILE) +GRAY_GLACIER_BLOCK=$(jq '.config.grayGlacierBlock' $JSON_FILE) +MERGE_NETSPLIT_BLOCK=$(jq '.config.mergeNetsplitBlock' $JSON_FILE) +SHANGHAI_TIME=$(jq '.config.shanghaiTime' $JSON_FILE) +TERMINAL_TOTAL_DIFFICULTY=$(jq '.config.terminalTotalDifficulty' $JSON_FILE) +TERMINAL_TOTAL_DIFFICULTY_PASSED=$(jq '.config.terminalTotalDifficultyPassed' $JSON_FILE) + +# Update values in TOML using sed command for Linux with -i and empty string argument +sed -i "s/chain-id = .*/chain-id = \"$CHAIN_ID\"/" $APP_TOML +sed -i "s/homestead-block = .*/homestead-block = \"$HOMESTEAD_BLOCK\"/" $APP_TOML +sed -i "s/dao-fork-block = .*/dao-fork-block = $DAO_FORK_BLOCK/" $APP_TOML +sed -i "s/dao-fork-support = .*/dao-fork-support = $DAO_FORK_SUPPORT/" $APP_TOML +sed -i "s/eip150-block = .*/eip150-block = \"$EIP150_BLOCK\"/" $APP_TOML +sed -i "s/eip155-block = .*/eip155-block = \"$EIP155_BLOCK\"/" $APP_TOML +sed -i "s/eip158-block = .*/eip158-block = \"$EIP158_BLOCK\"/" $APP_TOML +sed -i "s/byzantium-block = .*/byzantium-block = \"$BYZANTIUM_BLOCK\"/" $APP_TOML +sed -i "s/constantinople-block = .*/constantinople-block = \"$CONSTANTINOPLE_BLOCK\"/" $APP_TOML +sed -i "s/petersburg-block = .*/petersburg-block = \"$PETERSBURG_BLOCK\"/" $APP_TOML +sed -i "s/istanbul-block = .*/istanbul-block = \"$ISTANBUL_BLOCK\"/" $APP_TOML +sed -i "s/berlin-block = .*/berlin-block = \"$BERLIN_BLOCK\"/" $APP_TOML +sed -i "s/london-block = .*/london-block = \"$LONDON_BLOCK\"/" $APP_TOML +sed -i "s/muir-glacier-block = .*/muir-glacier-block = \"$MUIR_GLACIER_BLOCK\"/" $APP_TOML +sed -i "s/arrow-glacier-block = .*/arrow-glacier-block = \"$ARROW_GLACIER_BLOCK\"/" $APP_TOML +sed -i "s/gray-glacier-block = .*/gray-glacier-block = \"$GRAY_GLACIER_BLOCK\"/" $APP_TOML +sed -i "s/merge-netsplit-block = .*/merge-netsplit-block = \"$MERGE_NETSPLIT_BLOCK\"/" $APP_TOML +sed -i "s/shanghai-time = .*/shanghai-time = \"$SHANGHAI_TIME\"/" $APP_TOML +sed -i "s/terminal-total-difficulty = .*/terminal-total-difficulty = \"$TERMINAL_TOTAL_DIFFICULTY\"/" $APP_TOML +sed -i "s/terminal-total-difficulty-passed = .*/terminal-total-difficulty-passed = $TERMINAL_TOTAL_DIFFICULTY_PASSED/" $APP_TOML + +# sed -i 's/"null"/null/g' $APP_TOML +# sed -i 's/"null"/null/g' $APP_TOML +# cat "POSTSED" +# cat $APP_TOML +cat $APP_TOML +echo "BINGBONG" + # Start the node (remove the --pruning=nothing flag if historical queries are not needed)m polard start --pruning=nothing "$TRACE" --log_level $LOGLEVEL --api.enabled-unsafe-cors --api.enable --api.swagger --minimum-gas-prices=0.0001abera --home "$HOMEDIR" diff --git a/e2e/hive/simulators/rpc-compat/tests/genesis.json b/e2e/hive/simulators/rpc-compat/tests/genesis.json index cbda65608..222a44c77 100644 --- a/e2e/hive/simulators/rpc-compat/tests/genesis.json +++ b/e2e/hive/simulators/rpc-compat/tests/genesis.json @@ -2,6 +2,8 @@ "config": { "chainId": 1337, "homesteadBlock": 0, + "daoForkBlock": 0, + "daoForkSupport": true, "eip150Block": 0, "eip155Block": 0, "eip158Block": 0, @@ -9,12 +11,12 @@ "constantinopleBlock": 0, "petersburgBlock": 0, "istanbulBlock": 0, - "muirGlacierBlock": 0, "berlinBlock": 0, "londonBlock": 0, + "muirGlacierBlock": 0, "arrowGlacierBlock": 0, "grayGlacierBlock": 0, - "shanghaiTime": 0, + "mergeNetsplitBlock": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true, "ethash": {} diff --git a/e2e/hive/simulators/rpc/init/genesis.json b/e2e/hive/simulators/rpc/init/genesis.json index 78491db56..bf3434f1a 100644 --- a/e2e/hive/simulators/rpc/init/genesis.json +++ b/e2e/hive/simulators/rpc/init/genesis.json @@ -13,6 +13,7 @@ "istanbulBlock": 0, "berlinBlock": 0, "londonBlock": 0, + "muirGlacierBlock": 0, "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "mergeNetsplitBlock": 0, diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index d6c0ff9c5..a1cee97b3 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -106,8 +106,7 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] ############################################################################### ### API Configuration ### @@ -230,7 +229,18 @@ max-txs = 5000 # General Polaris settings [polaris] -[polaris.polar.chain] +[polaris.polar] +# Gas cap for RPC requests +rpc-gas-cap = "50000000" + +# Timeout setting for EVM operations via RPC +rpc-evm-timeout = "5s" + +# Transaction fee cap for RPC requests +rpc-tx-fee-cap = "1" + + +[polaris.polar.chain] chain-id = "2061" # Homestead switch block @@ -264,7 +274,7 @@ petersburg-block = "0" istanbul-block = "0" # Muir Glacier switch block -muir-glacier-block = "" +muir-glacier-block = "0" # Berlin switch block berlin-block = "0" @@ -282,17 +292,17 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = "0" +shanghai-time = 0 -# Cancun switch time (nil == no fork, 0 = already on cancun) -cancun-time = "" +cancun-time = "null" -# Prague switch time (nil == no fork, 0 = already on prague) -prague-time = "" +prague-time = "null" -# Verkle switch time (nil == no fork, 0 = already on verkle) -verkle-time = "" +verkle-time = "null" +# Cancun switch time (nil == no fork, 0 = already on cancun) +# Prague switch time (nil == no fork, 0 = already on prague) +# Verkle switch time (nil == no fork, 0 = already on verkle) # Terminal total difficulty terminal-total-difficulty = "0" @@ -303,17 +313,6 @@ terminal-total-difficulty-passed = true is-dev-mode = false -[polaris.polar] -# Gas cap for RPC requests -rpc-gas-cap = "50000000" - -# Timeout setting for EVM operations via RPC -rpc-evm-timeout = "5s" - -# Transaction fee cap for RPC requests -rpc-tx-fee-cap = "1" - - # Gas price oracle settings for Polaris [polaris.polar.gpo] # Number of blocks to check for gas prices diff --git a/e2e/precompile/polard/config/config.toml b/e2e/precompile/polard/config/config.toml index 8b30f02c4..608a74f81 100644 --- a/e2e/precompile/polard/config/config.toml +++ b/e2e/precompile/polard/config/config.toml @@ -95,10 +95,16 @@ laddr = "tcp://0.0.0.0:26657" cors_allowed_origins = [] # A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] +cors_allowed_methods = ["HEAD", "GET", "POST"] # A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] +cors_allowed_headers = [ + "Origin", + "Accept", + "Content-Type", + "X-Requested-With", + "X-Server-Time", +] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit @@ -438,7 +444,7 @@ discard_abci_responses = false # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" +indexer = "null" # The PostgreSQL connection configuration, the connection format: # postgresql://:@:/? diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index abcd87fc1..eb98ebf60 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -42,13 +42,9 @@ import ( "github.com/cosmos/cosmos-sdk/server/api" "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - testdata_pulsar "github.com/cosmos/cosmos-sdk/testutil/testdata/testpb" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" - authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" @@ -62,6 +58,7 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "pkg.berachain.dev/polaris/cosmos/abci" + evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" @@ -103,9 +100,6 @@ type SimApp struct { // polaris keepers EVMKeeper *evmkeeper.Keeper - - // simulation manager - sm *module.SimulationManager } //nolint:gochecknoinits // from sdk. @@ -143,6 +137,7 @@ func NewPolarisApp( // supply the logger logger, // ADVANCED CONFIGURATION + PolarisConfigFn(evmconfig.MustReadConfigFromAppOpts(appOpts)), PrecompilesToInject(app), QueryContextFn(app), // @@ -253,21 +248,6 @@ func NewPolarisApp( // RegisterUpgradeHandlers is used for registering any on-chain upgrades. app.RegisterUpgradeHandlers() - // add test gRPC service for testing gRPC queries in isolation - testdata_pulsar.RegisterQueryServer(app.GRPCQueryRouter(), testdata_pulsar.QueryImpl{}) - - // create the simulation manager and define the order of the modules for deterministic simulations - // - // NOTE: this is not required apps that don't use the simulator for fuzz testing - // transactions - overrideModules := map[string]module.AppModuleSimulation{ - authtypes.ModuleName: auth.NewAppModule(app.appCodec, - app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), - } - app.sm = module.NewSimulationManagerFromAppModules(app.ModuleManager.Modules, overrideModules) - - app.sm.RegisterStoreDecoders() - if err := app.Load(loadLatest); err != nil { panic(err) } @@ -337,7 +317,7 @@ func (app *SimApp) GetSubspace(moduleName string) paramstypes.Subspace { // SimulationManager implements the SimulationApp interface. func (app *SimApp) SimulationManager() *module.SimulationManager { - return app.sm + return nil } // RegisterAPIRoutes registers all application module routes with the provided diff --git a/e2e/testapp/docker/local/config/app.toml b/e2e/testapp/docker/local/config/app.toml index d6c0ff9c5..a1cee97b3 100644 --- a/e2e/testapp/docker/local/config/app.toml +++ b/e2e/testapp/docker/local/config/app.toml @@ -106,8 +106,7 @@ prometheus-retention-time = 0 # # Example: # [["chain_id", "cosmoshub-1"]] -global-labels = [ -] +global-labels = [] ############################################################################### ### API Configuration ### @@ -230,7 +229,18 @@ max-txs = 5000 # General Polaris settings [polaris] -[polaris.polar.chain] +[polaris.polar] +# Gas cap for RPC requests +rpc-gas-cap = "50000000" + +# Timeout setting for EVM operations via RPC +rpc-evm-timeout = "5s" + +# Transaction fee cap for RPC requests +rpc-tx-fee-cap = "1" + + +[polaris.polar.chain] chain-id = "2061" # Homestead switch block @@ -264,7 +274,7 @@ petersburg-block = "0" istanbul-block = "0" # Muir Glacier switch block -muir-glacier-block = "" +muir-glacier-block = "0" # Berlin switch block berlin-block = "0" @@ -282,17 +292,17 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = "0" +shanghai-time = 0 -# Cancun switch time (nil == no fork, 0 = already on cancun) -cancun-time = "" +cancun-time = "null" -# Prague switch time (nil == no fork, 0 = already on prague) -prague-time = "" +prague-time = "null" -# Verkle switch time (nil == no fork, 0 = already on verkle) -verkle-time = "" +verkle-time = "null" +# Cancun switch time (nil == no fork, 0 = already on cancun) +# Prague switch time (nil == no fork, 0 = already on prague) +# Verkle switch time (nil == no fork, 0 = already on verkle) # Terminal total difficulty terminal-total-difficulty = "0" @@ -303,17 +313,6 @@ terminal-total-difficulty-passed = true is-dev-mode = false -[polaris.polar] -# Gas cap for RPC requests -rpc-gas-cap = "50000000" - -# Timeout setting for EVM operations via RPC -rpc-evm-timeout = "5s" - -# Transaction fee cap for RPC requests -rpc-tx-fee-cap = "1" - - # Gas price oracle settings for Polaris [polaris.polar.gpo] # Number of blocks to check for gas prices diff --git a/e2e/testapp/docker/local/config/config.toml b/e2e/testapp/docker/local/config/config.toml index aaa9a6f94..b34bd1564 100644 --- a/e2e/testapp/docker/local/config/config.toml +++ b/e2e/testapp/docker/local/config/config.toml @@ -95,10 +95,16 @@ laddr = "tcp://127.0.0.1:26657" cors_allowed_origins = [] # A list of methods the client is allowed to use with cross-domain requests -cors_allowed_methods = ["HEAD", "GET", "POST", ] +cors_allowed_methods = ["HEAD", "GET", "POST"] # A list of non simple headers the client is allowed to use with cross-domain requests -cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] +cors_allowed_headers = [ + "Origin", + "Accept", + "Content-Type", + "X-Requested-With", + "X-Server-Time", +] # TCP or UNIX socket address for the gRPC server to listen on # NOTE: This server only supports /broadcast_tx_commit @@ -428,7 +434,7 @@ discard_abci_responses = false # - When "kv" is chosen "tx.height" and "tx.hash" will always be indexed. # 3) "psql" - the indexer services backed by PostgreSQL. # When "kv" or "psql" is chosen "tx.height" and "tx.hash" will always be indexed. -indexer = "kv" +indexer = "null" # The PostgreSQL connection configuration, the connection format: # postgresql://:@:/? diff --git a/e2e/testapp/helpers.go b/e2e/testapp/helpers.go index cd6e6c408..f6740f8a6 100644 --- a/e2e/testapp/helpers.go +++ b/e2e/testapp/helpers.go @@ -26,6 +26,7 @@ import ( distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + evmconfig "pkg.berachain.dev/polaris/cosmos/config" bankprecompile "pkg.berachain.dev/polaris/cosmos/precompile/bank" distrprecompile "pkg.berachain.dev/polaris/cosmos/precompile/distribution" govprecompile "pkg.berachain.dev/polaris/cosmos/precompile/governance" @@ -73,3 +74,9 @@ func QueryContextFn(app *SimApp) func() func(height int64, prove bool) (sdk.Cont return app.BaseApp.CreateQueryContext } } + +func PolarisConfigFn(cfg *evmconfig.Config) func() *evmconfig.Config { + return func() *evmconfig.Config { + return cfg + } +} diff --git a/e2e/testapp/polard/cmd/root.go b/e2e/testapp/polard/cmd/root.go index 9013f999d..c360dea6f 100644 --- a/e2e/testapp/polard/cmd/root.go +++ b/e2e/testapp/polard/cmd/root.go @@ -83,6 +83,7 @@ func NewRootCmd() *cobra.Command { if err := depinject.Inject(depinject.Configs( testapp.MakeAppConfig(""), depinject.Supply( + testapp.PolarisConfigFn(evmconfig.DefaultConfig()), testapp.QueryContextFn((&testapp.SimApp{})), log.NewNopLogger(), simtestutil.NewAppOptionsWithFlagHome(tempDir()), diff --git a/eth/core/chain.go b/eth/core/chain.go index f4c19ad7e..49bcae0e2 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -118,7 +118,7 @@ func NewChain(host PolarisHostChain) *blockchain { //nolint:revive // only used logger: log.Root(), } bc.statedb = state.NewStateDB(bc.sp) - bc.currentBlock.Store(nil) //types.NewBlock(&types.Header{Number: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) + bc.currentBlock.Store(nil) bc.finalizedBlock.Store(nil) return bc diff --git a/eth/core/genesis.go b/eth/core/genesis.go index f9b01ab30..c66f3dfb3 100644 --- a/eth/core/genesis.go +++ b/eth/core/genesis.go @@ -28,7 +28,6 @@ import ( "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/common/hexutil" "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/params" ) type ( @@ -39,9 +38,6 @@ type ( // DefaultGenesis is the default genesis block used by Polaris. var DefaultGenesis = &core.Genesis{ - // Genesis Config - Config: params.DefaultChainConfig, - // Genesis Block Nonce: 0, Timestamp: 0, @@ -50,7 +46,6 @@ var DefaultGenesis = &core.Genesis{ Difficulty: big.NewInt(0), Mixhash: common.Hash{}, Coinbase: common.Address{}, - BaseFee: big.NewInt(int64(params.InitialBaseFee)), // Genesis Accounts Alloc: core.GenesisAlloc{ @@ -59,12 +54,23 @@ var DefaultGenesis = &core.Genesis{ Balance: big.NewInt(0).Mul(big.NewInt(5e18), big.NewInt(100)), //nolint:gomnd // its okay. }, }, + + // These fields are used for consensus tests. Please don't use them + // in actual genesis blocks. + Number: 0, + GasUsed: 0, + ParentHash: common.Hash{}, + BaseFee: nil, + ExcessBlobGas: nil, + BlobGasUsed: nil, + + // These fields are used for consensus tests. Please don't use them + // in actual genesis blocks. } // UnmarshalGenesisHeader sets the fields of the given header into the Genesis struct. func UnmarshalGenesisHeader(header *types.Header, gen *Genesis) { // Note: cannot set the state root on the genesis. - gen.Number = header.Number.Uint64() gen.Nonce = header.Nonce.Uint64() gen.Timestamp = header.Time gen.ParentHash = header.ParentHash @@ -75,4 +81,5 @@ func UnmarshalGenesisHeader(header *types.Header, gen *Genesis) { gen.Difficulty = header.Difficulty gen.Mixhash = header.MixDigest gen.Coinbase = header.Coinbase + gen.Number = header.Number.Uint64() } diff --git a/eth/params/chain_config.go b/eth/params/chain_config.go index afa250baa..e563d180e 100644 --- a/eth/params/chain_config.go +++ b/eth/params/chain_config.go @@ -29,20 +29,18 @@ const DefaultEIP155ChainID = 2061 var zero = uint64(0) var DefaultChainConfig = &ChainConfig{ - ChainID: big.NewInt(DefaultEIP155ChainID), + ChainID: big.NewInt(1), HomesteadBlock: big.NewInt(0), DAOForkBlock: big.NewInt(0), DAOForkSupport: true, EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), - ShanghaiTime: &zero, - CancunTime: nil, - PragueTime: nil, ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), + MuirGlacierBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), ArrowGlacierBlock: big.NewInt(0), @@ -50,6 +48,5 @@ var DefaultChainConfig = &ChainConfig{ MergeNetsplitBlock: big.NewInt(0), TerminalTotalDifficulty: big.NewInt(0), TerminalTotalDifficultyPassed: true, - Ethash: nil, - Clique: nil, + ShanghaiTime: &zero, } diff --git a/eth/polar/config.go b/eth/polar/config.go index 96b9d7096..66145cd7a 100644 --- a/eth/polar/config.go +++ b/eth/polar/config.go @@ -65,12 +65,12 @@ type Config struct { LegacyTxPool legacypool.Config // RPCGasCap is the global gas cap for eth-call variants. - RPCGasCap uint64 `toml:""` + RPCGasCap uint64 // RPCEVMTimeout is the global timeout for eth-call. - RPCEVMTimeout time.Duration `toml:""` + RPCEVMTimeout time.Duration // RPCTxFeeCap is the global transaction fee(price * gaslimit) cap for // send-transaction variants. The unit is ether. - RPCTxFeeCap float64 `toml:""` + RPCTxFeeCap float64 } diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 0a733dc2f..3af43447b 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -23,6 +23,7 @@ package polar import ( "math/big" "net/http" + "time" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/core/txpool" @@ -175,9 +176,13 @@ func (pl *Polaris) StartServices() error { pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) // Stack the networking stack. - if err := pl.stack.Start(); err != nil { - panic(err) - } + go func() { + // TODO: fix hive (this is required for hive to not break) + time.Sleep(5 * time.Second) //nolint:gomnd // for hive to not freak out... + if err := pl.stack.Start(); err != nil { + panic(err) + } + }() return nil } From 754052a74f6206acba1ce74b01c61319b3ebd90a Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 14:08:06 -0400 Subject: [PATCH 46/94] revert genesis.json to main --- e2e/hive/clients/polard/config/genesis.json | 1 - e2e/hive/simulators/rpc-compat/tests/genesis.json | 7 +++---- e2e/hive/simulators/rpc/init/genesis.json | 1 - e2e/precompile/polard/config/genesis.json | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/e2e/hive/clients/polard/config/genesis.json b/e2e/hive/clients/polard/config/genesis.json index 95d86e9c5..750e22bf9 100644 --- a/e2e/hive/clients/polard/config/genesis.json +++ b/e2e/hive/clients/polard/config/genesis.json @@ -150,7 +150,6 @@ "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "mergeNetsplitBlock": 0, - "shanghaiTime": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true }, diff --git a/e2e/hive/simulators/rpc-compat/tests/genesis.json b/e2e/hive/simulators/rpc-compat/tests/genesis.json index 222a44c77..2cbc5bf45 100644 --- a/e2e/hive/simulators/rpc-compat/tests/genesis.json +++ b/e2e/hive/simulators/rpc-compat/tests/genesis.json @@ -2,21 +2,20 @@ "config": { "chainId": 1337, "homesteadBlock": 0, - "daoForkBlock": 0, - "daoForkSupport": true, "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, "eip158Block": 0, "byzantiumBlock": 0, "constantinopleBlock": 0, "petersburgBlock": 0, "istanbulBlock": 0, + "muirGlacierBlock": 0, "berlinBlock": 0, "londonBlock": 0, - "muirGlacierBlock": 0, "arrowGlacierBlock": 0, "grayGlacierBlock": 0, - "mergeNetsplitBlock": 0, + "shanghaiTime": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true, "ethash": {} diff --git a/e2e/hive/simulators/rpc/init/genesis.json b/e2e/hive/simulators/rpc/init/genesis.json index bf3434f1a..78491db56 100644 --- a/e2e/hive/simulators/rpc/init/genesis.json +++ b/e2e/hive/simulators/rpc/init/genesis.json @@ -13,7 +13,6 @@ "istanbulBlock": 0, "berlinBlock": 0, "londonBlock": 0, - "muirGlacierBlock": 0, "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "mergeNetsplitBlock": 0, diff --git a/e2e/precompile/polard/config/genesis.json b/e2e/precompile/polard/config/genesis.json index 5c43e126d..6a25263e1 100644 --- a/e2e/precompile/polard/config/genesis.json +++ b/e2e/precompile/polard/config/genesis.json @@ -394,7 +394,6 @@ "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "mergeNetsplitBlock": 0, - "shanghaiTime": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true }, From 26c6b1e5bebfa76e69f4d65e828d5797a123fc83 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 14:10:31 -0400 Subject: [PATCH 47/94] app.toml --- e2e/hive/clients/polard/config/app.toml | 8 ++++---- e2e/precompile/polard/config/app.toml | 8 ++++---- e2e/testapp/docker/local/config/app.toml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index a1cee97b3..739da46cf 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -292,17 +292,17 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = 0 +shanghai-time = "null" +# Cancun switch time (nil == no fork, 0 = already on cancun) cancun-time = "null" +# Prague switch time (nil == no fork, 0 = already on prague) prague-time = "null" +# Verkle switch time (nil == no fork, 0 = already on verkle) verkle-time = "null" -# Cancun switch time (nil == no fork, 0 = already on cancun) -# Prague switch time (nil == no fork, 0 = already on prague) -# Verkle switch time (nil == no fork, 0 = already on verkle) # Terminal total difficulty terminal-total-difficulty = "0" diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index a1cee97b3..739da46cf 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -292,17 +292,17 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = 0 +shanghai-time = "null" +# Cancun switch time (nil == no fork, 0 = already on cancun) cancun-time = "null" +# Prague switch time (nil == no fork, 0 = already on prague) prague-time = "null" +# Verkle switch time (nil == no fork, 0 = already on verkle) verkle-time = "null" -# Cancun switch time (nil == no fork, 0 = already on cancun) -# Prague switch time (nil == no fork, 0 = already on prague) -# Verkle switch time (nil == no fork, 0 = already on verkle) # Terminal total difficulty terminal-total-difficulty = "0" diff --git a/e2e/testapp/docker/local/config/app.toml b/e2e/testapp/docker/local/config/app.toml index a1cee97b3..739da46cf 100644 --- a/e2e/testapp/docker/local/config/app.toml +++ b/e2e/testapp/docker/local/config/app.toml @@ -292,17 +292,17 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = 0 +shanghai-time = "null" +# Cancun switch time (nil == no fork, 0 = already on cancun) cancun-time = "null" +# Prague switch time (nil == no fork, 0 = already on prague) prague-time = "null" +# Verkle switch time (nil == no fork, 0 = already on verkle) verkle-time = "null" -# Cancun switch time (nil == no fork, 0 = already on cancun) -# Prague switch time (nil == no fork, 0 = already on prague) -# Verkle switch time (nil == no fork, 0 = already on verkle) # Terminal total difficulty terminal-total-difficulty = "0" From a217ebf9565d5f0f726dcbcdc54b258a6b35e8e2 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 14:42:11 -0400 Subject: [PATCH 48/94] failed tests to 1 hive --- cosmos/config/config.go | 6 ++++++ e2e/hive/simulators/rpc-compat/tests/genesis.json | 2 ++ e2e/hive/simulators/rpc/init/genesis.json | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cosmos/config/config.go b/cosmos/config/config.go index b2cbb92cd..e334f22c3 100644 --- a/cosmos/config/config.go +++ b/cosmos/config/config.go @@ -101,6 +101,9 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { } getBigInt := func(key string) (*big.Int, error) { str, _err := cast.ToStringE(opts.Get(key)) + if str, _ := cast.ToStringE((opts.Get(key))); str == "" || str == "null" { + return nil, nil //nolint:nilnil // intentional. + } if _err != nil { return nil, _err } @@ -181,6 +184,9 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { if conf.Polar.Chain.ShanghaiTime, err = getUint64Ptr(flagShanghaiTime); err != nil { return nil, handleError(err, flagShanghaiTime) } + + fmt.Println("SHANGHAI TIME SHOULD BE NIL", conf.Polar.Chain.ShanghaiTime) + if conf.Polar.Chain.CancunTime, err = getUint64Ptr(flagCancunTime); err != nil { return nil, handleError(err, flagCancunTime) } diff --git a/e2e/hive/simulators/rpc-compat/tests/genesis.json b/e2e/hive/simulators/rpc-compat/tests/genesis.json index 2cbc5bf45..e4a81dc93 100644 --- a/e2e/hive/simulators/rpc-compat/tests/genesis.json +++ b/e2e/hive/simulators/rpc-compat/tests/genesis.json @@ -2,6 +2,8 @@ "config": { "chainId": 1337, "homesteadBlock": 0, + "daoForkBlock": 0, + "daoForkSupport": true, "eip150Block": 0, "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip155Block": 0, diff --git a/e2e/hive/simulators/rpc/init/genesis.json b/e2e/hive/simulators/rpc/init/genesis.json index 78491db56..55b7a6953 100644 --- a/e2e/hive/simulators/rpc/init/genesis.json +++ b/e2e/hive/simulators/rpc/init/genesis.json @@ -11,12 +11,12 @@ "constantinopleBlock": 0, "petersburgBlock": 0, "istanbulBlock": 0, + "muirGlacierBlock": 0, "berlinBlock": 0, "londonBlock": 0, "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "mergeNetsplitBlock": 0, - "shanghaiTime": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true }, From 06302f37cae4c3e896201a4b3d1238d7dd4d21fc Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 15:07:57 -0400 Subject: [PATCH 49/94] some cleanup --- cosmos/config/config.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cosmos/config/config.go b/cosmos/config/config.go index e334f22c3..e559553f3 100644 --- a/cosmos/config/config.go +++ b/cosmos/config/config.go @@ -101,7 +101,7 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { } getBigInt := func(key string) (*big.Int, error) { str, _err := cast.ToStringE(opts.Get(key)) - if str, _ := cast.ToStringE((opts.Get(key))); str == "" || str == "null" { + if str == "" || str == "null" { return nil, nil //nolint:nilnil // intentional. } if _err != nil { @@ -185,8 +185,6 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { return nil, handleError(err, flagShanghaiTime) } - fmt.Println("SHANGHAI TIME SHOULD BE NIL", conf.Polar.Chain.ShanghaiTime) - if conf.Polar.Chain.CancunTime, err = getUint64Ptr(flagCancunTime); err != nil { return nil, handleError(err, flagCancunTime) } From 3565443548f90de0b0ff24117e07ebb4f72e0681 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 15:27:40 -0400 Subject: [PATCH 50/94] fix unit test --- cosmos/x/evm/genesis_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index ece8ed552..d0cf6ded1 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -40,6 +40,7 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" + "pkg.berachain.dev/polaris/eth/params" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -58,8 +59,13 @@ var _ = Describe("", func() { err error ) + zero := uint64(0) + BeforeEach(func() { ethGen = core.DefaultGenesis + ethGen.Config = ¶ms.ChainConfig{ + ShanghaiTime: &zero, + } ctx, ak, _, sk = testutil.SetupMinimalKeepers() ctx = ctx.WithBlockHeight(0) sc = staking.NewPrecompileContract(ak, &sk) From 428e82b61e0fd15331393e147aa7c8da456c66bf Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 15:43:49 -0400 Subject: [PATCH 51/94] fix unit test --- cosmos/x/evm/genesis_test.go | 10 +++++----- cosmos/x/evm/keeper/processor_test.go | 12 +++--------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index d0cf6ded1..03b61131a 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -24,6 +24,7 @@ import ( "bytes" "encoding/json" "fmt" + "math/big" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -59,13 +60,10 @@ var _ = Describe("", func() { err error ) - zero := uint64(0) + ethGen = core.DefaultGenesis + ethGen.Config = params.DefaultChainConfig BeforeEach(func() { - ethGen = core.DefaultGenesis - ethGen.Config = ¶ms.ChainConfig{ - ShanghaiTime: &zero, - } ctx, ak, _, sk = testutil.SetupMinimalKeepers() ctx = ctx.WithBlockHeight(0) sc = staking.NewPrecompileContract(ak, &sk) @@ -174,6 +172,8 @@ var _ = Describe("", func() { When("the genesis is valid", func() { It("should export without fail", func() { + ethGen.Config = nil + ethGen.BaseFee = big.NewInt(int64(params.InitialBaseFee)) Expect(actualGenesis).To(Equal(*ethGen)) }) }) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 847851e1f..f40879a39 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -38,7 +38,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/precompile/staking" testutil "pkg.berachain.dev/polaris/cosmos/testing/utils" "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/eth/accounts/abi" "pkg.berachain.dev/polaris/eth/common" @@ -47,7 +46,6 @@ import ( coretypes "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/crypto" "pkg.berachain.dev/polaris/eth/params" - "pkg.berachain.dev/polaris/lib/utils" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -103,13 +101,8 @@ var _ = Describe("Processor", func() { cfg, ) ctx = ctx.WithBlockHeight(0) - - for _, plugin := range k.Polaris().Host().(keeper.Host).GetAllPlugins() { - plugin, hasInitGenesis := utils.GetAs[plugins.HasGenesis](plugin) - if hasInitGenesis { - Expect(plugin.InitGenesis(ctx, core.DefaultGenesis)).To(Succeed()) - } - } + genState := core.DefaultGenesis + k.InitGenesis(ctx, genState) validator, err := NewValidator(sdk.ValAddress(valAddr), PKs[0]) Expect(err).ToNot(HaveOccurred()) validator.Status = stakingtypes.Bonded @@ -139,6 +132,7 @@ var _ = Describe("Processor", func() { BeforeEach(func() { // before every tx ctx = ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) + // := k.BeginBlocker(ctx) }) AfterEach(func() { From 82883abcf49f4c5a8288252f16ccd0b98615b1dc Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 15:45:38 -0400 Subject: [PATCH 52/94] lint --- cosmos/x/evm/keeper/processor_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index f40879a39..55035c728 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -102,7 +102,7 @@ var _ = Describe("Processor", func() { ) ctx = ctx.WithBlockHeight(0) genState := core.DefaultGenesis - k.InitGenesis(ctx, genState) + Expect(k.InitGenesis(ctx, genState)).ToNot(HaveOccurred()) validator, err := NewValidator(sdk.ValAddress(valAddr), PKs[0]) Expect(err).ToNot(HaveOccurred()) validator.Status = stakingtypes.Bonded From 1ea7771839fdd86b46efdfc61172bca58a39ccdc Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 15:54:40 -0400 Subject: [PATCH 53/94] some cleanup --- cosmos/x/evm/keeper/processor_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 55035c728..74c43c274 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -132,7 +132,6 @@ var _ = Describe("Processor", func() { BeforeEach(func() { // before every tx ctx = ctx.WithGasMeter(storetypes.NewInfiniteGasMeter()) - // := k.BeginBlocker(ctx) }) AfterEach(func() { From dcdb207af66b7589ef9339366337c2120ce93aa2 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 16:41:56 -0400 Subject: [PATCH 54/94] fix test --- cosmos/x/evm/genesis_test.go | 25 +++++++++++++------------ e2e/testapp/helpers.go | 2 ++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 03b61131a..298cc3183 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -47,27 +47,28 @@ import ( . "github.com/onsi/gomega" ) +var ( + ethGen = core.DefaultGenesis +) + var _ = Describe("", func() { var ( - cdc codec.JSONCodec - ctx sdk.Context - sc ethprecompile.StatefulImpl - ak state.AccountKeeper - sk stakingkeeper.Keeper - k *keeper.Keeper - ethGen *core.Genesis - am evm.AppModule - err error + cdc codec.JSONCodec + ctx sdk.Context + sc ethprecompile.StatefulImpl + ak state.AccountKeeper + sk stakingkeeper.Keeper + k *keeper.Keeper + am evm.AppModule + err error ) - ethGen = core.DefaultGenesis - ethGen.Config = params.DefaultChainConfig - BeforeEach(func() { ctx, ak, _, sk = testutil.SetupMinimalKeepers() ctx = ctx.WithBlockHeight(0) sc = staking.NewPrecompileContract(ak, &sk) cfg := config.DefaultConfig() + ethGen.Config = params.DefaultChainConfig cfg.Node.DataDir = GinkgoT().TempDir() cfg.Node.KeyStoreDir = GinkgoT().TempDir() k = keeper.NewKeeper( diff --git a/e2e/testapp/helpers.go b/e2e/testapp/helpers.go index f6740f8a6..30a579431 100644 --- a/e2e/testapp/helpers.go +++ b/e2e/testapp/helpers.go @@ -75,6 +75,8 @@ func QueryContextFn(app *SimApp) func() func(height int64, prove bool) (sdk.Cont } } +// PolarisConfigFn returns a function that provides the initialization of the standard +// set of precompiles. func PolarisConfigFn(cfg *evmconfig.Config) func() *evmconfig.Config { return func() *evmconfig.Config { return cfg From 47994fd1a7e4a9ca12711e30dc58caade986a103 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 17:05:09 -0400 Subject: [PATCH 55/94] lint and fix address codec --- cosmos/precompile/bank/bank.go | 28 +++++++-------- .../precompile/distribution/distribution.go | 34 +++++++++---------- cosmos/precompile/governance/governance.go | 26 +++++++------- e2e/localnet/network/node.go | 2 +- e2e/testapp/app.go | 2 ++ e2e/testapp/entrypoint.sh | 2 +- 6 files changed, 45 insertions(+), 49 deletions(-) diff --git a/cosmos/precompile/bank/bank.go b/cosmos/precompile/bank/bank.go index 7f63ecc09..75947b708 100644 --- a/cosmos/precompile/bank/bank.go +++ b/cosmos/precompile/bank/bank.go @@ -24,8 +24,6 @@ import ( "context" "math/big" - "cosmossdk.io/core/address" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -42,9 +40,9 @@ import ( type Contract struct { ethprecompile.BaseContract - addressCodec address.Codec - msgServer banktypes.MsgServer - querier banktypes.QueryServer + codec cosmlib.CodecProvider + msgServer banktypes.MsgServer + querier banktypes.QueryServer } // NewPrecompileContract returns a new instance of the bank precompile contract. @@ -56,9 +54,9 @@ func NewPrecompileContract( bankgenerated.BankModuleMetaData.ABI, common.BytesToAddress(authtypes.NewModuleAddress(banktypes.ModuleName)), ), - addressCodec: ak.AddressCodec(), - msgServer: ms, - querier: qs, + codec: ak, + msgServer: ms, + querier: qs, } } @@ -79,7 +77,7 @@ func (c *Contract) GetBalance( accountAddress common.Address, denom string, ) (*big.Int, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) if err != nil { return nil, err } @@ -101,7 +99,7 @@ func (c *Contract) GetAllBalances( ctx context.Context, accountAddress common.Address, ) ([]lib.CosmosCoin, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) if err != nil { return nil, err } @@ -122,7 +120,7 @@ func (c *Contract) GetSpendableBalance( accountAddress common.Address, denom string, ) (*big.Int, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) if err != nil { return nil, err } @@ -144,7 +142,7 @@ func (c *Contract) GetAllSpendableBalances( ctx context.Context, accountAddress common.Address, ) ([]lib.CosmosCoin, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) if err != nil { return nil, err } @@ -249,12 +247,12 @@ func (c *Contract) Send( return false, err } caller, err := cosmlib.StringFromEthAddress( - c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), + c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err } - toAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, toAddress) + toAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), toAddress) if err != nil { return false, err } @@ -271,5 +269,5 @@ func (c *Contract) Send( // common.Address. func (c *Contract) ConvertAccAddressFromString(attributeValue string) (any, error) { // extract the sdk.AccAddress from string value as common.Address - return cosmlib.EthAddressFromString(c.addressCodec, attributeValue) + return cosmlib.EthAddressFromString(c.codec.AddressCodec(), attributeValue) } diff --git a/cosmos/precompile/distribution/distribution.go b/cosmos/precompile/distribution/distribution.go index 9d350edb1..01f3c8f03 100644 --- a/cosmos/precompile/distribution/distribution.go +++ b/cosmos/precompile/distribution/distribution.go @@ -23,8 +23,6 @@ package distribution import ( "context" - "cosmossdk.io/core/address" - sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -41,10 +39,10 @@ import ( type Contract struct { ethprecompile.BaseContract - addressCodec address.Codec - vs staking.ValidatorStore - msgServer distributiontypes.MsgServer - querier distributiontypes.QueryServer + codec cosmlib.CodecProvider + vs staking.ValidatorStore + msgServer distributiontypes.MsgServer + querier distributiontypes.QueryServer } // NewPrecompileContract returns a new instance of the distribution module precompile contract. @@ -59,10 +57,10 @@ func NewPrecompileContract( generated.DistributionModuleMetaData.ABI, common.BytesToAddress([]byte{0x69}), ), - addressCodec: ak.AddressCodec(), - vs: vs, - msgServer: m, - querier: q, + codec: ak, + vs: vs, + msgServer: m, + querier: q, } } @@ -79,12 +77,12 @@ func (c *Contract) SetWithdrawAddress( withdrawAddress common.Address, ) (bool, error) { delAddr, err := cosmlib.StringFromEthAddress( - c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), + c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err } - withdrawAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, withdrawAddress) + withdrawAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), withdrawAddress) if err != nil { return false, err } @@ -101,7 +99,7 @@ func (c *Contract) GetWithdrawAddress( ctx context.Context, delegator common.Address, ) (common.Address, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) if err != nil { return common.Address{}, err } @@ -116,7 +114,7 @@ func (c *Contract) GetWithdrawAddress( return common.Address{}, err } - withdrawAddr, err := cosmlib.EthAddressFromString(c.addressCodec, resp.WithdrawAddress) + withdrawAddr, err := cosmlib.EthAddressFromString(c.codec.AddressCodec(), resp.WithdrawAddress) if err != nil { return common.Address{}, err } @@ -138,7 +136,7 @@ func (c *Contract) WithdrawDelegatorReward( delegator common.Address, validator common.Address, ) ([]lib.CosmosCoin, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) if err != nil { return nil, err } @@ -171,7 +169,7 @@ func (c *Contract) GetAllDelegatorRewards( ctx context.Context, delegator common.Address, ) ([]generated.IDistributionModuleValidatorReward, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) if err != nil { return nil, err } @@ -219,7 +217,7 @@ func (c *Contract) GetTotalDelegatorReward( ctx context.Context, delegator common.Address, ) ([]lib.CosmosCoin, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) if err != nil { return nil, err } @@ -259,5 +257,5 @@ func (c *Contract) ConvertValAddressFromString(attributeValue string) (any, erro // common.Address. func (c *Contract) ConvertAccAddressFromString(attributeValue string) (any, error) { // extract the sdk.AccAddress from string value as common.Address - return cosmlib.EthAddressFromString(c.addressCodec, attributeValue) + return cosmlib.EthAddressFromString(c.codec.AddressCodec(), attributeValue) } diff --git a/cosmos/precompile/governance/governance.go b/cosmos/precompile/governance/governance.go index 58a8ff61a..d19e482d6 100644 --- a/cosmos/precompile/governance/governance.go +++ b/cosmos/precompile/governance/governance.go @@ -25,8 +25,6 @@ import ( "encoding/json" "strconv" - "cosmossdk.io/core/address" - sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -52,9 +50,9 @@ const ( type Contract struct { ethprecompile.BaseContract - addressCodec address.Codec - msgServer v1.MsgServer - querier v1.QueryServer + codec cosmlib.CodecProvider + msgServer v1.MsgServer + querier v1.QueryServer } // NewPrecompileContract creates a new precompile contract for the governance module. @@ -65,9 +63,9 @@ func NewPrecompileContract(ak cosmlib.CodecProvider, m v1.MsgServer, q v1.QueryS // Precompile Address: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 common.BytesToAddress(authtypes.NewModuleAddress(govtypes.ModuleName)), ), - addressCodec: ak.AddressCodec(), - msgServer: m, - querier: q, + codec: ak, + msgServer: m, + querier: q, } } @@ -113,7 +111,7 @@ func (c *Contract) CancelProposal( id uint64, ) (uint64, uint64, error) { caller, err := cosmlib.StringFromEthAddress( - c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), + c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return 0, 0, err @@ -138,7 +136,7 @@ func (c *Contract) Vote( metadata string, ) (bool, error) { caller, err := cosmlib.StringFromEthAddress( - c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), + c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err @@ -195,7 +193,7 @@ func (c *Contract) VoteWeighted( } } caller, err := cosmlib.StringFromEthAddress( - c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), + c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err @@ -298,7 +296,7 @@ func (c *Contract) GetProposalDepositsByDepositor( proposalID uint64, depositor common.Address, ) ([]generated.CosmosCoin, error) { - depositorBech32, err := cosmlib.StringFromEthAddress(c.addressCodec, depositor) + depositorBech32, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), depositor) if err != nil { return nil, err } @@ -369,7 +367,7 @@ func (c *Contract) GetProposalVotes( ) } var voter common.Address - voter, err = cosmlib.EthAddressFromString(c.addressCodec, vote.Voter) + voter, err = cosmlib.EthAddressFromString(c.codec.AddressCodec(), vote.Voter) if err != nil { return nil, cbindings.CosmosPageResponse{}, err } @@ -391,7 +389,7 @@ func (c *Contract) GetProposalVotesByVoter( proposalID uint64, voter common.Address, ) (generated.IGovernanceModuleVote, error) { - voterBech32, err := cosmlib.StringFromEthAddress(c.addressCodec, voter) + voterBech32, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), voter) if err != nil { return generated.IGovernanceModuleVote{}, err } diff --git a/e2e/localnet/network/node.go b/e2e/localnet/network/node.go index 4fe08647d..c0e3b3980 100644 --- a/e2e/localnet/network/node.go +++ b/e2e/localnet/network/node.go @@ -38,7 +38,7 @@ import ( const ( defaultTimeout = 30 * time.Second - nodeStartTime = 10 * time.Second + nodeStartTime = 15 * time.Second ) // ContainerizedNode is an interface for a containerized network. diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index eb98ebf60..b92b4aca3 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -36,6 +36,7 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" @@ -137,6 +138,7 @@ func NewPolarisApp( // supply the logger logger, // ADVANCED CONFIGURATION + address.NewBech32Codec(bech32Prefix), PolarisConfigFn(evmconfig.MustReadConfigFromAppOpts(appOpts)), PrecompilesToInject(app), QueryContextFn(app), diff --git a/e2e/testapp/entrypoint.sh b/e2e/testapp/entrypoint.sh index 386756720..962759994 100755 --- a/e2e/testapp/entrypoint.sh +++ b/e2e/testapp/entrypoint.sh @@ -54,7 +54,7 @@ mage build # echo "Overwrite the existing configuration and start a new local node? [y/n]" # read -r overwrite # else -overwrite="Y" +overwrite="N" # fi # Setup local node if overwrite is set to Yes, otherwise skip setup From 0e0b8909a06bb9e8c716aa426815713104da09f1 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 17:40:19 -0400 Subject: [PATCH 56/94] push --- cosmos/precompile/bank/bank.go | 28 ++++++++------- .../precompile/distribution/distribution.go | 34 ++++++++++--------- cosmos/precompile/governance/governance.go | 26 +++++++------- cosmos/x/evm/genesis_test.go | 1 - cosmos/x/evm/keeper/host.go | 18 +++++++--- cosmos/x/evm/keeper/keeper.go | 4 +++ cosmos/x/evm/keeper/processor_test.go | 1 + cosmos/x/evm/plugins/state/plugin.go | 6 ++++ e2e/localnet/network/node.go | 2 +- e2e/testapp/app.go | 5 +-- 10 files changed, 75 insertions(+), 50 deletions(-) diff --git a/cosmos/precompile/bank/bank.go b/cosmos/precompile/bank/bank.go index 75947b708..7f63ecc09 100644 --- a/cosmos/precompile/bank/bank.go +++ b/cosmos/precompile/bank/bank.go @@ -24,6 +24,8 @@ import ( "context" "math/big" + "cosmossdk.io/core/address" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" @@ -40,9 +42,9 @@ import ( type Contract struct { ethprecompile.BaseContract - codec cosmlib.CodecProvider - msgServer banktypes.MsgServer - querier banktypes.QueryServer + addressCodec address.Codec + msgServer banktypes.MsgServer + querier banktypes.QueryServer } // NewPrecompileContract returns a new instance of the bank precompile contract. @@ -54,9 +56,9 @@ func NewPrecompileContract( bankgenerated.BankModuleMetaData.ABI, common.BytesToAddress(authtypes.NewModuleAddress(banktypes.ModuleName)), ), - codec: ak, - msgServer: ms, - querier: qs, + addressCodec: ak.AddressCodec(), + msgServer: ms, + querier: qs, } } @@ -77,7 +79,7 @@ func (c *Contract) GetBalance( accountAddress common.Address, denom string, ) (*big.Int, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) if err != nil { return nil, err } @@ -99,7 +101,7 @@ func (c *Contract) GetAllBalances( ctx context.Context, accountAddress common.Address, ) ([]lib.CosmosCoin, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) if err != nil { return nil, err } @@ -120,7 +122,7 @@ func (c *Contract) GetSpendableBalance( accountAddress common.Address, denom string, ) (*big.Int, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) if err != nil { return nil, err } @@ -142,7 +144,7 @@ func (c *Contract) GetAllSpendableBalances( ctx context.Context, accountAddress common.Address, ) ([]lib.CosmosCoin, error) { - accAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), accountAddress) + accAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, accountAddress) if err != nil { return nil, err } @@ -247,12 +249,12 @@ func (c *Contract) Send( return false, err } caller, err := cosmlib.StringFromEthAddress( - c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), + c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err } - toAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), toAddress) + toAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, toAddress) if err != nil { return false, err } @@ -269,5 +271,5 @@ func (c *Contract) Send( // common.Address. func (c *Contract) ConvertAccAddressFromString(attributeValue string) (any, error) { // extract the sdk.AccAddress from string value as common.Address - return cosmlib.EthAddressFromString(c.codec.AddressCodec(), attributeValue) + return cosmlib.EthAddressFromString(c.addressCodec, attributeValue) } diff --git a/cosmos/precompile/distribution/distribution.go b/cosmos/precompile/distribution/distribution.go index 01f3c8f03..9d350edb1 100644 --- a/cosmos/precompile/distribution/distribution.go +++ b/cosmos/precompile/distribution/distribution.go @@ -23,6 +23,8 @@ package distribution import ( "context" + "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" @@ -39,10 +41,10 @@ import ( type Contract struct { ethprecompile.BaseContract - codec cosmlib.CodecProvider - vs staking.ValidatorStore - msgServer distributiontypes.MsgServer - querier distributiontypes.QueryServer + addressCodec address.Codec + vs staking.ValidatorStore + msgServer distributiontypes.MsgServer + querier distributiontypes.QueryServer } // NewPrecompileContract returns a new instance of the distribution module precompile contract. @@ -57,10 +59,10 @@ func NewPrecompileContract( generated.DistributionModuleMetaData.ABI, common.BytesToAddress([]byte{0x69}), ), - codec: ak, - vs: vs, - msgServer: m, - querier: q, + addressCodec: ak.AddressCodec(), + vs: vs, + msgServer: m, + querier: q, } } @@ -77,12 +79,12 @@ func (c *Contract) SetWithdrawAddress( withdrawAddress common.Address, ) (bool, error) { delAddr, err := cosmlib.StringFromEthAddress( - c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), + c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err } - withdrawAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), withdrawAddress) + withdrawAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, withdrawAddress) if err != nil { return false, err } @@ -99,7 +101,7 @@ func (c *Contract) GetWithdrawAddress( ctx context.Context, delegator common.Address, ) (common.Address, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) if err != nil { return common.Address{}, err } @@ -114,7 +116,7 @@ func (c *Contract) GetWithdrawAddress( return common.Address{}, err } - withdrawAddr, err := cosmlib.EthAddressFromString(c.codec.AddressCodec(), resp.WithdrawAddress) + withdrawAddr, err := cosmlib.EthAddressFromString(c.addressCodec, resp.WithdrawAddress) if err != nil { return common.Address{}, err } @@ -136,7 +138,7 @@ func (c *Contract) WithdrawDelegatorReward( delegator common.Address, validator common.Address, ) ([]lib.CosmosCoin, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) if err != nil { return nil, err } @@ -169,7 +171,7 @@ func (c *Contract) GetAllDelegatorRewards( ctx context.Context, delegator common.Address, ) ([]generated.IDistributionModuleValidatorReward, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) if err != nil { return nil, err } @@ -217,7 +219,7 @@ func (c *Contract) GetTotalDelegatorReward( ctx context.Context, delegator common.Address, ) ([]lib.CosmosCoin, error) { - delAddr, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), delegator) + delAddr, err := cosmlib.StringFromEthAddress(c.addressCodec, delegator) if err != nil { return nil, err } @@ -257,5 +259,5 @@ func (c *Contract) ConvertValAddressFromString(attributeValue string) (any, erro // common.Address. func (c *Contract) ConvertAccAddressFromString(attributeValue string) (any, error) { // extract the sdk.AccAddress from string value as common.Address - return cosmlib.EthAddressFromString(c.codec.AddressCodec(), attributeValue) + return cosmlib.EthAddressFromString(c.addressCodec, attributeValue) } diff --git a/cosmos/precompile/governance/governance.go b/cosmos/precompile/governance/governance.go index d19e482d6..58a8ff61a 100644 --- a/cosmos/precompile/governance/governance.go +++ b/cosmos/precompile/governance/governance.go @@ -25,6 +25,8 @@ import ( "encoding/json" "strconv" + "cosmossdk.io/core/address" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" @@ -50,9 +52,9 @@ const ( type Contract struct { ethprecompile.BaseContract - codec cosmlib.CodecProvider - msgServer v1.MsgServer - querier v1.QueryServer + addressCodec address.Codec + msgServer v1.MsgServer + querier v1.QueryServer } // NewPrecompileContract creates a new precompile contract for the governance module. @@ -63,9 +65,9 @@ func NewPrecompileContract(ak cosmlib.CodecProvider, m v1.MsgServer, q v1.QueryS // Precompile Address: 0x7b5Fe22B5446f7C62Ea27B8BD71CeF94e03f3dF2 common.BytesToAddress(authtypes.NewModuleAddress(govtypes.ModuleName)), ), - codec: ak, - msgServer: m, - querier: q, + addressCodec: ak.AddressCodec(), + msgServer: m, + querier: q, } } @@ -111,7 +113,7 @@ func (c *Contract) CancelProposal( id uint64, ) (uint64, uint64, error) { caller, err := cosmlib.StringFromEthAddress( - c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), + c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return 0, 0, err @@ -136,7 +138,7 @@ func (c *Contract) Vote( metadata string, ) (bool, error) { caller, err := cosmlib.StringFromEthAddress( - c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), + c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err @@ -193,7 +195,7 @@ func (c *Contract) VoteWeighted( } } caller, err := cosmlib.StringFromEthAddress( - c.codec.AddressCodec(), vm.UnwrapPolarContext(ctx).MsgSender(), + c.addressCodec, vm.UnwrapPolarContext(ctx).MsgSender(), ) if err != nil { return false, err @@ -296,7 +298,7 @@ func (c *Contract) GetProposalDepositsByDepositor( proposalID uint64, depositor common.Address, ) ([]generated.CosmosCoin, error) { - depositorBech32, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), depositor) + depositorBech32, err := cosmlib.StringFromEthAddress(c.addressCodec, depositor) if err != nil { return nil, err } @@ -367,7 +369,7 @@ func (c *Contract) GetProposalVotes( ) } var voter common.Address - voter, err = cosmlib.EthAddressFromString(c.codec.AddressCodec(), vote.Voter) + voter, err = cosmlib.EthAddressFromString(c.addressCodec, vote.Voter) if err != nil { return nil, cbindings.CosmosPageResponse{}, err } @@ -389,7 +391,7 @@ func (c *Contract) GetProposalVotesByVoter( proposalID uint64, voter common.Address, ) (generated.IGovernanceModuleVote, error) { - voterBech32, err := cosmlib.StringFromEthAddress(c.codec.AddressCodec(), voter) + voterBech32, err := cosmlib.StringFromEthAddress(c.addressCodec, voter) if err != nil { return generated.IGovernanceModuleVote{}, err } diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 298cc3183..147a5faa3 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -82,7 +82,6 @@ var _ = Describe("", func() { nil, cfg, ) - am = evm.NewAppModule(k, ak) }) diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 085785630..b2c395a04 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -48,6 +48,7 @@ var _ core.PolarisHostChain = (*host)(nil) type Host interface { core.PolarisHostChain GetAllPlugins() []any + SetupPrecompiles() } type host struct { @@ -64,6 +65,7 @@ type host struct { ak state.AccountKeeper storeKey storetypes.StoreKey pcs func() *ethprecompile.Injector + qc func() func(height int64, prove bool) (sdk.Context, error) } // Newhost creates new instances of the plugin host. @@ -88,19 +90,25 @@ func NewHost( h.pcs = precompiles h.storeKey = storeKey h.ak = ak + h.qc = qc // Setup the state, precompile, historical, and txpool plugins - h.sp = state.NewPlugin(h.ak, h.storeKey, log.NewFactory(h.pcs().GetPrecompiles())) - h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) // TODO: re-enable historical plugin using ABCI listener. h.hp = historical.NewPlugin(h.cp, h.bp, nil, h.storeKey) + h.bp.SetQueryContextFn(h.qc) + h.sp = state.NewPlugin(h.ak, h.storeKey, nil) - // Set the query context function for the block and state plugins - h.sp.SetQueryContextFn(qc) - h.bp.SetQueryContextFn(qc) return h } +// SetupPrecompiles intializes the precompile contracts. +func (h *host) SetupPrecompiles() { + // Set the query context function for the block and state plugins + h.sp.SetQueryContextFn(h.qc) + h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) + h.sp.SetPrecompileLogFactory(log.NewFactory(h.pcs().GetPrecompiles())) +} + // GetBlockPlugin returns the header plugin. func (h *host) GetBlockPlugin() core.BlockPlugin { return h.bp diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 96401abfd..e8c5514fe 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -105,6 +105,10 @@ func NewKeeper( } } +func (k *Keeper) SetupPrecompiles() { + k.host.SetupPrecompiles() +} + // Logger returns a module-specific logger. func (k *Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With(types.ModuleName) diff --git a/cosmos/x/evm/keeper/processor_test.go b/cosmos/x/evm/keeper/processor_test.go index 74c43c274..ef7fb36b9 100644 --- a/cosmos/x/evm/keeper/processor_test.go +++ b/cosmos/x/evm/keeper/processor_test.go @@ -100,6 +100,7 @@ var _ = Describe("Processor", func() { nil, cfg, ) + k.SetupPrecompiles() ctx = ctx.WithBlockHeight(0) genState := core.DefaultGenesis Expect(k.InitGenesis(ctx, genState)).ToNot(HaveOccurred()) diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index 3938b7e40..1a2c952a0 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -63,6 +63,8 @@ type Plugin interface { IterateState(fn func(addr common.Address, key common.Hash, value common.Hash) bool) // SetGasConfig sets the gas config for the plugin. SetGasConfig(storetypes.GasConfig, storetypes.GasConfig) + // SetPrecompileLogFactory sets the log factory on the plugin + SetPrecompileLogFactory(events.PrecompileLogFactory) } // The StatePlugin is a very fun and interesting part of the EVM implementation. But if you want to @@ -129,6 +131,10 @@ func NewPlugin( } } +func (p *plugin) SetPrecompileLogFactory(plf events.PrecompileLogFactory) { + p.plf = plf +} + // Prepare sets up the context on the state plugin for a new block. It sets the gas configs to be 0 // so that query calls to the EVM (ones that do not invoke a new transaction) do not charge gas. // diff --git a/e2e/localnet/network/node.go b/e2e/localnet/network/node.go index c0e3b3980..4fe08647d 100644 --- a/e2e/localnet/network/node.go +++ b/e2e/localnet/network/node.go @@ -38,7 +38,7 @@ import ( const ( defaultTimeout = 30 * time.Second - nodeStartTime = 15 * time.Second + nodeStartTime = 10 * time.Second ) // ContainerizedNode is an interface for a containerized network. diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index b92b4aca3..715c3b060 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -36,7 +36,6 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/address" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/server" @@ -138,7 +137,6 @@ func NewPolarisApp( // supply the logger logger, // ADVANCED CONFIGURATION - address.NewBech32Codec(bech32Prefix), PolarisConfigFn(evmconfig.MustReadConfigFromAppOpts(appOpts)), PrecompilesToInject(app), QueryContextFn(app), @@ -250,6 +248,9 @@ func NewPolarisApp( // RegisterUpgradeHandlers is used for registering any on-chain upgrades. app.RegisterUpgradeHandlers() + // SetupPrecompiles is used to setup the precompile contracts post depinject. + app.EVMKeeper.SetupPrecompiles() + if err := app.Load(loadLatest); err != nil { panic(err) } From 8dea165a4c11c70f7b01db56ccf667095685f840 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 19:50:54 -0400 Subject: [PATCH 57/94] fix e2e --- cosmos/x/evm/genesis_test.go | 1 + cosmos/x/evm/keeper/host.go | 28 +++++++++++++--------- cosmos/x/evm/keeper/keeper.go | 9 +++---- cosmos/x/evm/plugins/precompile/plugin.go | 5 ++++ cosmos/x/evm/plugins/state/genesis_test.go | 3 ++- cosmos/x/evm/plugins/state/plugin.go | 20 +++++++++++++--- cosmos/x/evm/plugins/state/plugin_test.go | 10 ++++++-- e2e/hive/clients/polard/config/app.toml | 2 +- e2e/localnet/network/node.go | 2 +- e2e/precompile/polard/config/app.toml | 2 +- e2e/testapp/docker/local/config/app.toml | 2 +- eth/polar/polaris.go | 8 +++---- magefiles/ci.go | 2 +- 13 files changed, 64 insertions(+), 30 deletions(-) diff --git a/cosmos/x/evm/genesis_test.go b/cosmos/x/evm/genesis_test.go index 147a5faa3..dd1bb8a35 100644 --- a/cosmos/x/evm/genesis_test.go +++ b/cosmos/x/evm/genesis_test.go @@ -82,6 +82,7 @@ var _ = Describe("", func() { nil, cfg, ) + k.SetupPrecompiles() am = evm.NewAppModule(k, ak) }) diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index b2c395a04..39775e773 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -21,6 +21,7 @@ package keeper import ( + "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/client" @@ -33,7 +34,7 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/gas" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/historical" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log" + pclog "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/eth/core" @@ -53,14 +54,15 @@ type Host interface { type host struct { // The various plugins that are are used to implement core.PolarisHostChain. - bp block.Plugin - cp configuration.Plugin - ep engine.Plugin - gp gas.Plugin - hp historical.Plugin - pp precompile.Plugin - sp state.Plugin - txp txpool.Plugin + bp block.Plugin + cp configuration.Plugin + ep engine.Plugin + gp gas.Plugin + hp historical.Plugin + pp precompile.Plugin + sp state.Plugin + txp txpool.Plugin + logger log.Logger ak state.AccountKeeper storeKey storetypes.StoreKey @@ -77,6 +79,7 @@ func NewHost( precompiles func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), txConfig client.TxConfig, + logger log.Logger, ) Host { // We setup the host with some Cosmos standard sauce. h := &host{} @@ -91,11 +94,13 @@ func NewHost( h.storeKey = storeKey h.ak = ak h.qc = qc + h.logger = logger // Setup the state, precompile, historical, and txpool plugins // TODO: re-enable historical plugin using ABCI listener. h.hp = historical.NewPlugin(h.cp, h.bp, nil, h.storeKey) h.bp.SetQueryContextFn(h.qc) + h.pp = precompile.NewPlugin(nil) h.sp = state.NewPlugin(h.ak, h.storeKey, nil) return h @@ -105,8 +110,9 @@ func NewHost( func (h *host) SetupPrecompiles() { // Set the query context function for the block and state plugins h.sp.SetQueryContextFn(h.qc) - h.pp = precompile.NewPlugin(h.pcs().GetPrecompiles()) - h.sp.SetPrecompileLogFactory(log.NewFactory(h.pcs().GetPrecompiles())) + pcs := h.pcs().GetPrecompiles() + h.pp.SetPrecompiles(pcs) + h.sp.SetupForPrecompiles(h.pp, pclog.NewFactory(pcs)) } // GetBlockPlugin returns the header plugin. diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index e8c5514fe..13819e691 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -72,6 +72,7 @@ func NewKeeper( pcs, qc, txConfig, + logger, ) node, err := polar.NewGethNetworkingStack(&polarisCfg.Node) @@ -94,10 +95,6 @@ func NewKeeper( }), ) - if err = polaris.Init(); err != nil { - panic(err) - } - return &Keeper{ polaris: polaris, host: host, @@ -107,6 +104,10 @@ func NewKeeper( func (k *Keeper) SetupPrecompiles() { k.host.SetupPrecompiles() + + if err := k.polaris.Init(); err != nil { + panic(err) + } } // Logger returns a module-specific logger. diff --git a/cosmos/x/evm/plugins/precompile/plugin.go b/cosmos/x/evm/plugins/precompile/plugin.go index de506e76e..e8fbb5261 100644 --- a/cosmos/x/evm/plugins/precompile/plugin.go +++ b/cosmos/x/evm/plugins/precompile/plugin.go @@ -42,6 +42,7 @@ import ( // Plugin is the interface that must be implemented by the plugin. type Plugin interface { core.PrecompilePlugin + SetPrecompiles([]ethprecompile.Registrable) } // polarisStateDB is the interface that must be implemented by the state DB. @@ -74,6 +75,10 @@ func NewPlugin(precompiles []ethprecompile.Registrable) Plugin { } } +func (p *plugin) SetPrecompiles(precompiles []ethprecompile.Registrable) { + p.precompiles = precompiles +} + // GetPrecompiles implements core.PrecompilePlugin. func (p *plugin) GetPrecompiles(_ *params.Rules) []ethprecompile.Registrable { return p.precompiles diff --git a/cosmos/x/evm/plugins/state/genesis_test.go b/cosmos/x/evm/plugins/state/genesis_test.go index 1400fe693..516f5cc2c 100644 --- a/cosmos/x/evm/plugins/state/genesis_test.go +++ b/cosmos/x/evm/plugins/state/genesis_test.go @@ -45,7 +45,8 @@ var _ = Describe("Genesis", func() { BeforeEach(func() { var ak state.AccountKeeper ctx, ak, _, _ = testutil.SetupMinimalKeepers() - sp = state.NewPlugin(ak, testutil.EvmKey, nil) + sp = state.NewPlugin(ak, testutil.EvmKey, &mockPLF{}) + sp.SetupForPrecompiles(&mockPrecompiles{}, &mockPLF{}) // Create account for alice, bob acc := ak.NewAccountWithAddress(ctx, bob[:]) diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index 1a2c952a0..8657a112a 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -51,6 +51,10 @@ var ( emptyCodeHashBytes = emptyCodeHash.Bytes() ) +type PrecompilePlugin interface { + Has(common.Address) bool +} + // Plugin is the interface that must be implemented by the plugin. type Plugin interface { plugins.HasGenesis @@ -63,8 +67,8 @@ type Plugin interface { IterateState(fn func(addr common.Address, key common.Hash, value common.Hash) bool) // SetGasConfig sets the gas config for the plugin. SetGasConfig(storetypes.GasConfig, storetypes.GasConfig) - // SetPrecompileLogFactory sets the log factory on the plugin - SetPrecompileLogFactory(events.PrecompileLogFactory) + // SetupForPrecompiles sets the log factory on the plugin + SetupForPrecompiles(pp PrecompilePlugin, plf events.PrecompileLogFactory) } // The StatePlugin is a very fun and interesting part of the EVM implementation. But if you want to @@ -106,6 +110,7 @@ type plugin struct { // keepers used for balance and account information. ak AccountKeeper + pp PrecompilePlugin // getQueryContext allows for querying state a historical height. getQueryContext func() func(height int64, prove bool) (sdk.Context, error) @@ -131,7 +136,9 @@ func NewPlugin( } } -func (p *plugin) SetPrecompileLogFactory(plf events.PrecompileLogFactory) { +// SetupForPrecompiles sets the precompile plugin and the log factory on the state plugin. +func (p *plugin) SetupForPrecompiles(pp PrecompilePlugin, plf events.PrecompileLogFactory) { + p.pp = pp p.plf = plf } @@ -345,6 +352,11 @@ func (p *plugin) GetCodeHash(addr common.Address) common.Hash { // GetCode implements the `StatePlugin` interface by returning // the code of account (nil if not exists). func (p *plugin) GetCode(addr common.Address) []byte { + // We return a single byte for client compatibility. + if p.pp.Has(addr) { + return []byte{0x01} + } + codeHash := p.GetCodeHash(addr) if (codeHash == common.Hash{}) || codeHash == emptyCodeHash { // if account at addr does not exist or the account does not have a codehash, return nil @@ -554,6 +566,7 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { // Create a State Plugin with the requested chain height. sp := NewPlugin(p.ak, p.storeKey, p.plf) + sp.SetupForPrecompiles(p.pp, p.plf) sp.Reset(ctx) return sp, nil } @@ -565,6 +578,7 @@ func (p *plugin) StateAtBlockNumber(number uint64) (core.StatePlugin, error) { // Clone implements libtypes.Cloneable. func (p *plugin) Clone() ethstate.Plugin { sp := NewPlugin(p.ak, p.storeKey, p.plf) + sp.SetupForPrecompiles(p.pp, p.plf) cacheCtx, _ := p.ctx.CacheContext() sp.Reset(cacheCtx) return sp diff --git a/cosmos/x/evm/plugins/state/plugin_test.go b/cosmos/x/evm/plugins/state/plugin_test.go index 6cff43fe9..f37a45fd8 100644 --- a/cosmos/x/evm/plugins/state/plugin_test.go +++ b/cosmos/x/evm/plugins/state/plugin_test.go @@ -28,7 +28,6 @@ import ( testutil "pkg.berachain.dev/polaris/cosmos/testing/utils" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" "pkg.berachain.dev/polaris/eth/common" - "pkg.berachain.dev/polaris/eth/core" coretypes "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/crypto" @@ -45,11 +44,12 @@ var ( var _ = Describe("State Plugin", func() { var ak state.AccountKeeper var ctx sdk.Context - var sp core.StatePlugin + var sp state.Plugin BeforeEach(func() { ctx, ak, _, _ = testutil.SetupMinimalKeepers() sp = state.NewPlugin(ak, testutil.EvmKey, &mockPLF{}) + sp.SetupForPrecompiles(&mockPrecompiles{}, &mockPLF{}) sp.Reset(ctx) }) @@ -472,3 +472,9 @@ func (mplf *mockPLF) Build(event *sdk.Event) (*coretypes.Log, error) { Address: common.BytesToAddress([]byte(event.Type)), }, nil } + +type mockPrecompiles struct{} + +func (mpc *mockPrecompiles) Has(_ common.Address) bool { + return false +} diff --git a/e2e/hive/clients/polard/config/app.toml b/e2e/hive/clients/polard/config/app.toml index 739da46cf..a7615f28d 100644 --- a/e2e/hive/clients/polard/config/app.toml +++ b/e2e/hive/clients/polard/config/app.toml @@ -292,7 +292,7 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = "null" +shanghai-time = "0" # Cancun switch time (nil == no fork, 0 = already on cancun) cancun-time = "null" diff --git a/e2e/localnet/network/node.go b/e2e/localnet/network/node.go index 4fe08647d..c57f05ee3 100644 --- a/e2e/localnet/network/node.go +++ b/e2e/localnet/network/node.go @@ -38,7 +38,7 @@ import ( const ( defaultTimeout = 30 * time.Second - nodeStartTime = 10 * time.Second + nodeStartTime = 7 * time.Second ) // ContainerizedNode is an interface for a containerized network. diff --git a/e2e/precompile/polard/config/app.toml b/e2e/precompile/polard/config/app.toml index 739da46cf..a7615f28d 100644 --- a/e2e/precompile/polard/config/app.toml +++ b/e2e/precompile/polard/config/app.toml @@ -292,7 +292,7 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = "null" +shanghai-time = "0" # Cancun switch time (nil == no fork, 0 = already on cancun) cancun-time = "null" diff --git a/e2e/testapp/docker/local/config/app.toml b/e2e/testapp/docker/local/config/app.toml index 739da46cf..a7615f28d 100644 --- a/e2e/testapp/docker/local/config/app.toml +++ b/e2e/testapp/docker/local/config/app.toml @@ -292,7 +292,7 @@ gray-glacier-block = "0" merge-netsplit-block = "0" # Shanghai switch time (nil == no fork, 0 = already on shanghai) -shanghai-time = "null" +shanghai-time = "0" # Cancun switch time (nil == no fork, 0 = already on cancun) cancun-time = "null" diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 3af43447b..ed8a86005 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -113,14 +113,14 @@ func NewWithNetworkingStack( log.Root().SetHandler(logHandler) } - // TODO: this needs to be moved to Init() - pl.miner = miner.New(pl) - return pl } // Init initializes the Polaris struct. func (pl *Polaris) Init() error { + pl.backend = NewBackend(pl, pl.stack.ExtRPCEnabled(), pl.cfg) + pl.miner = miner.New(pl) + var err error legacyPool := legacypool.New( pl.cfg.LegacyTxPool, pl.Blockchain(), @@ -137,7 +137,7 @@ func (pl *Polaris) Init() error { // eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) // Build and set the RPC Backend and other services. - pl.backend = NewBackend(pl, pl.stack.ExtRPCEnabled(), pl.cfg) + // if eth.APIBackend.allowUnprotectedTxs { // log.Info("Unprotected transactions allowed") // } diff --git a/magefiles/ci.go b/magefiles/ci.go index daa924763..4c1148ed7 100644 --- a/magefiles/ci.go +++ b/magefiles/ci.go @@ -113,7 +113,7 @@ func TestE2E() error { return err } utils.LogGreen("Running all e2e tests") - return testE2E(".") + return testE2E("./e2e") } func testE2E(path string) error { From 4381be292f7367e54b79601efed3f0e7fb5335f3 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 23:03:02 -0400 Subject: [PATCH 58/94] fix data race in handler --- cosmos/x/evm/plugins/txpool/handler.go | 19 ++++++++++++------- cosmos/x/evm/plugins/txpool/handler_test.go | 12 ++++++++---- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/cosmos/x/evm/plugins/txpool/handler.go b/cosmos/x/evm/plugins/txpool/handler.go index 0a8a69108..e299e2c1f 100644 --- a/cosmos/x/evm/plugins/txpool/handler.go +++ b/cosmos/x/evm/plugins/txpool/handler.go @@ -21,6 +21,8 @@ package txpool import ( + "sync/atomic" + "cosmossdk.io/log" sdk "github.com/cosmos/cosmos-sdk/types" @@ -68,7 +70,7 @@ type handler struct { txsCh chan core.NewTxsEvent stopCh chan struct{} txsSub Subscription - running bool + running atomic.Bool } // newHandler creates a new handler. @@ -96,7 +98,7 @@ func (h *handler) Start() { func (h *handler) start() { // Connect to the subscription. h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) - h.running = true + h.running.Store(true) // Handle events. var err error @@ -114,23 +116,26 @@ func (h *handler) start() { // Running returns true if the handler is running. func (h *handler) Running() bool { - return h.running + return h.running.Load() } // Stop stops the handler. func (h *handler) Stop() { - h.stopCh <- struct{}{} + if h.Running() { + h.stopCh <- struct{}{} + } else { + panic("stopping already stopped handler") + } } // stop stops the handler. func (h *handler) stop(err error) { if err != nil { - h.logger.Error("tx subscription error", "err", err) + h.logger.Error("txpool handler", "error", err) } - // Triggers txBroadcastLoop to quit. h.txsSub.Unsubscribe() - h.running = false + h.running.Store(false) // Leave the channels. close(h.txsCh) diff --git a/cosmos/x/evm/plugins/txpool/handler_test.go b/cosmos/x/evm/plugins/txpool/handler_test.go index aa954e946..9f2c7df54 100644 --- a/cosmos/x/evm/plugins/txpool/handler_test.go +++ b/cosmos/x/evm/plugins/txpool/handler_test.go @@ -54,15 +54,19 @@ var _ = Describe("", func() { serializer = mocks.NewTxSerializer(t) h = newHandler(broadcaster, subprovider, serializer, log.NewTestLogger(t)) h.Start() - // Wait for handler to start. - time.Sleep(300 * time.Millisecond) + for !h.Running() { + // Wait for handler to start. + time.Sleep(50 * time.Millisecond) + } Expect(h.Running()).To(BeTrue()) }) AfterEach(func() { h.Stop() - // Wait for handler to stop - time.Sleep(300 * time.Millisecond) + for h.Running() { + // Wait for handler to start. + time.Sleep(50 * time.Millisecond) + } Expect(h.Running()).To(BeFalse()) }) From 4ae8b74ca2ebd1f4bcf45bb894f6e6ea097d802d Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 23:34:12 -0400 Subject: [PATCH 59/94] lint --- eth/polar/polaris.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index ed8a86005..e56b2277f 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -177,8 +177,7 @@ func (pl *Polaris) StartServices() error { // Stack the networking stack. go func() { - // TODO: fix hive (this is required for hive to not break) - time.Sleep(5 * time.Second) //nolint:gomnd // for hive to not freak out... + time.Sleep(3 * time.Second) //nolint:gomnd // TODO:fix, this is required for hive... if err := pl.stack.Start(); err != nil { panic(err) } From 3b830586a8776cfc00b969c5183899e3519b4486 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 28 Sep 2023 23:50:22 -0400 Subject: [PATCH 60/94] lint --- cosmos/x/evm/keeper/keeper.go | 2 ++ eth/core/processor.go | 5 +++-- eth/polar/polaris.go | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 13819e691..e1a3ec403 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -42,6 +42,8 @@ import ( "pkg.berachain.dev/polaris/eth/polar" ) +var _ Host = (*host)(nil) + type Keeper struct { // provider is the struct that houses the Polaris EVM. polaris *polar.Polaris diff --git a/eth/core/processor.go b/eth/core/processor.go index 12fc731a0..ce381d538 100644 --- a/eth/core/processor.go +++ b/eth/core/processor.go @@ -87,10 +87,9 @@ func NewStateProcessor( statedb: statedb, } + // TODO: move nil check out of the processor. if sp.pp == nil { sp.pp = precompile.NewDefaultPlugin() - } else { - sp.BuildAndRegisterPrecompiles(sp.pp.GetPrecompiles(nil)) } return sp @@ -124,6 +123,7 @@ func (sp *StateProcessor) Prepare(evm *vm.GethEVM, header *types.Header) { // *technically* the precompiles change based on the chain config rules, to be fully correct, // we should check every block. sp.BuildAndRegisterPrecompiles(precompile.GetDefaultPrecompiles(&rules)) + sp.BuildAndRegisterPrecompiles(sp.pp.GetPrecompiles(nil)) sp.evm = evm } @@ -192,6 +192,7 @@ func (sp *StateProcessor) Finalize( // BuildAndRegisterPrecompiles builds the given precompiles and registers them with the precompile // plugin. +// TODO: move precompile registration out of the state processor? func (sp *StateProcessor) BuildAndRegisterPrecompiles(precompiles []precompile.Registrable) { for _, pc := range precompiles { // skip registering precompiles that are already registered. diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index e56b2277f..56584ad70 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -113,12 +113,13 @@ func NewWithNetworkingStack( log.Root().SetHandler(logHandler) } + pl.backend = NewBackend(pl, pl.stack.ExtRPCEnabled(), pl.cfg) + return pl } // Init initializes the Polaris struct. func (pl *Polaris) Init() error { - pl.backend = NewBackend(pl, pl.stack.ExtRPCEnabled(), pl.cfg) pl.miner = miner.New(pl) var err error From 2b390bc2f7efc5dadac883ba3affbdc4ec58fdb1 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 11:33:38 -0400 Subject: [PATCH 61/94] fix nil ptr --- eth/core/processor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/core/processor.go b/eth/core/processor.go index 7832c01cf..40945cf39 100644 --- a/eth/core/processor.go +++ b/eth/core/processor.go @@ -125,7 +125,7 @@ func (sp *StateProcessor) Prepare(evm *vm.GethEVM, header *types.Header) { // *technically* the precompiles change based on the chain config rules, to be fully correct, // we should check every block. sp.BuildAndRegisterPrecompiles(precompile.GetDefaultPrecompiles(&rules)) - sp.BuildAndRegisterPrecompiles(sp.pp.GetPrecompiles(nil)) + sp.BuildAndRegisterPrecompiles(sp.pp.GetPrecompiles(&rules)) sp.evm = evm } From 847a697e83bc4f58b8f2de4589ee042e51cf3d8a Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 11:44:23 -0400 Subject: [PATCH 62/94] fix --- cosmos/txpool/handler.go | 16 +++++++++++++++- cosmos/txpool/handler_test.go | 2 +- cosmos/x/evm/plugins/txpool/plugin.go | 2 +- eth/core/processor.go | 2 -- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/cosmos/txpool/handler.go b/cosmos/txpool/handler.go index 0b14e9c8f..ca6f99824 100644 --- a/cosmos/txpool/handler.go +++ b/cosmos/txpool/handler.go @@ -57,6 +57,13 @@ type Subscription interface { event.Subscription } +// Handler provides an interface to start and stop the handler. +type Handler interface { + Start() + Running() bool + Stop() +} + // handler listens for new insertions into the geth txpool and broadcasts them to the CometBFT // layer for p2p and ABCI. type handler struct { @@ -73,9 +80,16 @@ type handler struct { running atomic.Bool } -// NewHandler creates a new handler. +// NewHandler creates a new Handler. func NewHandler( clientCtx Broadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, +) Handler { + return newHandler(clientCtx, txPool, serializer, logger) +} + +// newHandler creates a new handler. +func newHandler( + clientCtx Broadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, ) *handler { h := &handler{ logger: logger, diff --git a/cosmos/txpool/handler_test.go b/cosmos/txpool/handler_test.go index 577718f13..62873ea94 100644 --- a/cosmos/txpool/handler_test.go +++ b/cosmos/txpool/handler_test.go @@ -58,7 +58,7 @@ var _ = Describe("", func() { subprovider = mocks.NewTxSubProvider(t) subprovider.On("SubscribeNewTxsEvent", mock.Anything).Return(subscription) serializer = mocks.NewTxSerializer(t) - h = NewHandler(broadcaster, subprovider, serializer, log.NewTestLogger(t)) + h = newHandler(broadcaster, subprovider, serializer, log.NewTestLogger(t)) h.Start() for !h.Running() { // Wait for handler to start. diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go index a4f152646..5ccf0f22a 100644 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ b/cosmos/x/evm/plugins/txpool/plugin.go @@ -27,8 +27,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/core/txpool" - cosmostxpool "pkg.berachain.dev/polaris/cosmos/txpool" + cosmostxpool "pkg.berachain.dev/polaris/cosmos/txpool" "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/core" coretypes "pkg.berachain.dev/polaris/eth/core/types" diff --git a/eth/core/processor.go b/eth/core/processor.go index 40945cf39..1228cfadc 100644 --- a/eth/core/processor.go +++ b/eth/core/processor.go @@ -90,8 +90,6 @@ func NewStateProcessor( // TODO: move nil check out of the processor. if sp.pp == nil { sp.pp = precompile.NewDefaultPlugin() - } else { - sp.pp = precompile.NewDefaultPlugin() } return sp From f20db1b2a40f31e8d63db27360ed6d197d572774 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 12:05:30 -0400 Subject: [PATCH 63/94] remove mocks --- .../x/evm/plugins/txpool/mocks/broadcaster.go | 90 ------ .../txpool/mocks/configuration_plugin.go | 73 ----- cosmos/x/evm/plugins/txpool/mocks/plugin.go | 264 ------------------ .../x/evm/plugins/txpool/mocks/serializer.go | 145 ---------- .../evm/plugins/txpool/mocks/subscription.go | 107 ------- .../evm/plugins/txpool/mocks/tx_serializer.go | 90 ------ .../plugins/txpool/mocks/tx_sub_provider.go | 81 ------ 7 files changed, 850 deletions(-) delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/broadcaster.go delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/plugin.go delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/serializer.go delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/subscription.go delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go delete mode 100644 cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go diff --git a/cosmos/x/evm/plugins/txpool/mocks/broadcaster.go b/cosmos/x/evm/plugins/txpool/mocks/broadcaster.go deleted file mode 100644 index e76ce6ce1..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/broadcaster.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - types "github.com/cosmos/cosmos-sdk/types" -) - -// Broadcaster is an autogenerated mock type for the Broadcaster type -type Broadcaster struct { - mock.Mock -} - -type Broadcaster_Expecter struct { - mock *mock.Mock -} - -func (_m *Broadcaster) EXPECT() *Broadcaster_Expecter { - return &Broadcaster_Expecter{mock: &_m.Mock} -} - -// BroadcastTxSync provides a mock function with given fields: txBytes -func (_m *Broadcaster) BroadcastTxSync(txBytes []byte) (*types.TxResponse, error) { - ret := _m.Called(txBytes) - - var r0 *types.TxResponse - var r1 error - if rf, ok := ret.Get(0).(func([]byte) (*types.TxResponse, error)); ok { - return rf(txBytes) - } - if rf, ok := ret.Get(0).(func([]byte) *types.TxResponse); ok { - r0 = rf(txBytes) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.TxResponse) - } - } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(txBytes) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Broadcaster_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' -type Broadcaster_BroadcastTxSync_Call struct { - *mock.Call -} - -// BroadcastTxSync is a helper method to define mock.On call -// - txBytes []byte -func (_e *Broadcaster_Expecter) BroadcastTxSync(txBytes interface{}) *Broadcaster_BroadcastTxSync_Call { - return &Broadcaster_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", txBytes)} -} - -func (_c *Broadcaster_BroadcastTxSync_Call) Run(run func(txBytes []byte)) *Broadcaster_BroadcastTxSync_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *Broadcaster_BroadcastTxSync_Call) Return(res *types.TxResponse, err error) *Broadcaster_BroadcastTxSync_Call { - _c.Call.Return(res, err) - return _c -} - -func (_c *Broadcaster_BroadcastTxSync_Call) RunAndReturn(run func([]byte) (*types.TxResponse, error)) *Broadcaster_BroadcastTxSync_Call { - _c.Call.Return(run) - return _c -} - -// NewBroadcaster creates a new instance of Broadcaster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBroadcaster(t interface { - mock.TestingT - Cleanup(func()) -}) *Broadcaster { - mock := &Broadcaster{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go b/cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go deleted file mode 100644 index 1cd007d7f..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/configuration_plugin.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// ConfigurationPlugin is an autogenerated mock type for the ConfigurationPlugin type -type ConfigurationPlugin struct { - mock.Mock -} - -type ConfigurationPlugin_Expecter struct { - mock *mock.Mock -} - -func (_m *ConfigurationPlugin) EXPECT() *ConfigurationPlugin_Expecter { - return &ConfigurationPlugin_Expecter{mock: &_m.Mock} -} - -// GetEvmDenom provides a mock function with given fields: -func (_m *ConfigurationPlugin) GetEvmDenom() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// ConfigurationPlugin_GetEvmDenom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetEvmDenom' -type ConfigurationPlugin_GetEvmDenom_Call struct { - *mock.Call -} - -// GetEvmDenom is a helper method to define mock.On call -func (_e *ConfigurationPlugin_Expecter) GetEvmDenom() *ConfigurationPlugin_GetEvmDenom_Call { - return &ConfigurationPlugin_GetEvmDenom_Call{Call: _e.mock.On("GetEvmDenom")} -} - -func (_c *ConfigurationPlugin_GetEvmDenom_Call) Run(run func()) *ConfigurationPlugin_GetEvmDenom_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *ConfigurationPlugin_GetEvmDenom_Call) Return(_a0 string) *ConfigurationPlugin_GetEvmDenom_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *ConfigurationPlugin_GetEvmDenom_Call) RunAndReturn(run func() string) *ConfigurationPlugin_GetEvmDenom_Call { - _c.Call.Return(run) - return _c -} - -// NewConfigurationPlugin creates a new instance of ConfigurationPlugin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewConfigurationPlugin(t interface { - mock.TestingT - Cleanup(func()) -}) *ConfigurationPlugin { - mock := &ConfigurationPlugin{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/x/evm/plugins/txpool/mocks/plugin.go b/cosmos/x/evm/plugins/txpool/mocks/plugin.go deleted file mode 100644 index a84ccd5b4..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/plugin.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import ( - client "github.com/cosmos/cosmos-sdk/client" - common "github.com/ethereum/go-ethereum/common" - - core "pkg.berachain.dev/polaris/eth/core" - - coretxpool "github.com/ethereum/go-ethereum/core/txpool" - - log "cosmossdk.io/log" - - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" -) - -// Plugin is an autogenerated mock type for the Plugin type -type Plugin struct { - mock.Mock -} - -type Plugin_Expecter struct { - mock *mock.Mock -} - -func (_m *Plugin) EXPECT() *Plugin_Expecter { - return &Plugin_Expecter{mock: &_m.Mock} -} - -// GetHandler provides a mock function with given fields: -func (_m *Plugin) GetHandler() core.Handler { - ret := _m.Called() - - var r0 core.Handler - if rf, ok := ret.Get(0).(func() core.Handler); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(core.Handler) - } - } - - return r0 -} - -// Plugin_GetHandler_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHandler' -type Plugin_GetHandler_Call struct { - *mock.Call -} - -// GetHandler is a helper method to define mock.On call -func (_e *Plugin_Expecter) GetHandler() *Plugin_GetHandler_Call { - return &Plugin_GetHandler_Call{Call: _e.mock.On("GetHandler")} -} - -func (_c *Plugin_GetHandler_Call) Run(run func()) *Plugin_GetHandler_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Plugin_GetHandler_Call) Return(_a0 core.Handler) *Plugin_GetHandler_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Plugin_GetHandler_Call) RunAndReturn(run func() core.Handler) *Plugin_GetHandler_Call { - _c.Call.Return(run) - return _c -} - -// Pending provides a mock function with given fields: enforceTips -func (_m *Plugin) Pending(enforceTips bool) map[common.Address][]*coretxpool.LazyTransaction { - ret := _m.Called(enforceTips) - - var r0 map[common.Address][]*coretxpool.LazyTransaction - if rf, ok := ret.Get(0).(func(bool) map[common.Address][]*coretxpool.LazyTransaction); ok { - r0 = rf(enforceTips) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[common.Address][]*coretxpool.LazyTransaction) - } - } - - return r0 -} - -// Plugin_Pending_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Pending' -type Plugin_Pending_Call struct { - *mock.Call -} - -// Pending is a helper method to define mock.On call -// - enforceTips bool -func (_e *Plugin_Expecter) Pending(enforceTips interface{}) *Plugin_Pending_Call { - return &Plugin_Pending_Call{Call: _e.mock.On("Pending", enforceTips)} -} - -func (_c *Plugin_Pending_Call) Run(run func(enforceTips bool)) *Plugin_Pending_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(bool)) - }) - return _c -} - -func (_c *Plugin_Pending_Call) Return(_a0 map[common.Address][]*coretxpool.LazyTransaction) *Plugin_Pending_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Plugin_Pending_Call) RunAndReturn(run func(bool) map[common.Address][]*coretxpool.LazyTransaction) *Plugin_Pending_Call { - _c.Call.Return(run) - return _c -} - -// SerializeToBytes provides a mock function with given fields: signedTx -func (_m *Plugin) SerializeToBytes(signedTx *types.Transaction) ([]byte, error) { - ret := _m.Called(signedTx) - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(*types.Transaction) ([]byte, error)); ok { - return rf(signedTx) - } - if rf, ok := ret.Get(0).(func(*types.Transaction) []byte); ok { - r0 = rf(signedTx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { - r1 = rf(signedTx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Plugin_SerializeToBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToBytes' -type Plugin_SerializeToBytes_Call struct { - *mock.Call -} - -// SerializeToBytes is a helper method to define mock.On call -// - signedTx *types.Transaction -func (_e *Plugin_Expecter) SerializeToBytes(signedTx interface{}) *Plugin_SerializeToBytes_Call { - return &Plugin_SerializeToBytes_Call{Call: _e.mock.On("SerializeToBytes", signedTx)} -} - -func (_c *Plugin_SerializeToBytes_Call) Run(run func(signedTx *types.Transaction)) *Plugin_SerializeToBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*types.Transaction)) - }) - return _c -} - -func (_c *Plugin_SerializeToBytes_Call) Return(_a0 []byte, _a1 error) *Plugin_SerializeToBytes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Plugin_SerializeToBytes_Call) RunAndReturn(run func(*types.Transaction) ([]byte, error)) *Plugin_SerializeToBytes_Call { - _c.Call.Return(run) - return _c -} - -// Start provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Plugin) Start(_a0 log.Logger, _a1 *coretxpool.TxPool, _a2 client.Context) { - _m.Called(_a0, _a1, _a2) -} - -// Plugin_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type Plugin_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -// - _a0 log.Logger -// - _a1 *coretxpool.TxPool -// - _a2 client.Context -func (_e *Plugin_Expecter) Start(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Plugin_Start_Call { - return &Plugin_Start_Call{Call: _e.mock.On("Start", _a0, _a1, _a2)} -} - -func (_c *Plugin_Start_Call) Run(run func(_a0 log.Logger, _a1 *coretxpool.TxPool, _a2 client.Context)) *Plugin_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(log.Logger), args[1].(*coretxpool.TxPool), args[2].(client.Context)) - }) - return _c -} - -func (_c *Plugin_Start_Call) Return() *Plugin_Start_Call { - _c.Call.Return() - return _c -} - -func (_c *Plugin_Start_Call) RunAndReturn(run func(log.Logger, *coretxpool.TxPool, client.Context)) *Plugin_Start_Call { - _c.Call.Return(run) - return _c -} - -// TxPool provides a mock function with given fields: -func (_m *Plugin) TxPool() *coretxpool.TxPool { - ret := _m.Called() - - var r0 *coretxpool.TxPool - if rf, ok := ret.Get(0).(func() *coretxpool.TxPool); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*coretxpool.TxPool) - } - } - - return r0 -} - -// Plugin_TxPool_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxPool' -type Plugin_TxPool_Call struct { - *mock.Call -} - -// TxPool is a helper method to define mock.On call -func (_e *Plugin_Expecter) TxPool() *Plugin_TxPool_Call { - return &Plugin_TxPool_Call{Call: _e.mock.On("TxPool")} -} - -func (_c *Plugin_TxPool_Call) Run(run func()) *Plugin_TxPool_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Plugin_TxPool_Call) Return(_a0 *coretxpool.TxPool) *Plugin_TxPool_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Plugin_TxPool_Call) RunAndReturn(run func() *coretxpool.TxPool) *Plugin_TxPool_Call { - _c.Call.Return(run) - return _c -} - -// NewPlugin creates a new instance of Plugin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewPlugin(t interface { - mock.TestingT - Cleanup(func()) -}) *Plugin { - mock := &Plugin{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/x/evm/plugins/txpool/mocks/serializer.go b/cosmos/x/evm/plugins/txpool/mocks/serializer.go deleted file mode 100644 index 9a96d934c..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/serializer.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import ( - cosmos_sdktypes "github.com/cosmos/cosmos-sdk/types" - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" -) - -// Serializer is an autogenerated mock type for the Serializer type -type Serializer struct { - mock.Mock -} - -type Serializer_Expecter struct { - mock *mock.Mock -} - -func (_m *Serializer) EXPECT() *Serializer_Expecter { - return &Serializer_Expecter{mock: &_m.Mock} -} - -// SerializeToBytes provides a mock function with given fields: signedTx -func (_m *Serializer) SerializeToBytes(signedTx *types.Transaction) ([]byte, error) { - ret := _m.Called(signedTx) - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(*types.Transaction) ([]byte, error)); ok { - return rf(signedTx) - } - if rf, ok := ret.Get(0).(func(*types.Transaction) []byte); ok { - r0 = rf(signedTx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { - r1 = rf(signedTx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Serializer_SerializeToBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToBytes' -type Serializer_SerializeToBytes_Call struct { - *mock.Call -} - -// SerializeToBytes is a helper method to define mock.On call -// - signedTx *types.Transaction -func (_e *Serializer_Expecter) SerializeToBytes(signedTx interface{}) *Serializer_SerializeToBytes_Call { - return &Serializer_SerializeToBytes_Call{Call: _e.mock.On("SerializeToBytes", signedTx)} -} - -func (_c *Serializer_SerializeToBytes_Call) Run(run func(signedTx *types.Transaction)) *Serializer_SerializeToBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*types.Transaction)) - }) - return _c -} - -func (_c *Serializer_SerializeToBytes_Call) Return(_a0 []byte, _a1 error) *Serializer_SerializeToBytes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Serializer_SerializeToBytes_Call) RunAndReturn(run func(*types.Transaction) ([]byte, error)) *Serializer_SerializeToBytes_Call { - _c.Call.Return(run) - return _c -} - -// SerializeToSdkTx provides a mock function with given fields: signedTx -func (_m *Serializer) SerializeToSdkTx(signedTx *types.Transaction) (cosmos_sdktypes.Tx, error) { - ret := _m.Called(signedTx) - - var r0 cosmos_sdktypes.Tx - var r1 error - if rf, ok := ret.Get(0).(func(*types.Transaction) (cosmos_sdktypes.Tx, error)); ok { - return rf(signedTx) - } - if rf, ok := ret.Get(0).(func(*types.Transaction) cosmos_sdktypes.Tx); ok { - r0 = rf(signedTx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cosmos_sdktypes.Tx) - } - } - - if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { - r1 = rf(signedTx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Serializer_SerializeToSdkTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToSdkTx' -type Serializer_SerializeToSdkTx_Call struct { - *mock.Call -} - -// SerializeToSdkTx is a helper method to define mock.On call -// - signedTx *types.Transaction -func (_e *Serializer_Expecter) SerializeToSdkTx(signedTx interface{}) *Serializer_SerializeToSdkTx_Call { - return &Serializer_SerializeToSdkTx_Call{Call: _e.mock.On("SerializeToSdkTx", signedTx)} -} - -func (_c *Serializer_SerializeToSdkTx_Call) Run(run func(signedTx *types.Transaction)) *Serializer_SerializeToSdkTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*types.Transaction)) - }) - return _c -} - -func (_c *Serializer_SerializeToSdkTx_Call) Return(_a0 cosmos_sdktypes.Tx, _a1 error) *Serializer_SerializeToSdkTx_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Serializer_SerializeToSdkTx_Call) RunAndReturn(run func(*types.Transaction) (cosmos_sdktypes.Tx, error)) *Serializer_SerializeToSdkTx_Call { - _c.Call.Return(run) - return _c -} - -// NewSerializer creates a new instance of Serializer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSerializer(t interface { - mock.TestingT - Cleanup(func()) -}) *Serializer { - mock := &Serializer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/x/evm/plugins/txpool/mocks/subscription.go b/cosmos/x/evm/plugins/txpool/mocks/subscription.go deleted file mode 100644 index e1513660d..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/subscription.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// Subscription is an autogenerated mock type for the Subscription type -type Subscription struct { - mock.Mock -} - -type Subscription_Expecter struct { - mock *mock.Mock -} - -func (_m *Subscription) EXPECT() *Subscription_Expecter { - return &Subscription_Expecter{mock: &_m.Mock} -} - -// Err provides a mock function with given fields: -func (_m *Subscription) Err() <-chan error { - ret := _m.Called() - - var r0 <-chan error - if rf, ok := ret.Get(0).(func() <-chan error); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan error) - } - } - - return r0 -} - -// Subscription_Err_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Err' -type Subscription_Err_Call struct { - *mock.Call -} - -// Err is a helper method to define mock.On call -func (_e *Subscription_Expecter) Err() *Subscription_Err_Call { - return &Subscription_Err_Call{Call: _e.mock.On("Err")} -} - -func (_c *Subscription_Err_Call) Run(run func()) *Subscription_Err_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Subscription_Err_Call) Return(_a0 <-chan error) *Subscription_Err_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Subscription_Err_Call) RunAndReturn(run func() <-chan error) *Subscription_Err_Call { - _c.Call.Return(run) - return _c -} - -// Unsubscribe provides a mock function with given fields: -func (_m *Subscription) Unsubscribe() { - _m.Called() -} - -// Subscription_Unsubscribe_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unsubscribe' -type Subscription_Unsubscribe_Call struct { - *mock.Call -} - -// Unsubscribe is a helper method to define mock.On call -func (_e *Subscription_Expecter) Unsubscribe() *Subscription_Unsubscribe_Call { - return &Subscription_Unsubscribe_Call{Call: _e.mock.On("Unsubscribe")} -} - -func (_c *Subscription_Unsubscribe_Call) Run(run func()) *Subscription_Unsubscribe_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Subscription_Unsubscribe_Call) Return() *Subscription_Unsubscribe_Call { - _c.Call.Return() - return _c -} - -func (_c *Subscription_Unsubscribe_Call) RunAndReturn(run func()) *Subscription_Unsubscribe_Call { - _c.Call.Return(run) - return _c -} - -// NewSubscription creates a new instance of Subscription. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewSubscription(t interface { - mock.TestingT - Cleanup(func()) -}) *Subscription { - mock := &Subscription{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go b/cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go deleted file mode 100644 index e93219295..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/tx_serializer.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - types "github.com/ethereum/go-ethereum/core/types" -) - -// TxSerializer is an autogenerated mock type for the TxSerializer type -type TxSerializer struct { - mock.Mock -} - -type TxSerializer_Expecter struct { - mock *mock.Mock -} - -func (_m *TxSerializer) EXPECT() *TxSerializer_Expecter { - return &TxSerializer_Expecter{mock: &_m.Mock} -} - -// SerializeToBytes provides a mock function with given fields: signedTx -func (_m *TxSerializer) SerializeToBytes(signedTx *types.Transaction) ([]byte, error) { - ret := _m.Called(signedTx) - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(*types.Transaction) ([]byte, error)); ok { - return rf(signedTx) - } - if rf, ok := ret.Get(0).(func(*types.Transaction) []byte); ok { - r0 = rf(signedTx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(*types.Transaction) error); ok { - r1 = rf(signedTx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// TxSerializer_SerializeToBytes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SerializeToBytes' -type TxSerializer_SerializeToBytes_Call struct { - *mock.Call -} - -// SerializeToBytes is a helper method to define mock.On call -// - signedTx *types.Transaction -func (_e *TxSerializer_Expecter) SerializeToBytes(signedTx interface{}) *TxSerializer_SerializeToBytes_Call { - return &TxSerializer_SerializeToBytes_Call{Call: _e.mock.On("SerializeToBytes", signedTx)} -} - -func (_c *TxSerializer_SerializeToBytes_Call) Run(run func(signedTx *types.Transaction)) *TxSerializer_SerializeToBytes_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(*types.Transaction)) - }) - return _c -} - -func (_c *TxSerializer_SerializeToBytes_Call) Return(_a0 []byte, _a1 error) *TxSerializer_SerializeToBytes_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *TxSerializer_SerializeToBytes_Call) RunAndReturn(run func(*types.Transaction) ([]byte, error)) *TxSerializer_SerializeToBytes_Call { - _c.Call.Return(run) - return _c -} - -// NewTxSerializer creates a new instance of TxSerializer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTxSerializer(t interface { - mock.TestingT - Cleanup(func()) -}) *TxSerializer { - mock := &TxSerializer{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go b/cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go deleted file mode 100644 index a983f0bfe..000000000 --- a/cosmos/x/evm/plugins/txpool/mocks/tx_sub_provider.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by mockery v2.34.1. DO NOT EDIT. - -package mocks - -import ( - core "github.com/ethereum/go-ethereum/core" - event "github.com/ethereum/go-ethereum/event" - - mock "github.com/stretchr/testify/mock" -) - -// TxSubProvider is an autogenerated mock type for the TxSubProvider type -type TxSubProvider struct { - mock.Mock -} - -type TxSubProvider_Expecter struct { - mock *mock.Mock -} - -func (_m *TxSubProvider) EXPECT() *TxSubProvider_Expecter { - return &TxSubProvider_Expecter{mock: &_m.Mock} -} - -// SubscribeNewTxsEvent provides a mock function with given fields: ch -func (_m *TxSubProvider) SubscribeNewTxsEvent(ch chan<- core.NewTxsEvent) event.Subscription { - ret := _m.Called(ch) - - var r0 event.Subscription - if rf, ok := ret.Get(0).(func(chan<- core.NewTxsEvent) event.Subscription); ok { - r0 = rf(ch) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(event.Subscription) - } - } - - return r0 -} - -// TxSubProvider_SubscribeNewTxsEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewTxsEvent' -type TxSubProvider_SubscribeNewTxsEvent_Call struct { - *mock.Call -} - -// SubscribeNewTxsEvent is a helper method to define mock.On call -// - ch chan<- core.NewTxsEvent -func (_e *TxSubProvider_Expecter) SubscribeNewTxsEvent(ch interface{}) *TxSubProvider_SubscribeNewTxsEvent_Call { - return &TxSubProvider_SubscribeNewTxsEvent_Call{Call: _e.mock.On("SubscribeNewTxsEvent", ch)} -} - -func (_c *TxSubProvider_SubscribeNewTxsEvent_Call) Run(run func(ch chan<- core.NewTxsEvent)) *TxSubProvider_SubscribeNewTxsEvent_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(chan<- core.NewTxsEvent)) - }) - return _c -} - -func (_c *TxSubProvider_SubscribeNewTxsEvent_Call) Return(_a0 event.Subscription) *TxSubProvider_SubscribeNewTxsEvent_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *TxSubProvider_SubscribeNewTxsEvent_Call) RunAndReturn(run func(chan<- core.NewTxsEvent) event.Subscription) *TxSubProvider_SubscribeNewTxsEvent_Call { - _c.Call.Return(run) - return _c -} - -// NewTxSubProvider creates a new instance of TxSubProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTxSubProvider(t interface { - mock.TestingT - Cleanup(func()) -}) *TxSubProvider { - mock := &TxSubProvider{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} From 5ea5b5a904100f97194a153ae8f02b075977400d Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 12:09:29 -0400 Subject: [PATCH 64/94] mockery from main --- .mockery.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mockery.yaml b/.mockery.yaml index ae7852f72..2ce327a5e 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -7,4 +7,4 @@ packages: config: all: True recursive: True - with-expecter: true + with-expecter: true \ No newline at end of file From f0911fa7ed2183b1e4e0abb38c5bd98ab45d8cac Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 12:21:46 -0400 Subject: [PATCH 65/94] reduce diff --- cosmos/txpool/mempool.go | 3 +++ e2e/hive/simulators/rpc/init/genesis.json | 1 + eth/miner/miner.go | 2 -- eth/params/chain_config.go | 2 +- eth/polar/polaris.go | 15 ++++----------- magefiles/setup/setup.go | 2 +- 6 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 cosmos/txpool/mempool.go diff --git a/cosmos/txpool/mempool.go b/cosmos/txpool/mempool.go new file mode 100644 index 000000000..c1ad7aeb8 --- /dev/null +++ b/cosmos/txpool/mempool.go @@ -0,0 +1,3 @@ +package txpool + + diff --git a/e2e/hive/simulators/rpc/init/genesis.json b/e2e/hive/simulators/rpc/init/genesis.json index 55b7a6953..2b0e50a65 100644 --- a/e2e/hive/simulators/rpc/init/genesis.json +++ b/e2e/hive/simulators/rpc/init/genesis.json @@ -17,6 +17,7 @@ "arrowGlacierBlock": 0, "grayGlacierBlock": 0, "mergeNetsplitBlock": 0, + "shanghaiTime": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true }, diff --git a/eth/miner/miner.go b/eth/miner/miner.go index 94d6d3577..b5a228e5b 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -120,8 +120,6 @@ func (m *miner) NextBaseFee() *big.Int { } // Prepare prepares the blockchain for processing a new block at the given height. -// - func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { // Prepare the State, Block, Configuration, Gas, and Historical plugins for the block. m.sp.Prepare(ctx) diff --git a/eth/params/chain_config.go b/eth/params/chain_config.go index e563d180e..038e1e898 100644 --- a/eth/params/chain_config.go +++ b/eth/params/chain_config.go @@ -29,7 +29,7 @@ const DefaultEIP155ChainID = 2061 var zero = uint64(0) var DefaultChainConfig = &ChainConfig{ - ChainID: big.NewInt(1), + ChainID: big.NewInt(DefaultEIP155ChainID), HomesteadBlock: big.NewInt(0), DAOForkBlock: big.NewInt(0), DAOForkSupport: true, diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 56584ad70..bdaef5a14 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -121,6 +121,7 @@ func NewWithNetworkingStack( // Init initializes the Polaris struct. func (pl *Polaris) Init() error { pl.miner = miner.New(pl) + // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) var err error legacyPool := legacypool.New( @@ -132,9 +133,6 @@ func (pl *Polaris) Init() error { return err } - // pl.miner = miner.New(pl) - // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) - // eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) // Build and set the RPC Backend and other services. @@ -143,12 +141,6 @@ func (pl *Polaris) Init() error { // log.Info("Unprotected transactions allowed") // } - // Register the backend on the node - // Register the JSON-RPCs with the networking stack. - pl.stack.RegisterAPIs(pl.APIs()) - // stack.RegisterProtocols(eth.Protocols()) - // stack.RegisterLifecycle(eth) - return nil } @@ -173,17 +165,18 @@ func (pl *Polaris) APIs() []rpc.API { // StartServices notifies the NetworkStack to spin up (i.e json-rpc). func (pl *Polaris) StartServices() error { + // Register the JSON-RPCs with the networking stack. + pl.stack.RegisterAPIs(pl.APIs()) + // Register the filter API separately in order to get access to the filterSystem pl.filterSystem = utils.RegisterFilterAPI(pl.stack, pl.backend, &defaultEthConfig) - // Stack the networking stack. go func() { time.Sleep(3 * time.Second) //nolint:gomnd // TODO:fix, this is required for hive... if err := pl.stack.Start(); err != nil { panic(err) } }() - return nil } diff --git a/magefiles/setup/setup.go b/magefiles/setup/setup.go index 3458f15b7..50ca6858f 100644 --- a/magefiles/setup/setup.go +++ b/magefiles/setup/setup.go @@ -51,7 +51,7 @@ var ( allTools = append(ciTools, []string{moq, rlpgen, abigen, mockery}...) ) -// Setup runs the setup script for the curremocknt OS. +// Setup runs the setup script for the current OS. func main() { var err error From 00425aeb1cd9bc565199fece2e1ffd0fabd29133 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 13:22:56 -0400 Subject: [PATCH 66/94] ree --- e2e/testapp/entrypoint.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/e2e/testapp/entrypoint.sh b/e2e/testapp/entrypoint.sh index 962759994..c96db46cf 100755 --- a/e2e/testapp/entrypoint.sh +++ b/e2e/testapp/entrypoint.sh @@ -65,9 +65,6 @@ if [[ $overwrite == "y" || $overwrite == "Y" ]]; then # Set moniker and chain-id (Moniker can be anything, chain-id must be an integer) ./bin/polard init $MONIKER -o --chain-id $CHAINID --home "$HOMEDIR" - # cp ./e2e/testapp/docker/local/config/app.toml "$APP_TOML" - # cp ./e2e/testapp/docker/local/config/config.toml "$CONFIG_TOML" - # Set client config ./bin/polard config set client keyring-backend $KEYRING --home "$HOMEDIR" ./bin/polard config set client chain-id "$CHAINID" --home "$HOMEDIR" From b018231ca0bc6df442001f4e11f7f46c57f21eee Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 17:33:47 -0400 Subject: [PATCH 67/94] set mempool on the baseapp --- cosmos/txpool/mempool.go | 7 +++++++ e2e/testapp/app.go | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cosmos/txpool/mempool.go b/cosmos/txpool/mempool.go index e51f515aa..1c5d8d8f5 100644 --- a/cosmos/txpool/mempool.go +++ b/cosmos/txpool/mempool.go @@ -49,6 +49,13 @@ type Mempool struct { txpool GethTxPool } +// NewMempool creates a new Mempool. +func NewMempool(txpool GethTxPool) *Mempool { + return &Mempool{ + txpool: txpool, + } +} + // Insert attempts to insert a Tx into the app-side mempool returning // an error upon failure. func (m *Mempool) Insert(_ context.Context, sdkTx sdk.Tx) error { diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 715c3b060..2edb63184 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -60,6 +60,7 @@ import ( "pkg.berachain.dev/polaris/cosmos/abci" evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" + cosmostxpool "pkg.berachain.dev/polaris/cosmos/txpool" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" @@ -214,8 +215,9 @@ func NewPolarisApp( app.App = appBuilder.Build(db, traceStore, baseAppOptions...) proposalHandler := abci.NewDefaultProposalHandler(app) - proposalHandler.SetPolaris(app.EVMKeeper.Polaris()) + proposalHandler.SetPolaris(app.EVMKeeper.Polaris()) + app.App.BaseApp.SetMempool(cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool())) app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) @@ -226,6 +228,7 @@ func NewPolarisApp( FeegrantKeeper: nil, SigGasConsumer: evmante.SigVerificationGasConsumer, } + ch, _ := evmante.NewAnteHandler( opt, ) @@ -242,7 +245,6 @@ func NewPolarisApp( } /**** Module Options ****/ - app.ModuleManager.RegisterInvariants(app.CrisisKeeper) // RegisterUpgradeHandlers is used for registering any on-chain upgrades. From b66eace3dcbf08dfe4a63d31a091f5929751fc88 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 17:34:02 -0400 Subject: [PATCH 68/94] set tx pool --- cosmos/txpool/mempool.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cosmos/txpool/mempool.go b/cosmos/txpool/mempool.go index 1c5d8d8f5..a4d055030 100644 --- a/cosmos/txpool/mempool.go +++ b/cosmos/txpool/mempool.go @@ -73,11 +73,6 @@ func (m *Mempool) Insert(_ context.Context, sdkTx sdk.Tx) error { return nil } -// SetTxPool sets the underlying txpool. -func (m *Mempool) SetTxPool(txpool GethTxPool) { - m.txpool = txpool -} - // CountTx returns the number of transactions currently in the mempool. func (m *Mempool) CountTx() int { runnable, blocked := m.txpool.Stats() From 18666753f757aff6674dc69df972c25d72025ef5 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 29 Sep 2023 17:40:20 -0400 Subject: [PATCH 69/94] ree --- cosmos/abci/abci.go | 17 ++--------------- cosmos/abci/prepare/default.go | 10 +++------- e2e/testapp/app.go | 3 +-- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/cosmos/abci/abci.go b/cosmos/abci/abci.go index 46e2cdb4b..07ebabfab 100644 --- a/cosmos/abci/abci.go +++ b/cosmos/abci/abci.go @@ -37,11 +37,6 @@ type ( ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) } - // GasTx defines the contract that a transaction with a gas limit must implement. - GasTx interface { - GetGas() uint64 - } - // DefaultProposalHandler defines the default ABCI PrepareProposal and // ProcessProposal handlers. DefaultProposalHandler struct { @@ -50,13 +45,9 @@ type ( } ) -func NewDefaultProposalHandler(txVerifier ProposalTxVerifier) *DefaultProposalHandler { - // _, isNoOp := mp.(mempool.NoOpMempool) - // if mp == nil || isNoOp { - // panic("mempool must be set and cannot be a NoOpMempool") - // } +func NewDefaultProposalHandler(polaris *polar.Polaris, txVerifier ProposalTxVerifier) *DefaultProposalHandler { return &DefaultProposalHandler{ - proposer: prepare.NewHandler(txVerifier), + proposer: prepare.NewHandler(polaris, txVerifier), processor: process.NewHandler(txVerifier), } } @@ -68,7 +59,3 @@ func (h *DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHan func (h *DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { return h.processor.ProcessProposal } - -func (h *DefaultProposalHandler) SetPolaris(polaris *polar.Polaris) { - h.proposer.SetPolaris(polaris) -} diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/default.go index 447eafc54..95a6fa97b 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/default.go @@ -47,16 +47,13 @@ type Handler struct { txVerifier TxVerifier } -func NewHandler(txVerifier TxVerifier) Handler { +func NewHandler(polaris *polar.Polaris, txVerifier TxVerifier) Handler { return Handler{ + polaris: polaris, txVerifier: txVerifier, } } -func (h *Handler) SetPolaris(polaris *polar.Polaris) { - h.polaris = polaris -} - func (h *Handler) PrepareProposal( ctx sdk.Context, req *abci.RequestPrepareProposal, ) (*abci.ResponsePrepareProposal, error) { @@ -119,8 +116,7 @@ func (h *Handler) PrepareProposal( // txPoolTransactions returns a sorted list of transactions from the txpool. func (h *Handler) txPoolTransactions() *miner.TransactionsByPriceAndNonce { - pending := h.polaris.TxPool().Pending(false) return miner.NewTransactionsByPriceAndNonce(types.LatestSigner( h.polaris.Host().GetConfigurationPlugin().ChainConfig(), - ), pending, h.polaris.Miner().NextBaseFee()) + ), h.polaris.TxPool().Pending(false), h.polaris.Miner().NextBaseFee()) } diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 2edb63184..ad3ad93f5 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -214,9 +214,8 @@ func NewPolarisApp( // baseAppOptions = append(baseAppOptions, prepareOpt) app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - proposalHandler := abci.NewDefaultProposalHandler(app) + proposalHandler := abci.NewDefaultProposalHandler(app.EVMKeeper.Polaris(), app) - proposalHandler.SetPolaris(app.EVMKeeper.Polaris()) app.App.BaseApp.SetMempool(cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool())) app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) From 00789c39c630522f5d46a3f12531d3e647dbceae Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Sat, 30 Sep 2023 22:52:50 -0400 Subject: [PATCH 70/94] remove uneeded code --- cosmos/abci/abci.go | 61 ------------- .../abci/prepare/{default.go => prepare.go} | 4 +- cosmos/abci/process/default.go | 86 ------------------- cosmos/x/evm/plugins/state/plugin.go | 4 - e2e/testapp/app.go | 7 +- 5 files changed, 4 insertions(+), 158 deletions(-) delete mode 100644 cosmos/abci/abci.go rename cosmos/abci/prepare/{default.go => prepare.go} (97%) delete mode 100644 cosmos/abci/process/default.go diff --git a/cosmos/abci/abci.go b/cosmos/abci/abci.go deleted file mode 100644 index 07ebabfab..000000000 --- a/cosmos/abci/abci.go +++ /dev/null @@ -1,61 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 abci - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - prepare "pkg.berachain.dev/polaris/cosmos/abci/prepare" - process "pkg.berachain.dev/polaris/cosmos/abci/process" - "pkg.berachain.dev/polaris/eth/polar" -) - -type ( - // ProposalTxVerifier defines the interface that is implemented by BaseApp, - // that any custom ABCI PrepareProposal and ProcessProposal handler can use - // to verify a transaction. - ProposalTxVerifier interface { - PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) - ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) - } - - // DefaultProposalHandler defines the default ABCI PrepareProposal and - // ProcessProposal handlers. - DefaultProposalHandler struct { - proposer prepare.Handler - processor process.Handler - } -) - -func NewDefaultProposalHandler(polaris *polar.Polaris, txVerifier ProposalTxVerifier) *DefaultProposalHandler { - return &DefaultProposalHandler{ - proposer: prepare.NewHandler(polaris, txVerifier), - processor: process.NewHandler(txVerifier), - } -} - -func (h *DefaultProposalHandler) PrepareProposalHandler() sdk.PrepareProposalHandler { - return h.proposer.PrepareProposal -} - -func (h *DefaultProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { - return h.processor.ProcessProposal -} diff --git a/cosmos/abci/prepare/default.go b/cosmos/abci/prepare/prepare.go similarity index 97% rename from cosmos/abci/prepare/default.go rename to cosmos/abci/prepare/prepare.go index 95a6fa97b..837f2e600 100644 --- a/cosmos/abci/prepare/default.go +++ b/cosmos/abci/prepare/prepare.go @@ -47,8 +47,8 @@ type Handler struct { txVerifier TxVerifier } -func NewHandler(polaris *polar.Polaris, txVerifier TxVerifier) Handler { - return Handler{ +func NewHandler(polaris *polar.Polaris, txVerifier TxVerifier) *Handler { + return &Handler{ polaris: polaris, txVerifier: txVerifier, } diff --git a/cosmos/abci/process/default.go b/cosmos/abci/process/default.go deleted file mode 100644 index 1cc77474d..000000000 --- a/cosmos/abci/process/default.go +++ /dev/null @@ -1,86 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 proposal - -import ( - abci "github.com/cometbft/cometbft/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type ( - // ProposalTxVerifier defines the interface that is implemented by BaseApp, - // that any custom ABCI PrepareProposal and ProcessProposal handler can use - // to verify a transaction. - TxVerifier interface { - PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) - ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) - } - - // GasTx defines the contract that a transaction with a gas limit must implement. - GasTx interface { - GetGas() uint64 - } -) - -type Handler struct { - txVerifier TxVerifier -} - -func NewHandler(txVerifier TxVerifier) Handler { - return Handler{ - txVerifier: txVerifier, - } -} - -func (h *Handler) ProcessProposal( - ctx sdk.Context, req *abci.RequestProcessProposal, -) (*abci.ResponseProcessProposal, error) { - var totalTxGas uint64 - - var maxBlockGas int64 - if b := ctx.ConsensusParams().Block; b != nil { - maxBlockGas = b.MaxGas - } - - for _, txBytes := range req.Txs { - tx, err := h.txVerifier.ProcessProposalVerifyTx(txBytes) - if err != nil { - //nolint:nolintlint,nilerr // intentional. - return &abci.ResponseProcessProposal{ - Status: abci.ResponseProcessProposal_REJECT, - }, nil - } - - if maxBlockGas > 0 { - gasTx, ok := tx.(GasTx) - if ok { - totalTxGas += gasTx.GetGas() - } - - if totalTxGas > uint64(maxBlockGas) { - return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT}, nil - } - } - } - - return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil -} diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index ddb603361..7054f51b7 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -51,10 +51,6 @@ var ( emptyCodeHashBytes = emptyCodeHash.Bytes() ) -type PrecompilePlugin interface { - Has(common.Address) bool -} - // Plugin is the interface that must be implemented by the plugin. type Plugin interface { plugins.HasGenesis diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index ad3ad93f5..adab6e7d7 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -57,7 +57,7 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "pkg.berachain.dev/polaris/cosmos/abci" + "pkg.berachain.dev/polaris/cosmos/abci/prepare" evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" cosmostxpool "pkg.berachain.dev/polaris/cosmos/txpool" @@ -214,11 +214,8 @@ func NewPolarisApp( // baseAppOptions = append(baseAppOptions, prepareOpt) app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - proposalHandler := abci.NewDefaultProposalHandler(app.EVMKeeper.Polaris(), app) - app.App.BaseApp.SetMempool(cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool())) - app.App.BaseApp.SetPrepareProposal(proposalHandler.PrepareProposalHandler()) - app.App.BaseApp.SetProcessProposal(proposalHandler.ProcessProposalHandler()) + app.App.BaseApp.SetPrepareProposal(prepare.NewHandler(app.EVMKeeper.Polaris(), app).PrepareProposal) opt := ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, From 45e317554b2f42a723284d4c2f6e78bae3d573f3 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 13:40:16 -0400 Subject: [PATCH 71/94] miner poc --- .mockery.yaml | 5 + cosmos/abci/prepare/prepare.go | 122 --------------- cosmos/go.mod | 4 +- cosmos/go.sum | 8 +- cosmos/miner/blank_engine.go | 88 +++++++++++ cosmos/miner/miner.go | 76 +++++++++ cosmos/miner/miner_test.go | 84 ++++++++++ e2e/localnet/go.mod | 4 +- e2e/localnet/go.sum | 8 +- e2e/precompile/go.mod | 4 +- e2e/precompile/go.sum | 8 +- e2e/testapp/app.go | 32 +++- e2e/testapp/entrypoint.sh | 2 +- e2e/testapp/go.mod | 4 +- e2e/testapp/go.sum | 3 +- eth/core/chain.go | 4 +- eth/core/chain_reader.go | 14 ++ eth/core/chain_writer.go | 7 + eth/go.mod | 5 +- eth/go.sum | 5 +- eth/miner/miner.go | 2 +- eth/polar/polaris.go | 47 +++++- go.work.sum | 278 +-------------------------------- 23 files changed, 372 insertions(+), 442 deletions(-) delete mode 100644 cosmos/abci/prepare/prepare.go create mode 100644 cosmos/miner/blank_engine.go create mode 100644 cosmos/miner/miner.go create mode 100644 cosmos/miner/miner_test.go diff --git a/.mockery.yaml b/.mockery.yaml index 5f455e0c3..b2bb43d72 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -8,6 +8,11 @@ packages: all: True recursive: True with-expecter: true + pkg.berachain.dev/polaris/cosmos/miner: + config: + all: True + recursive: True + with-expecter: true pkg.berachain.dev/polaris/eth/core/state: config: all: True diff --git a/cosmos/abci/prepare/prepare.go b/cosmos/abci/prepare/prepare.go deleted file mode 100644 index 837f2e600..000000000 --- a/cosmos/abci/prepare/prepare.go +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 prepare - -import ( - abci "github.com/cometbft/cometbft/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/miner" - - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" - "pkg.berachain.dev/polaris/eth/polar" -) - -type ( - // ProposalTxVerifier defines the interface that is implemented by BaseApp, - // that any custom ABCI PrepareProposal and ProcessProposal handler can use - // to verify a transaction. - TxVerifier interface { - PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) - ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) - } -) - -type Handler struct { - polaris *polar.Polaris - txVerifier TxVerifier -} - -func NewHandler(polaris *polar.Polaris, txVerifier TxVerifier) *Handler { - return &Handler{ - polaris: polaris, - txVerifier: txVerifier, - } -} - -func (h *Handler) PrepareProposal( - ctx sdk.Context, req *abci.RequestPrepareProposal, -) (*abci.ResponsePrepareProposal, error) { - var maxBlockGas int64 - if b := ctx.ConsensusParams().Block; b != nil { - maxBlockGas = b.MaxGas - } - - var ( - selectedTxs [][]byte - totalTxBytes int64 - totalTxGas uint64 - ) - txs := h.txPoolTransactions() - txp, ok := h.polaris.Host().GetTxPoolPlugin().(txpool.Plugin) - if !ok { - panic("big bad wolf") - } - - for lazyTx := txs.Peek(); lazyTx != nil; lazyTx = txs.Peek() { - tx := lazyTx.Resolve() - bz, err := txp.SerializeToBytes(tx) - if err != nil { - ctx.Logger().Error("Failed sdk.Tx Serialization", tx.Hash(), err) - continue - } - - txGasLimit := tx.Gas() - txSize := int64(len(bz)) - - // only add the transaction to the proposal if we have enough capacity - if (txSize + totalTxBytes) < req.MaxTxBytes { - // If there is a max block gas limit, add the tx only if the limit has - // not been met. - if maxBlockGas > 0 { - if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { - totalTxGas += txGasLimit - totalTxBytes += txSize - selectedTxs = append(selectedTxs, bz) - } - } else { - totalTxBytes += txSize - selectedTxs = append(selectedTxs, bz) - } - } - - // Check if we've reached capacity. If so, we cannot select any more - // transactions. - if totalTxBytes >= req.MaxTxBytes || - (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { - break - } - - // Shift the transaction off the queue. - txs.Shift() - } - - return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil -} - -// txPoolTransactions returns a sorted list of transactions from the txpool. -func (h *Handler) txPoolTransactions() *miner.TransactionsByPriceAndNonce { - return miner.NewTransactionsByPriceAndNonce(types.LatestSigner( - h.polaris.Host().GetConfigurationPlugin().ChainConfig(), - ), h.polaris.TxPool().Pending(false), h.polaris.Miner().NextBaseFee()) -} diff --git a/cosmos/go.mod b/cosmos/go.mod index c77ac22a7..3fd3570d6 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) @@ -24,7 +24,7 @@ require ( github.com/cometbft/cometbft v0.38.0 github.com/cosmos/cosmos-db v1.0.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.50.0-rc.1 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.11 github.com/ethereum/go-ethereum v1.13.1 diff --git a/cosmos/go.sum b/cosmos/go.sum index 4ef2424ee..e5b1ed2ac 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -113,8 +113,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= -github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -233,8 +233,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/cosmos/miner/blank_engine.go b/cosmos/miner/blank_engine.go new file mode 100644 index 000000000..980596b5b --- /dev/null +++ b/cosmos/miner/blank_engine.go @@ -0,0 +1,88 @@ +package miner + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/common" + consensus "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rpc" + "github.com/ethereum/go-ethereum/trie" +) + +// MockEngine is a mock implementation of the Engine interface. +type MockEngine struct{} + +// Author is a mock implementation. +func (m *MockEngine) Author(header *types.Header) (common.Address, error) { + return common.Address{}, nil +} + +// VerifyHeader is a mock implementation. +func (m *MockEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { + + // Set the correct difficulty + header.Difficulty = new(big.Int).SetUint64(1) + + return nil +} + +// VerifyHeaders is a mock implementation. +func (m *MockEngine) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) { + for _, h := range headers { + if err := m.VerifyHeader(chain, h); err != nil { + return nil, nil + } + } + return nil, nil +} + +// VerifyUncles is a mock implementation. +func (m *MockEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error { + return nil +} + +// Prepare is a mock implementation. +func (m *MockEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error { + header.Difficulty = new(big.Int).SetUint64(0) + return nil +} + +// Finalize is a mock implementation. +func (m *MockEngine) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state state.StateDBI, txs []*types.Transaction, + uncles []*types.Header, withdrawals []*types.Withdrawal) { +} + +// FinalizeAndAssemble is a mock implementation. +func (m *MockEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state state.StateDBI, txs []*types.Transaction, + uncles []*types.Header, receipts []*types.Receipt, withdrawals []*types.Withdrawal) (*types.Block, error) { + return types.NewBlock(header, txs, uncles, receipts, trie.NewStackTrie(nil)), nil +} + +// Seal is a mock implementation. +func (m *MockEngine) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error { + sealedBlock := block //.seal() + results <- sealedBlock + return nil +} + +// SealHash is a mock implementation. +func (m *MockEngine) SealHash(header *types.Header) common.Hash { + return header.Hash() +} + +// CalcDifficulty is a mock implementation. +func (m *MockEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int { + return big.NewInt(0) +} + +// APIs is a mock implementation. +func (m *MockEngine) APIs(chain consensus.ChainHeaderReader) []rpc.API { + return nil +} + +// Close is a mock implementation. +func (m *MockEngine) Close() error { + return nil +} diff --git a/cosmos/miner/miner.go b/cosmos/miner/miner.go new file mode 100644 index 000000000..a30273f54 --- /dev/null +++ b/cosmos/miner/miner.go @@ -0,0 +1,76 @@ +package miner + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/miner" + "pkg.berachain.dev/polaris/eth/core/types" + "pkg.berachain.dev/polaris/eth/params" + + evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" +) + +type Engine interface { + consensus.Engine +} + +var _ baseapp.TxSelector = (*Miner)(nil) + +type Miner struct { + mux *event.TypeMux + *miner.Miner + serializer evmtypes.TxSerializer +} + +func NewMiner(eth miner.Backend, config *miner.Config, chainConfig *params.ChainConfig, mux *event.TypeMux, engine consensus.Engine, isLocalBlock func(header *types.Header) bool) *Miner { + return &Miner{ + mux: mux, + Miner: miner.New(eth, config, chainConfig, mux, engine, isLocalBlock), + } +} + +func (m *Miner) SetSerializer(serializer evmtypes.TxSerializer) { + m.serializer = serializer +} + +func (m *Miner) SelectedTxs() [][]byte { + payload, err := m.BuildPayload(&miner.BuildPayloadArgs{ + // TODO: properly fill in the rest of the payload. + Timestamp: m.PendingBlock().Time() + 2, + }) + if err != nil { + panic(err) + } + + // This blocks. + executionPayload := payload.ResolveFull() + + ethTxBzs := executionPayload.ExecutionPayload.Transactions + txs := make([][]byte, len(executionPayload.ExecutionPayload.Transactions)) + + // encode to sdk.txs and then + for i, ethTxBz := range ethTxBzs { + var tx types.Transaction + if err := tx.UnmarshalBinary(ethTxBz); err != nil { + return nil + } + bz, err := m.serializer.SerializeToBytes(&tx) + if err != nil { + panic(err) + } + txs[i] = bz + } + return txs +} + +func (m *Miner) Clear() { + // no-op +} + +func (m *Miner) SelectTxForProposal(_ context.Context, maxTxBytes, maxBlockGas uint64, memTx sdk.Tx, txBz []byte) bool { + return true +} diff --git a/cosmos/miner/miner_test.go b/cosmos/miner/miner_test.go new file mode 100644 index 000000000..738c32e21 --- /dev/null +++ b/cosmos/miner/miner_test.go @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 miner + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestMiner(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "cosmos/miner") +} + +var _ = Describe("", func() { + + var ( + // t = GinkgoT() + // txPool *mocks.GethTxPool + // sdkTx *mocks.SdkTx + // mempool *Miner + // ctx = context.Background() + ) + + BeforeEach(func() { + // mempool = &Miner{} + }) + + // When("we call insert", func() { + // When("the txpool does not error", func() { + // It("does not error", func() { + // sdkTx.On("GetMsgs").Return([]sdk.Msg{evmtypes.NewFromTransaction(coretypes.NewTx(&coretypes.LegacyTx{}))}).Once() + // txPool.On("Add", mock.Anything, mock.Anything, mock.Anything).Return(nil).Once() + // Expect(mempool.Insert(ctx, sdkTx)).ToNot(HaveOccurred()) + // }) + // }) + // When("the txpool errors", func() { + // It("does error", func() { + // sdkTx.On("GetMsgs").Return([]sdk.Msg{evmtypes.NewFromTransaction(coretypes.NewTx(&coretypes.LegacyTx{}))}).Once() + // txPool.On("Add", mock.Anything, mock.Anything, mock.Anything).Return([]error{errors.New("mock error")}).Once() + // Expect(mempool.Insert(ctx, sdkTx)).To(HaveOccurred()) + // }) + // }) + // When("we use an sdkTx with no messages", func() { + // It("errors", func() { + // sdkTx.On("GetMsgs").Return([]sdk.Msg{}).Once() + // Expect(mempool.Insert(ctx, sdkTx)).To(HaveOccurred()) + // }) + // }) + // When("we use an that is not an ethereum msg", func() { + // It("errors", func() { + // sdkTx.On("GetMsgs").Return([]sdk.Msg{nil}).Once() + // Expect(mempool.Insert(ctx, sdkTx)).To(HaveOccurred()) + // }) + // }) + // }) + + // When("we call stats", func() { + // It("returns", func() { + // txPool.On("Stats").Return(16, 12).Once() + // Expect(mempool.CountTx()).To(Equal(28)) + // }) + // }) +}) diff --git a/e2e/localnet/go.mod b/e2e/localnet/go.mod index be483cabc..13a28e278 100644 --- a/e2e/localnet/go.mod +++ b/e2e/localnet/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/e2e/localnet go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 require ( github.com/docker/docker v24.0.5+incompatible @@ -55,7 +55,7 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.0 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.50.0-rc.1 // indirect + github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect diff --git a/e2e/localnet/go.sum b/e2e/localnet/go.sum index c4e7e7d8f..5b649af32 100644 --- a/e2e/localnet/go.sum +++ b/e2e/localnet/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= -github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -200,8 +200,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/e2e/precompile/go.mod b/e2e/precompile/go.mod index 717041cd9..b2dd2bf00 100644 --- a/e2e/precompile/go.mod +++ b/e2e/precompile/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) @@ -12,7 +12,7 @@ replace ( require ( cosmossdk.io/core v0.11.0 cosmossdk.io/math v1.1.3-rc.1 - github.com/cosmos/cosmos-sdk v0.50.0-rc.1 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 pkg.berachain.dev/polaris/contracts v0.0.0-20230919154905-0c53dfe1360a diff --git a/e2e/precompile/go.sum b/e2e/precompile/go.sum index ebd87aefd..4229bcf00 100644 --- a/e2e/precompile/go.sum +++ b/e2e/precompile/go.sum @@ -107,8 +107,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= -github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -200,8 +200,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index adab6e7d7..eca713332 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -56,14 +56,15 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - - "pkg.berachain.dev/polaris/cosmos/abci/prepare" evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" - cosmostxpool "pkg.berachain.dev/polaris/cosmos/txpool" + "pkg.berachain.dev/polaris/cosmos/miner" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" + + "github.com/ethereum/go-ethereum/event" + gethminer "github.com/ethereum/go-ethereum/miner" ) // DefaultNodeHome default home directories for the application daemon. @@ -101,6 +102,8 @@ type SimApp struct { // polaris keepers EVMKeeper *evmkeeper.Keeper + + mm *miner.Miner } //nolint:gochecknoinits // from sdk. @@ -214,9 +217,24 @@ func NewPolarisApp( // baseAppOptions = append(baseAppOptions, prepareOpt) app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - app.App.BaseApp.SetMempool(cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool())) - app.App.BaseApp.SetPrepareProposal(prepare.NewHandler(app.EVMKeeper.Polaris(), app).PrepareProposal) + // mp := cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool()) + // defaultPrepareProposal := baseapp.NewDefaultProposalHandler(mp, app) + + mux := new(event.TypeMux) + // SetupPrecompiles is used to setup the precompile contracts post depinject. + app.EVMKeeper.SetupPrecompiles() + app.mm = miner.NewMiner( + app.EVMKeeper.Polaris(), + &gethminer.DefaultConfig, + app.EVMKeeper.Polaris().Host().GetConfigurationPlugin().ChainConfig(), + mux, + &miner.MockEngine{}, app.EVMKeeper.Polaris().IsLocalBlock, + ) + defaultProposalHandler := baseapp.NewDefaultProposalHandler(nil, app) + defaultProposalHandler.SetTxSelector(app.mm) + app.App.BaseApp.SetPrepareProposal(defaultProposalHandler.PrepareProposalHandler()) + app.App.BaseApp.SetProcessProposal(defaultProposalHandler.ProcessProposalHandler()) opt := ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, @@ -246,9 +264,6 @@ func NewPolarisApp( // RegisterUpgradeHandlers is used for registering any on-chain upgrades. app.RegisterUpgradeHandlers() - // SetupPrecompiles is used to setup the precompile contracts post depinject. - app.EVMKeeper.SetupPrecompiles() - if err := app.Load(loadLatest); err != nil { panic(err) } @@ -329,6 +344,7 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { panic(err) } + app.mm.SetSerializer(evmtypes.NewSerializer(apiSvr.ClientCtx.TxConfig)) app.EVMKeeper.SetClientCtx(apiSvr.ClientCtx) } diff --git a/e2e/testapp/entrypoint.sh b/e2e/testapp/entrypoint.sh index c96db46cf..256add940 100755 --- a/e2e/testapp/entrypoint.sh +++ b/e2e/testapp/entrypoint.sh @@ -54,7 +54,7 @@ mage build # echo "Overwrite the existing configuration and start a new local node? [y/n]" # read -r overwrite # else -overwrite="N" +overwrite="Y" # fi # Setup local node if overwrite is set to Yes, otherwise skip setup diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index e448a2618..3916f1e0a 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -4,7 +4,7 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) @@ -34,7 +34,7 @@ require ( github.com/cometbft/cometbft v0.38.0 github.com/cosmos/cosmos-db v1.0.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.50.0-rc.1 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect github.com/ethereum/go-ethereum v1.13.1 // indirect diff --git a/e2e/testapp/go.sum b/e2e/testapp/go.sum index 49fab3486..a24e72b08 100644 --- a/e2e/testapp/go.sum +++ b/e2e/testapp/go.sum @@ -395,8 +395,7 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/eth/core/chain.go b/eth/core/chain.go index 92d7d7dc5..92531a5dd 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -21,10 +21,12 @@ package core import ( + "math/big" "sync/atomic" lru "github.com/ethereum/go-ethereum/common/lru" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/trie" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/state" @@ -118,7 +120,7 @@ func NewChain(host PolarisHostChain) *blockchain { //nolint:revive // only used logger: log.Root(), } bc.statedb = state.NewStateDB(bc.sp, bc.pp) - bc.currentBlock.Store(nil) + bc.currentBlock.Store(types.NewBlock(&types.Header{Number: big.NewInt(0), BaseFee: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) bc.finalizedBlock.Store(nil) return bc diff --git a/eth/core/chain_reader.go b/eth/core/chain_reader.go index d28962f91..a3d26faf7 100644 --- a/eth/core/chain_reader.go +++ b/eth/core/chain_reader.go @@ -48,6 +48,7 @@ type ChainBlockReader interface { GetBlockByNumber(uint64) *types.Block GetTransactionLookup(common.Hash) *types.TxLookupEntry GetTd(common.Hash, uint64) *big.Int + HasBlock(common.Hash, uint64) bool // THIS SHOULD BE MOVED TO A "MINER" TYPE THING PendingBlockAndReceipts() (*types.Block, types.Receipts) @@ -312,3 +313,16 @@ func (bc *blockchain) GetTd(hash common.Hash, number uint64) *big.Int { } return block.Difficulty() } + +func (bc *blockchain) HasBlock(hash common.Hash, number uint64) bool { + return bc.blockHashCache.Contains(hash) + // { + // return true + // } + // return false + // TODO: handle + // if !bc.HasHeader(hash, number) { + // return false + // } + // return rawdb.HasBody(bc.db, hash, number) +} diff --git a/eth/core/chain_writer.go b/eth/core/chain_writer.go index 51588c7ca..2fadbfc31 100644 --- a/eth/core/chain_writer.go +++ b/eth/core/chain_writer.go @@ -21,12 +21,19 @@ package core import ( + "github.com/ethereum/go-ethereum/core" + "pkg.berachain.dev/polaris/eth/core/state" "pkg.berachain.dev/polaris/eth/core/types" ) // ChainWriter defines methods that are used to perform state and block transitions. type ChainWriter interface { InsertBlock(block *types.Block, receipts types.Receipts, logs []*types.Log) error + WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state state.StateDBI, emitHeadEvent bool) (status core.WriteStatus, err error) +} + +func (blockchain) WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state state.StateDBI, emitHeadEvent bool) (status core.WriteStatus, err error) { + return core.NonStatTy, nil } // InsertBlock inserts a block into the canonical chain and updates the state of the blockchain. diff --git a/eth/go.mod b/eth/go.mod index 6e6f1ea72..3877c6f6d 100644 --- a/eth/go.mod +++ b/eth/go.mod @@ -3,13 +3,14 @@ module pkg.berachain.dev/polaris/eth go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 require ( github.com/ethereum/go-ethereum v1.13.1 github.com/holiman/uint256 v1.2.3 github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 + github.com/stretchr/testify v1.8.4 golang.org/x/text v0.13.0 pkg.berachain.dev/polaris/contracts v0.0.0-20230919154905-0c53dfe1360a pkg.berachain.dev/polaris/lib v0.0.0-20230919154905-0c53dfe1360a @@ -95,6 +96,7 @@ require ( github.com/pelletier/go-toml/v2 v2.0.9 // indirect github.com/peterh/liner v1.2.2 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect @@ -105,6 +107,7 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect diff --git a/eth/go.sum b/eth/go.sum index 11722e221..143283277 100644 --- a/eth/go.sum +++ b/eth/go.sum @@ -12,8 +12,8 @@ github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7D github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= 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/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= -github.com/berachain/polaris-geth v0.0.0-20230928023220-89db795f378f/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= @@ -281,6 +281,7 @@ github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobt github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= diff --git a/eth/miner/miner.go b/eth/miner/miner.go index 020919c99..36a1ae51d 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -156,7 +156,7 @@ func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { Number: new(big.Int).SetUint64(number), GasLimit: m.gp.BlockGasLimit(), Time: timestamp, - Difficulty: new(big.Int), + Difficulty: new(big.Int).SetUint64(0), } // TODO: Settable in PrepareProposal. diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index bdaef5a14..5827808b3 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -13,7 +13,7 @@ // 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, +// AN “AS IS” BASIpl. 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. @@ -30,8 +30,10 @@ import ( "github.com/ethereum/go-ethereum/core/txpool/legacypool" "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/filters" + gethminer "github.com/ethereum/go-ethereum/miner" "pkg.berachain.dev/polaris/eth/core" + "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/log" "pkg.berachain.dev/polaris/eth/miner" polarapi "pkg.berachain.dev/polaris/eth/polar/api" @@ -47,9 +49,9 @@ var defaultEthConfig = ethconfig.Config{ FilterLogCacheSize: 0, } -// NetworkingStack defines methods that allow a Polaris chain to build and expose JSON-RPC apis. +// NetworkingStack defines methods that allow a Polaris chain to build and expose JSON-RPC apipl. type NetworkingStack interface { - // IsExtRPCEnabled returns true if the networking stack is configured to expose JSON-RPC APIs. + // IsExtRPCEnabled returns true if the networking stack is configured to expose JSON-RPC APIpl. ExtRPCEnabled() bool // RegisterHandler manually registers a new handler into the networking stack. @@ -68,7 +70,7 @@ type NetworkingStack interface { // Polaris is the only object that an implementing chain should use. type Polaris struct { cfg *Config - // NetworkingStack represents the networking stack responsible for exposes the JSON-RPC APIs. + // NetworkingStack represents the networking stack responsible for exposes the JSON-RPC APIpl. // Although possible, it does not handle p2p networking like its sibling in geth would. stack NetworkingStack @@ -78,7 +80,7 @@ type Polaris struct { txPool *txpool.TxPool miner miner.Miner - // backend is utilize by the api handlers as a middleware between the JSON-RPC APIs and the core pieces. + // backend is utilize by the api handlers as a middleware between the JSON-RPC APIs and the core piecepl. backend Backend // engine represents the consensus engine for the backend. @@ -109,7 +111,7 @@ func NewWithNetworkingStack( // to specify their own log handler. If logHandler is nil then we // we use the default geth log handler. if logHandler != nil { - // Root is a global in geth that is used by the evm to emit logs. + // Root is a global in geth that is used by the evm to emit logpl. log.Root().SetHandler(logHandler) } @@ -135,7 +137,7 @@ func (pl *Polaris) Init() error { // eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) - // Build and set the RPC Backend and other services. + // Build and set the RPC Backend and other servicepl. // if eth.APIBackend.allowUnprotectedTxs { // log.Info("Unprotected transactions allowed") @@ -144,7 +146,7 @@ func (pl *Polaris) Init() error { return nil } -// APIs return the collection of RPC services the polar package offers. +// APIs return the collection of RPC services the polar package offerpl. // NOTE, some of these services probably need to be moved to somewhere else. func (pl *Polaris) APIs() []rpc.API { // Grab a bunch of the apis from go-ethereum (thx bae) @@ -196,6 +198,35 @@ func (pl *Polaris) TxPool() *txpool.TxPool { return pl.txPool } +func (pl *Polaris) MinerChain() gethminer.BlockChain { + return pl.blockchain +} + func (pl *Polaris) Blockchain() core.Blockchain { return pl.blockchain } + +func (pl *Polaris) IsLocalBlock(header *types.Header) bool { + // TODO: this will break on anything other than a local node rn. + return true + // author, err := pl.engine.Author(header) + // if err != nil { + // log.Warn("Failed to retrieve block author", "number", header.Number.Uint64(), "hash", header.Hash(), "err", err) + // return false + // } + // // // Check whether the given address is etherbase. + // // pl.lock.RLock() + // // etherbase := pl.etherbase + // // pl.lock.RUnlock() + // if author == etherbase { + // return true + // } + // // Check whether the given address is specified by `txpool.local` + // // CLI flag. + // for _, account := range pl.config.TxPool.Locals { + // if account == author { + // return true + // } + // } + return false +} diff --git a/go.work.sum b/go.work.sum index 1fa6a1fe3..210aa0845 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,444 +1,208 @@ +<<<<<<< Updated upstream cloud.google.com/go/accessapproval v1.7.1 h1:/5YjNhR6lzCvmJZAnByYkfEgWjfAKwYP6nkuTk6nKFE= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= -cloud.google.com/go/accesscontextmanager v1.8.1 h1:WIAt9lW9AXtqw/bnvrEUaE8VG/7bAAeMzRCBGMkc4+w= cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= -cloud.google.com/go/aiplatform v1.48.0 h1:M5davZWCTzE043rJCn+ZLW6hSxfG1KAx4vJTtas2/ec= cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/analytics v0.21.3 h1:TFBC1ZAqX9/jL56GEXdLrVe5vT3I22bDVWyDwZX4IEg= cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/apigateway v1.6.1 h1:aBSwCQPcp9rZ0zVEUeJbR623palnqtvxJlUyvzsKGQc= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= -cloud.google.com/go/apigeeconnect v1.6.1 h1:6u/jj0P2c3Mcm+H9qLsXI7gYcTiG9ueyQL3n6vCmFJM= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= -cloud.google.com/go/apigeeregistry v0.7.1 h1:hgq0ANLDx7t2FDZDJQrCMtCtddR/pjCqVuvQWGrQbXw= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= -cloud.google.com/go/appengine v1.8.1 h1:J+aaUZ6IbTpBegXbmEsh8qZZy864ZVnOoWyfa1XSNbI= cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= -cloud.google.com/go/area120 v0.8.1 h1:wiOq3KDpdqXmaHzvZwKdpoM+3lDcqsI2Lwhyac7stss= cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= -cloud.google.com/go/artifactregistry v1.14.1 h1:k6hNqab2CubhWlGcSzunJ7kfxC7UzpAfQ1UPb9PDCKI= cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= -cloud.google.com/go/asset v1.14.1 h1:vlHdznX70eYW4V1y1PxocvF6tEwxJTTarwIGwOhFF3U= cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= -cloud.google.com/go/assuredworkloads v1.11.1 h1:yaO0kwS+SnhVSTF7BqTyVGt3DTocI6Jqo+S3hHmCwNk= cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= -cloud.google.com/go/automl v1.13.1 h1:iP9iQurb0qbz+YOOMfKSEjhONA/WcoOIjt6/m+6pIgo= cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= -cloud.google.com/go/baremetalsolution v1.1.1 h1:0Ge9PQAy6cZ1tRrkc44UVgYV15nw2TVnzJzYsMHXF+E= cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= -cloud.google.com/go/batch v1.3.1 h1:uE0Q//W7FOGPjf7nuPiP0zoE8wOT3ngoIO2HIet0ilY= cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= -cloud.google.com/go/beyondcorp v1.0.0 h1:VPg+fZXULQjs8LiMeWdLaB5oe8G9sEoZ0I0j6IMiG1Q= cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/bigquery v1.53.0 h1:K3wLbjbnSlxhuG5q4pntHv5AEbQM1QqHKGYgwFIqOTg= cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/billing v1.16.0 h1:1iktEAIZ2uA6KpebC235zi/rCXDdDYQ0bTXTNetSL80= cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= -cloud.google.com/go/binaryauthorization v1.6.1 h1:cAkOhf1ic92zEN4U1zRoSupTmwmxHfklcp1X7CCBKvE= cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= -cloud.google.com/go/certificatemanager v1.7.1 h1:uKsohpE0hiobx1Eak9jNcPCznwfB6gvyQCcS28Ah9E8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= -cloud.google.com/go/channel v1.16.0 h1:dqRkK2k7Ll/HHeYGxv18RrfhozNxuTJRkspW0iaFZoY= cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= -cloud.google.com/go/cloudbuild v1.13.0 h1:YBbAWcvE4x6xPWTyS+OU4eiUpz5rCS3VCM/aqmfddPA= cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/clouddms v1.6.1 h1:rjR1nV6oVf2aNNB7B5uz1PDIlBjlOiBgR+q5n7bbB7M= cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= -cloud.google.com/go/cloudtasks v1.12.1 h1:cMh9Q6dkvh+Ry5LAPbD/U2aw6KAqdiU6FttwhbTo69w= cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/contactcenterinsights v1.10.0 h1:YR2aPedGVQPpFBZXJnPkqRj8M//8veIZZH5ZvICoXnI= cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/container v1.24.0 h1:N51t/cgQJFqDD/W7Mb+IvmAPHrf8AbPx7Bb7aF4lROE= cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/containeranalysis v0.10.1 h1:SM/ibWHWp4TYyJMwrILtcBtYKObyupwOVeceI9pNblw= cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= -cloud.google.com/go/datacatalog v1.16.0 h1:qVeQcw1Cz93/cGu2E7TYUPh8Lz5dn5Ws2siIuQ17Vng= cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/dataflow v0.9.1 h1:VzG2tqsk/HbmOtq/XSfdF4cBvUWRK+S+oL9k4eWkENQ= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= -cloud.google.com/go/dataform v0.8.1 h1:xcWso0hKOoxeW72AjBSIp/UfkvpqHNzzS0/oygHlcqY= cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= -cloud.google.com/go/datafusion v1.7.1 h1:eX9CZoyhKQW6g1Xj7+RONeDj1mV8KQDKEB9KLELX9/8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= -cloud.google.com/go/datalabeling v0.8.1 h1:zxsCD/BLKXhNuRssen8lVXChUj8VxF3ofN06JfdWOXw= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= -cloud.google.com/go/dataplex v1.9.0 h1:yoBWuuUZklYp7nx26evIhzq8+i/nvKYuZr1jka9EqLs= cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataproc/v2 v2.0.1 h1:4OpSiPMMGV3XmtPqskBU/RwYpj3yMFjtMLj/exi425Q= cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= -cloud.google.com/go/dataqna v0.8.1 h1:ITpUJep04hC9V7C+gcK390HO++xesQFSUJ7S4nSnF3U= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= -cloud.google.com/go/datastore v1.13.0 h1:ktbC66bOQB3HJPQe8qNI1/aiQ77PMu7hD4mzE6uxe3w= cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastream v1.10.0 h1:ra/+jMv36zTAGPfi8TRne1hXme+UsKtdcK4j6bnqQiw= cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/deploy v1.13.0 h1:A+w/xpWgz99EYzB6e31gMGAI/P5jTZ2UO7veQK5jQ8o= cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/dialogflow v1.40.0 h1:sCJbaXt6ogSbxWQnERKAzos57f02PP6WkGbOZvXUdwc= cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dlp v1.10.1 h1:tF3wsJ2QulRhRLWPzWVkeDz3FkOGVoMl6cmDUHtfYxw= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= -cloud.google.com/go/documentai v1.22.0 h1:dW8ex9yb3oT9s1yD2+yLcU8Zq15AquRZ+wd0U+TkxFw= cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/domains v0.9.1 h1:rqz6KY7mEg7Zs/69U6m6LMbB7PxFDWmT3QWNXIqhHm0= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= -cloud.google.com/go/edgecontainer v1.1.1 h1:zhHWnLzg6AqzE+I3gzJqiIwHfjEBhWctNQEzqb+FaRo= cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= -cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.6.2 h1:OEJ0MLXXCW/tX1fkxzEZOsv/wRfyFsvDVNaHWBAvoV0= cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= -cloud.google.com/go/eventarc v1.13.0 h1:xIP3XZi0Xawx8DEfh++mE2lrIi5kQmCr/KcWhJ1q0J4= cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/filestore v1.7.1 h1:Eiz8xZzMJc5ppBWkuaod/PUdUZGCFR8ku0uS+Ah2fRw= cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= -cloud.google.com/go/firestore v1.11.0 h1:PPgtwcYUOXV2jFe1bV3nda3RCrOa8cvBjTOn2MQVfW8= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/functions v1.15.1 h1:LtAyqvO1TFmNLcROzHZhV0agEJfBi+zfMZsF4RT/a7U= cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= -cloud.google.com/go/gaming v1.6.0 h1:PKggmegChZulPW8yvtziF8P9UOuVFwbvylbEucTNups= -cloud.google.com/go/gkebackup v1.3.0 h1:lgyrpdhtJKV7l1GM15YFt+OCyHMxsQZuSydyNmS0Pxo= cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= -cloud.google.com/go/gkeconnect v0.8.1 h1:a1ckRvVznnuvDWESM2zZDzSVFvggeBaVY5+BVB8tbT0= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= -cloud.google.com/go/gkehub v0.14.1 h1:2BLSb8i+Co1P05IYCKATXy5yaaIw/ZqGvVSBTLdzCQo= cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= -cloud.google.com/go/gkemulticloud v1.0.0 h1:MluqhtPVZReoriP5+adGIw+ij/RIeRik8KApCW2WMTw= cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/grafeas v0.2.0 h1:CYjC+xzdPvbV65gi6Dr4YowKcmLo045pm18L0DhdELM= -cloud.google.com/go/gsuiteaddons v1.6.1 h1:mi9jxZpzVjLQibTS/XfPZvl+Jr6D5Bs8pGqUjllRb00= cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= -cloud.google.com/go/iap v1.8.1 h1:X1tcp+EoJ/LGX6cUPt3W2D4H2Kbqq0pLAsldnsCjLlE= cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= -cloud.google.com/go/ids v1.4.1 h1:khXYmSoDDhWGEVxHl4c4IgbwSRR+qE/L4hzP3vaU9Hc= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= -cloud.google.com/go/iot v1.7.1 h1:yrH0OSmicD5bqGBoMlWG8UltzdLkYzNUwNVUVz7OT54= cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= -cloud.google.com/go/kms v1.15.0 h1:xYl5WEaSekKYN5gGRyhjvZKM22GVBBCzegGNVPy+aIs= cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/language v1.10.1 h1:3MXeGEv8AlX+O2LyV4pO4NGpodanc26AmXwOuipEym0= cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= -cloud.google.com/go/lifesciences v0.9.1 h1:axkANGx1wiBXHiPcJZAE+TDjjYoJRIDzbHC/WYllCBU= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= -cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= -cloud.google.com/go/managedidentities v1.6.1 h1:2/qZuOeLgUHorSdxSQGtnOu9xQkBn37+j+oZQv/KHJY= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= -cloud.google.com/go/maps v1.4.0 h1:PdfgpBLhAoSzZrQXP+/zBc78fIPLZSJp5y8+qSMn2UU= cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= -cloud.google.com/go/mediatranslation v0.8.1 h1:50cF7c1l3BanfKrpnTCaTvhf+Fo6kdF21DG0byG7gYU= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= -cloud.google.com/go/memcache v1.10.1 h1:7lkLsF0QF+Mre0O/NvkD9Q5utUNwtzvIYjrOLOs0HO0= cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= -cloud.google.com/go/metastore v1.12.0 h1:+9DsxUOHvsqvC0ylrRc/JwzbXJaaBpfIK3tX0Lx8Tcc= cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/monitoring v1.15.1 h1:65JhLMd+JiYnXr6j5Z63dUYCuOg770p8a/VC+gil/58= cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= -cloud.google.com/go/networkconnectivity v1.12.1 h1:LnrYM6lBEeTq+9f2lR4DjBhv31EROSAQi/P5W4Q0AEc= cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= -cloud.google.com/go/networkmanagement v1.8.0 h1:/3xP37eMxnyvkfLrsm1nv1b2FbMMSAEAOlECTvoeCq4= cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= -cloud.google.com/go/networksecurity v0.9.1 h1:TBLEkMp3AE+6IV/wbIGRNTxnqLXHCTEQWoxRVC18TzY= cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= -cloud.google.com/go/notebooks v1.9.1 h1:CUqMNEtv4EHFnbogV+yGHQH5iAQLmijOx191innpOcs= cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= -cloud.google.com/go/optimization v1.4.1 h1:pEwOAmO00mxdbesCRSsfj8Sd4rKY9kBrYW7Vd3Pq7cA= cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= -cloud.google.com/go/orchestration v1.8.1 h1:KmN18kE/xa1n91cM5jhCh7s1/UfIguSCisw7nTMUzgE= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= -cloud.google.com/go/orgpolicy v1.11.1 h1:I/7dHICQkNwym9erHqmlb50LRU588NPCvkfIY0Bx9jI= cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= -cloud.google.com/go/osconfig v1.12.1 h1:dgyEHdfqML6cUW6/MkihNdTVc0INQst0qSE8Ou1ub9c= cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= -cloud.google.com/go/oslogin v1.10.1 h1:LdSuG3xBYu2Sgr3jTUULL1XCl5QBx6xwzGqzoDUw1j0= cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= -cloud.google.com/go/phishingprotection v0.8.1 h1:aK/lNmSd1vtbft/vLe2g7edXK72sIQbqr2QyrZN/iME= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= -cloud.google.com/go/policytroubleshooter v1.8.0 h1:XTMHy31yFmXgQg57CB3w9YQX8US7irxDX0Fl0VwlZyY= cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= -cloud.google.com/go/privatecatalog v0.9.1 h1:B/18xGo+E0EMS9LOEQ0zXz7F2asMgmVgTYGSI89MHOA= cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= -cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsublite v1.8.1 h1:pX+idpWMIH30/K7c0epN6V703xpIcMXWRjKJsz0tYGY= cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= -cloud.google.com/go/recaptchaenterprise v1.3.1 h1:u6EznTGzIdsyOsvm+Xkw0aSuKFXQlyjGE9a4exk6iNQ= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.2 h1:IGkbudobsTXAwmkEYOzPCQPApUCsN4Gbq3ndGVhHQpI= cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= -cloud.google.com/go/recommendationengine v0.8.1 h1:nMr1OEVHuDambRn+/y4RmNAmnR/pXCuHtH0Y4tCgGRQ= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= -cloud.google.com/go/recommender v1.10.1 h1:UKp94UH5/Lv2WXSQe9+FttqV07x/2p1hFTMMYVFtilg= cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= -cloud.google.com/go/redis v1.13.1 h1:YrjQnCC7ydk+k30op7DSjSHw1yAYhqYXFcOq1bSXRYA= cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= -cloud.google.com/go/resourcemanager v1.9.1 h1:QIAMfndPOHR6yTmMUB0ZN+HSeRmPjR/21Smq5/xwghI= cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= -cloud.google.com/go/resourcesettings v1.6.1 h1:Fdyq418U69LhvNPFdlEO29w+DRRjwDA4/pFamm4ksAg= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= -cloud.google.com/go/retail v1.14.1 h1:gYBrb9u/Hc5s5lUTFXX1Vsbc/9BEvgtioY6ZKaK0DK8= cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= -cloud.google.com/go/run v1.2.0 h1:kHeIG8q+N6Zv0nDkBjSOYfK2eWqa5FnaiDPH/7/HirE= cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= -cloud.google.com/go/scheduler v1.10.1 h1:yoZbZR8880KgPGLmACOMCiY2tPk+iX4V/dkxqTirlz8= cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= -cloud.google.com/go/secretmanager v1.11.1 h1:cLTCwAjFh9fKvU6F13Y4L9vPcx9yiWPyWXE4+zkuEQs= cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= -cloud.google.com/go/security v1.15.1 h1:jR3itwycg/TgGA0uIgTItcVhA55hKWiNJxaNNpQJaZE= cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= -cloud.google.com/go/securitycenter v1.23.0 h1:XOGJ9OpnDtqg8izd7gYk/XUhj8ytjIalyjjsR6oyG0M= cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= -cloud.google.com/go/servicedirectory v1.11.0 h1:pBWpjCFVGWkzVTkqN3TBBIqNSoSHY86/6RL0soSQ4z8= cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/shell v1.7.1 h1:aHbwH9LSqs4r2rbay9f6fKEls61TAjT63jSyglsw7sI= cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= -cloud.google.com/go/spanner v1.47.0 h1:aqiMP8dhsEXgn9K5EZBWxPG7dxIiyM2VaikqeU4iteg= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= -cloud.google.com/go/speech v1.19.0 h1:MCagaq8ObV2tr1kZJcJYgXYbIn8Ai5rp42tyGYw9rls= cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/storagetransfer v1.10.0 h1:+ZLkeXx0K0Pk5XdDmG0MnUVqIR18lllsihU/yq39I8Q= cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= -cloud.google.com/go/talent v1.6.2 h1:j46ZgD6N2YdpFPux9mc7OAf4YK3tiBCsbLKc8rQx+bU= cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= -cloud.google.com/go/texttospeech v1.7.1 h1:S/pR/GZT9p15R7Y2dk2OXD/3AufTct/NSxT4a7nxByw= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= -cloud.google.com/go/tpu v1.6.1 h1:kQf1jgPY04UJBYYjNUO+3GrZtIb57MfGAW2bwgLbR3A= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= -cloud.google.com/go/trace v1.10.1 h1:EwGdOLCNfYOOPtgqo+D2sDLZmRCEO1AagRTJCU6ztdg= cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= -cloud.google.com/go/translate v1.8.2 h1:PQHamiOzlehqLBJMnM72lXk/OsMQewZB12BKJ8zXrU0= cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/video v1.19.0 h1:BRyyS+wU+Do6VOXnb8WfPr42ZXti9hzmLKLUCkggeK4= cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/videointelligence v1.11.1 h1:MBMWnkQ78GQnRz5lfdTAbBq/8QMCF3wahgtHh3s/J+k= cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= -cloud.google.com/go/vision v1.2.0 h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4= -cloud.google.com/go/vision/v2 v2.7.2 h1:ccK6/YgPfGHR/CyESz1mvIbsht5Y2xRsWCPqmTNydEw= cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= -cloud.google.com/go/vmmigration v1.7.1 h1:gnjIclgqbEMc+cF5IJuPxp53wjBIlqZ8h9hE8Rkwp7A= cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= -cloud.google.com/go/vmwareengine v1.0.0 h1:qsJ0CPlOQu/3MFBGklu752v3AkD+Pdu091UmXJ+EjTA= cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vpcaccess v1.7.1 h1:ram0GzjNWElmbxXMIzeOZUkQ9J8ZAahD6V8ilPGqX0Y= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= -cloud.google.com/go/webrisk v1.9.1 h1:Ssy3MkOMOnyRV5H2bkMQ13Umv7CwB/kugo3qkAX83Fk= cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= -cloud.google.com/go/websecurityscanner v1.6.1 h1:CfEF/vZ+xXyAR3zC9iaC/QRdf1MEgS20r5UR17Q4gOg= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= -cloud.google.com/go/workflows v1.11.1 h1:2akeQ/PgtRhrNuD/n1WvJd5zb7YyuDZrlOanBj2ihPg= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= -cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/RaveNoX/go-jsoncommentstrip v1.0.0 h1:t527LHHE3HmiHrq74QMpNPZpGCIJzTx+apLkMKt4HC0= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= -github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s= -github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= -github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= -github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= -github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= -github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= -github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/config v1.1.1 h1:ZAoq32boMzcaTW9bcUacBswAmHTbvlvDJICgHFZuECo= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1 h1:NbvWIM1Mx6sNPTxowHgS2ewXCRp+NGTzUYb/96FZJbY= github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2 h1:EtEU7WRaWliitZh2nmuxEXrN0Cb8EgPUFGIoTMeqbzI= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1 h1:w/fPGB0t5rWwA43mux4e9ozFSH5zF1moQemlA131PWc= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2 h1:4AH9fFjUlVktQMznF+YN33aWNXaR4VgDXyP28qokJC0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1 h1:cKr6St+CtC3/dl/rEBJvlk7A/IN5D5F02GNkGzfbtVU= github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1 h1:37QubsarExl5ZuCBlnRP+7l1tNwZPBSTqpTBrPH98RU= github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1 h1:TJoIfnIFubCX0ACVeJ0w46HEH5MwjwYN4iFhuYIhfIY= github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= -github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= -github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= -github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= -github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= -github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= -github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= -github.com/casbin/casbin/v2 v2.37.0 h1:/poEwPSovi4bTOcP752/CsTQiRz2xycyVKFG7GUhbDw= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= -github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= -github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= -github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= -github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89 h1:aPflPkRFkVwbW6dmcVqfgwp1i+UWGFH6VgR1Jim5Ygc= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= -github.com/chromedp/chromedp v0.9.2 h1:dKtNz4kApb06KuSXoTQIyUC2TrA0fhGDwNZf3bcgfKw= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= -github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic= github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= -github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= -github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= -github.com/cloudflare/circl v1.3.1 h1:4OVCZRL62ijwEwxnF6I7hLwxvIYi3VaZt8TflkqtrtA= github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= -github.com/cloudflare/cloudflare-go v0.14.0 h1:gFqGlGl/5f9UGXAaKapCGUfaTCgRKKnzu2VvzMZlOFA= github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= -github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= -github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2/go.mod h1:NV9RgyPGw3QjOHYKmruHuejnCZ9+fwBDruxTxJf2gak= -github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80 h1:DuBDHVjgGMPki7bAyh91+3cF1Vh34sAEdH8JQgbc2R0= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= -github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6 h1:uKuolOJonQOb/2+z/wFSJeVREP6fSoigr/X4Wlfhwwg= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6/go.mod h1:jN7ZJM5YSVtD3SHmkAdN/cOC1dXiqg2Y9K5Sr5a8Nxw= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= -github.com/cristalhq/acmd v0.11.1 h1:DJ4fh2Pv0nPKmqT646IU/0Vh5FNdGblxvF+3/W3NAUI= github.com/cristalhq/acmd v0.11.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= -github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/daixiang0/gci v0.11.0/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/dave/dst v0.27.2/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= github.com/dave/jennifer v1.5.0/go.mod h1:4MnyiFIlZS3l5tSDn8VnzE6ffAhYBMB2SZntBsZGUok= -github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docker/cli v24.0.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= -github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= -github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= -github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780 h1:tFh1tRc4CA31yP6qDcu+Trax5wW5GuMxvkIba07qVLY= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= -github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= -github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= -github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e h1:bBLctRc7kr01YGvaDfgLbTwjFNW5jdp5y5rj8XXBHfY= github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 h1:IZqZOB2fydHte3kUgxrzK5E1fW7RQGeDwE8F/ZZnUYc= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= -github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b h1:vMT47RYsrftsHSTQhqXwC3BYflo38OLC3Y4LtXtLyU0= github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= -github.com/getkin/kin-openapi v0.118.0 h1:z43njxPmJ7TaPpMSCQb7PN0dEYno4tyBPQcrFdHoLuM= github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BHOEV2VaAVf/pc= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-critic/go-critic v0.9.0/go.mod h1:5P8tdXL7m/6qnyG6oRAlYLORvoXH0WDypYgAEmagT40= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= @@ -451,16 +215,12 @@ github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslW github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= -github.com/gofiber/fiber/v2 v2.48.0 h1:cRVMCb9aUJDsyHxGFLwz/sGzDggdailZZyptU9F9cU0= github.com/gofiber/fiber/v2 v2.48.0/go.mod h1:xqJgfqrc23FJuqGOW6DVgi3HyZEm2Mn9pRqUb2kHSX8= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= -github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= @@ -477,18 +237,10 @@ github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCk github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/addlicense v1.1.1/go.mod h1:Sm/DHu7Jk+T5miFHHehdIjbi4M5+dJDRS3Cq0rncIxA= github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= -github.com/google/go-pkcs11 v0.2.0 h1:5meDPB26aJ98f+K9G21f0AqZwo/S5BJMJh8nuhMbdsI= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= -github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gordonklaus/ineffassign v0.0.0-20230610083614-0e73809eb601/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= -github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= @@ -497,54 +249,27 @@ github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3 github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/guptarohit/asciigraph v0.5.5 h1:ccFnUF8xYIOUPPY3tmdvRyHqmn1MYI9iv1pLKX+/ZkQ= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= -github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= -github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= -github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hudl/fargo v1.4.0 h1:ZDDILMbB37UlAVLlWcJ2Iz1XuahZZTDZfdCKeclfq2s= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/hydrogen18/memlistener v1.0.0 h1:JR7eDj8HD6eXrc5fWLbSUnfcQFL06PYvCc0DKQnWfaU= github.com/hydrogen18/memlistener v1.0.0/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab h1:BA4a7pe6ZTd9F8kXETBoijjFJ/ntaa//1wiH9BZu4zU= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/informalsystems/tm-load-test v1.3.0 h1:FGjKy7vBw6mXNakt+wmNWKggQZRsKkEYpaFk/zR64VA= github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= -github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= -github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= -github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 h1:TMtDYDHKYY15rFihtRfck/bfFqNfvcabqvXAFQfAUpY= github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/gopoet v0.1.0 h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= -github.com/jhump/goprotoc v0.5.0 h1:Y1UgUX+txUznfqcGdDef8ZOVlyQvnV0pKWZH08RmZuo= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= @@ -795,6 +520,7 @@ golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771/go.mod h1:3QoBVwTHkXbY1oRGzlhwhOykfcATQN43LJ6iT8Wy8kE= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= honnef.co/go/tools v0.4.5/go.mod h1:GUV+uIBCLpdf0/v6UhHHG/yzI/z6qPskBeQCjcNB96k= mvdan.cc/gofumpt v0.5.0/go.mod h1:HBeVDtMKRZpXyxFciAirzdKklDlGu8aAy1wEbH5Y9js= From 2106a1e525ffb8dfb6ded933f195812b93d47cf9 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 13:42:27 -0400 Subject: [PATCH 72/94] typos --- eth/polar/polaris.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 5827808b3..dc6ac54d2 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -13,7 +13,7 @@ // LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). // // TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIpl. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +// 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. @@ -49,9 +49,9 @@ var defaultEthConfig = ethconfig.Config{ FilterLogCacheSize: 0, } -// NetworkingStack defines methods that allow a Polaris chain to build and expose JSON-RPC apipl. +// NetworkingStack defines methods that allow a Polaris chain to build and expose JSON-RPC API. type NetworkingStack interface { - // IsExtRPCEnabled returns true if the networking stack is configured to expose JSON-RPC APIpl. + // IsExtRPCEnabled returns true if the networking stack is configured to expose JSON-RPC API. ExtRPCEnabled() bool // RegisterHandler manually registers a new handler into the networking stack. @@ -70,7 +70,7 @@ type NetworkingStack interface { // Polaris is the only object that an implementing chain should use. type Polaris struct { cfg *Config - // NetworkingStack represents the networking stack responsible for exposes the JSON-RPC APIpl. + // NetworkingStack represents the networking stack responsible for exposes the JSON-RPC API. // Although possible, it does not handle p2p networking like its sibling in geth would. stack NetworkingStack @@ -111,7 +111,7 @@ func NewWithNetworkingStack( // to specify their own log handler. If logHandler is nil then we // we use the default geth log handler. if logHandler != nil { - // Root is a global in geth that is used by the evm to emit logpl. + // Root is a global in geth that is used by the evm to emit logs. log.Root().SetHandler(logHandler) } @@ -137,7 +137,7 @@ func (pl *Polaris) Init() error { // eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) - // Build and set the RPC Backend and other servicepl. + // Build and set the RPC Backend and other services. // if eth.APIBackend.allowUnprotectedTxs { // log.Info("Unprotected transactions allowed") @@ -146,7 +146,7 @@ func (pl *Polaris) Init() error { return nil } -// APIs return the collection of RPC services the polar package offerpl. +// APIs return the collection of RPC services the polar package offers. // NOTE, some of these services probably need to be moved to somewhere else. func (pl *Polaris) APIs() []rpc.API { // Grab a bunch of the apis from go-ethereum (thx bae) From efb63cb91d9980e9d4602ee39c0f0f81430699ff Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 13:44:01 -0400 Subject: [PATCH 73/94] remove mock engine --- .mockery.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.mockery.yaml b/.mockery.yaml index b2bb43d72..5f455e0c3 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -8,11 +8,6 @@ packages: all: True recursive: True with-expecter: true - pkg.berachain.dev/polaris/cosmos/miner: - config: - all: True - recursive: True - with-expecter: true pkg.berachain.dev/polaris/eth/core/state: config: all: True From 47b5de7ba4c3c0e1f8b779763735ad983ce4e3d9 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 14:58:11 -0400 Subject: [PATCH 74/94] push --- cosmos/miner/blank_engine.go | 42 +++++++++++--- cosmos/miner/miner.go | 108 ++++++++++++++++++++++++++--------- e2e/testapp/app.go | 15 +++-- eth/core/types/imported.go | 1 + 4 files changed, 122 insertions(+), 44 deletions(-) diff --git a/cosmos/miner/blank_engine.go b/cosmos/miner/blank_engine.go index 980596b5b..88d2860f3 100644 --- a/cosmos/miner/blank_engine.go +++ b/cosmos/miner/blank_engine.go @@ -1,3 +1,24 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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. +// +//nolint:revive // boilerplate for now. package miner import ( @@ -21,7 +42,6 @@ func (m *MockEngine) Author(header *types.Header) (common.Address, error) { // VerifyHeader is a mock implementation. func (m *MockEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { - // Set the correct difficulty header.Difficulty = new(big.Int).SetUint64(1) @@ -29,7 +49,8 @@ func (m *MockEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *typ } // VerifyHeaders is a mock implementation. -func (m *MockEngine) VerifyHeaders(chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) { +func (m *MockEngine) VerifyHeaders( + chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) { for _, h := range headers { if err := m.VerifyHeader(chain, h); err != nil { return nil, nil @@ -50,19 +71,23 @@ func (m *MockEngine) Prepare(chain consensus.ChainHeaderReader, header *types.He } // Finalize is a mock implementation. -func (m *MockEngine) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state state.StateDBI, txs []*types.Transaction, +func (m *MockEngine) Finalize(chain consensus.ChainHeaderReader, + header *types.Header, state state.StateDBI, txs []*types.Transaction, uncles []*types.Header, withdrawals []*types.Withdrawal) { } // FinalizeAndAssemble is a mock implementation. -func (m *MockEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state state.StateDBI, txs []*types.Transaction, - uncles []*types.Header, receipts []*types.Receipt, withdrawals []*types.Withdrawal) (*types.Block, error) { +func (m *MockEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, + header *types.Header, state state.StateDBI, txs []*types.Transaction, + uncles []*types.Header, receipts []*types.Receipt, + withdrawals []*types.Withdrawal) (*types.Block, error) { return types.NewBlock(header, txs, uncles, receipts, trie.NewStackTrie(nil)), nil } // Seal is a mock implementation. -func (m *MockEngine) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error { - sealedBlock := block //.seal() +func (m *MockEngine) Seal(chain consensus.ChainHeaderReader, + block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error { + sealedBlock := block // .seal() results <- sealedBlock return nil } @@ -73,7 +98,8 @@ func (m *MockEngine) SealHash(header *types.Header) common.Hash { } // CalcDifficulty is a mock implementation. -func (m *MockEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int { +func (m *MockEngine) CalcDifficulty(chain consensus.ChainHeaderReader, + time uint64, parent *types.Header) *big.Int { return big.NewInt(0) } diff --git a/cosmos/miner/miner.go b/cosmos/miner/miner.go index a30273f54..0b2fa0853 100644 --- a/cosmos/miner/miner.go +++ b/cosmos/miner/miner.go @@ -1,56 +1,116 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 miner implements the Ethereum miner. package miner import ( "context" - "github.com/cosmos/cosmos-sdk/baseapp" + abci "github.com/cometbft/cometbft/abci/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/miner" - "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/params" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" + "pkg.berachain.dev/polaris/eth/core/types" + "pkg.berachain.dev/polaris/eth/params" ) -type Engine interface { - consensus.Engine -} - -var _ baseapp.TxSelector = (*Miner)(nil) +// emptyHash is a common.Hash initialized to all zeros. +var emptyHash = common.Hash{} +// Miner implements the baseapp.TxSelector interface. type Miner struct { - mux *event.TypeMux *miner.Miner - serializer evmtypes.TxSerializer + serializer evmtypes.TxSerializer + currentPayload *miner.Payload } -func NewMiner(eth miner.Backend, config *miner.Config, chainConfig *params.ChainConfig, mux *event.TypeMux, engine consensus.Engine, isLocalBlock func(header *types.Header) bool) *Miner { +// NewMiner returns a new instance of the Miner. +func NewMiner( + eth miner.Backend, config *miner.Config, chainConfig *params.ChainConfig, + mux *event.TypeMux, engine consensus.Engine, //nolint:staticcheck // its okay for now. + isLocalBlock func(header *types.Header) bool, +) *Miner { return &Miner{ - mux: mux, Miner: miner.New(eth, config, chainConfig, mux, engine, isLocalBlock), } } +// PrepareProposal implements baseapp.PrepareProposal. +func (m *Miner) PrepareProposal( + ctx sdk.Context, _ *abci.RequestPrepareProposal, +) (*abci.ResponsePrepareProposal, error) { + // TODO: maybe add some safety checks against `req` args. + return &abci.ResponsePrepareProposal{Txs: m.buildBlock(ctx)}, nil +} + +// SetSerializer sets the transaction serializer. func (m *Miner) SetSerializer(serializer evmtypes.TxSerializer) { m.serializer = serializer } -func (m *Miner) SelectedTxs() [][]byte { +// buildBlock builds and submits a payload, it also waits for the txs +// to resolve from the underying worker. +func (m *Miner) buildBlock(ctx sdk.Context) [][]byte { + defer func() { m.currentPayload = nil }() + if err := m.submitPayloadForBuilding(ctx); err != nil { + panic(err) + } + return m.resolveTxs() +} + +// submitPayloadForBuilding submits a payload for building. +func (m *Miner) submitPayloadForBuilding(ctx context.Context) error { + sCtx := sdk.UnwrapSDKContext(ctx) + sCtx.Logger().Info("Submitting payload for building") payload, err := m.BuildPayload(&miner.BuildPayloadArgs{ + Parent: common.Hash{}, // Empty parent is fine, geth miner will handle. + Timestamp: uint64(sCtx.BlockTime().Unix()), // TODO: properly fill in the rest of the payload. - Timestamp: m.PendingBlock().Time() + 2, + FeeRecipient: common.Address{}, + Random: common.Hash{}, + Withdrawals: make(types.Withdrawals, 0), + BeaconRoot: &emptyHash, }) if err != nil { - panic(err) + sCtx.Logger().Error("Failed to build payload", "err", err) + return err } + m.currentPayload = payload + return nil +} - // This blocks. - executionPayload := payload.ResolveFull() - - ethTxBzs := executionPayload.ExecutionPayload.Transactions - txs := make([][]byte, len(executionPayload.ExecutionPayload.Transactions)) +// resolveTxs resolves the transactions from the payload. +func (m *Miner) resolveTxs() [][]byte { + if m.currentPayload == nil { + return nil + } + envelope := m.currentPayload.ResolveFull() + ethTxBzs := envelope.ExecutionPayload.Transactions + txs := make([][]byte, len(envelope.ExecutionPayload.Transactions)) // encode to sdk.txs and then for i, ethTxBz := range ethTxBzs { @@ -66,11 +126,3 @@ func (m *Miner) SelectedTxs() [][]byte { } return txs } - -func (m *Miner) Clear() { - // no-op -} - -func (m *Miner) SelectTxForProposal(_ context.Context, maxTxBytes, maxBlockGas uint64, memTx sdk.Tx, txBz []byte) bool { - return true -} diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index eca713332..2f9f38bd1 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -56,15 +56,16 @@ import ( paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" + + "github.com/ethereum/go-ethereum/event" + gethminer "github.com/ethereum/go-ethereum/miner" + evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" "pkg.berachain.dev/polaris/cosmos/miner" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" - - "github.com/ethereum/go-ethereum/event" - gethminer "github.com/ethereum/go-ethereum/miner" ) // DefaultNodeHome default home directories for the application daemon. @@ -220,7 +221,7 @@ func NewPolarisApp( // mp := cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool()) // defaultPrepareProposal := baseapp.NewDefaultProposalHandler(mp, app) - mux := new(event.TypeMux) + mux := new(event.TypeMux) //nolint:staticcheck // todo fix. // SetupPrecompiles is used to setup the precompile contracts post depinject. app.EVMKeeper.SetupPrecompiles() @@ -231,10 +232,8 @@ func NewPolarisApp( mux, &miner.MockEngine{}, app.EVMKeeper.Polaris().IsLocalBlock, ) - defaultProposalHandler := baseapp.NewDefaultProposalHandler(nil, app) - defaultProposalHandler.SetTxSelector(app.mm) - app.App.BaseApp.SetPrepareProposal(defaultProposalHandler.PrepareProposalHandler()) - app.App.BaseApp.SetProcessProposal(defaultProposalHandler.ProcessProposalHandler()) + app.App.BaseApp.SetPrepareProposal(app.mm.PrepareProposal) + opt := ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, diff --git a/eth/core/types/imported.go b/eth/core/types/imported.go index f39f74a1d..595410d55 100644 --- a/eth/core/types/imported.go +++ b/eth/core/types/imported.go @@ -44,6 +44,7 @@ type ( LegacyTx = types.LegacyTx TxData = types.TxData Signer = types.Signer + Withdrawals = types.Withdrawals ) var ( From 0cc3e143954e292c7e898948c7e981cb03d11906 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 15:14:33 -0400 Subject: [PATCH 75/94] lint --- cosmos/x/evm/keeper/abci.go | 4 +-- cosmos/x/evm/keeper/processor.go | 2 +- e2e/testapp/app.go | 2 ++ eth/core/chain.go | 4 ++- eth/core/chain_reader.go | 58 ++++---------------------------- eth/core/chain_subscriber.go | 6 ---- eth/core/chain_writer.go | 9 +++-- eth/miner/miner.go | 1 + eth/polar/backend.go | 24 +++++-------- eth/polar/mining.go | 6 ++-- eth/polar/polaris.go | 40 +++++++++------------- 11 files changed, 50 insertions(+), 106 deletions(-) diff --git a/cosmos/x/evm/keeper/abci.go b/cosmos/x/evm/keeper/abci.go index eadf27e39..b2610cfb1 100644 --- a/cosmos/x/evm/keeper/abci.go +++ b/cosmos/x/evm/keeper/abci.go @@ -28,11 +28,11 @@ import ( func (k *Keeper) BeginBlocker(ctx context.Context) error { // Prepare the Polaris Ethereum block. - _ = k.polaris.Miner().Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) + _ = k.polaris.SPMiner().Prepare(ctx, uint64(sdk.UnwrapSDKContext(ctx).BlockHeight())) return nil } func (k *Keeper) EndBlock(ctx context.Context) error { // Finalize the Polaris Ethereum block. - return k.polaris.Miner().Finalize(ctx) + return k.polaris.SPMiner().Finalize(ctx) } diff --git a/cosmos/x/evm/keeper/processor.go b/cosmos/x/evm/keeper/processor.go index 2e256a6e3..33b8df6cf 100644 --- a/cosmos/x/evm/keeper/processor.go +++ b/cosmos/x/evm/keeper/processor.go @@ -40,7 +40,7 @@ func (k *Keeper) ProcessTransaction(ctx context.Context, tx *coretypes.Transacti "reset gas meter prior to ethereum state transition") // Process the transaction and return the EVM's execution result. - receipt, err := k.polaris.Miner().ProcessTransaction(ctx, tx) + receipt, err := k.polaris.SPMiner().ProcessTransaction(ctx, tx) if err != nil { k.Logger(sCtx).Error("failed to process transaction", "err", err) return nil, err diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 2f9f38bd1..2517b8187 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -232,6 +232,8 @@ func NewPolarisApp( mux, &miner.MockEngine{}, app.EVMKeeper.Polaris().IsLocalBlock, ) + + app.EVMKeeper.Polaris().SetMiner(app.mm.Miner) app.App.BaseApp.SetPrepareProposal(app.mm.PrepareProposal) opt := ante.HandlerOptions{ diff --git a/eth/core/chain.go b/eth/core/chain.go index 92531a5dd..087b4970c 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -120,7 +120,9 @@ func NewChain(host PolarisHostChain) *blockchain { //nolint:revive // only used logger: log.Root(), } bc.statedb = state.NewStateDB(bc.sp, bc.pp) - bc.currentBlock.Store(types.NewBlock(&types.Header{Number: big.NewInt(0), BaseFee: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) + bc.currentBlock.Store( + types.NewBlock(&types.Header{Number: big.NewInt(0), + BaseFee: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) bc.finalizedBlock.Store(nil) return bc diff --git a/eth/core/chain_reader.go b/eth/core/chain_reader.go index a3d26faf7..b0d85b6c0 100644 --- a/eth/core/chain_reader.go +++ b/eth/core/chain_reader.go @@ -49,9 +49,6 @@ type ChainBlockReader interface { GetTransactionLookup(common.Hash) *types.TxLookupEntry GetTd(common.Hash, uint64) *big.Int HasBlock(common.Hash, uint64) bool - - // THIS SHOULD BE MOVED TO A "MINER" TYPE THING - PendingBlockAndReceipts() (*types.Block, types.Receipts) } // ========================================================================= @@ -104,44 +101,6 @@ func (bc *blockchain) CurrentSafeBlock() *types.Header { return bc.CurrentFinalBlock() } -// PendingBlockAndReceipts returns the pending block and receipts of the blockchain. -// TODO: move to the miner. Currently returns the "current" finalized block and receipts. -func (bc *blockchain) PendingBlockAndReceipts() (*types.Block, types.Receipts) { - var err error - - // Get current block. - header := bc.CurrentHeader() - if header == nil { - bc.logger.Error("current header is nil") - return nil, nil - } - - // Get receipts from cache. - receipts, ok := utils.GetAs[types.Receipts](bc.currentReceipts.Load()) - if receipts == nil || !ok { - bc.logger.Error("current receipts are nil") - return nil, nil - } - - // Derive receipts from block. - receipts, err = bc.deriveReceipts(receipts, header.Hash()) - if err != nil { - bc.logger.Error("failed to derive receipts", "err", err) - return nil, nil - } - - // Get block - block := bc.GetBlock(header.Hash(), header.Number.Uint64()) - if block == nil { - bc.logger.Error("failed to get block", "hash", header.Hash(), "number", header.Number.Uint64()) - return nil, nil - } - - // Add to cache. - bc.receiptsCache.Add(block.Hash(), receipts) - return block, receipts -} - // GetBlock returns a block by its hash or number. func (bc *blockchain) GetBlock(hash common.Hash, number uint64) *types.Block { if block := bc.GetBlockByHash(hash); block != nil { @@ -314,15 +273,12 @@ func (bc *blockchain) GetTd(hash common.Hash, number uint64) *big.Int { return block.Difficulty() } +// HasBlock returns true if the blockchain contains a block with the given +// hash or number. func (bc *blockchain) HasBlock(hash common.Hash, number uint64) bool { - return bc.blockHashCache.Contains(hash) - // { - // return true - // } - // return false - // TODO: handle - // if !bc.HasHeader(hash, number) { - // return false - // } - // return rawdb.HasBody(bc.db, hash, number) + b := bc.GetBlockByNumber(number) + if b == nil { + b = bc.GetBlockByHash(hash) + } + return b != nil } diff --git a/eth/core/chain_subscriber.go b/eth/core/chain_subscriber.go index c410704c8..27b31ab98 100644 --- a/eth/core/chain_subscriber.go +++ b/eth/core/chain_subscriber.go @@ -32,7 +32,6 @@ type ChainSubscriber interface { SubscribeChainHeadEvent(chan<- ChainHeadEvent) event.Subscription SubscribeChainSideEvent(ch chan<- ChainSideEvent) event.Subscription // currently not used SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription - SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription } // SubscribeRemovedLogsEvent registers a subscription of RemovedLogsEvent. @@ -59,8 +58,3 @@ func (bc *blockchain) SubscribeChainSideEvent(ch chan<- ChainSideEvent) event.Su func (bc *blockchain) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription { return bc.scope.Track(bc.logsFeed.Subscribe(ch)) } - -// SubscribePendingLogsEvent registers a subscription of []*types.Log. -func (bc *blockchain) SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription { - return bc.scope.Track(bc.pendingLogsFeed.Subscribe(ch)) -} diff --git a/eth/core/chain_writer.go b/eth/core/chain_writer.go index 2fadbfc31..9cd2990db 100644 --- a/eth/core/chain_writer.go +++ b/eth/core/chain_writer.go @@ -22,6 +22,7 @@ package core import ( "github.com/ethereum/go-ethereum/core" + "pkg.berachain.dev/polaris/eth/core/state" "pkg.berachain.dev/polaris/eth/core/types" ) @@ -29,10 +30,14 @@ import ( // ChainWriter defines methods that are used to perform state and block transitions. type ChainWriter interface { InsertBlock(block *types.Block, receipts types.Receipts, logs []*types.Log) error - WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state state.StateDBI, emitHeadEvent bool) (status core.WriteStatus, err error) + WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, + state state.StateDBI, emitHeadEvent bool) (status core.WriteStatus, err error) } -func (blockchain) WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, state state.StateDBI, emitHeadEvent bool) (status core.WriteStatus, err error) { +// WriteBlockAndSetHead is a no-op in the current implementation. Potentially usable later. +func (*blockchain) WriteBlockAndSetHead( + _ *types.Block, _ []*types.Receipt, _ []*types.Log, _ state.StateDBI, + _ bool) (core.WriteStatus, error) { return core.NonStatTy, nil } diff --git a/eth/miner/miner.go b/eth/miner/miner.go index 36a1ae51d..bb3d4fe0c 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -65,6 +65,7 @@ type Miner interface { } // miner implements the Miner interface. +// TODO: RENAME TO STATE PROCESSOR OR DEPRECATE. type miner struct { backend Backend chain core.Blockchain diff --git a/eth/polar/backend.go b/eth/polar/backend.go index 68119543d..43d4296d3 100644 --- a/eth/polar/backend.go +++ b/eth/polar/backend.go @@ -222,12 +222,8 @@ func (b *backend) BlockByNumber(_ context.Context, number rpc.BlockNumber) (*typ // Pending block is only known by the miner switch number { case rpc.PendingBlockNumber: - // block := b.eth.miner.PendingBlock() - // return block, nil - // TODO: handling pending in the miner. - header := b.polar.blockchain.CurrentBlock() - return b.polar.blockchain.GetBlock(header.Hash(), header.Number.Uint64()), nil - + block := b.polar.miner.PendingBlock() + return block, nil // Otherwise resolve and return the block case rpc.LatestBlockNumber: header := b.polar.blockchain.CurrentBlock() @@ -285,13 +281,11 @@ func (b *backend) BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.Blo func (b *backend) StateAndHeaderByNumber( ctx context.Context, number rpc.BlockNumber, ) (state.StateDBI, *types.Header, error) { - // TODO: handling pending better - // // Pending state is only known by the miner - // if number == rpc.PendingBlockNumber { - // block, state := b.eth.miner.Pending() - // return state, block.Header(), nil - // } - + // Pending state is only known by the miner + if number == rpc.PendingBlockNumber { + block, state := b.polar.miner.Pending() + return state, block.Header(), nil + } // Otherwise resolve the block number and return its state header, err := b.HeaderByNumber(ctx, number) if err != nil { @@ -353,7 +347,7 @@ func (b *backend) GetTransaction( // PendingBlockAndReceipts returns the pending block (equivalent to current block in Polaris) // and associated receipts. func (b *backend) PendingBlockAndReceipts() (*types.Block, types.Receipts) { - block, receipts := b.polar.blockchain.PendingBlockAndReceipts() + block, receipts := b.polar.miner.PendingBlockAndReceipts() // If the block is non-existent, return nil. // This is to maintain parity with the behavior of the geth backend. if block == nil { @@ -527,7 +521,7 @@ func (b *backend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscription } func (b *backend) SubscribePendingLogsEvent(ch chan<- []*types.Log) event.Subscription { - return b.polar.blockchain.SubscribePendingLogsEvent(ch) + return b.polar.miner.SubscribePendingLogs(ch) } func (b *backend) BloomStatus() (uint64, uint64) { diff --git a/eth/polar/mining.go b/eth/polar/mining.go index 94bf981df..72aa86cfc 100644 --- a/eth/polar/mining.go +++ b/eth/polar/mining.go @@ -29,7 +29,7 @@ import ( // TODO: replace this file with a proper mining object and use message passing instead of direct calls. // Prepare prepares the Polaris chain for processing a new block at the given height. func (pl *Polaris) Prepare(ctx context.Context, number uint64) { - header := pl.miner.Prepare(ctx, number) + header := pl.spminer.Prepare(ctx, number) if header == nil { panic("blockchain produced nil header") } @@ -37,10 +37,10 @@ func (pl *Polaris) Prepare(ctx context.Context, number uint64) { // ProcessTransaction processes the given transaction and returns the receipt. func (pl *Polaris) ProcessTransaction(ctx context.Context, tx *types.Transaction) (*types.Receipt, error) { - return pl.miner.ProcessTransaction(ctx, tx) + return pl.spminer.ProcessTransaction(ctx, tx) } // Finalize finalizes the current block. func (pl *Polaris) Finalize(ctx context.Context) error { - return pl.miner.Finalize(ctx) + return pl.spminer.Finalize(ctx) } diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index dc6ac54d2..fb1a52079 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -78,7 +78,8 @@ type Polaris struct { host core.PolarisHostChain blockchain core.Blockchain txPool *txpool.TxPool - miner miner.Miner + spminer miner.Miner + miner *gethminer.Miner // backend is utilize by the api handlers as a middleware between the JSON-RPC APIs and the core piecepl. backend Backend @@ -122,7 +123,7 @@ func NewWithNetworkingStack( // Init initializes the Polaris struct. func (pl *Polaris) Init() error { - pl.miner = miner.New(pl) + pl.spminer = miner.New(pl) // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) var err error @@ -190,10 +191,19 @@ func (pl *Polaris) Host() core.PolarisHostChain { return pl.host } -func (pl *Polaris) Miner() miner.Miner { +func (pl *Polaris) Miner() *gethminer.Miner { return pl.miner } +// TODO: DEPREACTE +func (pl *Polaris) SetMiner(sp *gethminer.Miner) { + pl.miner = sp +} + +func (pl *Polaris) SPMiner() miner.Miner { + return pl.spminer +} + func (pl *Polaris) TxPool() *txpool.TxPool { return pl.txPool } @@ -206,27 +216,7 @@ func (pl *Polaris) Blockchain() core.Blockchain { return pl.blockchain } -func (pl *Polaris) IsLocalBlock(header *types.Header) bool { - // TODO: this will break on anything other than a local node rn. +func (pl *Polaris) IsLocalBlock(_ *types.Header) bool { + // Unused. return true - // author, err := pl.engine.Author(header) - // if err != nil { - // log.Warn("Failed to retrieve block author", "number", header.Number.Uint64(), "hash", header.Hash(), "err", err) - // return false - // } - // // // Check whether the given address is etherbase. - // // pl.lock.RLock() - // // etherbase := pl.etherbase - // // pl.lock.RUnlock() - // if author == etherbase { - // return true - // } - // // Check whether the given address is specified by `txpool.local` - // // CLI flag. - // for _, account := range pl.config.TxPool.Locals { - // if account == author { - // return true - // } - // } - return false } From b5a2853bdd9c4d1d98dc6c69d0df86eab91565aa Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 15:15:55 -0400 Subject: [PATCH 76/94] doesnt need cosmos bump anymore --- cosmos/go.mod | 2 +- cosmos/go.sum | 4 ++-- e2e/localnet/go.mod | 2 +- e2e/localnet/go.sum | 4 ++-- e2e/precompile/go.mod | 2 +- e2e/precompile/go.sum | 4 ++-- e2e/testapp/go.mod | 4 ++-- e2e/testapp/go.sum | 4 ++-- go.work.sum | 2 ++ 9 files changed, 15 insertions(+), 13 deletions(-) diff --git a/cosmos/go.mod b/cosmos/go.mod index 3fd3570d6..dfd91ed8c 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -24,7 +24,7 @@ require ( github.com/cometbft/cometbft v0.38.0 github.com/cosmos/cosmos-db v1.0.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.11 github.com/ethereum/go-ethereum v1.13.1 diff --git a/cosmos/go.sum b/cosmos/go.sum index e5b1ed2ac..6880492c5 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -233,8 +233,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/e2e/localnet/go.mod b/e2e/localnet/go.mod index 13a28e278..0cfa74420 100644 --- a/e2e/localnet/go.mod +++ b/e2e/localnet/go.mod @@ -55,7 +55,7 @@ require ( github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-db v1.0.0 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 // indirect + github.com/cosmos/cosmos-sdk v0.50.0-rc.1 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect diff --git a/e2e/localnet/go.sum b/e2e/localnet/go.sum index 5b649af32..42412388d 100644 --- a/e2e/localnet/go.sum +++ b/e2e/localnet/go.sum @@ -200,8 +200,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/e2e/precompile/go.mod b/e2e/precompile/go.mod index b2dd2bf00..56bd53bb1 100644 --- a/e2e/precompile/go.mod +++ b/e2e/precompile/go.mod @@ -12,7 +12,7 @@ replace ( require ( cosmossdk.io/core v0.11.0 cosmossdk.io/math v1.1.3-rc.1 - github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1 github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 pkg.berachain.dev/polaris/contracts v0.0.0-20230919154905-0c53dfe1360a diff --git a/e2e/precompile/go.sum b/e2e/precompile/go.sum index 4229bcf00..e5f088250 100644 --- a/e2e/precompile/go.sum +++ b/e2e/precompile/go.sum @@ -200,8 +200,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index 3916f1e0a..cf9036c56 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -34,10 +34,10 @@ require ( github.com/cometbft/cometbft v0.38.0 github.com/cosmos/cosmos-db v1.0.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 + github.com/cosmos/cosmos-sdk v0.50.0-rc.1 github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/ethereum/go-ethereum v1.13.1 // indirect + github.com/ethereum/go-ethereum v1.13.1 github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect diff --git a/e2e/testapp/go.sum b/e2e/testapp/go.sum index a24e72b08..e92e28a7e 100644 --- a/e2e/testapp/go.sum +++ b/e2e/testapp/go.sum @@ -276,7 +276,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20230928023220-89db795f378f h1:GMdBm1AyuJo352zHWJLSgQzgJ+DTQ42S3F8pdYkCDrc= +github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -395,7 +395,7 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1.0.20231002123207-138e55725f64 h1:6kpPpe4wSgls/irSCNQ9vi/T19tNvKQqidkZUE5rDgI= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= diff --git a/go.work.sum b/go.work.sum index 210aa0845..3b1b4f6fd 100644 --- a/go.work.sum +++ b/go.work.sum @@ -157,6 +157,8 @@ github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= +github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= github.com/cosmos/gosec/v2 v2.0.0-20230124142343-bf28a33fadf2/go.mod h1:NV9RgyPGw3QjOHYKmruHuejnCZ9+fwBDruxTxJf2gak= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6/go.mod h1:jN7ZJM5YSVtD3SHmkAdN/cOC1dXiqg2Y9K5Sr5a8Nxw= From 73d5d24dbf846df8321efb08fece3e4cda90a17c Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Mon, 2 Oct 2023 15:20:48 -0400 Subject: [PATCH 77/94] probably still fails --- eth/core/chain.go | 1 + eth/miner/miner.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eth/core/chain.go b/eth/core/chain.go index 087b4970c..5a254332d 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -120,6 +120,7 @@ func NewChain(host PolarisHostChain) *blockchain { //nolint:revive // only used logger: log.Root(), } bc.statedb = state.NewStateDB(bc.sp, bc.pp) + // TODO: hmm... bc.currentBlock.Store( types.NewBlock(&types.Header{Number: big.NewInt(0), BaseFee: big.NewInt(0)}, nil, nil, nil, trie.NewStackTrie(nil))) diff --git a/eth/miner/miner.go b/eth/miner/miner.go index bb3d4fe0c..0259e6942 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -157,7 +157,7 @@ func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { Number: new(big.Int).SetUint64(number), GasLimit: m.gp.BlockGasLimit(), Time: timestamp, - Difficulty: new(big.Int).SetUint64(0), + Difficulty: new(big.Int), } // TODO: Settable in PrepareProposal. From 785b1ddf577f2f51042bfd511fb00e438f5c713d Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 12:30:02 -0400 Subject: [PATCH 78/94] begin moving miner --- cosmos/miner/miner.go | 42 ++++++++++--------- e2e/testapp/app.go | 15 +------ e2e/testapp/go.mod | 2 +- .../miner => eth/consensus}/blank_engine.go | 5 +-- eth/consensus/imported.go | 25 +++++++++++ eth/polar/polaris.go | 32 +++++++------- 6 files changed, 69 insertions(+), 52 deletions(-) rename {cosmos/miner => eth/consensus}/blank_engine.go (98%) create mode 100644 eth/consensus/imported.go diff --git a/cosmos/miner/miner.go b/cosmos/miner/miner.go index 0b2fa0853..368aedc1e 100644 --- a/cosmos/miner/miner.go +++ b/cosmos/miner/miner.go @@ -29,13 +29,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/consensus" - "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/miner" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/params" ) // emptyHash is a common.Hash initialized to all zeros. @@ -48,38 +45,43 @@ type Miner struct { currentPayload *miner.Payload } -// NewMiner returns a new instance of the Miner. -func NewMiner( - eth miner.Backend, config *miner.Config, chainConfig *params.ChainConfig, - mux *event.TypeMux, engine consensus.Engine, //nolint:staticcheck // its okay for now. - isLocalBlock func(header *types.Header) bool, -) *Miner { +// New produces a cosmos miner from a geth miner. +func New(gm *miner.Miner) *Miner { return &Miner{ - Miner: miner.New(eth, config, chainConfig, mux, engine, isLocalBlock), + Miner: gm, } } +// SetSerializer sets the transaction serializer. +func (m *Miner) SetSerializer(serializer evmtypes.TxSerializer) { + m.serializer = serializer +} + +// SetMiner sets the underlying Miner object from geth. +func (m *Miner) SetGethMiner(gm *miner.Miner) { + m.Miner = gm +} + // PrepareProposal implements baseapp.PrepareProposal. func (m *Miner) PrepareProposal( ctx sdk.Context, _ *abci.RequestPrepareProposal, ) (*abci.ResponsePrepareProposal, error) { - // TODO: maybe add some safety checks against `req` args. - return &abci.ResponsePrepareProposal{Txs: m.buildBlock(ctx)}, nil -} - -// SetSerializer sets the transaction serializer. -func (m *Miner) SetSerializer(serializer evmtypes.TxSerializer) { - m.serializer = serializer + var txs [][]byte + var err error + if txs, err = m.buildBlock(ctx); err != nil { + return nil, err + } + return &abci.ResponsePrepareProposal{Txs: txs}, err } // buildBlock builds and submits a payload, it also waits for the txs // to resolve from the underying worker. -func (m *Miner) buildBlock(ctx sdk.Context) [][]byte { +func (m *Miner) buildBlock(ctx sdk.Context) ([][]byte, error) { defer func() { m.currentPayload = nil }() if err := m.submitPayloadForBuilding(ctx); err != nil { - panic(err) + return nil, err } - return m.resolveTxs() + return m.resolveTxs(), nil } // submitPayloadForBuilding submits a payload for building. diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 2517b8187..15abefa89 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -57,9 +57,6 @@ import ( slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - "github.com/ethereum/go-ethereum/event" - gethminer "github.com/ethereum/go-ethereum/miner" - evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" "pkg.berachain.dev/polaris/cosmos/miner" @@ -221,19 +218,11 @@ func NewPolarisApp( // mp := cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool()) // defaultPrepareProposal := baseapp.NewDefaultProposalHandler(mp, app) - mux := new(event.TypeMux) //nolint:staticcheck // todo fix. // SetupPrecompiles is used to setup the precompile contracts post depinject. app.EVMKeeper.SetupPrecompiles() - app.mm = miner.NewMiner( - app.EVMKeeper.Polaris(), - &gethminer.DefaultConfig, - app.EVMKeeper.Polaris().Host().GetConfigurationPlugin().ChainConfig(), - mux, - &miner.MockEngine{}, app.EVMKeeper.Polaris().IsLocalBlock, - ) - - app.EVMKeeper.Polaris().SetMiner(app.mm.Miner) + // TODO: cleanup miner location. + app.mm = miner.New(app.EVMKeeper.Polaris().Miner()) app.App.BaseApp.SetPrepareProposal(app.mm.PrepareProposal) opt := ante.HandlerOptions{ diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index cf9036c56..9b7261b02 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -37,7 +37,7 @@ require ( github.com/cosmos/cosmos-sdk v0.50.0-rc.1 github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/ethereum/go-ethereum v1.13.1 + github.com/ethereum/go-ethereum v1.13.1 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect diff --git a/cosmos/miner/blank_engine.go b/eth/consensus/blank_engine.go similarity index 98% rename from cosmos/miner/blank_engine.go rename to eth/consensus/blank_engine.go index 88d2860f3..be15438e4 100644 --- a/cosmos/miner/blank_engine.go +++ b/eth/consensus/blank_engine.go @@ -19,13 +19,13 @@ // TITLE. // //nolint:revive // boilerplate for now. -package miner +package consensus import ( "math/big" "github.com/ethereum/go-ethereum/common" - consensus "github.com/ethereum/go-ethereum/consensus" + "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rpc" @@ -44,7 +44,6 @@ func (m *MockEngine) Author(header *types.Header) (common.Address, error) { func (m *MockEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { // Set the correct difficulty header.Difficulty = new(big.Int).SetUint64(1) - return nil } diff --git a/eth/consensus/imported.go b/eth/consensus/imported.go new file mode 100644 index 000000000..3f94b6195 --- /dev/null +++ b/eth/consensus/imported.go @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: BUSL-1.1 +// +// Copyright (C) 2023, Berachain Foundation. All rights reserved. +// Use of this software is govered 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 consensus + +import "github.com/ethereum/go-ethereum/consensus" + +type Engine consensus.Engine diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index fb1a52079..86f8a343d 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -30,12 +30,14 @@ import ( "github.com/ethereum/go-ethereum/core/txpool/legacypool" "github.com/ethereum/go-ethereum/eth/ethconfig" "github.com/ethereum/go-ethereum/eth/filters" - gethminer "github.com/ethereum/go-ethereum/miner" + "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/miner" + "pkg.berachain.dev/polaris/eth/consensus" "pkg.berachain.dev/polaris/eth/core" "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/log" - "pkg.berachain.dev/polaris/eth/miner" + oldminer "pkg.berachain.dev/polaris/eth/miner" polarapi "pkg.berachain.dev/polaris/eth/polar/api" "pkg.berachain.dev/polaris/eth/rpc" ) @@ -78,14 +80,15 @@ type Polaris struct { host core.PolarisHostChain blockchain core.Blockchain txPool *txpool.TxPool - spminer miner.Miner - miner *gethminer.Miner + spminer oldminer.Miner + miner *miner.Miner // backend is utilize by the api handlers as a middleware between the JSON-RPC APIs and the core piecepl. backend Backend // engine represents the consensus engine for the backend. engine core.EnginePlugin + beacon consensus.Engine // filterSystem is the filter system that is used by the filter API. // TODO: relocate @@ -104,6 +107,7 @@ func NewWithNetworkingStack( stack: stack, host: host, engine: host.GetEnginePlugin(), + beacon: &consensus.MockEngine{}, } // When creating a Polaris EVM, we allow the implementing chain // to specify their own log handler. If logHandler is nil then we @@ -123,8 +127,7 @@ func NewWithNetworkingStack( // Init initializes the Polaris struct. func (pl *Polaris) Init() error { - pl.spminer = miner.New(pl) - // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) + pl.spminer = oldminer.New(pl) var err error legacyPool := legacypool.New( @@ -136,7 +139,11 @@ func (pl *Polaris) Init() error { return err } - // eth.miner = miner.New(eth, &config.Miner, eth.blockchain.Config(), eth.EventMux(), eth.engine, eth.isLocalBlock) + mux := new(event.TypeMux) //nolint:staticcheck // todo fix. + // TODO: miner config to app.toml + pl.miner = miner.New(pl, &miner.DefaultConfig, + pl.host.GetConfigurationPlugin().ChainConfig(), mux, pl.beacon, pl.IsLocalBlock) + // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) // Build and set the RPC Backend and other services. @@ -191,16 +198,11 @@ func (pl *Polaris) Host() core.PolarisHostChain { return pl.host } -func (pl *Polaris) Miner() *gethminer.Miner { +func (pl *Polaris) Miner() *miner.Miner { return pl.miner } -// TODO: DEPREACTE -func (pl *Polaris) SetMiner(sp *gethminer.Miner) { - pl.miner = sp -} - -func (pl *Polaris) SPMiner() miner.Miner { +func (pl *Polaris) SPMiner() oldminer.Miner { return pl.spminer } @@ -208,7 +210,7 @@ func (pl *Polaris) TxPool() *txpool.TxPool { return pl.txPool } -func (pl *Polaris) MinerChain() gethminer.BlockChain { +func (pl *Polaris) MinerChain() miner.BlockChain { return pl.blockchain } From 51605c126efd9d3009dd40cedd8c65efb0b6c1e8 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 12:51:53 -0400 Subject: [PATCH 79/94] cleanup and remove txp --- cosmos/txpool/handler.go | 10 +-- cosmos/txpool/handler_test.go | 4 +- cosmos/txpool/mempool.go | 23 +++++- cosmos/txpool/mocks/broadcaster.go | 90 --------------------- cosmos/txpool/mocks/geth_tx_pool.go | 47 +++++++++++ cosmos/txpool/mocks/startable.go | 64 +++++++++++++++ cosmos/txpool/mocks/tx_broadcaster.go | 90 +++++++++++++++++++++ cosmos/x/evm/keeper/host.go | 12 +-- cosmos/x/evm/keeper/keeper.go | 12 +-- cosmos/x/evm/plugins/txpool/interfaces.go | 25 ------ cosmos/x/evm/plugins/txpool/plugin.go | 93 ---------------------- cosmos/x/evm/plugins/txpool/txpool_test.go | 33 -------- e2e/testapp/app.go | 60 +++++--------- eth/core/host.go | 9 +-- eth/core/mock/host.go | 8 +- eth/core/mock/host.mock.go | 37 --------- eth/core/mock/txpool_plugin.go | 23 ------ eth/core/mock/txpool_plugin.mock.go | 68 ---------------- eth/core/processor_test.go | 4 +- 19 files changed, 259 insertions(+), 453 deletions(-) delete mode 100644 cosmos/txpool/mocks/broadcaster.go create mode 100644 cosmos/txpool/mocks/startable.go create mode 100644 cosmos/txpool/mocks/tx_broadcaster.go delete mode 100644 cosmos/x/evm/plugins/txpool/interfaces.go delete mode 100644 cosmos/x/evm/plugins/txpool/plugin.go delete mode 100644 cosmos/x/evm/plugins/txpool/txpool_test.go delete mode 100644 eth/core/mock/txpool_plugin.go delete mode 100644 eth/core/mock/txpool_plugin.mock.go diff --git a/cosmos/txpool/handler.go b/cosmos/txpool/handler.go index 4c97fc7e0..f34d7eb62 100644 --- a/cosmos/txpool/handler.go +++ b/cosmos/txpool/handler.go @@ -53,8 +53,8 @@ type TxSerializer interface { SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) } -// Broadcaster provides an interface to broadcast TxBytes to the comet p2p layer. -type Broadcaster interface { +// TxBroadcaster provides an interface to broadcast TxBytes to the comet p2p layer. +type TxBroadcaster interface { BroadcastTxSync(txBytes []byte) (res *sdk.TxResponse, err error) } @@ -75,7 +75,7 @@ type Handler interface { type handler struct { // Cosmos logger log.Logger - clientCtx Broadcaster + clientCtx TxBroadcaster serializer TxSerializer // Ethereum @@ -88,14 +88,14 @@ type handler struct { // NewHandler creates a new Handler. func NewHandler( - clientCtx Broadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, + clientCtx TxBroadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, ) Handler { return newHandler(clientCtx, txPool, serializer, logger) } // newHandler creates a new handler. func newHandler( - clientCtx Broadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, + clientCtx TxBroadcaster, txPool TxSubProvider, serializer TxSerializer, logger log.Logger, ) *handler { h := &handler{ logger: logger, diff --git a/cosmos/txpool/handler_test.go b/cosmos/txpool/handler_test.go index 62873ea94..51dbef91d 100644 --- a/cosmos/txpool/handler_test.go +++ b/cosmos/txpool/handler_test.go @@ -47,14 +47,14 @@ var _ = Describe("", func() { var subscription *mocks.Subscription var serializer *mocks.TxSerializer - var broadcaster *mocks.Broadcaster + var broadcaster *mocks.TxBroadcaster var subprovider *mocks.TxSubProvider BeforeEach(func() { subscription = mocks.NewSubscription(t) subscription.On("Err").Return(nil) subscription.On("Unsubscribe").Return() - broadcaster = mocks.NewBroadcaster(t) + broadcaster = mocks.NewTxBroadcaster(t) subprovider = mocks.NewTxSubProvider(t) subprovider.On("SubscribeNewTxsEvent", mock.Anything).Return(subscription) serializer = mocks.NewTxSerializer(t) diff --git a/cosmos/txpool/mempool.go b/cosmos/txpool/mempool.go index a4d055030..2a723f80d 100644 --- a/cosmos/txpool/mempool.go +++ b/cosmos/txpool/mempool.go @@ -24,10 +24,15 @@ import ( "context" "errors" + "cosmossdk.io/log" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/event" + "pkg.berachain.dev/polaris/cosmos/x/evm/types" + "pkg.berachain.dev/polaris/eth/core" coretypes "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/lib/utils" ) @@ -39,6 +44,12 @@ var _ mempool.Mempool = (*Mempool)(nil) type GethTxPool interface { Add([]*coretypes.Transaction, bool, bool) []error Stats() (int, int) + SubscribeNewTxsEvent(chan<- core.NewTxsEvent) event.Subscription +} + +// Startable represents a type that can be started. +type Startable interface { + Start() } // Mempool is a mempool that adheres to the cosmos mempool interface. @@ -46,7 +57,8 @@ type GethTxPool interface { // is to allow for transactions coming in from CometBFT's gossip to be added to the underlying // geth txpool during `CheckTx`, that is the only purpose of `Mempool“. type Mempool struct { - txpool GethTxPool + txpool GethTxPool + handler Startable } // NewMempool creates a new Mempool. @@ -56,6 +68,15 @@ func NewMempool(txpool GethTxPool) *Mempool { } } +// StartSerializationHandler implements the Startable interface. +func (m *Mempool) StartSerializationHandler( + txBroadcaster TxBroadcaster, + txSerializer TxSerializer, +) { + m.handler = newHandler(txBroadcaster, m.txpool, txSerializer, log.NewNopLogger()) + m.handler.Start() // todo: handle closing. +} + // Insert attempts to insert a Tx into the app-side mempool returning // an error upon failure. func (m *Mempool) Insert(_ context.Context, sdkTx sdk.Tx) error { diff --git a/cosmos/txpool/mocks/broadcaster.go b/cosmos/txpool/mocks/broadcaster.go deleted file mode 100644 index 58a9870e0..000000000 --- a/cosmos/txpool/mocks/broadcaster.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by mockery v2.34.2. DO NOT EDIT. - -package mocks - -import ( - mock "github.com/stretchr/testify/mock" - - types "github.com/cosmos/cosmos-sdk/types" -) - -// Broadcaster is an autogenerated mock type for the Broadcaster type -type Broadcaster struct { - mock.Mock -} - -type Broadcaster_Expecter struct { - mock *mock.Mock -} - -func (_m *Broadcaster) EXPECT() *Broadcaster_Expecter { - return &Broadcaster_Expecter{mock: &_m.Mock} -} - -// BroadcastTxSync provides a mock function with given fields: txBytes -func (_m *Broadcaster) BroadcastTxSync(txBytes []byte) (*types.TxResponse, error) { - ret := _m.Called(txBytes) - - var r0 *types.TxResponse - var r1 error - if rf, ok := ret.Get(0).(func([]byte) (*types.TxResponse, error)); ok { - return rf(txBytes) - } - if rf, ok := ret.Get(0).(func([]byte) *types.TxResponse); ok { - r0 = rf(txBytes) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*types.TxResponse) - } - } - - if rf, ok := ret.Get(1).(func([]byte) error); ok { - r1 = rf(txBytes) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Broadcaster_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' -type Broadcaster_BroadcastTxSync_Call struct { - *mock.Call -} - -// BroadcastTxSync is a helper method to define mock.On call -// - txBytes []byte -func (_e *Broadcaster_Expecter) BroadcastTxSync(txBytes interface{}) *Broadcaster_BroadcastTxSync_Call { - return &Broadcaster_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", txBytes)} -} - -func (_c *Broadcaster_BroadcastTxSync_Call) Run(run func(txBytes []byte)) *Broadcaster_BroadcastTxSync_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].([]byte)) - }) - return _c -} - -func (_c *Broadcaster_BroadcastTxSync_Call) Return(res *types.TxResponse, err error) *Broadcaster_BroadcastTxSync_Call { - _c.Call.Return(res, err) - return _c -} - -func (_c *Broadcaster_BroadcastTxSync_Call) RunAndReturn(run func([]byte) (*types.TxResponse, error)) *Broadcaster_BroadcastTxSync_Call { - _c.Call.Return(run) - return _c -} - -// NewBroadcaster creates a new instance of Broadcaster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewBroadcaster(t interface { - mock.TestingT - Cleanup(func()) -}) *Broadcaster { - mock := &Broadcaster{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/cosmos/txpool/mocks/geth_tx_pool.go b/cosmos/txpool/mocks/geth_tx_pool.go index d34f394ac..9d48e04a9 100644 --- a/cosmos/txpool/mocks/geth_tx_pool.go +++ b/cosmos/txpool/mocks/geth_tx_pool.go @@ -3,6 +3,9 @@ package mocks import ( + core "github.com/ethereum/go-ethereum/core" + event "github.com/ethereum/go-ethereum/event" + mock "github.com/stretchr/testify/mock" types "github.com/ethereum/go-ethereum/core/types" @@ -118,6 +121,50 @@ func (_c *GethTxPool_Stats_Call) RunAndReturn(run func() (int, int)) *GethTxPool return _c } +// SubscribeNewTxsEvent provides a mock function with given fields: _a0 +func (_m *GethTxPool) SubscribeNewTxsEvent(_a0 chan<- core.NewTxsEvent) event.Subscription { + ret := _m.Called(_a0) + + var r0 event.Subscription + if rf, ok := ret.Get(0).(func(chan<- core.NewTxsEvent) event.Subscription); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(event.Subscription) + } + } + + return r0 +} + +// GethTxPool_SubscribeNewTxsEvent_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SubscribeNewTxsEvent' +type GethTxPool_SubscribeNewTxsEvent_Call struct { + *mock.Call +} + +// SubscribeNewTxsEvent is a helper method to define mock.On call +// - _a0 chan<- core.NewTxsEvent +func (_e *GethTxPool_Expecter) SubscribeNewTxsEvent(_a0 interface{}) *GethTxPool_SubscribeNewTxsEvent_Call { + return &GethTxPool_SubscribeNewTxsEvent_Call{Call: _e.mock.On("SubscribeNewTxsEvent", _a0)} +} + +func (_c *GethTxPool_SubscribeNewTxsEvent_Call) Run(run func(_a0 chan<- core.NewTxsEvent)) *GethTxPool_SubscribeNewTxsEvent_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(chan<- core.NewTxsEvent)) + }) + return _c +} + +func (_c *GethTxPool_SubscribeNewTxsEvent_Call) Return(_a0 event.Subscription) *GethTxPool_SubscribeNewTxsEvent_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *GethTxPool_SubscribeNewTxsEvent_Call) RunAndReturn(run func(chan<- core.NewTxsEvent) event.Subscription) *GethTxPool_SubscribeNewTxsEvent_Call { + _c.Call.Return(run) + return _c +} + // NewGethTxPool creates a new instance of GethTxPool. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewGethTxPool(t interface { diff --git a/cosmos/txpool/mocks/startable.go b/cosmos/txpool/mocks/startable.go new file mode 100644 index 000000000..fa4749c47 --- /dev/null +++ b/cosmos/txpool/mocks/startable.go @@ -0,0 +1,64 @@ +// Code generated by mockery v2.34.2. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// Startable is an autogenerated mock type for the Startable type +type Startable struct { + mock.Mock +} + +type Startable_Expecter struct { + mock *mock.Mock +} + +func (_m *Startable) EXPECT() *Startable_Expecter { + return &Startable_Expecter{mock: &_m.Mock} +} + +// Start provides a mock function with given fields: +func (_m *Startable) Start() { + _m.Called() +} + +// Startable_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' +type Startable_Start_Call struct { + *mock.Call +} + +// Start is a helper method to define mock.On call +func (_e *Startable_Expecter) Start() *Startable_Start_Call { + return &Startable_Start_Call{Call: _e.mock.On("Start")} +} + +func (_c *Startable_Start_Call) Run(run func()) *Startable_Start_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Startable_Start_Call) Return() *Startable_Start_Call { + _c.Call.Return() + return _c +} + +func (_c *Startable_Start_Call) RunAndReturn(run func()) *Startable_Start_Call { + _c.Call.Return(run) + return _c +} + +// NewStartable creates a new instance of Startable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewStartable(t interface { + mock.TestingT + Cleanup(func()) +}) *Startable { + mock := &Startable{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/txpool/mocks/tx_broadcaster.go b/cosmos/txpool/mocks/tx_broadcaster.go new file mode 100644 index 000000000..e42759b1d --- /dev/null +++ b/cosmos/txpool/mocks/tx_broadcaster.go @@ -0,0 +1,90 @@ +// Code generated by mockery v2.34.2. DO NOT EDIT. + +package mocks + +import ( + mock "github.com/stretchr/testify/mock" + + types "github.com/cosmos/cosmos-sdk/types" +) + +// TxBroadcaster is an autogenerated mock type for the TxBroadcaster type +type TxBroadcaster struct { + mock.Mock +} + +type TxBroadcaster_Expecter struct { + mock *mock.Mock +} + +func (_m *TxBroadcaster) EXPECT() *TxBroadcaster_Expecter { + return &TxBroadcaster_Expecter{mock: &_m.Mock} +} + +// BroadcastTxSync provides a mock function with given fields: txBytes +func (_m *TxBroadcaster) BroadcastTxSync(txBytes []byte) (*types.TxResponse, error) { + ret := _m.Called(txBytes) + + var r0 *types.TxResponse + var r1 error + if rf, ok := ret.Get(0).(func([]byte) (*types.TxResponse, error)); ok { + return rf(txBytes) + } + if rf, ok := ret.Get(0).(func([]byte) *types.TxResponse); ok { + r0 = rf(txBytes) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.TxResponse) + } + } + + if rf, ok := ret.Get(1).(func([]byte) error); ok { + r1 = rf(txBytes) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// TxBroadcaster_BroadcastTxSync_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastTxSync' +type TxBroadcaster_BroadcastTxSync_Call struct { + *mock.Call +} + +// BroadcastTxSync is a helper method to define mock.On call +// - txBytes []byte +func (_e *TxBroadcaster_Expecter) BroadcastTxSync(txBytes interface{}) *TxBroadcaster_BroadcastTxSync_Call { + return &TxBroadcaster_BroadcastTxSync_Call{Call: _e.mock.On("BroadcastTxSync", txBytes)} +} + +func (_c *TxBroadcaster_BroadcastTxSync_Call) Run(run func(txBytes []byte)) *TxBroadcaster_BroadcastTxSync_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].([]byte)) + }) + return _c +} + +func (_c *TxBroadcaster_BroadcastTxSync_Call) Return(res *types.TxResponse, err error) *TxBroadcaster_BroadcastTxSync_Call { + _c.Call.Return(res, err) + return _c +} + +func (_c *TxBroadcaster_BroadcastTxSync_Call) RunAndReturn(run func([]byte) (*types.TxResponse, error)) *TxBroadcaster_BroadcastTxSync_Call { + _c.Call.Return(run) + return _c +} + +// NewTxBroadcaster creates a new instance of TxBroadcaster. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewTxBroadcaster(t interface { + mock.TestingT + Cleanup(func()) +}) *TxBroadcaster { + mock := &TxBroadcaster{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 273581ca4..0a2eff541 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -24,7 +24,6 @@ import ( "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" "pkg.berachain.dev/polaris/cosmos/config" @@ -36,7 +35,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile" pclog "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/precompile/log" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/eth/core" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" ) @@ -61,7 +59,6 @@ type host struct { hp historical.Plugin pp precompile.Plugin sp state.Plugin - txp txpool.Plugin logger log.Logger ak state.AccountKeeper @@ -78,7 +75,6 @@ func NewHost( sk block.StakingKeeper, precompiles func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), - txConfig client.TxConfig, logger log.Logger, ) Host { // We setup the host with some Cosmos standard sauce. @@ -89,7 +85,6 @@ func NewHost( h.cp = configuration.NewPlugin(&cfg.Polar.Chain) h.ep = engine.NewPlugin() h.gp = gas.NewPlugin() - h.txp = txpool.NewPlugin(txConfig) h.pcs = precompiles h.storeKey = storeKey h.ak = ak @@ -149,12 +144,7 @@ func (h *host) GetStatePlugin() core.StatePlugin { return h.sp } -// GetTxPoolPlugin returns the txpool plugin. -func (h *host) GetTxPoolPlugin() core.TxPoolPlugin { - return h.txp -} - // GetAllPlugins returns all the plugins. func (h *host) GetAllPlugins() []any { - return []any{h.bp, h.cp, h.gp, h.hp, h.pp, h.sp, h.txp} + return []any{h.bp, h.cp, h.gp, h.hp, h.pp, h.sp} } diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index e1a3ec403..83f8f25eb 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -22,7 +22,6 @@ package keeper import ( "math/big" - "os" "cosmossdk.io/log" storetypes "cosmossdk.io/store/types" @@ -34,7 +33,6 @@ import ( "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/block" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine" "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/state" - "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/txpool" "pkg.berachain.dev/polaris/cosmos/x/evm/types" "pkg.berachain.dev/polaris/eth/common" ethprecompile "pkg.berachain.dev/polaris/eth/core/precompile" @@ -63,7 +61,7 @@ func NewKeeper( pcs func() *ethprecompile.Injector, qc func() func(height int64, prove bool) (sdk.Context, error), logger log.Logger, - txConfig client.TxConfig, + _ client.TxConfig, polarisCfg *config.Config, ) *Keeper { host := NewHost( @@ -73,7 +71,6 @@ func NewKeeper( sk, pcs, qc, - txConfig, logger, ) @@ -128,13 +125,6 @@ func (k *Keeper) SetClientCtx(clientContext client.Context) { if err := k.polaris.StartServices(); err != nil { panic(err) } - - txp, _ := k.host.GetTxPoolPlugin().(txpool.Plugin) - txp.Start( - log.NewLogger(os.Stdout), - k.polaris.TxPool(), - clientContext, - ) } // TODO: Remove these, because they're hacky af. diff --git a/cosmos/x/evm/plugins/txpool/interfaces.go b/cosmos/x/evm/plugins/txpool/interfaces.go deleted file mode 100644 index b35ebc989..000000000 --- a/cosmos/x/evm/plugins/txpool/interfaces.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 txpool - -type ConfigurationPlugin interface { - GetEvmDenom() string -} diff --git a/cosmos/x/evm/plugins/txpool/plugin.go b/cosmos/x/evm/plugins/txpool/plugin.go deleted file mode 100644 index 5ccf0f22a..000000000 --- a/cosmos/x/evm/plugins/txpool/plugin.go +++ /dev/null @@ -1,93 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 txpool - -import ( - "cosmossdk.io/log" - - "github.com/cosmos/cosmos-sdk/client" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ethereum/go-ethereum/core/txpool" - - cosmostxpool "pkg.berachain.dev/polaris/cosmos/txpool" - "pkg.berachain.dev/polaris/cosmos/x/evm/types" - "pkg.berachain.dev/polaris/eth/core" - coretypes "pkg.berachain.dev/polaris/eth/core/types" -) - -// Compile-time type assertion. -var _ Plugin = (*plugin)(nil) - -type Serializer interface { - SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) - SerializeToSdkTx(signedTx *coretypes.Transaction) (sdk.Tx, error) -} - -// Plugin defines the required functions of the transaction pool plugin. -type Plugin interface { - core.TxPoolPlugin - Start(log.Logger, *txpool.TxPool, client.Context) - // Prepare(*big.Int, coretypes.Signer) - SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) - GetTxPool() *txpool.TxPool -} - -// Startable represents a type that can be started. -type Startable interface { - Start() -} - -// plugin represents the transaction pool plugin. -type plugin struct { - *txpool.TxPool - handler Startable - serializer types.TxSerializer -} - -// NewPlugin returns a new transaction pool plugin. -func NewPlugin(txConfig client.TxConfig) Plugin { - return &plugin{ - serializer: types.NewSerializer(txConfig), - } -} - -// GetHandler implements the Plugin interface. -func (p *plugin) GetHandler() core.Handler { - return p.handler -} - -func (p *plugin) GetTxPool() *txpool.TxPool { - return p.TxPool -} - -func (p *plugin) SerializeToBytes(signedTx *coretypes.Transaction) ([]byte, error) { - return p.serializer.SerializeToBytes(signedTx) -} - -// Setup implements the Plugin interface. -func (p *plugin) Start(logger log.Logger, txpool *txpool.TxPool, ctx client.Context) { - p.TxPool = txpool - p.handler = cosmostxpool.NewHandler(ctx, txpool, p.serializer, logger) - - // TODO: register all these starting things somewhere better. - p.handler.Start() -} diff --git a/cosmos/x/evm/plugins/txpool/txpool_test.go b/cosmos/x/evm/plugins/txpool/txpool_test.go deleted file mode 100644 index 1115cb7bc..000000000 --- a/cosmos/x/evm/plugins/txpool/txpool_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 txpool_test - -import ( - "testing" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -func TestTxpool(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "cosmos/x/evm/plugins/txpool") -} diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 15abefa89..185ac2200 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -60,6 +60,7 @@ import ( evmconfig "pkg.berachain.dev/polaris/cosmos/config" ethcryptocodec "pkg.berachain.dev/polaris/cosmos/crypto/codec" "pkg.berachain.dev/polaris/cosmos/miner" + "pkg.berachain.dev/polaris/cosmos/txpool" evmante "pkg.berachain.dev/polaris/cosmos/x/evm/ante" evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper" evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types" @@ -102,6 +103,7 @@ type SimApp struct { EVMKeeper *evmkeeper.Keeper mm *miner.Miner + mp *txpool.Mempool } //nolint:gochecknoinits // from sdk. @@ -190,55 +192,35 @@ func NewPolarisApp( panic(err) } - // Below we could construct and set an application specific mempool and - // ABCI 1.0 PrepareProposal and ProcessProposal handlers. These defaults are - // already set in the SDK's BaseApp, this shows an example of how to override - // them. - // - // Example: - // - // app.App = appBuilder.Build(...) - // nonceMempool := mempool.NewSenderNonceMempool() - // abciPropHandler := NewDefaultProposalHandler(nonceMempool, app.App.BaseApp) - // - // app.App.BaseApp.SetMempool(nonceMempool) - // - // Alternatively, you can construct BaseApp options, append those to - // baseAppOptions and pass them to the appBuilder. - // - // Example: - // - // prepareOpt = func(app *baseapp.BaseApp) { - // abciPropHandler := baseapp.NewDefaultProposalHandler(nonceMempool, app) - // app.SetPrepareProposal(abciPropHandler.PrepareProposalHandler()) - // } - // baseAppOptions = append(baseAppOptions, prepareOpt) - + // Build the app using the app builder. app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - // mp := cosmostxpool.NewMempool(app.EVMKeeper.Polaris().TxPool()) - // defaultPrepareProposal := baseapp.NewDefaultProposalHandler(mp, app) // SetupPrecompiles is used to setup the precompile contracts post depinject. app.EVMKeeper.SetupPrecompiles() - // TODO: cleanup miner location. + // Setup TxPool Wrapper + app.mp = txpool.NewMempool(app.EVMKeeper.Polaris().TxPool()) + app.SetMempool(app.mp) + + // Setup Miner Wrapper app.mm = miner.New(app.EVMKeeper.Polaris().Miner()) - app.App.BaseApp.SetPrepareProposal(app.mm.PrepareProposal) - - opt := ante.HandlerOptions{ - AccountKeeper: app.AccountKeeper, - BankKeeper: app.BankKeeper, - SignModeHandler: app.TxConfig().SignModeHandler(), - FeegrantKeeper: nil, - SigGasConsumer: evmante.SigVerificationGasConsumer, - } + app.SetPrepareProposal(app.mm.PrepareProposal) + // Setup Custom Ante Handler ch, _ := evmante.NewAnteHandler( - opt, + ante.HandlerOptions{ + AccountKeeper: app.AccountKeeper, + BankKeeper: app.BankKeeper, + SignModeHandler: app.TxConfig().SignModeHandler(), + FeegrantKeeper: nil, + SigGasConsumer: evmante.SigVerificationGasConsumer, + }, ) app.SetAnteHandler( ch, ) + + // Register eth_secp256k1 keys ethcryptocodec.RegisterInterfaces(app.interfaceRegistry) // ----- END EVM SETUP ------------------------------------------------- @@ -334,7 +316,9 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon if err := server.RegisterSwaggerAPI(apiSvr.ClientCtx, apiSvr.Router, apiConfig.Swagger); err != nil { panic(err) } - app.mm.SetSerializer(evmtypes.NewSerializer(apiSvr.ClientCtx.TxConfig)) + txSerializer := evmtypes.NewSerializer(apiSvr.ClientCtx.TxConfig) + app.mm.SetSerializer(txSerializer) + app.mp.StartSerializationHandler(apiSvr.ClientCtx, txSerializer) app.EVMKeeper.SetClientCtx(apiSvr.ClientCtx) } diff --git a/eth/core/host.go b/eth/core/host.go index 1bbb39d32..eef262623 100644 --- a/eth/core/host.go +++ b/eth/core/host.go @@ -50,8 +50,6 @@ type PolarisHostChain interface { GetPrecompilePlugin() PrecompilePlugin // GetStatePlugin returns the `StatePlugin` of the Polaris host chain. GetStatePlugin() StatePlugin - // GetTxPoolPlugin returns the `TxPoolPlugin` of the Polaris host chain. - GetTxPoolPlugin() TxPoolPlugin } // ============================================================================= @@ -133,12 +131,7 @@ type ( // TxPoolPlugin defines the methods that the chain running Polaris EVM should implement to // support the transaction pool. - TxPoolPlugin interface { - // GetHandler returns a handler that is used to broadcast transactions. - GetHandler() Handler - } - - Handler interface{} + TxPoolPlugin interface{} ) // ============================================================================= diff --git a/eth/core/mock/host.go b/eth/core/mock/host.go index 0f82892cf..b6f5690f3 100644 --- a/eth/core/mock/host.go +++ b/eth/core/mock/host.go @@ -26,7 +26,7 @@ import "pkg.berachain.dev/polaris/eth/core" func NewMockHostAndPlugins() ( *PolarisHostChainMock, *BlockPluginMock, *ConfigurationPluginMock, *GasPluginMock, - *HistoricalPluginMock, *PrecompilePluginMock, *StatePluginMock, *TxPoolPluginMock, + *HistoricalPluginMock, *PrecompilePluginMock, *StatePluginMock, ) { bp := NewBlockPluginMock() cp := NewConfigurationPluginMock() @@ -34,7 +34,6 @@ func NewMockHostAndPlugins() ( hp := NewHistoricalPluginMock() pp := NewPrecompilePluginMock() sp := NewStatePluginMock() - tp := &TxPoolPluginMock{} mockedPolarisHostChain := &PolarisHostChainMock{ GetBlockPluginFunc: func() core.BlockPlugin { return bp @@ -54,9 +53,6 @@ func NewMockHostAndPlugins() ( GetStatePluginFunc: func() core.StatePlugin { return sp }, - GetTxPoolPluginFunc: func() core.TxPoolPlugin { - return tp - }, } - return mockedPolarisHostChain, bp, cp, gp, hp, pp, sp, tp + return mockedPolarisHostChain, bp, cp, gp, hp, pp, sp } diff --git a/eth/core/mock/host.mock.go b/eth/core/mock/host.mock.go index 97e58c4cd..e0067fcdb 100644 --- a/eth/core/mock/host.mock.go +++ b/eth/core/mock/host.mock.go @@ -40,9 +40,6 @@ var _ core.PolarisHostChain = &PolarisHostChainMock{} // GetStatePluginFunc: func() core.StatePlugin { // panic("mock out the GetStatePlugin method") // }, -// GetTxPoolPluginFunc: func() core.TxPoolPlugin { -// panic("mock out the GetTxPoolPlugin method") -// }, // } // // // use mockedPolarisHostChain in code that requires core.PolarisHostChain @@ -71,9 +68,6 @@ type PolarisHostChainMock struct { // GetStatePluginFunc mocks the GetStatePlugin method. GetStatePluginFunc func() core.StatePlugin - // GetTxPoolPluginFunc mocks the GetTxPoolPlugin method. - GetTxPoolPluginFunc func() core.TxPoolPlugin - // calls tracks calls to the methods. calls struct { // GetBlockPlugin holds details about calls to the GetBlockPlugin method. @@ -97,9 +91,6 @@ type PolarisHostChainMock struct { // GetStatePlugin holds details about calls to the GetStatePlugin method. GetStatePlugin []struct { } - // GetTxPoolPlugin holds details about calls to the GetTxPoolPlugin method. - GetTxPoolPlugin []struct { - } } lockGetBlockPlugin sync.RWMutex lockGetConfigurationPlugin sync.RWMutex @@ -108,7 +99,6 @@ type PolarisHostChainMock struct { lockGetHistoricalPlugin sync.RWMutex lockGetPrecompilePlugin sync.RWMutex lockGetStatePlugin sync.RWMutex - lockGetTxPoolPlugin sync.RWMutex } // GetBlockPlugin calls GetBlockPluginFunc. @@ -299,30 +289,3 @@ func (mock *PolarisHostChainMock) GetStatePluginCalls() []struct { mock.lockGetStatePlugin.RUnlock() return calls } - -// GetTxPoolPlugin calls GetTxPoolPluginFunc. -func (mock *PolarisHostChainMock) GetTxPoolPlugin() core.TxPoolPlugin { - if mock.GetTxPoolPluginFunc == nil { - panic("PolarisHostChainMock.GetTxPoolPluginFunc: method is nil but PolarisHostChain.GetTxPoolPlugin was just called") - } - callInfo := struct { - }{} - mock.lockGetTxPoolPlugin.Lock() - mock.calls.GetTxPoolPlugin = append(mock.calls.GetTxPoolPlugin, callInfo) - mock.lockGetTxPoolPlugin.Unlock() - return mock.GetTxPoolPluginFunc() -} - -// GetTxPoolPluginCalls gets all the calls that were made to GetTxPoolPlugin. -// Check the length with: -// -// len(mockedPolarisHostChain.GetTxPoolPluginCalls()) -func (mock *PolarisHostChainMock) GetTxPoolPluginCalls() []struct { -} { - var calls []struct { - } - mock.lockGetTxPoolPlugin.RLock() - calls = mock.calls.GetTxPoolPlugin - mock.lockGetTxPoolPlugin.RUnlock() - return calls -} diff --git a/eth/core/mock/txpool_plugin.go b/eth/core/mock/txpool_plugin.go deleted file mode 100644 index 6d4f07874..000000000 --- a/eth/core/mock/txpool_plugin.go +++ /dev/null @@ -1,23 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 mock - -//go:generate moq -out ./txpool_plugin.mock.go -pkg mock ../ TxPoolPlugin diff --git a/eth/core/mock/txpool_plugin.mock.go b/eth/core/mock/txpool_plugin.mock.go deleted file mode 100644 index 60bd36da5..000000000 --- a/eth/core/mock/txpool_plugin.mock.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "pkg.berachain.dev/polaris/eth/core" - "sync" -) - -// Ensure, that TxPoolPluginMock does implement core.TxPoolPlugin. -// If this is not the case, regenerate this file with moq. -var _ core.TxPoolPlugin = &TxPoolPluginMock{} - -// TxPoolPluginMock is a mock implementation of core.TxPoolPlugin. -// -// func TestSomethingThatUsesTxPoolPlugin(t *testing.T) { -// -// // make and configure a mocked core.TxPoolPlugin -// mockedTxPoolPlugin := &TxPoolPluginMock{ -// GetHandlerFunc: func() core.Handler { -// panic("mock out the GetHandler method") -// }, -// } -// -// // use mockedTxPoolPlugin in code that requires core.TxPoolPlugin -// // and then make assertions. -// -// } -type TxPoolPluginMock struct { - // GetHandlerFunc mocks the GetHandler method. - GetHandlerFunc func() core.Handler - - // calls tracks calls to the methods. - calls struct { - // GetHandler holds details about calls to the GetHandler method. - GetHandler []struct { - } - } - lockGetHandler sync.RWMutex -} - -// GetHandler calls GetHandlerFunc. -func (mock *TxPoolPluginMock) GetHandler() core.Handler { - if mock.GetHandlerFunc == nil { - panic("TxPoolPluginMock.GetHandlerFunc: method is nil but TxPoolPlugin.GetHandler was just called") - } - callInfo := struct { - }{} - mock.lockGetHandler.Lock() - mock.calls.GetHandler = append(mock.calls.GetHandler, callInfo) - mock.lockGetHandler.Unlock() - return mock.GetHandlerFunc() -} - -// GetHandlerCalls gets all the calls that were made to GetHandler. -// Check the length with: -// -// len(mockedTxPoolPlugin.GetHandlerCalls()) -func (mock *TxPoolPluginMock) GetHandlerCalls() []struct { -} { - var calls []struct { - } - mock.lockGetHandler.RLock() - calls = mock.calls.GetHandler - mock.lockGetHandler.RUnlock() - return calls -} diff --git a/eth/core/processor_test.go b/eth/core/processor_test.go index 5b36f3ac2..6c435ff60 100644 --- a/eth/core/processor_test.go +++ b/eth/core/processor_test.go @@ -71,7 +71,7 @@ var _ = Describe("StateProcessor", func() { BeforeEach(func() { sdb = vmmock.NewEmptyStateDB() - _, bp, cp, _, _, pp, _, _ = mock.NewMockHostAndPlugins() + _, bp, cp, _, _, pp, _ = mock.NewMockHostAndPlugins() bp.GetNewBlockMetadataFunc = func(n uint64) (common.Address, uint64) { return common.BytesToAddress([]byte{2}), uint64(3) } @@ -187,7 +187,7 @@ var _ = Describe("StateProcessor", func() { var _ = Describe("No precompile plugin provided", func() { It("should use the default plugin if none is provided", func() { - _, bp, cp, gp, _, pp, _, _ := mock.NewMockHostAndPlugins() + _, bp, cp, gp, _, pp, _ := mock.NewMockHostAndPlugins() gp.SetBlockGasLimit(uint64(blockGasLimit)) bp.GetNewBlockMetadataFunc = func(n uint64) (common.Address, uint64) { return common.BytesToAddress([]byte{2}), uint64(3) From d2aa08e1f712fcbc4e03091bd300faf6d98ee9b3 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 12:56:07 -0400 Subject: [PATCH 80/94] remove unused function from miner --- cosmos/miner/miner.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/cosmos/miner/miner.go b/cosmos/miner/miner.go index 368aedc1e..17449f98a 100644 --- a/cosmos/miner/miner.go +++ b/cosmos/miner/miner.go @@ -57,11 +57,6 @@ func (m *Miner) SetSerializer(serializer evmtypes.TxSerializer) { m.serializer = serializer } -// SetMiner sets the underlying Miner object from geth. -func (m *Miner) SetGethMiner(gm *miner.Miner) { - m.Miner = gm -} - // PrepareProposal implements baseapp.PrepareProposal. func (m *Miner) PrepareProposal( ctx sdk.Context, _ *abci.RequestPrepareProposal, From bd1daa9697f06c62a3ee73ee5b29733f1a0b89b2 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 13:16:40 -0400 Subject: [PATCH 81/94] add logger to mp --- cosmos/txpool/handler.go | 1 + cosmos/txpool/mempool.go | 15 +++++++++++---- e2e/testapp/app.go | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cosmos/txpool/handler.go b/cosmos/txpool/handler.go index f34d7eb62..4fb130baa 100644 --- a/cosmos/txpool/handler.go +++ b/cosmos/txpool/handler.go @@ -118,6 +118,7 @@ func (h *handler) eventLoop() { // Connect to the subscription. h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) h.running.Store(true) + h.logger.With("module", "txpool-handler").Info("starting txpool handler") // Handle events. var err error diff --git a/cosmos/txpool/mempool.go b/cosmos/txpool/mempool.go index 2a723f80d..8405f9470 100644 --- a/cosmos/txpool/mempool.go +++ b/cosmos/txpool/mempool.go @@ -29,6 +29,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/mempool" + "github.com/ethereum/go-ethereum/core/txpool/legacypool" "github.com/ethereum/go-ethereum/event" "pkg.berachain.dev/polaris/cosmos/x/evm/types" @@ -68,18 +69,20 @@ func NewMempool(txpool GethTxPool) *Mempool { } } -// StartSerializationHandler implements the Startable interface. -func (m *Mempool) StartSerializationHandler( +// StartBroadcasterHandler implements the Startable interface. +func (m *Mempool) StartBroadcasterHandler( + logger log.Logger, txBroadcaster TxBroadcaster, txSerializer TxSerializer, ) { - m.handler = newHandler(txBroadcaster, m.txpool, txSerializer, log.NewNopLogger()) + m.handler = newHandler(txBroadcaster, m.txpool, txSerializer, logger) m.handler.Start() // todo: handle closing. } // Insert attempts to insert a Tx into the app-side mempool returning // an error upon failure. -func (m *Mempool) Insert(_ context.Context, sdkTx sdk.Tx) error { +func (m *Mempool) Insert(ctx context.Context, sdkTx sdk.Tx) error { + sCtx := sdk.UnwrapSDKContext(ctx) msgs := sdkTx.GetMsgs() if len(msgs) != 1 { return errors.New("only one message is supported") @@ -88,6 +91,10 @@ func (m *Mempool) Insert(_ context.Context, sdkTx sdk.Tx) error { if wet, ok := utils.GetAs[*types.WrappedEthereumTransaction](msgs[0]); !ok { return errors.New("only WrappedEthereumTransactions are supported") } else if errs := m.txpool.Add([]*coretypes.Transaction{wet.AsTransaction()}, false, false); len(errs) != 0 { + // Handle case where a node broadcasts to itself, we don't want it to fail CheckTx. + if errors.Is(errs[0], legacypool.ErrAlreadyKnown) && sCtx.IsCheckTx() { + return nil + } return errs[0] } diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 185ac2200..2a53c7d4a 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -318,7 +318,7 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon } txSerializer := evmtypes.NewSerializer(apiSvr.ClientCtx.TxConfig) app.mm.SetSerializer(txSerializer) - app.mp.StartSerializationHandler(apiSvr.ClientCtx, txSerializer) + app.mp.StartBroadcasterHandler(app.Logger(), apiSvr.ClientCtx, txSerializer) app.EVMKeeper.SetClientCtx(apiSvr.ClientCtx) } From 8bc764fb92866003d95bd639d8e0726fd4ed9285 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 16:16:41 -0400 Subject: [PATCH 82/94] fix mempool test --- cosmos/txpool/mempool_test.go | 3 +- cosmos/txpool/mocks/context.go | 73 ++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 cosmos/txpool/mocks/context.go diff --git a/cosmos/txpool/mempool_test.go b/cosmos/txpool/mempool_test.go index ac99e3ca1..5bc1357d6 100644 --- a/cosmos/txpool/mempool_test.go +++ b/cosmos/txpool/mempool_test.go @@ -21,7 +21,6 @@ package txpool import ( - "context" "errors" "github.com/stretchr/testify/mock" @@ -43,7 +42,7 @@ var _ = Describe("", func() { txPool *mocks.GethTxPool sdkTx *mocks.SdkTx mempool *Mempool - ctx = context.Background() + ctx = sdk.Context{}.WithIsCheckTx(true) ) BeforeEach(func() { diff --git a/cosmos/txpool/mocks/context.go b/cosmos/txpool/mocks/context.go new file mode 100644 index 000000000..82c3c1a96 --- /dev/null +++ b/cosmos/txpool/mocks/context.go @@ -0,0 +1,73 @@ +// Code generated by mockery v2.34.2. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// Context is an autogenerated mock type for the Context type +type Context struct { + mock.Mock +} + +type Context_Expecter struct { + mock *mock.Mock +} + +func (_m *Context) EXPECT() *Context_Expecter { + return &Context_Expecter{mock: &_m.Mock} +} + +// IsCheckTx provides a mock function with given fields: +func (_m *Context) IsCheckTx() bool { + ret := _m.Called() + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Context_IsCheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsCheckTx' +type Context_IsCheckTx_Call struct { + *mock.Call +} + +// IsCheckTx is a helper method to define mock.On call +func (_e *Context_Expecter) IsCheckTx() *Context_IsCheckTx_Call { + return &Context_IsCheckTx_Call{Call: _e.mock.On("IsCheckTx")} +} + +func (_c *Context_IsCheckTx_Call) Run(run func()) *Context_IsCheckTx_Call { + _c.Call.Run(func(args mock.Arguments) { + run() + }) + return _c +} + +func (_c *Context_IsCheckTx_Call) Return(_a0 bool) *Context_IsCheckTx_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *Context_IsCheckTx_Call) RunAndReturn(run func() bool) *Context_IsCheckTx_Call { + _c.Call.Return(run) + return _c +} + +// NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewContext(t interface { + mock.TestingT + Cleanup(func()) +}) *Context { + mock := &Context{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From df986e213638cfdcded6ef46a04a9d7e1fd06786 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 16:18:10 -0400 Subject: [PATCH 83/94] remove unused mock --- cosmos/txpool/mocks/context.go | 73 ---------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 cosmos/txpool/mocks/context.go diff --git a/cosmos/txpool/mocks/context.go b/cosmos/txpool/mocks/context.go deleted file mode 100644 index 82c3c1a96..000000000 --- a/cosmos/txpool/mocks/context.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by mockery v2.34.2. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// Context is an autogenerated mock type for the Context type -type Context struct { - mock.Mock -} - -type Context_Expecter struct { - mock *mock.Mock -} - -func (_m *Context) EXPECT() *Context_Expecter { - return &Context_Expecter{mock: &_m.Mock} -} - -// IsCheckTx provides a mock function with given fields: -func (_m *Context) IsCheckTx() bool { - ret := _m.Called() - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Context_IsCheckTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsCheckTx' -type Context_IsCheckTx_Call struct { - *mock.Call -} - -// IsCheckTx is a helper method to define mock.On call -func (_e *Context_Expecter) IsCheckTx() *Context_IsCheckTx_Call { - return &Context_IsCheckTx_Call{Call: _e.mock.On("IsCheckTx")} -} - -func (_c *Context_IsCheckTx_Call) Run(run func()) *Context_IsCheckTx_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Context_IsCheckTx_Call) Return(_a0 bool) *Context_IsCheckTx_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Context_IsCheckTx_Call) RunAndReturn(run func() bool) *Context_IsCheckTx_Call { - _c.Call.Return(run) - return _c -} - -// NewContext creates a new instance of Context. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewContext(t interface { - mock.TestingT - Cleanup(func()) -}) *Context { - mock := &Context{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} From 22132f81958d2fa5375c105ab6e925445183cdc0 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 16:41:38 -0400 Subject: [PATCH 84/94] fix merge --- go.work.sum | 1 - 1 file changed, 1 deletion(-) diff --git a/go.work.sum b/go.work.sum index 5514f3f3f..7c8347d24 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,4 +1,3 @@ -<<<<<<< Updated upstream cloud.google.com/go/accessapproval v1.7.1 h1:/5YjNhR6lzCvmJZAnByYkfEgWjfAKwYP6nkuTk6nKFE= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= cloud.google.com/go/accesscontextmanager v1.8.1 h1:WIAt9lW9AXtqw/bnvrEUaE8VG/7bAAeMzRCBGMkc4+w= From 7c6245383e5db126715c2a3572062e5d45429ed5 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Tue, 3 Oct 2023 17:16:33 -0400 Subject: [PATCH 85/94] fix hive --- .../rpc-compat/tests/eth_getBlockByNumber/get-block-n.io | 2 +- .../rpc-compat/tests/eth_getBlockByNumber/get-block-notfound.io | 2 ++ .../rpc-compat/tests/eth_getBlockByNumber/get-genesis.io | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-notfound.io diff --git a/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-n.io b/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-n.io index 34e2b4348..f4bb16a99 100644 --- a/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-n.io +++ b/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-n.io @@ -1,2 +1,2 @@ >> {"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["0x0",true]} -<< {"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0x3b9aca00","difficulty":"0x1","extraData":"0x","gasLimit":"0x4c4b40","gasUsed":"0x0","hash":"0x1fc027d65f820d3eef441ebeec139ebe09e471cf98516dce7b5643ccb27f418c","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x21e","stateRoot":"0x078dc6061b1d8eaa8493384b59c9c65ceb917201221d08b80c4de6770b6ec7e7","timestamp":"0x0","totalDifficulty":"0x1","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[],"withdrawals": null,"withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"}} +<< {"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0x3b9aca00","difficulty":"0x1","extraData":"0x","gasLimit":"0x4c4b40","gasUsed":"0x0","hash":"0x1fc027d65f820d3eef441ebeec139ebe09e471cf98516dce7b5643ccb27f418c","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x21f","stateRoot":"0x078dc6061b1d8eaa8493384b59c9c65ceb917201221d08b80c4de6770b6ec7e7","timestamp":"0x0","totalDifficulty":"0x1","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[],"withdrawals": [],"withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"}} diff --git a/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-notfound.io b/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-notfound.io new file mode 100644 index 000000000..44bfc6b19 --- /dev/null +++ b/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-block-notfound.io @@ -0,0 +1,2 @@ +>> {"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["0x3e8",true]} +<< {"jsonrpc":"2.0","id":1,"result":null} \ No newline at end of file diff --git a/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-genesis.io b/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-genesis.io index 34e2b4348..f4bb16a99 100644 --- a/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-genesis.io +++ b/e2e/hive/simulators/rpc-compat/tests/eth_getBlockByNumber/get-genesis.io @@ -1,2 +1,2 @@ >> {"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["0x0",true]} -<< {"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0x3b9aca00","difficulty":"0x1","extraData":"0x","gasLimit":"0x4c4b40","gasUsed":"0x0","hash":"0x1fc027d65f820d3eef441ebeec139ebe09e471cf98516dce7b5643ccb27f418c","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x21e","stateRoot":"0x078dc6061b1d8eaa8493384b59c9c65ceb917201221d08b80c4de6770b6ec7e7","timestamp":"0x0","totalDifficulty":"0x1","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[],"withdrawals": null,"withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"}} +<< {"jsonrpc":"2.0","id":1,"result":{"baseFeePerGas":"0x3b9aca00","difficulty":"0x1","extraData":"0x","gasLimit":"0x4c4b40","gasUsed":"0x0","hash":"0x1fc027d65f820d3eef441ebeec139ebe09e471cf98516dce7b5643ccb27f418c","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x0","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x21f","stateRoot":"0x078dc6061b1d8eaa8493384b59c9c65ceb917201221d08b80c4de6770b6ec7e7","timestamp":"0x0","totalDifficulty":"0x1","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[],"withdrawals": [],"withdrawalsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"}} From cdb66fe55c9d423cbc23380c2a7840fbbac4fe2f Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 4 Oct 2023 13:31:39 -0400 Subject: [PATCH 86/94] deadcode --- cosmos/abci/prepare/prepare.go | 134 --------------------------------- cosmos/x/evm/keeper/keeper.go | 1 + 2 files changed, 1 insertion(+), 134 deletions(-) delete mode 100644 cosmos/abci/prepare/prepare.go diff --git a/cosmos/abci/prepare/prepare.go b/cosmos/abci/prepare/prepare.go deleted file mode 100644 index d35704af9..000000000 --- a/cosmos/abci/prepare/prepare.go +++ /dev/null @@ -1,134 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 prepare - -import ( - abci "github.com/cometbft/cometbft/abci/types" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/miner" - - "pkg.berachain.dev/polaris/eth/polar" -) - -type ( - // ProposalTxVerifier defines the interface that is implemented by BaseApp, - // that any custom ABCI PrepareProposal and ProcessProposal handler can use - // to verify a transaction. - TxVerifier interface { - PrepareProposalVerifyTx(tx sdk.Tx) ([]byte, error) - ProcessProposalVerifyTx(txBz []byte) (sdk.Tx, error) - } -) - -// TxSerializer provides an interface to Serialize Geth Transactions to Bytes (via sdk.Tx). -type TxSerializer interface { - SerializeToSdkTx(signedTx *types.Transaction) (sdk.Tx, error) -} - -// Handler provides the PrepareProposal function to allow a cosmos app to utilize the -// geth txpool. -type Handler struct { - polaris *polar.Polaris - txVerifier TxVerifier - serializer TxSerializer -} - -// NewHandler returns a new Handler. -func NewHandler(polaris *polar.Polaris, txVerifier TxVerifier) *Handler { - return &Handler{ - polaris: polaris, - txVerifier: txVerifier, - } -} - -// Init initializes the handler. -func (h *Handler) Init(serializer TxSerializer) { - h.serializer = serializer -} - -// PrepareProposal implements baseapp.PrepareProposalHandler. -func (h *Handler) PrepareProposal( - ctx sdk.Context, req *abci.RequestPrepareProposal, -) (*abci.ResponsePrepareProposal, error) { - var maxBlockGas int64 - if b := ctx.ConsensusParams().Block; b != nil { - maxBlockGas = b.MaxGas - } - - var ( - selectedTxs [][]byte - totalTxBytes int64 - totalTxGas uint64 - ) - txs := h.txPoolTransactions() - - for lazyTx := txs.Peek(); lazyTx != nil; lazyTx = txs.Peek() { - tx := lazyTx.Resolve() - sdkTx, err := h.serializer.SerializeToSdkTx(tx) - if err != nil { - ctx.Logger().Error("Failed sdk.Tx Serialization", tx.Hash(), err) - continue - } - - var bz []byte - bz, _ = h.txVerifier.PrepareProposalVerifyTx(sdkTx) - txGasLimit := tx.Gas() - txSize := int64(len(bz)) - - // only add the transaction to the proposal if we have enough capacity - if (txSize + totalTxBytes) < req.MaxTxBytes { - // If there is a max block gas limit, add the tx only if the limit has - // not been met. - if maxBlockGas > 0 { - if (txGasLimit + totalTxGas) <= uint64(maxBlockGas) { - totalTxGas += txGasLimit - totalTxBytes += txSize - selectedTxs = append(selectedTxs, bz) - } - } else { - totalTxBytes += txSize - selectedTxs = append(selectedTxs, bz) - } - } - - // Check if we've reached capacity. If so, we cannot select any more - // transactions. - if totalTxBytes >= req.MaxTxBytes || - (maxBlockGas > 0 && (totalTxGas >= uint64(maxBlockGas))) { - break - } - - // Shift the transaction off the queue. - txs.Shift() - } - - return &abci.ResponsePrepareProposal{Txs: selectedTxs}, nil -} - -// txPoolTransactions returns a sorted list of transactions from the txpool. -func (h *Handler) txPoolTransactions() *miner.TransactionsByPriceAndNonce { - return miner.NewTransactionsByPriceAndNonce(types.LatestSigner( - h.polaris.Host().GetConfigurationPlugin().ChainConfig(), - ), h.polaris.TxPool().Pending(false), h.polaris.Miner().NextBaseFee()) -} diff --git a/cosmos/x/evm/keeper/keeper.go b/cosmos/x/evm/keeper/keeper.go index 2a07f018c..67640e22b 100644 --- a/cosmos/x/evm/keeper/keeper.go +++ b/cosmos/x/evm/keeper/keeper.go @@ -26,6 +26,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/node" "pkg.berachain.dev/polaris/cosmos/config" From a96cc8b2fe44c8e181bd19a971232dc9a359e633 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Wed, 4 Oct 2023 15:49:48 -0400 Subject: [PATCH 87/94] l o l --- cosmos/cosmos.go | 21 ----------- cosmos/miner/miner.go | 2 +- cosmos/txpool/handler.go | 1 - cosmos/txpool/mocks/startable.go | 64 -------------------------------- e2e/testapp/app.go | 3 +- 5 files changed, 3 insertions(+), 88 deletions(-) delete mode 100644 cosmos/cosmos.go delete mode 100644 cosmos/txpool/mocks/startable.go diff --git a/cosmos/cosmos.go b/cosmos/cosmos.go deleted file mode 100644 index ac123cf2e..000000000 --- a/cosmos/cosmos.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 cosmos diff --git a/cosmos/miner/miner.go b/cosmos/miner/miner.go index 8d7274800..bb75c42c2 100644 --- a/cosmos/miner/miner.go +++ b/cosmos/miner/miner.go @@ -52,7 +52,7 @@ func New(gm *miner.Miner) *Miner { } } -// SetSerializer sets the transaction serializer. +// Init sets the transaction serializer. func (m *Miner) Init(serializer evmtypes.TxSerializer) { m.serializer = serializer } diff --git a/cosmos/txpool/handler.go b/cosmos/txpool/handler.go index 7848a1523..8bc50b673 100644 --- a/cosmos/txpool/handler.go +++ b/cosmos/txpool/handler.go @@ -119,7 +119,6 @@ func (h *handler) eventLoop() { h.txsSub = h.txPool.SubscribeNewTxsEvent(h.txsCh) h.logger.With("module", "txpool-handler").Info("starting txpool handler") h.running.Store(true) - h.logger.With("module", "txpool-handler").Info("starting txpool handler") // Handle events. var err error diff --git a/cosmos/txpool/mocks/startable.go b/cosmos/txpool/mocks/startable.go deleted file mode 100644 index fa4749c47..000000000 --- a/cosmos/txpool/mocks/startable.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by mockery v2.34.2. DO NOT EDIT. - -package mocks - -import mock "github.com/stretchr/testify/mock" - -// Startable is an autogenerated mock type for the Startable type -type Startable struct { - mock.Mock -} - -type Startable_Expecter struct { - mock *mock.Mock -} - -func (_m *Startable) EXPECT() *Startable_Expecter { - return &Startable_Expecter{mock: &_m.Mock} -} - -// Start provides a mock function with given fields: -func (_m *Startable) Start() { - _m.Called() -} - -// Startable_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start' -type Startable_Start_Call struct { - *mock.Call -} - -// Start is a helper method to define mock.On call -func (_e *Startable_Expecter) Start() *Startable_Start_Call { - return &Startable_Start_Call{Call: _e.mock.On("Start")} -} - -func (_c *Startable_Start_Call) Run(run func()) *Startable_Start_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Startable_Start_Call) Return() *Startable_Start_Call { - _c.Call.Return() - return _c -} - -func (_c *Startable_Start_Call) RunAndReturn(run func()) *Startable_Start_Call { - _c.Call.Return(run) - return _c -} - -// NewStartable creates a new instance of Startable. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewStartable(t interface { - mock.TestingT - Cleanup(func()) -}) *Startable { - mock := &Startable{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 6996927b4..917c22fd0 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -99,6 +99,7 @@ type SimApp struct { // polaris keepers EVMKeeper *evmkeeper.Keeper + // polaris componets mm *miner.Miner mp *txpool.Mempool } @@ -194,7 +195,7 @@ func NewPolarisApp( app.EVMKeeper.SetupPrecompiles() // Setup TxPool Wrapper - txpool.New(app.EVMKeeper.Polaris().TxPool()) + app.mp = txpool.New(app.EVMKeeper.Polaris().TxPool()) app.SetMempool(app.mp) // Setup Miner Wrapper From b4cb889e105eceb37f053bea3a335afb24c8a66e Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 5 Oct 2023 17:30:17 -0400 Subject: [PATCH 88/94] add miner config --- eth/consensus/blank_engine.go | 28 ++++++++++++++-------------- eth/polar/polaris.go | 8 ++++---- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/eth/consensus/blank_engine.go b/eth/consensus/blank_engine.go index be15438e4..b3fd63769 100644 --- a/eth/consensus/blank_engine.go +++ b/eth/consensus/blank_engine.go @@ -32,23 +32,23 @@ import ( "github.com/ethereum/go-ethereum/trie" ) -// MockEngine is a mock implementation of the Engine interface. -type MockEngine struct{} +// DummyEngine is a mock implementation of the Engine interface. +type DummyEngine struct{} // Author is a mock implementation. -func (m *MockEngine) Author(header *types.Header) (common.Address, error) { +func (m *DummyEngine) Author(header *types.Header) (common.Address, error) { return common.Address{}, nil } // VerifyHeader is a mock implementation. -func (m *MockEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { +func (m *DummyEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { // Set the correct difficulty header.Difficulty = new(big.Int).SetUint64(1) return nil } // VerifyHeaders is a mock implementation. -func (m *MockEngine) VerifyHeaders( +func (m *DummyEngine) VerifyHeaders( chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) { for _, h := range headers { if err := m.VerifyHeader(chain, h); err != nil { @@ -59,24 +59,24 @@ func (m *MockEngine) VerifyHeaders( } // VerifyUncles is a mock implementation. -func (m *MockEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error { +func (m *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error { return nil } // Prepare is a mock implementation. -func (m *MockEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error { +func (m *DummyEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error { header.Difficulty = new(big.Int).SetUint64(0) return nil } // Finalize is a mock implementation. -func (m *MockEngine) Finalize(chain consensus.ChainHeaderReader, +func (m *DummyEngine) Finalize(chain consensus.ChainHeaderReader, header *types.Header, state state.StateDBI, txs []*types.Transaction, uncles []*types.Header, withdrawals []*types.Withdrawal) { } // FinalizeAndAssemble is a mock implementation. -func (m *MockEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, +func (m *DummyEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *types.Header, state state.StateDBI, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt, withdrawals []*types.Withdrawal) (*types.Block, error) { @@ -84,7 +84,7 @@ func (m *MockEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, } // Seal is a mock implementation. -func (m *MockEngine) Seal(chain consensus.ChainHeaderReader, +func (m *DummyEngine) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error { sealedBlock := block // .seal() results <- sealedBlock @@ -92,22 +92,22 @@ func (m *MockEngine) Seal(chain consensus.ChainHeaderReader, } // SealHash is a mock implementation. -func (m *MockEngine) SealHash(header *types.Header) common.Hash { +func (m *DummyEngine) SealHash(header *types.Header) common.Hash { return header.Hash() } // CalcDifficulty is a mock implementation. -func (m *MockEngine) CalcDifficulty(chain consensus.ChainHeaderReader, +func (m *DummyEngine) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int { return big.NewInt(0) } // APIs is a mock implementation. -func (m *MockEngine) APIs(chain consensus.ChainHeaderReader) []rpc.API { +func (m *DummyEngine) APIs(chain consensus.ChainHeaderReader) []rpc.API { return nil } // Close is a mock implementation. -func (m *MockEngine) Close() error { +func (m *DummyEngine) Close() error { return nil } diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 411d9a4e1..d22f5d401 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -113,7 +113,7 @@ func NewWithNetworkingStack( stack: stack, host: host, engine: host.GetEnginePlugin(), - beacon: &consensus.MockEngine{}, + beacon: &consensus.DummyEngine{}, } // When creating a Polaris EVM, we allow the implementing chain // to specify their own log handler. If logHandler is nil then we @@ -150,11 +150,11 @@ func (pl *Polaris) Init() error { return err } - mux := new(event.TypeMux) //nolint:staticcheck // todo fix. + mux := new(event.TypeMux) //nolint:staticcheck // TODO: miner config to app.toml - cfg := &miner.DefaultConfig - pl.miner = miner.New(pl, cfg, + pl.miner = miner.New(pl, &pl.cfg.Miner, pl.host.GetConfigurationPlugin().ChainConfig(), mux, pl.beacon, pl.IsLocalBlock) + // extra data must be nil until 1 block 1 transaction. // eth.miner.SetExtra(makeExtraData(config.Miner.ExtraData)) // Build and set the RPC Backend and other services. From cc4a6440b323a2ddb54ce87470adda1e5f96fd73 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 5 Oct 2023 17:34:07 -0400 Subject: [PATCH 89/94] lint --- eth/polar/polaris.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index d22f5d401..8fcb0a2c7 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -150,7 +150,7 @@ func (pl *Polaris) Init() error { return err } - mux := new(event.TypeMux) //nolint:staticcheck + mux := new(event.TypeMux) //nolint:staticcheck // deprecated but still in geth. // TODO: miner config to app.toml pl.miner = miner.New(pl, &pl.cfg.Miner, pl.host.GetConfigurationPlugin().ChainConfig(), mux, pl.beacon, pl.IsLocalBlock) From 2964ec1e84a30dcbd5e8e684899252f9ba650ff7 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 5 Oct 2023 17:35:22 -0400 Subject: [PATCH 90/94] feat(statedb): Move precompile setup around (#1187) --- cosmos/go.mod | 3 +- cosmos/go.sum | 4 +- cosmos/x/evm/keeper/host.go | 4 +- cosmos/x/evm/plugins/precompile/plugin.go | 64 ++-- .../x/evm/plugins/precompile/plugin_test.go | 2 +- cosmos/x/evm/plugins/state/plugin.go | 16 +- e2e/localnet/go.mod | 3 - e2e/localnet/go.sum | 4 +- e2e/precompile/go.mod | 8 +- e2e/precompile/go.sum | 4 +- e2e/testapp/go.mod | 3 +- e2e/testapp/go.sum | 2 +- eth/core/chain.go | 2 +- eth/core/chain_writer.go | 4 +- eth/core/imported.go | 3 +- eth/core/mock/precompile_plugin.go | 4 - eth/core/mock/precompile_plugin.mock.go | 80 ++--- eth/core/precompile/default_plugin.go | 36 +- eth/core/precompile/default_plugin_test.go | 57 ---- eth/core/precompile/interfaces.go | 4 - eth/core/processor.go | 70 +--- eth/core/processor_test.go | 66 ++-- eth/core/state/imported.go | 4 +- eth/core/state/mocks/precompile_plugin.go | 314 +++++++++++++++++- eth/core/state/statedb.go | 53 +-- eth/core/state/statedb_test.go | 9 +- eth/core/vm/imported.go | 13 +- eth/core/vm/mock/statedb.mock.go | 37 +++ eth/go.mod | 2 +- eth/go.sum | 4 +- eth/miner/miner.go | 16 +- eth/polar/backend.go | 4 +- go.work.sum | 239 ------------- 33 files changed, 535 insertions(+), 603 deletions(-) delete mode 100644 eth/core/precompile/default_plugin_test.go diff --git a/cosmos/go.mod b/cosmos/go.mod index ffa05d613..b733b27bd 100644 --- a/cosmos/go.mod +++ b/cosmos/go.mod @@ -4,7 +4,8 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4 + // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/cosmos/go.sum b/cosmos/go.sum index 7bbf82248..27c4eaf46 100644 --- a/cosmos/go.sum +++ b/cosmos/go.sum @@ -113,8 +113,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= -github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4 h1:t8fKaxVPovG95BUX62QX1DaJld0Uk5Hi9DtDQphIWR0= +github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/cosmos/x/evm/keeper/host.go b/cosmos/x/evm/keeper/host.go index 0a2eff541..f18cb6a13 100644 --- a/cosmos/x/evm/keeper/host.go +++ b/cosmos/x/evm/keeper/host.go @@ -94,7 +94,7 @@ func NewHost( // Setup the state, precompile, historical, and txpool plugins // TODO: re-enable historical plugin using ABCI listener. h.hp = historical.NewPlugin(h.cp, h.bp, nil, h.storeKey) - h.pp = precompile.NewPlugin(nil) + h.pp = precompile.NewPlugin() h.sp = state.NewPlugin(h.ak, h.storeKey, nil) h.bp.SetQueryContextFn(h.qc) h.sp.SetQueryContextFn(h.qc) @@ -106,7 +106,7 @@ func NewHost( func (h *host) SetupPrecompiles() { // Set the query context function for the block and state plugins pcs := h.pcs().GetPrecompiles() - h.pp.SetPrecompiles(pcs) + h.pp.RegisterPrecompiles(pcs) h.sp.SetPrecompileLogFactory(pclog.NewFactory(pcs)) } diff --git a/cosmos/x/evm/plugins/precompile/plugin.go b/cosmos/x/evm/plugins/precompile/plugin.go index e8fbb5261..0545917b0 100644 --- a/cosmos/x/evm/plugins/precompile/plugin.go +++ b/cosmos/x/evm/plugins/precompile/plugin.go @@ -21,6 +21,7 @@ package precompile import ( + "fmt" "math/big" storetypes "cosmossdk.io/store/types" @@ -42,7 +43,7 @@ import ( // Plugin is the interface that must be implemented by the plugin. type Plugin interface { core.PrecompilePlugin - SetPrecompiles([]ethprecompile.Registrable) + RegisterPrecompiles([]ethprecompile.Registrable) } // polarisStateDB is the interface that must be implemented by the state DB. @@ -54,9 +55,7 @@ type polarisStateDB interface { // plugin runs precompile containers in the Cosmos environment with the context gas configs. type plugin struct { - libtypes.Registry[common.Address, vm.PrecompileContainer] - // precompiles is all supported precompile contracts. - precompiles []ethprecompile.Registrable + libtypes.Registry[common.Address, vm.PrecompiledContract] // kvGasConfig is the gas config for the KV store. kvGasConfig storetypes.GasConfig // transientKVGasConfig is the gas config for the transient KV store. @@ -64,10 +63,9 @@ type plugin struct { } // NewPlugin creates and returns a plugin with the default KV store gas configs. -func NewPlugin(precompiles []ethprecompile.Registrable) Plugin { +func NewPlugin() Plugin { return &plugin{ - Registry: registry.NewMap[common.Address, vm.PrecompileContainer](), - precompiles: precompiles, + Registry: registry.NewMap[common.Address, vm.PrecompiledContract](), // NOTE: these are hardcoded as they are also hardcoded in the sdk. // This should be updated if it ever changes. kvGasConfig: storetypes.KVGasConfig(), @@ -75,24 +73,50 @@ func NewPlugin(precompiles []ethprecompile.Registrable) Plugin { } } -func (p *plugin) SetPrecompiles(precompiles []ethprecompile.Registrable) { - p.precompiles = precompiles +func (p *plugin) Get(addr common.Address, _ *params.Rules) (vm.PrecompiledContract, bool) { + // TODO: handle rules + val := p.Registry.Get(addr) + if val == nil { + return nil, false + } + return val, true } -// GetPrecompiles implements core.PrecompilePlugin. -func (p *plugin) GetPrecompiles(_ *params.Rules) []ethprecompile.Registrable { - return p.precompiles +func (p *plugin) RegisterPrecompiles(precompiles []ethprecompile.Registrable) { + for _, pc := range precompiles { + // choose the appropriate precompile factory + var af ethprecompile.AbstractFactory + switch { + case utils.Implements[ethprecompile.StatefulImpl](pc): + af = ethprecompile.NewStatefulFactory() + case utils.Implements[ethprecompile.StatelessImpl](pc): + af = ethprecompile.NewStatelessFactory() + default: + panic( + fmt.Sprintf( + "native precompile %s not properly implemented", pc.RegistryKey().Hex(), + ), + ) + } + // build the precompile container and register with the plugin + container, err := af.Build(pc, p) + if err != nil { + panic(err) + } + + err = p.Register(container) + if err != nil { + panic(err) + } + } } // GetActive implements core.PrecompilePlugin. -func (p *plugin) GetActive(rules *params.Rules) []common.Address { - defaults := ethprecompile.GetDefaultPrecompiles(rules) - active := make([]common.Address, len(p.precompiles)+len(defaults)) - for i, pc := range p.precompiles { - active[i] = pc.RegistryKey() - } - for i, pc := range defaults { - active[i+len(p.precompiles)] = pc.RegistryKey() +func (p *plugin) GetActive(_ params.Rules) []common.Address { + // TODO: enable hardfork activation and de-activation. + active := make([]common.Address, 0) + for k := range p.Registry.Iterate() { + active = append(active, k) } return active } diff --git a/cosmos/x/evm/plugins/precompile/plugin_test.go b/cosmos/x/evm/plugins/precompile/plugin_test.go index cf453e226..aae5fbb5e 100644 --- a/cosmos/x/evm/plugins/precompile/plugin_test.go +++ b/cosmos/x/evm/plugins/precompile/plugin_test.go @@ -54,7 +54,7 @@ var _ = Describe("plugin", func() { ctx = ctx.WithEventManager( events.NewManagerFrom(ctx.EventManager(), mock.NewPrecompileLogFactory()), ) - p = utils.MustGetAs[*plugin](NewPlugin(nil)) + p = utils.MustGetAs[*plugin](NewPlugin()) e = &mockEVM{nil, ctx, &mockSDB{nil, ctx, 0}} }) diff --git a/cosmos/x/evm/plugins/state/plugin.go b/cosmos/x/evm/plugins/state/plugin.go index dbc226d94..b19d616ec 100644 --- a/cosmos/x/evm/plugins/state/plugin.go +++ b/cosmos/x/evm/plugins/state/plugin.go @@ -110,9 +110,9 @@ type plugin struct { // getQueryContext allows for querying state a historical height. getQueryContext func() func(height int64, prove bool) (sdk.Context, error) - // savedErr stores any error that is returned from state modifications on the underlying + // dbErr stores any error that is returned from state modifications on the underlying // keepers. - savedErr error + dbErr error mu sync.Mutex } @@ -180,7 +180,7 @@ func (p *plugin) Reset(ctx context.Context) { _ = p.Controller.Register(cem) // We reset the saved error, so that we can check for errors in the next state transition. - p.savedErr = nil + p.dbErr = nil } // RegistryKey implements `libtypes.Registrable`. @@ -195,7 +195,7 @@ func (p *plugin) GetContext() context.Context { // Error implements `core.StatePlugin`. func (p *plugin) Error() error { - return p.savedErr + return p.dbErr } // =========================================================================== @@ -317,7 +317,7 @@ func (p *plugin) SetNonce(addr common.Address, nonce uint64) { } if err := acc.SetSequence(nonce); err != nil { - p.savedErr = err + p.dbErr = err } p.ak.SetAccount(p.ctx, acc) @@ -378,7 +378,7 @@ func (p *plugin) IterateCode(fn func(addr common.Address, value common.Hash) boo ) defer func() { if err := it.Close(); err != nil { - p.savedErr = err + p.dbErr = err } }() @@ -445,7 +445,7 @@ func (p *plugin) IterateState(cb func(addr common.Address, key, value common.Has ) defer func() { if err := it.Close(); err != nil { - p.savedErr = err + p.dbErr = err } }() @@ -506,7 +506,7 @@ func (p *plugin) IterateBalances(fn func(common.Address, *big.Int) bool) { ) defer func() { if err := it.Close(); err != nil { - p.savedErr = err + p.dbErr = err } }() diff --git a/e2e/localnet/go.mod b/e2e/localnet/go.mod index d86ef9ee3..2608c527e 100644 --- a/e2e/localnet/go.mod +++ b/e2e/localnet/go.mod @@ -2,9 +2,6 @@ module pkg.berachain.dev/polaris/e2e/localnet go 1.21 -// We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 - require ( github.com/docker/docker v24.0.5+incompatible github.com/ethereum/go-ethereum v1.13.1 diff --git a/e2e/localnet/go.sum b/e2e/localnet/go.sum index c73c80bac..232654947 100644 --- a/e2e/localnet/go.sum +++ b/e2e/localnet/go.sum @@ -107,8 +107,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= -github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -279,6 +277,8 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.13.1 h1:UF2FaUKPIy5jeZk3X06ait3y2Q4wI+vJ1l7+UARp+60= +github.com/ethereum/go-ethereum v1.13.1/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= diff --git a/e2e/precompile/go.mod b/e2e/precompile/go.mod index 743d1a17e..0ef9ce6df 100644 --- a/e2e/precompile/go.mod +++ b/e2e/precompile/go.mod @@ -2,12 +2,8 @@ module pkg.berachain.dev/polaris/e2e/precompile go 1.21 -replace ( - // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 - // Required at the moment until a bug in the comsos-sdk is fixed. - github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 -) +// Required at the moment until a bug in the comsos-sdk is fixed. +replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 require ( github.com/cosmos/cosmos-sdk v0.50.0-rc.1 diff --git a/e2e/precompile/go.sum b/e2e/precompile/go.sum index 18af3cfe0..9c7aa381a 100644 --- a/e2e/precompile/go.sum +++ b/e2e/precompile/go.sum @@ -107,8 +107,6 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= -github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= @@ -279,6 +277,8 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.13.1 h1:UF2FaUKPIy5jeZk3X06ait3y2Q4wI+vJ1l7+UARp+60= +github.com/ethereum/go-ethereum v1.13.1/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index cf11335b5..d1610326e 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -4,7 +4,8 @@ go 1.21 replace ( // We replace `go-ethereum` with `polaris-geth` in order include our required changes. - github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 + github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4 + // Required at the moment until a bug in the comsos-sdk is fixed. github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/e2e/testapp/go.sum b/e2e/testapp/go.sum index 941bb3507..8e73c436d 100644 --- a/e2e/testapp/go.sum +++ b/e2e/testapp/go.sum @@ -276,7 +276,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 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/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= +github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4 h1:t8fKaxVPovG95BUX62QX1DaJld0Uk5Hi9DtDQphIWR0= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= diff --git a/eth/core/chain.go b/eth/core/chain.go index 5a254332d..e5e8d78fc 100644 --- a/eth/core/chain.go +++ b/eth/core/chain.go @@ -61,7 +61,7 @@ type blockchain struct { sp StatePlugin // statedb is the state database that is used to mange state during transactions. - statedb vm.PolarisStateDB + statedb state.StateDBI // vmConfig is the configuration used to create the EVM. vmConfig *vm.Config diff --git a/eth/core/chain_writer.go b/eth/core/chain_writer.go index 2d9b4a0f6..08096a693 100644 --- a/eth/core/chain_writer.go +++ b/eth/core/chain_writer.go @@ -48,7 +48,9 @@ func (bc *blockchain) InsertBlock( logs []*types.Log, ) error { var err error - + if err = bc.statedb.Error(); err != nil { + return err + } // TODO: prepare historical plugin here? // TBH still think we should deprecate it and run in another routine as indexer. diff --git a/eth/core/imported.go b/eth/core/imported.go index 194a7649f..260c46504 100644 --- a/eth/core/imported.go +++ b/eth/core/imported.go @@ -46,8 +46,7 @@ type ( ) var ( - // ApplyTransactionWithEVM applies a transaction to the current state of the blockchain. - ApplyTransactionWithEVM = core.ApplyTransactionWithEVM + ApplyTransaction = core.ApplyTransaction // NewEVMTxContext creates a new context for use in the EVM. NewEVMTxContext = core.NewEVMTxContext // NewEVMBlockContext creates a new block context for a given header. diff --git a/eth/core/mock/precompile_plugin.go b/eth/core/mock/precompile_plugin.go index 7c417e688..bdbe97371 100644 --- a/eth/core/mock/precompile_plugin.go +++ b/eth/core/mock/precompile_plugin.go @@ -23,7 +23,6 @@ package mock import ( "github.com/ethereum/go-ethereum/params" - "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/precompile" "pkg.berachain.dev/polaris/eth/core/vm" ) @@ -35,9 +34,6 @@ func NewPrecompilePluginMock() *PrecompilePluginMock { GetPrecompilesFunc: func(_ *params.Rules) []precompile.Registrable { return nil }, - GetActiveFunc: func(_ *params.Rules) []common.Address { - return nil - }, RegisterFunc: func(pc vm.PrecompileContainer) error { return nil }, diff --git a/eth/core/mock/precompile_plugin.mock.go b/eth/core/mock/precompile_plugin.mock.go index 752573ede..d94d3df2f 100644 --- a/eth/core/mock/precompile_plugin.mock.go +++ b/eth/core/mock/precompile_plugin.mock.go @@ -29,18 +29,15 @@ var _ core.PrecompilePlugin = &PrecompilePluginMock{} // EnableReentrancyFunc: func(precompileEVM vm.PrecompileEVM) { // panic("mock out the EnableReentrancy method") // }, -// GetFunc: func(addr common.Address) vm.PrecompiledContract { +// GetFunc: func(addr common.Address, rules *params.Rules) (vm.PrecompiledContract, bool) { // panic("mock out the Get method") // }, -// GetActiveFunc: func(rules *params.Rules) []common.Address { +// GetActiveFunc: func(rules params.Rules) []common.Address { // panic("mock out the GetActive method") // }, // GetPrecompilesFunc: func(rules *params.Rules) []precompile.Registrable { // panic("mock out the GetPrecompiles method") // }, -// HasFunc: func(addr common.Address) bool { -// panic("mock out the Has method") -// }, // RegisterFunc: func(precompiledContract vm.PrecompiledContract) error { // panic("mock out the Register method") // }, @@ -61,17 +58,14 @@ type PrecompilePluginMock struct { EnableReentrancyFunc func(precompileEVM vm.PrecompileEVM) // GetFunc mocks the Get method. - GetFunc func(addr common.Address) vm.PrecompiledContract + GetFunc func(addr common.Address, rules *params.Rules) (vm.PrecompiledContract, bool) // GetActiveFunc mocks the GetActive method. - GetActiveFunc func(rules *params.Rules) []common.Address + GetActiveFunc func(rules params.Rules) []common.Address // GetPrecompilesFunc mocks the GetPrecompiles method. GetPrecompilesFunc func(rules *params.Rules) []precompile.Registrable - // HasFunc mocks the Has method. - HasFunc func(addr common.Address) bool - // RegisterFunc mocks the Register method. RegisterFunc func(precompiledContract vm.PrecompiledContract) error @@ -94,22 +88,19 @@ type PrecompilePluginMock struct { Get []struct { // Addr is the addr argument value. Addr common.Address + // Rules is the rules argument value. + Rules *params.Rules } // GetActive holds details about calls to the GetActive method. GetActive []struct { // Rules is the rules argument value. - Rules *params.Rules + Rules params.Rules } // GetPrecompiles holds details about calls to the GetPrecompiles method. GetPrecompiles []struct { // Rules is the rules argument value. Rules *params.Rules } - // Has holds details about calls to the Has method. - Has []struct { - // Addr is the addr argument value. - Addr common.Address - } // Register holds details about calls to the Register method. Register []struct { // PrecompiledContract is the precompiledContract argument value. @@ -138,7 +129,6 @@ type PrecompilePluginMock struct { lockGet sync.RWMutex lockGetActive sync.RWMutex lockGetPrecompiles sync.RWMutex - lockHas sync.RWMutex lockRegister sync.RWMutex lockRun sync.RWMutex } @@ -208,19 +198,21 @@ func (mock *PrecompilePluginMock) EnableReentrancyCalls() []struct { } // Get calls GetFunc. -func (mock *PrecompilePluginMock) Get(addr common.Address) vm.PrecompiledContract { +func (mock *PrecompilePluginMock) Get(addr common.Address, rules *params.Rules) (vm.PrecompiledContract, bool) { if mock.GetFunc == nil { panic("PrecompilePluginMock.GetFunc: method is nil but PrecompilePlugin.Get was just called") } callInfo := struct { - Addr common.Address + Addr common.Address + Rules *params.Rules }{ - Addr: addr, + Addr: addr, + Rules: rules, } mock.lockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) mock.lockGet.Unlock() - return mock.GetFunc(addr) + return mock.GetFunc(addr, rules) } // GetCalls gets all the calls that were made to Get. @@ -228,10 +220,12 @@ func (mock *PrecompilePluginMock) Get(addr common.Address) vm.PrecompiledContrac // // len(mockedPrecompilePlugin.GetCalls()) func (mock *PrecompilePluginMock) GetCalls() []struct { - Addr common.Address + Addr common.Address + Rules *params.Rules } { var calls []struct { - Addr common.Address + Addr common.Address + Rules *params.Rules } mock.lockGet.RLock() calls = mock.calls.Get @@ -240,12 +234,12 @@ func (mock *PrecompilePluginMock) GetCalls() []struct { } // GetActive calls GetActiveFunc. -func (mock *PrecompilePluginMock) GetActive(rules *params.Rules) []common.Address { +func (mock *PrecompilePluginMock) GetActive(rules params.Rules) []common.Address { if mock.GetActiveFunc == nil { panic("PrecompilePluginMock.GetActiveFunc: method is nil but PrecompilePlugin.GetActive was just called") } callInfo := struct { - Rules *params.Rules + Rules params.Rules }{ Rules: rules, } @@ -260,10 +254,10 @@ func (mock *PrecompilePluginMock) GetActive(rules *params.Rules) []common.Addres // // len(mockedPrecompilePlugin.GetActiveCalls()) func (mock *PrecompilePluginMock) GetActiveCalls() []struct { - Rules *params.Rules + Rules params.Rules } { var calls []struct { - Rules *params.Rules + Rules params.Rules } mock.lockGetActive.RLock() calls = mock.calls.GetActive @@ -303,38 +297,6 @@ func (mock *PrecompilePluginMock) GetPrecompilesCalls() []struct { return calls } -// Has calls HasFunc. -func (mock *PrecompilePluginMock) Has(addr common.Address) bool { - if mock.HasFunc == nil { - panic("PrecompilePluginMock.HasFunc: method is nil but PrecompilePlugin.Has was just called") - } - callInfo := struct { - Addr common.Address - }{ - Addr: addr, - } - mock.lockHas.Lock() - mock.calls.Has = append(mock.calls.Has, callInfo) - mock.lockHas.Unlock() - return mock.HasFunc(addr) -} - -// HasCalls gets all the calls that were made to Has. -// Check the length with: -// -// len(mockedPrecompilePlugin.HasCalls()) -func (mock *PrecompilePluginMock) HasCalls() []struct { - Addr common.Address -} { - var calls []struct { - Addr common.Address - } - mock.lockHas.RLock() - calls = mock.calls.Has - mock.lockHas.RUnlock() - return calls -} - // Register calls RegisterFunc. func (mock *PrecompilePluginMock) Register(precompiledContract vm.PrecompiledContract) error { if mock.RegisterFunc == nil { diff --git a/eth/core/precompile/default_plugin.go b/eth/core/precompile/default_plugin.go index 23925b7d4..8aae3102f 100644 --- a/eth/core/precompile/default_plugin.go +++ b/eth/core/precompile/default_plugin.go @@ -51,19 +51,13 @@ func (dp *defaultPlugin) Register(vm.PrecompileContainer) error { return nil } -// GetPrecompiles implements core.PrecompilePlugin. -func (dp *defaultPlugin) GetPrecompiles(rules *params.Rules) []Registrable { - return GetDefaultPrecompiles(rules) +func (dp *defaultPlugin) Get(_ common.Address, _ *params.Rules) (vm.PrecompiledContract, bool) { + return nil, false } // GetActive implements core.PrecompilePlugin. -func (dp *defaultPlugin) GetActive(rules *params.Rules) []common.Address { - pc := dp.GetPrecompiles(rules) - active := make([]common.Address, 0, len(pc)) - for i, p := range pc { - active[i] = p.RegistryKey() - } - return active +func (dp *defaultPlugin) GetActive(_ params.Rules) []common.Address { + return nil } // Run supports executing stateless precompiles with the background context. @@ -89,25 +83,3 @@ func (dp *defaultPlugin) EnableReentrancy(vm.PrecompileEVM) {} // DisableReentrancy implements core.PrecompilePlugin. func (dp *defaultPlugin) DisableReentrancy(vm.PrecompileEVM) {} - -// GetDefaultPrecompiles returns the default set of precompiles for the given rules. -func GetDefaultPrecompiles(rules *params.Rules) []Registrable { - // Depending on the hard fork rules, we need to register a different set of precompiles. - var addrToPrecompiles map[common.Address]vm.PrecompileContainer - switch { - case rules.IsIstanbul: - addrToPrecompiles = vm.PrecompiledContractsIstanbul - case rules.IsBerlin: - addrToPrecompiles = vm.PrecompiledContractsBerlin - case rules.IsByzantium: - addrToPrecompiles = vm.PrecompiledContractsByzantium - case rules.IsHomestead: - addrToPrecompiles = vm.PrecompiledContractsHomestead - } - - allPrecompiles := make([]Registrable, 0, len(addrToPrecompiles)) - for _, precompile := range addrToPrecompiles { - allPrecompiles = append(allPrecompiles, precompile) - } - return allPrecompiles -} diff --git a/eth/core/precompile/default_plugin_test.go b/eth/core/precompile/default_plugin_test.go deleted file mode 100644 index 2062771a0..000000000 --- a/eth/core/precompile/default_plugin_test.go +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 precompile - -import ( - "github.com/ethereum/go-ethereum/core/vm" - - "pkg.berachain.dev/polaris/eth/common" - - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" -) - -//nolint:lll // test data. -const precompInput = `a8b53bdf3306a35a7103ab5504a0c9b492295564b6202b1942a84ef300107281000000000000000000000000000000000000000000000000000000000000001b307835653165303366353363653138623737326363623030393366663731663366353366356337356237346463623331613835616138623838393262346538621122334455667788991011121314151617181920212223242526272829303132` - -var _ = Describe("Default Plugin", func() { - var dp Plugin - - BeforeEach(func() { - dp = NewDefaultPlugin() - }) - - When("running a stateless contract", func() { - It("should run out of gas", func() { - ret, remainingGas, err := dp.Run(nil, &mockStateless{}, nil, common.Address{}, nil, 5, false) - Expect(ret).To(BeNil()) - Expect(remainingGas).To(Equal(uint64(0))) - Expect(err.Error()).To(Equal("out of gas")) - }) - - It("should run a geth contract", func() { - pc := vm.PrecompiledContractsHomestead[common.BytesToAddress([]byte{1})] - _, remainingGas, err := dp.Run(nil, pc, []byte(precompInput), common.Address{}, nil, 3000, true) - Expect(remainingGas).To(Equal(uint64(0))) - Expect(err).ToNot(HaveOccurred()) - }) - }) -}) diff --git a/eth/core/precompile/interfaces.go b/eth/core/precompile/interfaces.go index ea7a8e2af..ff379538b 100644 --- a/eth/core/precompile/interfaces.go +++ b/eth/core/precompile/interfaces.go @@ -24,7 +24,6 @@ import ( "pkg.berachain.dev/polaris/eth/accounts/abi" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/vm" - "pkg.berachain.dev/polaris/eth/params" libtypes "pkg.berachain.dev/polaris/lib/types" ) @@ -35,9 +34,6 @@ type ( Plugin interface { // PrecompileManager is the manager for the native precompiles. vm.PrecompileManager - - // GetPrecompiles returns the native precompiles for the chain. - GetPrecompiles(rules *params.Rules) []Registrable // Register registers a new precompiled contract at the given address. Register(vm.PrecompileContainer) error diff --git a/eth/core/processor.go b/eth/core/processor.go index 32e0e8893..2227e0075 100644 --- a/eth/core/processor.go +++ b/eth/core/processor.go @@ -22,17 +22,14 @@ package core import ( "context" - "fmt" "sync" "github.com/ethereum/go-ethereum/trie" "pkg.berachain.dev/polaris/eth/common" - "pkg.berachain.dev/polaris/eth/core/precompile" "pkg.berachain.dev/polaris/eth/core/types" "pkg.berachain.dev/polaris/eth/core/vm" errorslib "pkg.berachain.dev/polaris/lib/errors" - "pkg.berachain.dev/polaris/lib/utils" ) // initialTxsCapacity is the initial capacity of the transactions and receipts slice. @@ -54,9 +51,6 @@ type StateProcessor struct { // extract the underlying message from a transaction object in `ProcessTransaction`. signer types.Signer - // evm is the EVM that is used to process transactions. We re-use a single EVM for processing - // the entire block. This is done in order to reduce memory allocs. - evm *vm.GethEVM // statedb is the state database that is used to mange state during transactions. statedb vm.PolarisStateDB // vmConfig is the configuration for the EVM. @@ -95,7 +89,7 @@ func NewStateProcessor( // ============================================================================== // Prepare prepares the state processor for processing a block. -func (sp *StateProcessor) Prepare(evm *vm.GethEVM, header *types.Header) { +func (sp *StateProcessor) Prepare(header *types.Header) { // We lock the state processor as a safety measure to ensure that Prepare is not called again // before finalize. sp.mtx.Lock() @@ -110,32 +104,20 @@ func (sp *StateProcessor) Prepare(evm *vm.GethEVM, header *types.Header) { // increased. chainConfig := sp.cp.ChainConfig() sp.signer = types.MakeSigner(chainConfig, sp.header.Number, sp.header.Time) - - // Setup the EVM for this block. - rules := chainConfig.Rules(sp.header.Number, true, sp.header.Time) - - // We re-register the default geth precompiles every block, this isn't optimal, but since - // *technically* the precompiles change based on the chain config rules, to be fully correct, - // we should check every block. - sp.BuildAndRegisterPrecompiles(precompile.GetDefaultPrecompiles(&rules)) - sp.BuildAndRegisterPrecompiles(sp.pp.GetPrecompiles(&rules)) - sp.evm = evm } // ProcessTransaction applies a transaction to the current state of the blockchain. func (sp *StateProcessor) ProcessTransaction( - _ context.Context, gasPool *GasPool, tx *types.Transaction, + _ context.Context, chainContext ChainContext, gasPool *GasPool, tx *types.Transaction, ) (*types.Receipt, error) { // Set the transaction context in the state database. // This clears the logs and sets the transaction info. sp.statedb.SetTxContext(tx.Hash(), len(sp.txs)) // Inshallah we will be able to apply the transaction. - receipt, err := ApplyTransactionWithEVM( - sp.evm, sp.cp.ChainConfig(), gasPool, sp.statedb, - sp.header, tx, &sp.header.GasUsed, - ) - + receipt, err := ApplyTransaction( + sp.cp.ChainConfig(), chainContext, &sp.header.Coinbase, gasPool, sp.statedb, + sp.header, tx, &sp.header.GasUsed, *sp.vmConfig) if err != nil { return nil, errorslib.Wrapf(err, "could not apply transaction [%s]", tx.Hash().Hex()) } @@ -180,45 +162,3 @@ func (sp *StateProcessor) Finalize( // We return a new block with the updated header and the receipts to the `blockchain`. return block, sp.receipts, logs, nil } - -// =========================================================================== -// Utilities -// =========================================================================== - -// BuildAndRegisterPrecompiles builds the given precompiles and registers them with the precompile -// plugin. -// TODO: move precompile registration out of the state processor? -func (sp *StateProcessor) BuildAndRegisterPrecompiles(precompiles []precompile.Registrable) { - for _, pc := range precompiles { - // skip registering precompiles that are already registered. - if sp.pp.Has(pc.RegistryKey()) { - continue - } - - // choose the appropriate precompile factory - var af precompile.AbstractFactory - switch { - case utils.Implements[precompile.StatefulImpl](pc): - af = precompile.NewStatefulFactory() - case utils.Implements[precompile.StatelessImpl](pc): - af = precompile.NewStatelessFactory() - default: - panic( - fmt.Sprintf( - "native precompile %s not properly implemented", pc.RegistryKey().Hex(), - ), - ) - } - - // build the precompile container and register with the plugin - container, err := af.Build(pc, sp.pp) - if err != nil { - panic(err) - } - // TODO: set code on the statedb for every precompiled contract. - err = sp.pp.Register(container) - if err != nil { - panic(err) - } - } -} diff --git a/eth/core/processor_test.go b/eth/core/processor_test.go index 6c435ff60..936caf187 100644 --- a/eth/core/processor_test.go +++ b/eth/core/processor_test.go @@ -24,6 +24,8 @@ import ( "context" "math/big" + "github.com/ethereum/go-ethereum/consensus" + bindings "pkg.berachain.dev/polaris/contracts/bindings/testing" "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core" @@ -46,9 +48,10 @@ var ( _ = signer blockGasLimit = 10000000 dummyHeader = &types.Header{ - Number: big.NewInt(1), - BaseFee: big.NewInt(1), - GasLimit: uint64(blockGasLimit), + Number: big.NewInt(1), + BaseFee: big.NewInt(1), + GasLimit: uint64(blockGasLimit), + Difficulty: big.NewInt(0), } legacyTxData = &types.LegacyTx{ Nonce: 0, @@ -66,7 +69,6 @@ var _ = Describe("StateProcessor", func() { cp *mock.ConfigurationPluginMock pp *mock.PrecompilePluginMock sp *core.StateProcessor - evm *vm.GethEVM ) BeforeEach(func() { @@ -75,20 +77,21 @@ var _ = Describe("StateProcessor", func() { bp.GetNewBlockMetadataFunc = func(n uint64) (common.Address, uint64) { return common.BytesToAddress([]byte{2}), uint64(3) } - pp.HasFunc = func(addr common.Address) bool { - return false + sdb.GetPrecompileManagerFunc = func() any { + return pp + } + sdb.TxIndexFunc = func() int { + return 0 + } + pp.GetActiveFunc = func(params.Rules) []common.Address { + return []common.Address{} + } + pp.GetFunc = func(common.Address, *params.Rules) (vm.PrecompiledContract, bool) { + return nil, false } - sdb.SetTxContextFunc = func(thash common.Hash, ti int) {} - sdb.TxIndexFunc = func() int { return 0 } sp = core.NewStateProcessor(cp, pp, sdb, &vm.Config{}) Expect(sp).ToNot(BeNil()) - evm = vm.NewGethEVMWithPrecompiles( - vm.BlockContext{ - Transfer: core.Transfer, - CanTransfer: core.CanTransfer, - }, vm.TxContext{}, sdb, cp.ChainConfig(), vm.Config{}, pp, - ) - sp.Prepare(evm, dummyHeader) + sp.Prepare(dummyHeader) }) Context("Empty block", func() { @@ -105,12 +108,13 @@ var _ = Describe("StateProcessor", func() { BeforeEach(func() { _, _, _, err := sp.Finalize(context.Background()) Expect(err).ToNot(HaveOccurred()) - sp.Prepare(evm, dummyHeader) + sp.Prepare(dummyHeader) }) It("should error on an unsigned transaction", func() { gasPool := new(core.GasPool).AddGas(1000002) - receipt, err := sp.ProcessTransaction(context.Background(), gasPool, types.NewTx(legacyTxData)) + receipt, err := sp.ProcessTransaction( + context.Background(), &mockChainContext{}, gasPool, types.NewTx(legacyTxData)) Expect(err).To(HaveOccurred()) Expect(receipt).To(BeNil()) block, receipts, logs, err := sp.Finalize(context.Background()) @@ -125,9 +129,9 @@ var _ = Describe("StateProcessor", func() { sdb.GetBalanceFunc = func(addr common.Address) *big.Int { return big.NewInt(1000001) } - sdb.FinaliseFunc = func(bool) {} gasPool := new(core.GasPool).AddGas(1000002) - result, err := sp.ProcessTransaction(context.Background(), gasPool, signedTx) + result, err := sp.ProcessTransaction( + context.Background(), &mockChainContext{}, gasPool, signedTx) Expect(err).ToNot(HaveOccurred()) Expect(result).ToNot(BeNil()) Expect(result.Status).To(Equal(uint64(1))) @@ -153,17 +157,18 @@ var _ = Describe("StateProcessor", func() { if addr != dummyContract { return common.Hash{} } - return crypto.Keccak256Hash(common.Hex2Bytes(bindings.PrecompileConstructorMetaData.Bin)) + return crypto.Keccak256Hash( + common.Hex2Bytes(bindings.PrecompileConstructorMetaData.Bin)) } sdb.ExistFunc = func(addr common.Address) bool { return addr == dummyContract } - sdb.FinaliseFunc = func(bool) {} legacyTxData.To = nil legacyTxData.Value = new(big.Int) signedTx := types.MustSignNewTx(key, signer, legacyTxData) gasPool := new(core.GasPool).AddGas(1000002) - result, err := sp.ProcessTransaction(context.Background(), gasPool, signedTx) + result, err := sp.ProcessTransaction( + context.Background(), &mockChainContext{}, gasPool, signedTx) Expect(err).ToNot(HaveOccurred()) Expect(result).ToNot(BeNil()) Expect(result.Status).To(Equal(uint64(1))) @@ -172,7 +177,8 @@ var _ = Describe("StateProcessor", func() { legacyTxData.To = &dummyContract signedTx = types.MustSignNewTx(key, signer, legacyTxData) gasPool = new(core.GasPool).AddGas(1000002) - result, err = sp.ProcessTransaction(context.Background(), gasPool, signedTx) + result, err = sp.ProcessTransaction( + context.Background(), &mockChainContext{}, gasPool, signedTx) Expect(err).ToNot(HaveOccurred()) Expect(result).ToNot(BeNil()) Expect(result.Status).To(Equal(uint64(1))) @@ -194,9 +200,21 @@ var _ = Describe("No precompile plugin provided", func() { } sp := core.NewStateProcessor(cp, pp, vmmock.NewEmptyStateDB(), &vm.Config{}) Expect(func() { - sp.Prepare(nil, &types.Header{ + sp.Prepare(&types.Header{ GasLimit: uint64(blockGasLimit), }) }).ToNot(Panic()) }) }) + +type mockChainContext struct{} + +// Engine retrieves the chain's consensus engine. +func (mockChainContext) Engine() consensus.Engine { + return nil +} + +// GetHeader returns the header corresponding to the hash/number argument pair. +func (mockChainContext) GetHeader(common.Hash, uint64) *types.Header { + return nil +} diff --git a/eth/core/state/imported.go b/eth/core/state/imported.go index f5ecbf848..fd61507e6 100644 --- a/eth/core/state/imported.go +++ b/eth/core/state/imported.go @@ -20,7 +20,9 @@ package state -import "github.com/ethereum/go-ethereum/core/state" +import ( + "github.com/ethereum/go-ethereum/core/state" +) type ( Dump = state.Dump diff --git a/eth/core/state/mocks/precompile_plugin.go b/eth/core/state/mocks/precompile_plugin.go index 5d98088b4..23dfb4a95 100644 --- a/eth/core/state/mocks/precompile_plugin.go +++ b/eth/core/state/mocks/precompile_plugin.go @@ -3,8 +3,16 @@ package mocks import ( + big "math/big" + common "github.com/ethereum/go-ethereum/common" mock "github.com/stretchr/testify/mock" + + params "github.com/ethereum/go-ethereum/params" + + precompile "pkg.berachain.dev/polaris/eth/core/precompile" + + vm "github.com/ethereum/go-ethereum/core/vm" ) // PrecompilePlugin is an autogenerated mock type for the PrecompilePlugin type @@ -20,44 +28,320 @@ func (_m *PrecompilePlugin) EXPECT() *PrecompilePlugin_Expecter { return &PrecompilePlugin_Expecter{mock: &_m.Mock} } -// Has provides a mock function with given fields: _a0 -func (_m *PrecompilePlugin) Has(_a0 common.Address) bool { +// DisableReentrancy provides a mock function with given fields: _a0 +func (_m *PrecompilePlugin) DisableReentrancy(_a0 vm.PrecompileEVM) { + _m.Called(_a0) +} + +// PrecompilePlugin_DisableReentrancy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DisableReentrancy' +type PrecompilePlugin_DisableReentrancy_Call struct { + *mock.Call +} + +// DisableReentrancy is a helper method to define mock.On call +// - _a0 vm.PrecompileEVM +func (_e *PrecompilePlugin_Expecter) DisableReentrancy(_a0 interface{}) *PrecompilePlugin_DisableReentrancy_Call { + return &PrecompilePlugin_DisableReentrancy_Call{Call: _e.mock.On("DisableReentrancy", _a0)} +} + +func (_c *PrecompilePlugin_DisableReentrancy_Call) Run(run func(_a0 vm.PrecompileEVM)) *PrecompilePlugin_DisableReentrancy_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(vm.PrecompileEVM)) + }) + return _c +} + +func (_c *PrecompilePlugin_DisableReentrancy_Call) Return() *PrecompilePlugin_DisableReentrancy_Call { + _c.Call.Return() + return _c +} + +func (_c *PrecompilePlugin_DisableReentrancy_Call) RunAndReturn(run func(vm.PrecompileEVM)) *PrecompilePlugin_DisableReentrancy_Call { + _c.Call.Return(run) + return _c +} + +// EnableReentrancy provides a mock function with given fields: _a0 +func (_m *PrecompilePlugin) EnableReentrancy(_a0 vm.PrecompileEVM) { + _m.Called(_a0) +} + +// PrecompilePlugin_EnableReentrancy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnableReentrancy' +type PrecompilePlugin_EnableReentrancy_Call struct { + *mock.Call +} + +// EnableReentrancy is a helper method to define mock.On call +// - _a0 vm.PrecompileEVM +func (_e *PrecompilePlugin_Expecter) EnableReentrancy(_a0 interface{}) *PrecompilePlugin_EnableReentrancy_Call { + return &PrecompilePlugin_EnableReentrancy_Call{Call: _e.mock.On("EnableReentrancy", _a0)} +} + +func (_c *PrecompilePlugin_EnableReentrancy_Call) Run(run func(_a0 vm.PrecompileEVM)) *PrecompilePlugin_EnableReentrancy_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(vm.PrecompileEVM)) + }) + return _c +} + +func (_c *PrecompilePlugin_EnableReentrancy_Call) Return() *PrecompilePlugin_EnableReentrancy_Call { + _c.Call.Return() + return _c +} + +func (_c *PrecompilePlugin_EnableReentrancy_Call) RunAndReturn(run func(vm.PrecompileEVM)) *PrecompilePlugin_EnableReentrancy_Call { + _c.Call.Return(run) + return _c +} + +// Get provides a mock function with given fields: addr, rules +func (_m *PrecompilePlugin) Get(addr common.Address, rules *params.Rules) (vm.PrecompiledContract, bool) { + ret := _m.Called(addr, rules) + + var r0 vm.PrecompiledContract + var r1 bool + if rf, ok := ret.Get(0).(func(common.Address, *params.Rules) (vm.PrecompiledContract, bool)); ok { + return rf(addr, rules) + } + if rf, ok := ret.Get(0).(func(common.Address, *params.Rules) vm.PrecompiledContract); ok { + r0 = rf(addr, rules) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(vm.PrecompiledContract) + } + } + + if rf, ok := ret.Get(1).(func(common.Address, *params.Rules) bool); ok { + r1 = rf(addr, rules) + } else { + r1 = ret.Get(1).(bool) + } + + return r0, r1 +} + +// PrecompilePlugin_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' +type PrecompilePlugin_Get_Call struct { + *mock.Call +} + +// Get is a helper method to define mock.On call +// - addr common.Address +// - rules *params.Rules +func (_e *PrecompilePlugin_Expecter) Get(addr interface{}, rules interface{}) *PrecompilePlugin_Get_Call { + return &PrecompilePlugin_Get_Call{Call: _e.mock.On("Get", addr, rules)} +} + +func (_c *PrecompilePlugin_Get_Call) Run(run func(addr common.Address, rules *params.Rules)) *PrecompilePlugin_Get_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(common.Address), args[1].(*params.Rules)) + }) + return _c +} + +func (_c *PrecompilePlugin_Get_Call) Return(_a0 vm.PrecompiledContract, _a1 bool) *PrecompilePlugin_Get_Call { + _c.Call.Return(_a0, _a1) + return _c +} + +func (_c *PrecompilePlugin_Get_Call) RunAndReturn(run func(common.Address, *params.Rules) (vm.PrecompiledContract, bool)) *PrecompilePlugin_Get_Call { + _c.Call.Return(run) + return _c +} + +// GetActive provides a mock function with given fields: _a0 +func (_m *PrecompilePlugin) GetActive(_a0 params.Rules) []common.Address { ret := _m.Called(_a0) - var r0 bool - if rf, ok := ret.Get(0).(func(common.Address) bool); ok { + var r0 []common.Address + if rf, ok := ret.Get(0).(func(params.Rules) []common.Address); ok { r0 = rf(_a0) } else { - r0 = ret.Get(0).(bool) + if ret.Get(0) != nil { + r0 = ret.Get(0).([]common.Address) + } } return r0 } -// PrecompilePlugin_Has_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Has' -type PrecompilePlugin_Has_Call struct { +// PrecompilePlugin_GetActive_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetActive' +type PrecompilePlugin_GetActive_Call struct { *mock.Call } -// Has is a helper method to define mock.On call -// - _a0 common.Address -func (_e *PrecompilePlugin_Expecter) Has(_a0 interface{}) *PrecompilePlugin_Has_Call { - return &PrecompilePlugin_Has_Call{Call: _e.mock.On("Has", _a0)} +// GetActive is a helper method to define mock.On call +// - _a0 params.Rules +func (_e *PrecompilePlugin_Expecter) GetActive(_a0 interface{}) *PrecompilePlugin_GetActive_Call { + return &PrecompilePlugin_GetActive_Call{Call: _e.mock.On("GetActive", _a0)} } -func (_c *PrecompilePlugin_Has_Call) Run(run func(_a0 common.Address)) *PrecompilePlugin_Has_Call { +func (_c *PrecompilePlugin_GetActive_Call) Run(run func(_a0 params.Rules)) *PrecompilePlugin_GetActive_Call { _c.Call.Run(func(args mock.Arguments) { - run(args[0].(common.Address)) + run(args[0].(params.Rules)) }) return _c } -func (_c *PrecompilePlugin_Has_Call) Return(_a0 bool) *PrecompilePlugin_Has_Call { +func (_c *PrecompilePlugin_GetActive_Call) Return(_a0 []common.Address) *PrecompilePlugin_GetActive_Call { _c.Call.Return(_a0) return _c } -func (_c *PrecompilePlugin_Has_Call) RunAndReturn(run func(common.Address) bool) *PrecompilePlugin_Has_Call { +func (_c *PrecompilePlugin_GetActive_Call) RunAndReturn(run func(params.Rules) []common.Address) *PrecompilePlugin_GetActive_Call { + _c.Call.Return(run) + return _c +} + +// GetPrecompiles provides a mock function with given fields: rules +func (_m *PrecompilePlugin) GetPrecompiles(rules *params.Rules) []precompile.Registrable { + ret := _m.Called(rules) + + var r0 []precompile.Registrable + if rf, ok := ret.Get(0).(func(*params.Rules) []precompile.Registrable); ok { + r0 = rf(rules) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]precompile.Registrable) + } + } + + return r0 +} + +// PrecompilePlugin_GetPrecompiles_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPrecompiles' +type PrecompilePlugin_GetPrecompiles_Call struct { + *mock.Call +} + +// GetPrecompiles is a helper method to define mock.On call +// - rules *params.Rules +func (_e *PrecompilePlugin_Expecter) GetPrecompiles(rules interface{}) *PrecompilePlugin_GetPrecompiles_Call { + return &PrecompilePlugin_GetPrecompiles_Call{Call: _e.mock.On("GetPrecompiles", rules)} +} + +func (_c *PrecompilePlugin_GetPrecompiles_Call) Run(run func(rules *params.Rules)) *PrecompilePlugin_GetPrecompiles_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(*params.Rules)) + }) + return _c +} + +func (_c *PrecompilePlugin_GetPrecompiles_Call) Return(_a0 []precompile.Registrable) *PrecompilePlugin_GetPrecompiles_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PrecompilePlugin_GetPrecompiles_Call) RunAndReturn(run func(*params.Rules) []precompile.Registrable) *PrecompilePlugin_GetPrecompiles_Call { + _c.Call.Return(run) + return _c +} + +// Register provides a mock function with given fields: _a0 +func (_m *PrecompilePlugin) Register(_a0 vm.PrecompiledContract) error { + ret := _m.Called(_a0) + + var r0 error + if rf, ok := ret.Get(0).(func(vm.PrecompiledContract) error); ok { + r0 = rf(_a0) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// PrecompilePlugin_Register_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Register' +type PrecompilePlugin_Register_Call struct { + *mock.Call +} + +// Register is a helper method to define mock.On call +// - _a0 vm.PrecompiledContract +func (_e *PrecompilePlugin_Expecter) Register(_a0 interface{}) *PrecompilePlugin_Register_Call { + return &PrecompilePlugin_Register_Call{Call: _e.mock.On("Register", _a0)} +} + +func (_c *PrecompilePlugin_Register_Call) Run(run func(_a0 vm.PrecompiledContract)) *PrecompilePlugin_Register_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(vm.PrecompiledContract)) + }) + return _c +} + +func (_c *PrecompilePlugin_Register_Call) Return(_a0 error) *PrecompilePlugin_Register_Call { + _c.Call.Return(_a0) + return _c +} + +func (_c *PrecompilePlugin_Register_Call) RunAndReturn(run func(vm.PrecompiledContract) error) *PrecompilePlugin_Register_Call { + _c.Call.Return(run) + return _c +} + +// Run provides a mock function with given fields: evm, p, input, caller, value, suppliedGas, readonly +func (_m *PrecompilePlugin) Run(evm vm.PrecompileEVM, p vm.PrecompiledContract, input []byte, caller common.Address, value *big.Int, suppliedGas uint64, readonly bool) ([]byte, uint64, error) { + ret := _m.Called(evm, p, input, caller, value, suppliedGas, readonly) + + var r0 []byte + var r1 uint64 + var r2 error + if rf, ok := ret.Get(0).(func(vm.PrecompileEVM, vm.PrecompiledContract, []byte, common.Address, *big.Int, uint64, bool) ([]byte, uint64, error)); ok { + return rf(evm, p, input, caller, value, suppliedGas, readonly) + } + if rf, ok := ret.Get(0).(func(vm.PrecompileEVM, vm.PrecompiledContract, []byte, common.Address, *big.Int, uint64, bool) []byte); ok { + r0 = rf(evm, p, input, caller, value, suppliedGas, readonly) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(vm.PrecompileEVM, vm.PrecompiledContract, []byte, common.Address, *big.Int, uint64, bool) uint64); ok { + r1 = rf(evm, p, input, caller, value, suppliedGas, readonly) + } else { + r1 = ret.Get(1).(uint64) + } + + if rf, ok := ret.Get(2).(func(vm.PrecompileEVM, vm.PrecompiledContract, []byte, common.Address, *big.Int, uint64, bool) error); ok { + r2 = rf(evm, p, input, caller, value, suppliedGas, readonly) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// PrecompilePlugin_Run_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Run' +type PrecompilePlugin_Run_Call struct { + *mock.Call +} + +// Run is a helper method to define mock.On call +// - evm vm.PrecompileEVM +// - p vm.PrecompiledContract +// - input []byte +// - caller common.Address +// - value *big.Int +// - suppliedGas uint64 +// - readonly bool +func (_e *PrecompilePlugin_Expecter) Run(evm interface{}, p interface{}, input interface{}, caller interface{}, value interface{}, suppliedGas interface{}, readonly interface{}) *PrecompilePlugin_Run_Call { + return &PrecompilePlugin_Run_Call{Call: _e.mock.On("Run", evm, p, input, caller, value, suppliedGas, readonly)} +} + +func (_c *PrecompilePlugin_Run_Call) Run(run func(evm vm.PrecompileEVM, p vm.PrecompiledContract, input []byte, caller common.Address, value *big.Int, suppliedGas uint64, readonly bool)) *PrecompilePlugin_Run_Call { + _c.Call.Run(func(args mock.Arguments) { + run(args[0].(vm.PrecompileEVM), args[1].(vm.PrecompiledContract), args[2].([]byte), args[3].(common.Address), args[4].(*big.Int), args[5].(uint64), args[6].(bool)) + }) + return _c +} + +func (_c *PrecompilePlugin_Run_Call) Return(ret []byte, remainingGas uint64, err error) *PrecompilePlugin_Run_Call { + _c.Call.Return(ret, remainingGas, err) + return _c +} + +func (_c *PrecompilePlugin_Run_Call) RunAndReturn(run func(vm.PrecompileEVM, vm.PrecompiledContract, []byte, common.Address, *big.Int, uint64, bool) ([]byte, uint64, error)) *PrecompilePlugin_Run_Call { _c.Call.Return(run) return _c } diff --git a/eth/core/state/statedb.go b/eth/core/state/statedb.go index 4275d7890..bd57bc942 100644 --- a/eth/core/state/statedb.go +++ b/eth/core/state/statedb.go @@ -21,28 +21,29 @@ package state import ( - "fmt" + "context" + + "github.com/ethereum/go-ethereum/core/state" "pkg.berachain.dev/polaris/eth/common" + "pkg.berachain.dev/polaris/eth/core/precompile" "pkg.berachain.dev/polaris/eth/core/state/journal" coretypes "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/core/vm" "pkg.berachain.dev/polaris/eth/params" "pkg.berachain.dev/polaris/lib/snapshot" libtypes "pkg.berachain.dev/polaris/lib/types" ) -// PrecompilePlugin defines the interface to check for the existence of a precompile at an -// address. +// For mocks. type PrecompilePlugin interface { - Has(common.Address) bool + precompile.Plugin } // stateDB is a struct that holds the plugins and controller to manage Ethereum state. type stateDB struct { // Plugin is injected by the chain running the Polaris EVM. Plugin - pp PrecompilePlugin + pp precompile.Plugin // Journals built internally and required for the stateDB. journal.Log @@ -53,10 +54,17 @@ type stateDB struct { // ctrl is used to manage snapshots and reverts across plugins and journals. ctrl libtypes.Controller[string, libtypes.Controllable[string]] + + rules *params.Rules +} + +type StateDB interface { //nolint:revive // to match geth. + state.StateDBI + GetContext() context.Context } // NewStateDB returns a vm.PolarisStateDB with the given StatePlugin and new journals. -func NewStateDB(sp Plugin, pp PrecompilePlugin) vm.PolarisStateDB { +func NewStateDB(sp Plugin, pp precompile.Plugin) StateDB { return newStateDBWithJournals( sp, pp, journal.NewLogs(), journal.NewRefund(), journal.NewAccesslist(), journal.NewSelfDestructs(sp), journal.NewTransientStorage(), @@ -65,9 +73,9 @@ func NewStateDB(sp Plugin, pp PrecompilePlugin) vm.PolarisStateDB { // newStateDBWithJournals returns a vm.PolarisStateDB with the given StatePlugin and journals. func newStateDBWithJournals( - sp Plugin, pp PrecompilePlugin, lj journal.Log, rj journal.Refund, aj journal.Accesslist, + sp Plugin, pp precompile.Plugin, lj journal.Log, rj journal.Refund, aj journal.Accesslist, sj journal.SelfDestructs, tj journal.TransientStorage, -) vm.PolarisStateDB { +) *stateDB { if sp == nil { panic("StatePlugin is nil in newStateDBWithJournals") } else if pp == nil { @@ -104,6 +112,10 @@ func (sdb *stateDB) GetPlugin() Plugin { return sdb.Plugin } +func (sdb *stateDB) GetPrecompileManager() any { + return sdb.pp +} + // ============================================================================= // Snapshot // ============================================================================= @@ -131,9 +143,8 @@ func (sdb *stateDB) Finalise(bool) { // Commit implements vm.PolarisStateDB. // TODO: determine sideaffects of this function. -func (sdb *stateDB) Commit(_ uint64, deleteEmptyObjects bool) (common.Hash, error) { - sdb.Finalise(deleteEmptyObjects) - return common.Hash{}, nil +func (sdb *stateDB) Commit(_ uint64, _ bool) (common.Hash, error) { + return common.Hash{}, sdb.Error() } // ============================================================================= @@ -144,7 +155,11 @@ func (sdb *stateDB) Commit(_ uint64, deleteEmptyObjects bool) (common.Hash, erro // // Prepare implements vm.PolarisStateDB. func (sdb *stateDB) Prepare(rules params.Rules, sender, coinbase common.Address, - dest *common.Address, precompiles []common.Address, txAccesses coretypes.AccessList) { + dest *common.Address, precompiles []common.Address, txAccesses coretypes.AccessList, +) { + copyRules := rules + sdb.rules = ©Rules + if rules.IsBerlin { // Clear out any leftover from previous executions sdb.Accesslist = journal.NewAccesslist() @@ -191,7 +206,7 @@ func (sdb *stateDB) Preimages() map[common.Hash][]byte { // code associated with the given account. func (sdb *stateDB) GetCode(addr common.Address) []byte { // We return a single byte for client compatibility w/precompiles. - if sdb.pp.Has(addr) { + if _, ok := sdb.pp.Get(addr, sdb.rules); ok { return []byte{0x01} } return sdb.Plugin.GetCode(addr) @@ -208,18 +223,16 @@ func (sdb *stateDB) GetCodeSize(addr common.Address) int { // ============================================================================= // Copy returns a new statedb with cloned plugin and journals. -func (sdb *stateDB) Copy() StateDBI { +func (sdb *stateDB) Copy() state.StateDBI { logs := sdb.Log.Clone() if logs == nil { panic("failed to clone logs") } - statedb, ok := newStateDBWithJournals( + statedb := newStateDBWithJournals( sdb.Plugin.Clone(), sdb.pp, logs, sdb.Refund.Clone(), sdb.Accesslist.Clone(), sdb.SelfDestructs.Clone(), sdb.TransientStorage.Clone(), - ).(StateDBI) - if !ok { - panic(fmt.Sprintf("failed to clone stateDB: %T", sdb.Plugin)) - } + ) + statedb.rules = sdb.rules return statedb } diff --git a/eth/core/state/statedb_test.go b/eth/core/state/statedb_test.go index 54af659dd..d225a8ead 100644 --- a/eth/core/state/statedb_test.go +++ b/eth/core/state/statedb_test.go @@ -24,12 +24,13 @@ import ( "errors" "math/big" + tmock "github.com/stretchr/testify/mock" + "pkg.berachain.dev/polaris/eth/common" "pkg.berachain.dev/polaris/eth/core/state" "pkg.berachain.dev/polaris/eth/core/state/mock" "pkg.berachain.dev/polaris/eth/core/state/mocks" coretypes "pkg.berachain.dev/polaris/eth/core/types" - "pkg.berachain.dev/polaris/eth/core/vm" "pkg.berachain.dev/polaris/eth/params" . "github.com/onsi/ginkgo/v2" @@ -43,7 +44,7 @@ var ( ) var _ = Describe("StateDB", func() { - var sdb vm.PolarisStateDB + var sdb state.StateDBI var sp *mock.PluginMock var pp *mocks.PrecompilePlugin @@ -132,9 +133,9 @@ var _ = Describe("StateDB", func() { }) It("should return code for precompiles", func() { - pp.On("Has", common.Address{0x7}).Return(true).Once() + pp.On("Get", common.Address{0x7}, tmock.Anything).Return(nil, true).Once() Expect(sdb.GetCode(common.Address{0x7})).To(Equal([]byte{0x1})) - pp.On("Has", common.Address{0x7}).Return(false).Once() + pp.On("Get", common.Address{0x7}, tmock.Anything).Return(nil, false).Once() Expect(sdb.GetCode(common.Address{0x7})).To(Equal([]byte{})) }) }) diff --git a/eth/core/vm/imported.go b/eth/core/vm/imported.go index 3c108e0ef..714f43e39 100644 --- a/eth/core/vm/imported.go +++ b/eth/core/vm/imported.go @@ -39,15 +39,12 @@ type ( PrecompileEVM = vm.PrecompileEVM TransferFunc = vm.TransferFunc TxContext = vm.TxContext + PrecompiledContract = vm.PrecompiledContract ) var ( - NewGethEVMWithPrecompiles = vm.NewEVMWithPrecompiles - ErrOutOfGas = vm.ErrOutOfGas - ErrExecutionReverted = vm.ErrExecutionReverted - ErrWriteProtection = vm.ErrWriteProtection - PrecompiledContractsBerlin = vm.PrecompiledContractsBerlin - PrecompiledContractsByzantium = vm.PrecompiledContractsByzantium - PrecompiledContractsHomestead = vm.PrecompiledContractsHomestead - PrecompiledContractsIstanbul = vm.PrecompiledContractsIstanbul + NewEVM = vm.NewEVM + ErrOutOfGas = vm.ErrOutOfGas + ErrExecutionReverted = vm.ErrExecutionReverted + ErrWriteProtection = vm.ErrWriteProtection ) diff --git a/eth/core/vm/mock/statedb.mock.go b/eth/core/vm/mock/statedb.mock.go index 1b2a0a839..a97a6d586 100644 --- a/eth/core/vm/mock/statedb.mock.go +++ b/eth/core/vm/mock/statedb.mock.go @@ -102,6 +102,9 @@ var _ vm.PolarisStateDB = &PolarisStateDBMock{} // GetOrNewStateObjectFunc: func(addr common.Address) *state.StateObject { // panic("mock out the GetOrNewStateObject method") // }, +// GetPrecompileManagerFunc: func() any { +// panic("mock out the GetPrecompileManager method") +// }, // GetRefundFunc: func() uint64 { // panic("mock out the GetRefund method") // }, @@ -271,6 +274,9 @@ type PolarisStateDBMock struct { // GetOrNewStateObjectFunc mocks the GetOrNewStateObject method. GetOrNewStateObjectFunc func(addr common.Address) *state.StateObject + // GetPrecompileManagerFunc mocks the GetPrecompileManager method. + GetPrecompileManagerFunc func() any + // GetRefundFunc mocks the GetRefund method. GetRefundFunc func() uint64 @@ -495,6 +501,9 @@ type PolarisStateDBMock struct { // Addr is the addr argument value. Addr common.Address } + // GetPrecompileManager holds details about calls to the GetPrecompileManager method. + GetPrecompileManager []struct { + } // GetRefund holds details about calls to the GetRefund method. GetRefund []struct { } @@ -686,6 +695,7 @@ type PolarisStateDBMock struct { lockGetLogs sync.RWMutex lockGetNonce sync.RWMutex lockGetOrNewStateObject sync.RWMutex + lockGetPrecompileManager sync.RWMutex lockGetRefund sync.RWMutex lockGetState sync.RWMutex lockGetStorageRoot sync.RWMutex @@ -1560,6 +1570,33 @@ func (mock *PolarisStateDBMock) GetOrNewStateObjectCalls() []struct { return calls } +// GetPrecompileManager calls GetPrecompileManagerFunc. +func (mock *PolarisStateDBMock) GetPrecompileManager() any { + if mock.GetPrecompileManagerFunc == nil { + panic("PolarisStateDBMock.GetPrecompileManagerFunc: method is nil but PolarisStateDB.GetPrecompileManager was just called") + } + callInfo := struct { + }{} + mock.lockGetPrecompileManager.Lock() + mock.calls.GetPrecompileManager = append(mock.calls.GetPrecompileManager, callInfo) + mock.lockGetPrecompileManager.Unlock() + return mock.GetPrecompileManagerFunc() +} + +// GetPrecompileManagerCalls gets all the calls that were made to GetPrecompileManager. +// Check the length with: +// +// len(mockedPolarisStateDB.GetPrecompileManagerCalls()) +func (mock *PolarisStateDBMock) GetPrecompileManagerCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPrecompileManager.RLock() + calls = mock.calls.GetPrecompileManager + mock.lockGetPrecompileManager.RUnlock() + return calls +} + // GetRefund calls GetRefundFunc. func (mock *PolarisStateDBMock) GetRefund() uint64 { if mock.GetRefundFunc == nil { diff --git a/eth/go.mod b/eth/go.mod index 7a42d6de2..fc89a05ce 100644 --- a/eth/go.mod +++ b/eth/go.mod @@ -3,7 +3,7 @@ module pkg.berachain.dev/polaris/eth go 1.21 // We replace `go-ethereum` with `polaris-geth` in order include our required changes. -replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 +replace github.com/ethereum/go-ethereum => github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4 require ( github.com/ethereum/go-ethereum v1.13.1 diff --git a/eth/go.sum b/eth/go.sum index 6f97e4fc3..0355afece 100644 --- a/eth/go.sum +++ b/eth/go.sum @@ -12,8 +12,8 @@ github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7D github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= 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/polaris-geth v0.0.0-20231002143448-814ffd5ffe13 h1:kW4YmodIP+VfINZNtIB7eEpDaRaF7ahqPtdoWQBrq9Y= -github.com/berachain/polaris-geth v0.0.0-20231002143448-814ffd5ffe13/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4 h1:t8fKaxVPovG95BUX62QX1DaJld0Uk5Hi9DtDQphIWR0= +github.com/berachain/polaris-geth v0.0.0-20231005195105-e21d980905b4/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c= github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= diff --git a/eth/miner/miner.go b/eth/miner/miner.go index a9d0c4f8c..be13eeb3c 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -78,7 +78,7 @@ type miner struct { sp core.StatePlugin logger log.Logger vmConfig vm.Config - statedb vm.PolarisStateDB + statedb state.StateDB // TODO: historical plugin has no purpose here in the miner. // Should be handled async via channel @@ -129,7 +129,7 @@ func (m *miner) NextBaseFee() *big.Int { // Prepare prepares the blockchain for processing a new block at the given height. func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { // Prepare the State, Block, Configuration, Gas, and Historical plugins for the block. - m.sp.Prepare(ctx) + m.sp.Reset(ctx) m.bp.Prepare(ctx) m.cp.Prepare(ctx) m.gp.Prepare(ctx) @@ -208,21 +208,11 @@ func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { m.logger.Info("preparing evm block", "seal_hash", m.pendingHeader.Hash()) - var ( - // TODO: we are hardcoding author to coinbase, this may be incorrect. - // TODO: Suggestion -> implement Engine.Author() and allow host chain to decide. - context = core.NewEVMBlockContext(m.pendingHeader, m.chain, &m.pendingHeader.Coinbase) - vmenv = vm.NewGethEVMWithPrecompiles(context, - vm.TxContext{}, m.statedb, chainConfig, m.vmConfig, m.pp, - ) - ) - // Prepare the State Processor, StateDB and the EVM for the block. // TODO: miner should not have a processor. Copy what dydx does in which validators and full nodes // have different prepare and process proposals. // Heuristic: Validators get miners. Full nodes get processors. m.processor.Prepare( - vmenv, m.pendingHeader, ) return m.pendingHeader @@ -248,7 +238,7 @@ func (m *miner) ProcessTransaction( panic("gas consumed mismatch") } - receipt, err := m.processor.ProcessTransaction(ctx, m.gasPool, tx) + receipt, err := m.processor.ProcessTransaction(ctx, m.chain, m.gasPool, tx) if err != nil { return nil, errorslib.Wrapf( err, "could not process transaction [%s]", tx.Hash().Hex(), diff --git a/eth/polar/backend.go b/eth/polar/backend.go index 768220709..d710206c2 100644 --- a/eth/polar/backend.go +++ b/eth/polar/backend.go @@ -417,8 +417,8 @@ func (b *backend) GetEVM(_ context.Context, msg *core.Message, state state.State // TODO: Suggestion -> implement Engine.Author() and allow host chain to decide. context = core.NewEVMBlockContext(header, b.polar.Blockchain(), &header.Coinbase) } - return vm.NewGethEVMWithPrecompiles(context, txContext, state, b.polar.blockchain.Config(), - *vmConfig, b.polar.Host().GetPrecompilePlugin()), state.Error + return vm.NewEVM(context, txContext, state, b.polar.blockchain.Config(), + *vmConfig), state.Error } // GetBlockContext returns a new block context to be used by a EVM. diff --git a/go.work.sum b/go.work.sum index 78fc79c7f..34a38dcde 100644 --- a/go.work.sum +++ b/go.work.sum @@ -302,9 +302,6 @@ github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= @@ -319,7 +316,6 @@ github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMr github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= -github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89 h1:aPflPkRFkVwbW6dmcVqfgwp1i+UWGFH6VgR1Jim5Ygc= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= github.com/chromedp/chromedp v0.9.2 h1:dKtNz4kApb06KuSXoTQIyUC2TrA0fhGDwNZf3bcgfKw= @@ -339,7 +335,6 @@ github.com/cloudflare/cloudflare-go v0.14.0 h1:gFqGlGl/5f9UGXAaKapCGUfaTCgRKKnzu github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= @@ -359,12 +354,8 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80 h1:DuBDHVjgGMPki7bAyh91+3cF1Vh34sAEdH8JQgbc2R0= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= -github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= -github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6 h1:uKuolOJonQOb/2+z/wFSJeVREP6fSoigr/X4Wlfhwwg= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6/go.mod h1:jN7ZJM5YSVtD3SHmkAdN/cOC1dXiqg2Y9K5Sr5a8Nxw= -github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= -github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/cristalhq/acmd v0.11.1 h1:DJ4fh2Pv0nPKmqT646IU/0Vh5FNdGblxvF+3/W3NAUI= github.com/cristalhq/acmd v0.11.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= @@ -382,8 +373,6 @@ github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaI github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= @@ -440,40 +429,11 @@ github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-pkcs11 v0.2.0 h1:5meDPB26aJ98f+K9G21f0AqZwo/S5BJMJh8nuhMbdsI= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= -github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= @@ -485,16 +445,10 @@ github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtX github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.2 h1:uJDtyXwEfalmp1PqdxuhZqrNkUyClZAhVeZYTArbqkg= -github.com/hashicorp/go-getter v1.7.2/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= -github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= @@ -527,9 +481,6 @@ github.com/jhump/gopoet v0.1.0 h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0 h1:Y1UgUX+txUznfqcGdDef8ZOVlyQvnV0pKWZH08RmZuo= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= @@ -561,7 +512,6 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= @@ -590,7 +540,6 @@ github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqA github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= @@ -702,7 +651,6 @@ github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeX github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad h1:fiWzISvDn0Csy5H0iwgAuJGQTUpVfEMJJd4nRFXogbc= github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -717,9 +665,6 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzH github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= -github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= @@ -761,204 +706,21 @@ go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= -google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= -google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.134.0 h1:ktL4Goua+UBgoP1eL1/60LwZJqa1sIzkLmvoR3hR6Gw= -google.golang.org/api v0.134.0/go.mod h1:sjRL3UnjTx5UqNQS9EWr9N8p7xbHpy1k0XGRLCf3Spk= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= -google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= -google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= -google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= -google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771 h1:gm8vsVR64Jx1GxHY8M+p8YA2bxU/H/lymcutB2l7l9s= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771/go.mod h1:3QoBVwTHkXbY1oRGzlhwhOykfcATQN43LJ6iT8Wy8kE= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo= -gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= @@ -969,7 +731,6 @@ gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= nullprogram.com/x/optparse v1.0.0 h1:xGFgVi5ZaWOnYdac2foDT3vg0ZZC9ErXFV57mr4OHrI= -pkg.berachain.dev/polaris/contracts v0.0.0-20230925142347-326426fa61f6/go.mod h1:aM6e6GYmu5YPNUWGs0Qy3pL8N5MsRHO3QvcUruwF2Rc= pkg.berachain.dev/polaris/cosmos v0.0.0-20230928142528-23cc5f141354/go.mod h1:9aoV2M/XfS/kryhjpJWNjhGMDsZe28k5g8uLBsMB7aA= pkg.berachain.dev/polaris/cosmos v0.0.0-20231004235344-d975586a7cdd/go.mod h1:ivNrIw2VxAZv0TeCHVR2XXe7UH/2ipQgK2rMXUHfvqo= rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= From 98a35ef533622d9caf96da71682a23b493592d91 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 5 Oct 2023 23:17:15 -0400 Subject: [PATCH 91/94] fix --- eth/core/state/statedb.go | 4 ++-- eth/miner/miner.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eth/core/state/statedb.go b/eth/core/state/statedb.go index 660fbb435..8610636b2 100644 --- a/eth/core/state/statedb.go +++ b/eth/core/state/statedb.go @@ -61,9 +61,9 @@ type stateDB struct { type ( // StateDB is an alias for StateDBI. - StateDB = state.StateDBI //nolint:revive // to + StateDB = state.StateDBI //nolint:revive // to match geth naming. - // PolarStateDB is a Polaris StateDB with a context. + // PolarStateDB is a Polaris StateDB that has a context. PolarStateDB interface { StateDB GetContext() context.Context diff --git a/eth/miner/miner.go b/eth/miner/miner.go index acf0449f0..c55287a12 100644 --- a/eth/miner/miner.go +++ b/eth/miner/miner.go @@ -125,7 +125,7 @@ func (m *miner) NextBaseFee() *big.Int { // Prepare prepares the blockchain for processing a new block at the given height. func (m *miner) Prepare(ctx context.Context, number uint64) *types.Header { // Prepare the State, Block, Configuration, Gas, and Historical plugins for the block. - m.sp.Reset(ctx) + m.sp.Prepare(ctx) m.bp.Prepare(ctx) m.cp.Prepare(ctx) m.gp.Prepare(ctx) From fc6dac37c41bc430d6435cad49def790c6eeb3c6 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 5 Oct 2023 23:23:22 -0400 Subject: [PATCH 92/94] bing bong --- .../{blank_engine.go => dummy_eth_one.go} | 46 +++++++++++-------- eth/consensus/imported.go | 25 ---------- eth/core/chain_writer.go | 4 +- eth/core/state/imported.go | 36 --------------- eth/core/types/imported.go | 1 + eth/polar/backend.go | 2 +- eth/polar/polaris.go | 2 +- 7 files changed, 31 insertions(+), 85 deletions(-) rename eth/consensus/{blank_engine.go => dummy_eth_one.go} (68%) delete mode 100644 eth/consensus/imported.go delete mode 100644 eth/core/state/imported.go diff --git a/eth/consensus/blank_engine.go b/eth/consensus/dummy_eth_one.go similarity index 68% rename from eth/consensus/blank_engine.go rename to eth/consensus/dummy_eth_one.go index b3fd63769..3c4e819b7 100644 --- a/eth/consensus/blank_engine.go +++ b/eth/consensus/dummy_eth_one.go @@ -24,31 +24,37 @@ package consensus import ( "math/big" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" - "github.com/ethereum/go-ethereum/core/state" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" + + "pkg.berachain.dev/polaris/eth/common" + "pkg.berachain.dev/polaris/eth/core/state" + "pkg.berachain.dev/polaris/eth/core/types" + "pkg.berachain.dev/polaris/eth/rpc" ) -// DummyEngine is a mock implementation of the Engine interface. -type DummyEngine struct{} +type Engine consensus.Engine + +// DummyEthOne is a dummy implementation of the consensus.Engine interface. +var _ Engine = (*DummyEthOne)(nil) + +// DummyEthOne is a mock implementation of the Engine interface. +type DummyEthOne struct{} // Author is a mock implementation. -func (m *DummyEngine) Author(header *types.Header) (common.Address, error) { +func (m *DummyEthOne) Author(header *types.Header) (common.Address, error) { return common.Address{}, nil } // VerifyHeader is a mock implementation. -func (m *DummyEngine) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { +func (m *DummyEthOne) VerifyHeader(chain consensus.ChainHeaderReader, header *types.Header) error { // Set the correct difficulty header.Difficulty = new(big.Int).SetUint64(1) return nil } // VerifyHeaders is a mock implementation. -func (m *DummyEngine) VerifyHeaders( +func (m *DummyEthOne) VerifyHeaders( chain consensus.ChainHeaderReader, headers []*types.Header) (chan<- struct{}, <-chan error) { for _, h := range headers { if err := m.VerifyHeader(chain, h); err != nil { @@ -59,32 +65,32 @@ func (m *DummyEngine) VerifyHeaders( } // VerifyUncles is a mock implementation. -func (m *DummyEngine) VerifyUncles(chain consensus.ChainReader, block *types.Block) error { +func (m *DummyEthOne) VerifyUncles(chain consensus.ChainReader, block *types.Block) error { return nil } // Prepare is a mock implementation. -func (m *DummyEngine) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error { +func (m *DummyEthOne) Prepare(chain consensus.ChainHeaderReader, header *types.Header) error { header.Difficulty = new(big.Int).SetUint64(0) return nil } // Finalize is a mock implementation. -func (m *DummyEngine) Finalize(chain consensus.ChainHeaderReader, - header *types.Header, state state.StateDBI, txs []*types.Transaction, +func (m *DummyEthOne) Finalize(chain consensus.ChainHeaderReader, + header *types.Header, state state.StateDB, txs []*types.Transaction, uncles []*types.Header, withdrawals []*types.Withdrawal) { } // FinalizeAndAssemble is a mock implementation. -func (m *DummyEngine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, - header *types.Header, state state.StateDBI, txs []*types.Transaction, +func (m *DummyEthOne) FinalizeAndAssemble(chain consensus.ChainHeaderReader, + header *types.Header, state state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt, withdrawals []*types.Withdrawal) (*types.Block, error) { return types.NewBlock(header, txs, uncles, receipts, trie.NewStackTrie(nil)), nil } // Seal is a mock implementation. -func (m *DummyEngine) Seal(chain consensus.ChainHeaderReader, +func (m *DummyEthOne) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error { sealedBlock := block // .seal() results <- sealedBlock @@ -92,22 +98,22 @@ func (m *DummyEngine) Seal(chain consensus.ChainHeaderReader, } // SealHash is a mock implementation. -func (m *DummyEngine) SealHash(header *types.Header) common.Hash { +func (m *DummyEthOne) SealHash(header *types.Header) common.Hash { return header.Hash() } // CalcDifficulty is a mock implementation. -func (m *DummyEngine) CalcDifficulty(chain consensus.ChainHeaderReader, +func (m *DummyEthOne) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent *types.Header) *big.Int { return big.NewInt(0) } // APIs is a mock implementation. -func (m *DummyEngine) APIs(chain consensus.ChainHeaderReader) []rpc.API { +func (m *DummyEthOne) APIs(chain consensus.ChainHeaderReader) []rpc.API { return nil } // Close is a mock implementation. -func (m *DummyEngine) Close() error { +func (m *DummyEthOne) Close() error { return nil } diff --git a/eth/consensus/imported.go b/eth/consensus/imported.go deleted file mode 100644 index 3f94b6195..000000000 --- a/eth/consensus/imported.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 consensus - -import "github.com/ethereum/go-ethereum/consensus" - -type Engine consensus.Engine diff --git a/eth/core/chain_writer.go b/eth/core/chain_writer.go index dd5ad8b0e..7ef90576c 100644 --- a/eth/core/chain_writer.go +++ b/eth/core/chain_writer.go @@ -31,12 +31,12 @@ import ( type ChainWriter interface { InsertBlock(block *types.Block, receipts types.Receipts, logs []*types.Log) error WriteBlockAndSetHead(block *types.Block, receipts []*types.Receipt, logs []*types.Log, - state state.StateDBI, emitHeadEvent bool) (status core.WriteStatus, err error) + state state.StateDB, emitHeadEvent bool) (status core.WriteStatus, err error) } // WriteBlockAndSetHead is a no-op in the current implementation. Potentially usable later. func (*blockchain) WriteBlockAndSetHead( - _ *types.Block, _ []*types.Receipt, _ []*types.Log, _ state.StateDBI, + _ *types.Block, _ []*types.Receipt, _ []*types.Log, _ state.StateDB, _ bool) (core.WriteStatus, error) { return core.NonStatTy, nil } diff --git a/eth/core/state/imported.go b/eth/core/state/imported.go deleted file mode 100644 index fd61507e6..000000000 --- a/eth/core/state/imported.go +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 state - -import ( - "github.com/ethereum/go-ethereum/core/state" -) - -type ( - Dump = state.Dump - DumpCollector = state.DumpCollector - DumpConfig = state.DumpConfig - IteratorDump = state.IteratorDump - Database = state.Database - Trie = state.Trie - StateDBI = state.StateDBI //nolint:revive // vibes. - StateObject = state.StateObject //nolint:revive // vibes. -) diff --git a/eth/core/types/imported.go b/eth/core/types/imported.go index 3e398460c..f998461c9 100644 --- a/eth/core/types/imported.go +++ b/eth/core/types/imported.go @@ -44,6 +44,7 @@ type ( LegacyTx = types.LegacyTx TxData = types.TxData Signer = types.Signer + Withdrawal = types.Withdrawal Withdrawals = types.Withdrawals ) diff --git a/eth/polar/backend.go b/eth/polar/backend.go index 6c7e55038..07f6476cb 100644 --- a/eth/polar/backend.go +++ b/eth/polar/backend.go @@ -292,7 +292,7 @@ func (b *backend) BlockByNumberOrHash( func (b *backend) StateAndHeaderByNumber( ctx context.Context, number rpc.BlockNumber, -) (state.StateDBI, *types.Header, error) { +) (state.StateDB, *types.Header, error) { // Pending state is only known by the miner if number == rpc.PendingBlockNumber { block, state := b.polar.miner.Pending() diff --git a/eth/polar/polaris.go b/eth/polar/polaris.go index 8fcb0a2c7..18fbb871d 100644 --- a/eth/polar/polaris.go +++ b/eth/polar/polaris.go @@ -113,7 +113,7 @@ func NewWithNetworkingStack( stack: stack, host: host, engine: host.GetEnginePlugin(), - beacon: &consensus.DummyEngine{}, + beacon: &consensus.DummyEthOne{}, } // When creating a Polaris EVM, we allow the implementing chain // to specify their own log handler. If logHandler is nil then we From 5d03e96206ef7e41a4bfde79b362c8ff04017bf9 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 6 Oct 2023 10:29:56 -0400 Subject: [PATCH 93/94] cleanup --- e2e/testapp/app.go | 63 +------- e2e/testapp/export.go | 2 +- e2e/testapp/go.mod | 2 +- e2e/testapp/helpers.go | 2 +- e2e/testapp/sim_test.go | 188 ------------------------ go.work.sum | 312 +++++++++++++++++++++++++++++++++++++--- 6 files changed, 297 insertions(+), 272 deletions(-) delete mode 100644 e2e/testapp/sim_test.go diff --git a/e2e/testapp/app.go b/e2e/testapp/app.go index 7784f93f1..889ed92b5 100644 --- a/e2e/testapp/app.go +++ b/e2e/testapp/app.go @@ -209,7 +209,7 @@ func NewPolarisApp( ante.HandlerOptions{ AccountKeeper: app.AccountKeeper, BankKeeper: app.BankKeeper, - SignModeHandler: app.TxConfig().SignModeHandler(), + SignModeHandler: app.txConfig.SignModeHandler(), FeegrantKeeper: nil, SigGasConsumer: evmante.SigVerificationGasConsumer, }, @@ -252,36 +252,6 @@ func (app *SimApp) LegacyAmino() *codec.LegacyAmino { return app.legacyAmino } -// AppCodec returns SimApp's app codec. -// -// NOTE: This is solely to be used for testing purposes as it may be desirable -// for modules to register their own custom testing types. -func (app *SimApp) AppCodec() codec.Codec { - return app.appCodec -} - -// InterfaceRegistry returns SimApp's InterfaceRegistry. -func (app *SimApp) InterfaceRegistry() codectypes.InterfaceRegistry { - return app.interfaceRegistry -} - -// TxConfig returns SimApp's TxConfig. -func (app *SimApp) TxConfig() client.TxConfig { - return app.txConfig -} - -// GetKey returns the KVStoreKey for the provided store key. -// -// NOTE: This is solely to be used for testing purposes. -func (app *SimApp) GetKey(storeKey string) *storetypes.KVStoreKey { - sk := app.UnsafeFindStoreKey(storeKey) - kvStoreKey, ok := sk.(*storetypes.KVStoreKey) - if !ok { - return nil - } - return kvStoreKey -} - func (app *SimApp) kvStoreKeys() map[string]*storetypes.KVStoreKey { keys := make(map[string]*storetypes.KVStoreKey) for _, k := range app.GetStoreKeys() { @@ -327,34 +297,5 @@ func (app *SimApp) Close() error { if pl := app.EVMKeeper.Polaris(); pl != nil { return pl.Close() } - return nil -} - -// GetMaccPerms returns a copy of the module account permissions -// -// NOTE: This is solely to be used for testing purposes. -func GetMaccPerms() map[string][]string { - dup := make(map[string][]string) - for _, perms := range moduleAccPerms { - dup[perms.Account] = perms.Permissions - } - - return dup -} - -// BlockedAddresses returns all the app's blocked account addresses. -func BlockedAddresses() map[string]bool { - result := make(map[string]bool) - - if len(blockAccAddrs) > 0 { - for _, addr := range blockAccAddrs { - result[addr] = true - } - } else { - for addr := range GetMaccPerms() { - result[addr] = true - } - } - - return result + return app.BaseApp.Close() } diff --git a/e2e/testapp/export.go b/e2e/testapp/export.go index bc6e40cb2..881d31a25 100644 --- a/e2e/testapp/export.go +++ b/e2e/testapp/export.go @@ -222,7 +222,7 @@ func (app *SimApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [] // Iterate through validators by power descending, reset bond heights, and // update bond intra-tx counters. - store := ctx.KVStore(app.GetKey(stakingtypes.StoreKey)) + store := ctx.KVStore(app.UnsafeFindStoreKey(stakingtypes.StoreKey)) iter := storetypes.KVStoreReversePrefixIterator(store, stakingtypes.ValidatorsKey) counter := int16(0) diff --git a/e2e/testapp/go.mod b/e2e/testapp/go.mod index d1610326e..e3a390074 100644 --- a/e2e/testapp/go.mod +++ b/e2e/testapp/go.mod @@ -15,7 +15,6 @@ require ( cosmossdk.io/tools/confix v0.0.0-20230818115413-c402c51a1508 cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508 cosmossdk.io/x/upgrade v0.0.0-20230915171831-2196edacb99d - github.com/stretchr/testify v1.8.4 pkg.berachain.dev/polaris/cosmos v0.0.0-20231004235344-d975586a7cdd pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354 ) @@ -231,6 +230,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect diff --git a/e2e/testapp/helpers.go b/e2e/testapp/helpers.go index 7bcfa0deb..18cb8b467 100644 --- a/e2e/testapp/helpers.go +++ b/e2e/testapp/helpers.go @@ -58,7 +58,7 @@ func PrecompilesToInject( app.AccountKeeper, govkeeper.NewMsgServerImpl(app.GovKeeper), govkeeper.NewQueryServer(app.GovKeeper), - app.InterfaceRegistry(), + app.interfaceRegistry, ), stakingprecompile.NewPrecompileContract(app.AccountKeeper, app.StakingKeeper), }...) diff --git a/e2e/testapp/sim_test.go b/e2e/testapp/sim_test.go deleted file mode 100644 index 40aa02895..000000000 --- a/e2e/testapp/sim_test.go +++ /dev/null @@ -1,188 +0,0 @@ -// SPDX-License-Identifier: BUSL-1.1 -// -// Copyright (C) 2023, Berachain Foundation. All rights reserved. -// Use of this software is govered 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 testapp - -import ( - "flag" - "fmt" - "os" - "testing" - - "github.com/stretchr/testify/require" - - "cosmossdk.io/log" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/baseapp" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/server" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" - simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" -) - -// SimAppChainID hardcoded chainID for simulation. -const ( - SimAppChainID = "simulation-app" - Bech32Prefix = "cosmos" -) - -var FlagEnableStreamingValue bool - -// Get flags every time the simulator is run. -func setup() { - simcli.GetSimulatorFlags() - flag.BoolVar(&FlagEnableStreamingValue, "EnableStreaming", false, "Enable streaming service") -} - -func TestMain(m *testing.M) { - setup() - code := m.Run() - os.Exit(code) -} - -// fauxMerkleModeOpt returns a BaseApp option to use a dbStoreAdapter instead of -// an IAVLStore for faster simulation speed. -func fauxMerkleModeOpt(bapp *baseapp.BaseApp) { - bapp.SetFauxMerkleMode() -} - -func TestAppSimulationAfterImport(t *testing.T) { - config := simcli.NewConfigFromFlags() - config.ChainID = SimAppChainID - - db, dir, logger, skip, err := simtestutil.SetupSimulation( - config, - "leveldb-app-sim", - "Simulation", - simcli.FlagVerboseValue, - simcli.FlagEnabledValue, - ) - if skip { - t.Skip("skipping application simulation after import") - } - require.NoError(t, err, "simulation setup failed") - - appOptions := make(simtestutil.AppOptionsMap, 0) - appOptions[flags.FlagHome] = fmt.Sprintf("%d/%s", config.Seed, DefaultNodeHome) - appOptions[server.FlagInvCheckPeriod] = simcli.FlagPeriodValue - - app := NewPolarisApp( - logger, - db, - nil, - true, - Bech32Prefix, - appOptions, - fauxMerkleModeOpt, - baseapp.SetChainID(SimAppChainID), - ) - require.Equal(t, "SimApp", app.Name()) - - // Run randomized simulation - stopEarly, simParams, simErr := simulation.SimulateFromSeed( - t, - os.Stdout, - app.BaseApp, - simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), - app.DefaultGenesis()), - simtypes.RandomAccounts, // Replace with own - // random account function if using keys other than secp256k1 - simtestutil.SimulationOperations(app, app.AppCodec(), config), - BlockedAddresses(), - config, - app.AppCodec(), - ) - - // export state and simParams before the simulation error is checked - err = simtestutil.CheckExportSimulation(app, config, simParams) - require.NoError(t, err) - require.NoError(t, simErr) - - if config.Commit { - simtestutil.PrintStats(db) - } - - if stopEarly { - t.Log("can't export or import a zero-validator genesis, exiting test...") - return - } - - t.Log("exporting genesis...\n") - - exported, err := app.ExportAppStateAndValidators(true, []string{}, []string{}) - require.NoError(t, err) - - require.NoError(t, app.Close()) - require.NoError(t, db.Close()) - require.NoError(t, os.RemoveAll(dir)) - - t.Log("importing genesis...\n") - - newDB, newDir, _, _, err := simtestutil.SetupSimulation( - config, - "leveldb-app-sim-2", - "Simulation-2", - simcli.FlagVerboseValue, - simcli.FlagEnabledValue, - ) - require.NoError(t, err, "simulation setup failed") - - defer func() { - require.NoError(t, newDB.Close()) - require.NoError(t, os.RemoveAll(newDir)) - }() - - newApp := NewPolarisApp( - log.NewNopLogger(), - newDB, - nil, - true, - Bech32Prefix, - appOptions, - fauxMerkleModeOpt, - baseapp.SetChainID(SimAppChainID), - ) - require.Equal(t, "SimApp", newApp.Name()) - - _, err = newApp.InitChain(&abci.RequestInitChain{ - AppStateBytes: exported.AppState, - ChainId: SimAppChainID, - }) - require.NoError(t, err) - - _, _, err = simulation.SimulateFromSeed( - t, - os.Stdout, - newApp.BaseApp, - simtestutil.AppStateFn(app.AppCodec(), app.SimulationManager(), - app.DefaultGenesis()), - // Replace with own random account function if using keys other than secp256k1 - simtypes.RandomAccounts, - simtestutil.SimulationOperations(newApp, newApp.AppCodec(), config), - BlockedAddresses(), - config, - app.AppCodec(), - ) - require.NoError(t, err) -} diff --git a/go.work.sum b/go.work.sum index fe447e343..1950e99ef 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,234 +1,356 @@ +cloud.google.com/go v0.0.0-20170206221025-ce650573d812/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= cloud.google.com/go/accessapproval v1.7.1 h1:/5YjNhR6lzCvmJZAnByYkfEgWjfAKwYP6nkuTk6nKFE= cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= +cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= cloud.google.com/go/accesscontextmanager v1.8.1 h1:WIAt9lW9AXtqw/bnvrEUaE8VG/7bAAeMzRCBGMkc4+w= cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= +cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= cloud.google.com/go/aiplatform v1.48.0 h1:M5davZWCTzE043rJCn+ZLW6hSxfG1KAx4vJTtas2/ec= cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= +cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= cloud.google.com/go/analytics v0.21.3 h1:TFBC1ZAqX9/jL56GEXdLrVe5vT3I22bDVWyDwZX4IEg= cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= +cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= cloud.google.com/go/apigateway v1.6.1 h1:aBSwCQPcp9rZ0zVEUeJbR623palnqtvxJlUyvzsKGQc= cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= +cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= cloud.google.com/go/apigeeconnect v1.6.1 h1:6u/jj0P2c3Mcm+H9qLsXI7gYcTiG9ueyQL3n6vCmFJM= cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= +cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= cloud.google.com/go/apigeeregistry v0.7.1 h1:hgq0ANLDx7t2FDZDJQrCMtCtddR/pjCqVuvQWGrQbXw= cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= +cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= +cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= cloud.google.com/go/appengine v1.8.1 h1:J+aaUZ6IbTpBegXbmEsh8qZZy864ZVnOoWyfa1XSNbI= cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= +cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= cloud.google.com/go/area120 v0.8.1 h1:wiOq3KDpdqXmaHzvZwKdpoM+3lDcqsI2Lwhyac7stss= cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= +cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= cloud.google.com/go/artifactregistry v1.14.1 h1:k6hNqab2CubhWlGcSzunJ7kfxC7UzpAfQ1UPb9PDCKI= cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= +cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= cloud.google.com/go/asset v1.14.1 h1:vlHdznX70eYW4V1y1PxocvF6tEwxJTTarwIGwOhFF3U= cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= +cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= cloud.google.com/go/assuredworkloads v1.11.1 h1:yaO0kwS+SnhVSTF7BqTyVGt3DTocI6Jqo+S3hHmCwNk= cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= +cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= cloud.google.com/go/automl v1.13.1 h1:iP9iQurb0qbz+YOOMfKSEjhONA/WcoOIjt6/m+6pIgo= cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= +cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= cloud.google.com/go/baremetalsolution v1.1.1 h1:0Ge9PQAy6cZ1tRrkc44UVgYV15nw2TVnzJzYsMHXF+E= cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= +cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= cloud.google.com/go/batch v1.3.1 h1:uE0Q//W7FOGPjf7nuPiP0zoE8wOT3ngoIO2HIet0ilY= cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= +cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= cloud.google.com/go/beyondcorp v1.0.0 h1:VPg+fZXULQjs8LiMeWdLaB5oe8G9sEoZ0I0j6IMiG1Q= cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= +cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= cloud.google.com/go/bigquery v1.53.0 h1:K3wLbjbnSlxhuG5q4pntHv5AEbQM1QqHKGYgwFIqOTg= cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= +cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= cloud.google.com/go/billing v1.16.0 h1:1iktEAIZ2uA6KpebC235zi/rCXDdDYQ0bTXTNetSL80= cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= +cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= cloud.google.com/go/binaryauthorization v1.6.1 h1:cAkOhf1ic92zEN4U1zRoSupTmwmxHfklcp1X7CCBKvE= cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= +cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= cloud.google.com/go/certificatemanager v1.7.1 h1:uKsohpE0hiobx1Eak9jNcPCznwfB6gvyQCcS28Ah9E8= cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= +cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= cloud.google.com/go/channel v1.16.0 h1:dqRkK2k7Ll/HHeYGxv18RrfhozNxuTJRkspW0iaFZoY= cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= +cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= cloud.google.com/go/cloudbuild v1.13.0 h1:YBbAWcvE4x6xPWTyS+OU4eiUpz5rCS3VCM/aqmfddPA= cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= +cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= cloud.google.com/go/clouddms v1.6.1 h1:rjR1nV6oVf2aNNB7B5uz1PDIlBjlOiBgR+q5n7bbB7M= cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= +cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= cloud.google.com/go/cloudtasks v1.12.1 h1:cMh9Q6dkvh+Ry5LAPbD/U2aw6KAqdiU6FttwhbTo69w= cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= cloud.google.com/go/contactcenterinsights v1.10.0 h1:YR2aPedGVQPpFBZXJnPkqRj8M//8veIZZH5ZvICoXnI= cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= +cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= cloud.google.com/go/container v1.24.0 h1:N51t/cgQJFqDD/W7Mb+IvmAPHrf8AbPx7Bb7aF4lROE= cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= +cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= cloud.google.com/go/containeranalysis v0.10.1 h1:SM/ibWHWp4TYyJMwrILtcBtYKObyupwOVeceI9pNblw= cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= +cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= cloud.google.com/go/datacatalog v1.16.0 h1:qVeQcw1Cz93/cGu2E7TYUPh8Lz5dn5Ws2siIuQ17Vng= cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= +cloud.google.com/go/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= cloud.google.com/go/dataflow v0.9.1 h1:VzG2tqsk/HbmOtq/XSfdF4cBvUWRK+S+oL9k4eWkENQ= cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= +cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= cloud.google.com/go/dataform v0.8.1 h1:xcWso0hKOoxeW72AjBSIp/UfkvpqHNzzS0/oygHlcqY= cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= +cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= cloud.google.com/go/datafusion v1.7.1 h1:eX9CZoyhKQW6g1Xj7+RONeDj1mV8KQDKEB9KLELX9/8= cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= +cloud.google.com/go/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= cloud.google.com/go/datalabeling v0.8.1 h1:zxsCD/BLKXhNuRssen8lVXChUj8VxF3ofN06JfdWOXw= cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= +cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= cloud.google.com/go/dataplex v1.9.0 h1:yoBWuuUZklYp7nx26evIhzq8+i/nvKYuZr1jka9EqLs= cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= +cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= cloud.google.com/go/dataproc/v2 v2.0.1 h1:4OpSiPMMGV3XmtPqskBU/RwYpj3yMFjtMLj/exi425Q= cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= +cloud.google.com/go/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= cloud.google.com/go/dataqna v0.8.1 h1:ITpUJep04hC9V7C+gcK390HO++xesQFSUJ7S4nSnF3U= cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= cloud.google.com/go/datastore v1.13.0 h1:ktbC66bOQB3HJPQe8qNI1/aiQ77PMu7hD4mzE6uxe3w= cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= +cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= cloud.google.com/go/datastream v1.10.0 h1:ra/+jMv36zTAGPfi8TRne1hXme+UsKtdcK4j6bnqQiw= cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= +cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= cloud.google.com/go/deploy v1.13.0 h1:A+w/xpWgz99EYzB6e31gMGAI/P5jTZ2UO7veQK5jQ8o= cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= +cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= cloud.google.com/go/dialogflow v1.40.0 h1:sCJbaXt6ogSbxWQnERKAzos57f02PP6WkGbOZvXUdwc= cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= +cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= cloud.google.com/go/dlp v1.10.1 h1:tF3wsJ2QulRhRLWPzWVkeDz3FkOGVoMl6cmDUHtfYxw= cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= +cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= cloud.google.com/go/documentai v1.22.0 h1:dW8ex9yb3oT9s1yD2+yLcU8Zq15AquRZ+wd0U+TkxFw= cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= +cloud.google.com/go/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= cloud.google.com/go/domains v0.9.1 h1:rqz6KY7mEg7Zs/69U6m6LMbB7PxFDWmT3QWNXIqhHm0= cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= +cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= cloud.google.com/go/edgecontainer v1.1.1 h1:zhHWnLzg6AqzE+I3gzJqiIwHfjEBhWctNQEzqb+FaRo= cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= cloud.google.com/go/essentialcontacts v1.6.2 h1:OEJ0MLXXCW/tX1fkxzEZOsv/wRfyFsvDVNaHWBAvoV0= cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= +cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= cloud.google.com/go/eventarc v1.13.0 h1:xIP3XZi0Xawx8DEfh++mE2lrIi5kQmCr/KcWhJ1q0J4= cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= +cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= cloud.google.com/go/filestore v1.7.1 h1:Eiz8xZzMJc5ppBWkuaod/PUdUZGCFR8ku0uS+Ah2fRw= cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= cloud.google.com/go/firestore v1.11.0 h1:PPgtwcYUOXV2jFe1bV3nda3RCrOa8cvBjTOn2MQVfW8= cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= +cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= cloud.google.com/go/functions v1.15.1 h1:LtAyqvO1TFmNLcROzHZhV0agEJfBi+zfMZsF4RT/a7U= cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= cloud.google.com/go/gaming v1.6.0 h1:PKggmegChZulPW8yvtziF8P9UOuVFwbvylbEucTNups= +cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= +cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= cloud.google.com/go/gkebackup v1.3.0 h1:lgyrpdhtJKV7l1GM15YFt+OCyHMxsQZuSydyNmS0Pxo= cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= +cloud.google.com/go/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= cloud.google.com/go/gkeconnect v0.8.1 h1:a1ckRvVznnuvDWESM2zZDzSVFvggeBaVY5+BVB8tbT0= cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= +cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= cloud.google.com/go/gkehub v0.14.1 h1:2BLSb8i+Co1P05IYCKATXy5yaaIw/ZqGvVSBTLdzCQo= cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= +cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= cloud.google.com/go/gkemulticloud v1.0.0 h1:MluqhtPVZReoriP5+adGIw+ij/RIeRik8KApCW2WMTw= cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= cloud.google.com/go/grafeas v0.2.0 h1:CYjC+xzdPvbV65gi6Dr4YowKcmLo045pm18L0DhdELM= +cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= cloud.google.com/go/gsuiteaddons v1.6.1 h1:mi9jxZpzVjLQibTS/XfPZvl+Jr6D5Bs8pGqUjllRb00= cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= +cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= cloud.google.com/go/iap v1.8.1 h1:X1tcp+EoJ/LGX6cUPt3W2D4H2Kbqq0pLAsldnsCjLlE= cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= +cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= cloud.google.com/go/ids v1.4.1 h1:khXYmSoDDhWGEVxHl4c4IgbwSRR+qE/L4hzP3vaU9Hc= cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= +cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= cloud.google.com/go/iot v1.7.1 h1:yrH0OSmicD5bqGBoMlWG8UltzdLkYzNUwNVUVz7OT54= cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= +cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= cloud.google.com/go/kms v1.15.0 h1:xYl5WEaSekKYN5gGRyhjvZKM22GVBBCzegGNVPy+aIs= cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= +cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= cloud.google.com/go/language v1.10.1 h1:3MXeGEv8AlX+O2LyV4pO4NGpodanc26AmXwOuipEym0= cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= +cloud.google.com/go/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= cloud.google.com/go/lifesciences v0.9.1 h1:axkANGx1wiBXHiPcJZAE+TDjjYoJRIDzbHC/WYllCBU= cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= +cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= cloud.google.com/go/managedidentities v1.6.1 h1:2/qZuOeLgUHorSdxSQGtnOu9xQkBn37+j+oZQv/KHJY= cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= cloud.google.com/go/maps v1.4.0 h1:PdfgpBLhAoSzZrQXP+/zBc78fIPLZSJp5y8+qSMn2UU= cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= +cloud.google.com/go/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= cloud.google.com/go/mediatranslation v0.8.1 h1:50cF7c1l3BanfKrpnTCaTvhf+Fo6kdF21DG0byG7gYU= cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= +cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= cloud.google.com/go/memcache v1.10.1 h1:7lkLsF0QF+Mre0O/NvkD9Q5utUNwtzvIYjrOLOs0HO0= cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= +cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= cloud.google.com/go/metastore v1.12.0 h1:+9DsxUOHvsqvC0ylrRc/JwzbXJaaBpfIK3tX0Lx8Tcc= cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= +cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/monitoring v1.15.1 h1:65JhLMd+JiYnXr6j5Z63dUYCuOg770p8a/VC+gil/58= cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= +cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= cloud.google.com/go/networkconnectivity v1.12.1 h1:LnrYM6lBEeTq+9f2lR4DjBhv31EROSAQi/P5W4Q0AEc= cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= +cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= cloud.google.com/go/networkmanagement v1.8.0 h1:/3xP37eMxnyvkfLrsm1nv1b2FbMMSAEAOlECTvoeCq4= cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= +cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= cloud.google.com/go/networksecurity v0.9.1 h1:TBLEkMp3AE+6IV/wbIGRNTxnqLXHCTEQWoxRVC18TzY= cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= +cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= cloud.google.com/go/notebooks v1.9.1 h1:CUqMNEtv4EHFnbogV+yGHQH5iAQLmijOx191innpOcs= cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= +cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= cloud.google.com/go/optimization v1.4.1 h1:pEwOAmO00mxdbesCRSsfj8Sd4rKY9kBrYW7Vd3Pq7cA= cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= +cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= cloud.google.com/go/orchestration v1.8.1 h1:KmN18kE/xa1n91cM5jhCh7s1/UfIguSCisw7nTMUzgE= cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= +cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= cloud.google.com/go/orgpolicy v1.11.1 h1:I/7dHICQkNwym9erHqmlb50LRU588NPCvkfIY0Bx9jI= cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= +cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= cloud.google.com/go/osconfig v1.12.1 h1:dgyEHdfqML6cUW6/MkihNdTVc0INQst0qSE8Ou1ub9c= cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= +cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= cloud.google.com/go/oslogin v1.10.1 h1:LdSuG3xBYu2Sgr3jTUULL1XCl5QBx6xwzGqzoDUw1j0= cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= +cloud.google.com/go/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= cloud.google.com/go/phishingprotection v0.8.1 h1:aK/lNmSd1vtbft/vLe2g7edXK72sIQbqr2QyrZN/iME= cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= +cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= cloud.google.com/go/policytroubleshooter v1.8.0 h1:XTMHy31yFmXgQg57CB3w9YQX8US7irxDX0Fl0VwlZyY= cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= +cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= cloud.google.com/go/privatecatalog v0.9.1 h1:B/18xGo+E0EMS9LOEQ0zXz7F2asMgmVgTYGSI89MHOA= cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= +cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= cloud.google.com/go/pubsublite v1.8.1 h1:pX+idpWMIH30/K7c0epN6V703xpIcMXWRjKJsz0tYGY= cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= cloud.google.com/go/recaptchaenterprise v1.3.1 h1:u6EznTGzIdsyOsvm+Xkw0aSuKFXQlyjGE9a4exk6iNQ= +cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= cloud.google.com/go/recaptchaenterprise/v2 v2.7.2 h1:IGkbudobsTXAwmkEYOzPCQPApUCsN4Gbq3ndGVhHQpI= cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= +cloud.google.com/go/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= cloud.google.com/go/recommendationengine v0.8.1 h1:nMr1OEVHuDambRn+/y4RmNAmnR/pXCuHtH0Y4tCgGRQ= cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= +cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= cloud.google.com/go/recommender v1.10.1 h1:UKp94UH5/Lv2WXSQe9+FttqV07x/2p1hFTMMYVFtilg= cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= +cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= cloud.google.com/go/redis v1.13.1 h1:YrjQnCC7ydk+k30op7DSjSHw1yAYhqYXFcOq1bSXRYA= cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= +cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= cloud.google.com/go/resourcemanager v1.9.1 h1:QIAMfndPOHR6yTmMUB0ZN+HSeRmPjR/21Smq5/xwghI= cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= +cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= cloud.google.com/go/resourcesettings v1.6.1 h1:Fdyq418U69LhvNPFdlEO29w+DRRjwDA4/pFamm4ksAg= cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= +cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= cloud.google.com/go/retail v1.14.1 h1:gYBrb9u/Hc5s5lUTFXX1Vsbc/9BEvgtioY6ZKaK0DK8= cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= +cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= cloud.google.com/go/run v1.2.0 h1:kHeIG8q+N6Zv0nDkBjSOYfK2eWqa5FnaiDPH/7/HirE= cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= +cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= cloud.google.com/go/scheduler v1.10.1 h1:yoZbZR8880KgPGLmACOMCiY2tPk+iX4V/dkxqTirlz8= cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= +cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= cloud.google.com/go/secretmanager v1.11.1 h1:cLTCwAjFh9fKvU6F13Y4L9vPcx9yiWPyWXE4+zkuEQs= cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= +cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= cloud.google.com/go/security v1.15.1 h1:jR3itwycg/TgGA0uIgTItcVhA55hKWiNJxaNNpQJaZE= cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= +cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= cloud.google.com/go/securitycenter v1.23.0 h1:XOGJ9OpnDtqg8izd7gYk/XUhj8ytjIalyjjsR6oyG0M= cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= +cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= +cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= cloud.google.com/go/servicedirectory v1.11.0 h1:pBWpjCFVGWkzVTkqN3TBBIqNSoSHY86/6RL0soSQ4z8= cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= +cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= +cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= +cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= cloud.google.com/go/shell v1.7.1 h1:aHbwH9LSqs4r2rbay9f6fKEls61TAjT63jSyglsw7sI= cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= +cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= cloud.google.com/go/spanner v1.47.0 h1:aqiMP8dhsEXgn9K5EZBWxPG7dxIiyM2VaikqeU4iteg= cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= +cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/speech v1.19.0 h1:MCagaq8ObV2tr1kZJcJYgXYbIn8Ai5rp42tyGYw9rls= cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= cloud.google.com/go/storagetransfer v1.10.0 h1:+ZLkeXx0K0Pk5XdDmG0MnUVqIR18lllsihU/yq39I8Q= cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= +cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= cloud.google.com/go/talent v1.6.2 h1:j46ZgD6N2YdpFPux9mc7OAf4YK3tiBCsbLKc8rQx+bU= cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= +cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= cloud.google.com/go/texttospeech v1.7.1 h1:S/pR/GZT9p15R7Y2dk2OXD/3AufTct/NSxT4a7nxByw= cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= +cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= cloud.google.com/go/tpu v1.6.1 h1:kQf1jgPY04UJBYYjNUO+3GrZtIb57MfGAW2bwgLbR3A= cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= +cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= cloud.google.com/go/trace v1.10.1 h1:EwGdOLCNfYOOPtgqo+D2sDLZmRCEO1AagRTJCU6ztdg= cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= +cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= cloud.google.com/go/translate v1.8.2 h1:PQHamiOzlehqLBJMnM72lXk/OsMQewZB12BKJ8zXrU0= cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= +cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= cloud.google.com/go/video v1.19.0 h1:BRyyS+wU+Do6VOXnb8WfPr42ZXti9hzmLKLUCkggeK4= cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= +cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= cloud.google.com/go/videointelligence v1.11.1 h1:MBMWnkQ78GQnRz5lfdTAbBq/8QMCF3wahgtHh3s/J+k= cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= cloud.google.com/go/vision v1.2.0 h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4= +cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= cloud.google.com/go/vision/v2 v2.7.2 h1:ccK6/YgPfGHR/CyESz1mvIbsht5Y2xRsWCPqmTNydEw= cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= +cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= cloud.google.com/go/vmmigration v1.7.1 h1:gnjIclgqbEMc+cF5IJuPxp53wjBIlqZ8h9hE8Rkwp7A= cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= +cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= cloud.google.com/go/vmwareengine v1.0.0 h1:qsJ0CPlOQu/3MFBGklu752v3AkD+Pdu091UmXJ+EjTA= cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= +cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= cloud.google.com/go/vpcaccess v1.7.1 h1:ram0GzjNWElmbxXMIzeOZUkQ9J8ZAahD6V8ilPGqX0Y= cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= +cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= cloud.google.com/go/webrisk v1.9.1 h1:Ssy3MkOMOnyRV5H2bkMQ13Umv7CwB/kugo3qkAX83Fk= cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= +cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= cloud.google.com/go/websecurityscanner v1.6.1 h1:CfEF/vZ+xXyAR3zC9iaC/QRdf1MEgS20r5UR17Q4gOg= cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= +cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= cloud.google.com/go/workflows v1.11.1 h1:2akeQ/PgtRhrNuD/n1WvJd5zb7YyuDZrlOanBj2ihPg= cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= +gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1 h1:qoVeMsc9/fh/yhxVaA0obYjVH/oI/ihrOoMwsLS9KSA= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 h1:E+m3SkZCN0Bf5q7YdTs5lSm2CYY3CK4spn5OmUIiQtk= @@ -236,15 +358,20 @@ github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSu github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0 h1:Px2UA+2RvSSvv+RvJNuUB6n7rs5Wsel4dXLe90Um2n4= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= +github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= @@ -261,14 +388,18 @@ github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= +github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= +github.com/ajstarks/svgo v0.0.0-20210923152817-c3b6e2f0c527/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= +github.com/alecthomas/kingpin/v2 v2.3.1/go.mod h1:oYL5vtsvEHZGHxU7DMp32Dvx+qL+ptGn6lWaot2vCNE= github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= @@ -302,9 +433,10 @@ github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas= github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4= github.com/bmatcuk/doublestar v1.1.1 h1:YroD6BJCZBYx06yYFEWvUuKVWQn3vLLQAVmDmvTSaiQ= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= @@ -312,11 +444,14 @@ github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79il github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 h1:R8vQdOQdZ9Y3SkEwmHoWBmX1DNXhXZqlTpq6s4tyJGc= github.com/btcsuite/winsvc v1.0.0 h1:J9B4L7e3oqhXOcm+2IuNApwzQec85lE+QaikUcCs+dk= +github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.37.0 h1:/poEwPSovi4bTOcP752/CsTQiRz2xycyVKFG7GUhbDw= github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89 h1:aPflPkRFkVwbW6dmcVqfgwp1i+UWGFH6VgR1Jim5Ygc= @@ -339,8 +474,15 @@ github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3h github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= +github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -349,26 +491,30 @@ github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80 h1:DuBDHVjgGMPki7bAyh91+3cF1Vh34sAEdH8JQgbc2R0= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= -github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6 h1:uKuolOJonQOb/2+z/wFSJeVREP6fSoigr/X4Wlfhwwg= github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6/go.mod h1:jN7ZJM5YSVtD3SHmkAdN/cOC1dXiqg2Y9K5Sr5a8Nxw= -github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/cristalhq/acmd v0.11.1 h1:DJ4fh2Pv0nPKmqT646IU/0Vh5FNdGblxvF+3/W3NAUI= github.com/cristalhq/acmd v0.11.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/decred/dcrd/lru v1.0.0 h1:Kbsb1SFDsIlaupWPwsPp+dkxiBY1frcS07PCPgotKz8= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= @@ -383,8 +529,11 @@ github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= @@ -397,8 +546,10 @@ github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e h1:bBLctRc7kr01YGvaDfgLbTwjFNW5jdp5y5rj8XXBHfY= github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= +github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 h1:IZqZOB2fydHte3kUgxrzK5E1fW7RQGeDwE8F/ZZnUYc= @@ -410,6 +561,12 @@ github.com/getkin/kin-openapi v0.118.0/go.mod h1:l5e9PaFUo9fyLJCPGQeXI2ML8c3P8BH github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= +github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= +github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= +github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= @@ -418,18 +575,28 @@ github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHs github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= +github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= +github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= +github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= github.com/gofiber/fiber/v2 v2.48.0 h1:cRVMCb9aUJDsyHxGFLwz/sGzDggdailZZyptU9F9cU0= github.com/gofiber/fiber/v2 v2.48.0/go.mod h1:xqJgfqrc23FJuqGOW6DVgi3HyZEm2Mn9pRqUb2kHSX8= @@ -439,16 +606,19 @@ github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= +github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= +github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= +github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= +github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-pkcs11 v0.2.0 h1:5meDPB26aJ98f+K9G21f0AqZwo/S5BJMJh8nuhMbdsI= github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -456,14 +626,14 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/safehtml v0.0.2/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.5 h1:UR4rDjcgpgEnqpIEvkiqTYKBCKLNmlge2eVjoZfySzM= github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= +github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= @@ -471,7 +641,7 @@ github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99 github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= +github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= @@ -480,21 +650,22 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/guptarohit/asciigraph v0.5.5 h1:ccFnUF8xYIOUPPY3tmdvRyHqmn1MYI9iv1pLKX+/ZkQ= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.2 h1:uJDtyXwEfalmp1PqdxuhZqrNkUyClZAhVeZYTArbqkg= github.com/hashicorp/go-getter v1.7.2/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= @@ -507,6 +678,7 @@ github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfE github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hudl/fargo v1.4.0 h1:ZDDILMbB37UlAVLlWcJ2Iz1XuahZZTDZfdCKeclfq2s= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= +github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/hydrogen18/memlistener v1.0.0 h1:JR7eDj8HD6eXrc5fWLbSUnfcQFL06PYvCc0DKQnWfaU= github.com/hydrogen18/memlistener v1.0.0/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= github.com/ianlancetaylor/demangle v0.0.0-20230524184225-eabc099b10ab h1:BA4a7pe6ZTd9F8kXETBoijjFJ/ntaa//1wiH9BZu4zU= @@ -517,6 +689,7 @@ github.com/informalsystems/tm-load-test v1.3.0 h1:FGjKy7vBw6mXNakt+wmNWKggQZRsKk github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -528,9 +701,7 @@ github.com/jhump/gopoet v0.1.0 h1:gYjOPnzHd2nzB37xYQZxj4EIQNpBrBskRqQQ3q4ZgSg= github.com/jhump/gopoet v0.1.0/go.mod h1:me9yfT6IJSlOL3FCfrg+L6yzUEZ+5jW6WHt4Sk+UPUI= github.com/jhump/goprotoc v0.5.0 h1:Y1UgUX+txUznfqcGdDef8ZOVlyQvnV0pKWZH08RmZuo= github.com/jhump/goprotoc v0.5.0/go.mod h1:VrbvcYrQOrTi3i0Vf+m+oqQWk9l72mjkJCYo7UvLHRQ= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= @@ -541,17 +712,25 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jrick/logrotate v1.0.0 h1:lQ1bL/n9mBNeIXoTUoYRlK4dHuNJVofX9oWqBtPnSzI= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d h1:c93kUJDtVAXFEhsCh5jSxyOJmFHuzcihnslQiX8Urwo= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c h1:AqsttAyEyIEsNz5WLRwuRwjiT5CMDUfLk6cFJDVPebs= github.com/karalabe/usb v0.0.3-0.20230711191512-61db3e06439c/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= +github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= +github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= +github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= @@ -563,12 +742,19 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4= github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= +github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/knz/go-libedit v1.10.1 h1:0pHpWtx9vcvC0xGZqEQlQdfSQs7WRlAjuPvk3fOZDCo= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lestrrat-go/backoff/v2 v2.0.8 h1:oNb5E5isby2kiro9AgdHLv5N5tint1AnDVVf2E2un5A= github.com/lestrrat-go/backoff/v2 v2.0.8/go.mod h1:rHP/q/r9aT27n24JQLa7JhSQZCKBBOiM/uP402WwN8Y= github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= @@ -585,6 +771,7 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo= github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= @@ -592,7 +779,13 @@ github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqA github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= @@ -621,13 +814,17 @@ github.com/nats-io/jwt/v2 v2.0.3 h1:i/O6cmIsjpcQyWDYNcq2JyZ3/VTF8SJ4JWluI5OhpvI= github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.5.0 h1:wsnVaaXH9VRSg+A2MVg5Q727/CqxnmPLGFQ3YZYKTQg= github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= github.com/nats-io/nats.go v1.12.1 h1:+0ndxwUPz3CmQ2vjbXdkC1fo3FdiOQDim4gl3Mge8Qo= github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc= github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= @@ -643,6 +840,8 @@ github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89 github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= github.com/performancecopilot/speed/v4 v4.0.0 h1:VxEDCmdkfbQYDlcr/GC9YoN9PQ6p8ulk9xVsepYy9ZY= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= @@ -650,10 +849,14 @@ github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= +github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3 h1:hUmXhbljNFtrH5hzV9kiRoddZ5nfPTq3K0Sb2hYYiqE= github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3/go.mod h1:q5NXNGzqj5uPnVuhGkZfmgHqNUhf15VLi6L9kW0VEc0= @@ -664,6 +867,15 @@ github.com/pointlander/peg v1.0.1/go.mod h1:5hsGDQR2oZI4QoWz0/Kdg3VSVEC31iJw/b7W github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7 h1:cZC+usqsYgHtlBaGulVnZ1hfKAi8iWtujBnRLQE698c= github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod h1:IToEjHuttnUzwZI5KBSM/LOOW3qLbbrHOEfp3SbECGY= github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= @@ -677,8 +889,11 @@ github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e h1:eTWZyPUnHcuGRDiryS/l2I7FfKjbU3IBx3IjqHPxuKU= github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/sagikazarmark/crypt v0.10.0 h1:96E1qrToLBU6fGzo+PRRz7KGOc9FkYFiPnR3/zf8Smg= github.com/sagikazarmark/crypt v0.10.0/go.mod h1:gwTNHQVoOS3xp9Xvz5LLR+1AauC5M6880z5NWzdhOyQ= @@ -687,8 +902,10 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil/v3 v3.23.7 h1:C+fHO8hfIppoJ1WdsVm1RoI0RwXoNdfTK7yWXV0wVj4= github.com/shirou/gopsutil/v3 v3.23.7/go.mod h1:c4gnmoRC0hQuaLqvxnx1//VXQ0Ms/X9UnJF8pddY5z4= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= @@ -704,6 +921,10 @@ github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeX github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad h1:fiWzISvDn0Csy5H0iwgAuJGQTUpVfEMJJd4nRFXogbc= github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -714,16 +935,21 @@ github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1 github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ= github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= github.com/valyala/fasthttp v1.48.0 h1:oJWvHb9BIZToTQS3MuQ2R3bJZiNSa2KiNdeI8A+79Tc= github.com/valyala/fasthttp v1.48.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM= @@ -744,6 +970,7 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= @@ -751,6 +978,7 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwY github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= @@ -763,21 +991,42 @@ go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQa go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= +golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -786,6 +1035,9 @@ golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -801,19 +1053,22 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210304124612-50617c2ba197/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -827,16 +1082,24 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= +gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= +gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= +google.golang.org/api v0.0.0-20170206182103-3d017632ea10/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= @@ -866,9 +1129,8 @@ google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.134.0 h1:ktL4Goua+UBgoP1eL1/60LwZJqa1sIzkLmvoR3hR6Gw= +google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/api v0.134.0/go.mod h1:sjRL3UnjTx5UqNQS9EWr9N8p7xbHpy1k0XGRLCf3Spk= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -902,6 +1164,7 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= @@ -935,8 +1198,13 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= +google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= +google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771 h1:gm8vsVR64Jx1GxHY8M+p8YA2bxU/H/lymcutB2l7l9s= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230720185612-659f7aaaa771/go.mod h1:3QoBVwTHkXbY1oRGzlhwhOykfcATQN43LJ6iT8Wy8kE= +google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= @@ -945,6 +1213,7 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= @@ -952,9 +1221,12 @@ google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= From 4ff3e98865e8b6afc02f2596e0b114b10a30e0b3 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Fri, 6 Oct 2023 13:43:40 -0400 Subject: [PATCH 94/94] cleanup miner a touch --- cosmos/miner/miner.go | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/cosmos/miner/miner.go b/cosmos/miner/miner.go index bb75c42c2..fdd20854c 100644 --- a/cosmos/miner/miner.go +++ b/cosmos/miner/miner.go @@ -72,7 +72,7 @@ func (m *Miner) PrepareProposal( // buildBlock builds and submits a payload, it also waits for the txs // to resolve from the underying worker. func (m *Miner) buildBlock(ctx sdk.Context) ([][]byte, error) { - defer func() { m.currentPayload = nil }() + defer m.clearPayload() if err := m.submitPayloadForBuilding(ctx); err != nil { return nil, err } @@ -81,25 +81,33 @@ func (m *Miner) buildBlock(ctx sdk.Context) ([][]byte, error) { // submitPayloadForBuilding submits a payload for building. func (m *Miner) submitPayloadForBuilding(ctx context.Context) error { - sCtx := sdk.UnwrapSDKContext(ctx) - sCtx.Logger().Info("Submitting payload for building") - payload, err := m.BuildPayload(&miner.BuildPayloadArgs{ - Parent: common.Hash{}, // Empty parent is fine, geth miner will handle. - Timestamp: uint64(sCtx.BlockTime().Unix()), - // TODO: properly fill in the rest of the payload. - FeeRecipient: common.Address{}, - Random: common.Hash{}, - Withdrawals: make(types.Withdrawals, 0), - BeaconRoot: &emptyHash, - }) - if err != nil { - sCtx.Logger().Error("Failed to build payload", "err", err) + var ( + err error + payload *miner.Payload + sCtx = sdk.UnwrapSDKContext(ctx) + ) + + // Build Payload + if payload, err = m.BuildPayload(m.constructPayloadArgs(sCtx)); err != nil { + sCtx.Logger().Error("failed to build payload", "err", err) return err } m.currentPayload = payload + sCtx.Logger().Info("submitted payload for building") return nil } +// constructPayloadArgs builds a payload to submit to the miner. +func (m *Miner) constructPayloadArgs(ctx sdk.Context) *miner.BuildPayloadArgs { + return &miner.BuildPayloadArgs{ + Timestamp: uint64(ctx.BlockTime().Unix()), + FeeRecipient: common.Address{}, /* todo: set etherbase */ + Random: common.Hash{}, /* todo: generated random */ + Withdrawals: make(types.Withdrawals, 0), + BeaconRoot: &emptyHash, + } +} + // resolveTxs resolves the transactions from the payload. func (m *Miner) resolveTxs() [][]byte { if m.currentPayload == nil { @@ -123,3 +131,8 @@ func (m *Miner) resolveTxs() [][]byte { } return txs } + +// clearPayload clears the payload. +func (m *Miner) clearPayload() { + m.currentPayload = nil +}