diff --git a/README.md b/README.md index d2419f9..70f109d 100644 --- a/README.md +++ b/README.md @@ -175,3 +175,23 @@ docker run -d -p 8081:8080 -p 19650:9650 -p 19651:9651 -e NETWORK_ID=costwo -e M ``` Modify cli config in `server/rosetta-cli-conf/config.json -> construction.offline_url` to point to the offline node. + +## Local full integration test + +You can use `test-localflare.sh` script. You need bash, node 20, npm, yarn, curl, jq and docker preinstalled. + +This script does the following: +- spins up a 5 node localflare cluster +- creates a few blocks +- spins up a rosetta docker image, build from local source (as opposed to pulling from github) +- installs rosetta-cli from github +- performss a construction test +- tears down the localflare network + +Run with: +``` +export=ROSETTA_IMAGE=rosetta-local +export=START_ROSETTA_SERVER_AFTER_BOOTSTRAP=true +export=MODE=online +./test-localflare.sh +``` \ No newline at end of file diff --git a/server/Dockerfile b/server/Dockerfile index c0f68d3..34234e3 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -5,7 +5,7 @@ FROM golang:1.22 AS flare WORKDIR /app -ARG GO_FLARE_VERSION=v1.11.13-rc0 +ARG GO_FLARE_VERSION=v1.12.0 ARG GO_FLARE_REPO=https://github.com/flare-foundation/go-flare RUN git clone --branch "$GO_FLARE_VERSION" "${GO_FLARE_REPO}" . diff --git a/server/Dockerfile.arm64 b/server/Dockerfile.arm64 index e835063..d917dda 100644 --- a/server/Dockerfile.arm64 +++ b/server/Dockerfile.arm64 @@ -5,7 +5,7 @@ FROM arm64v8/golang:1.22 AS flare WORKDIR /app -ARG GO_FLARE_VERSION=v1.11.0 +ARG GO_FLARE_VERSION=v1.12.0 ARG GO_FLARE_REPO=https://github.com/flare-foundation/go-flare RUN git clone --branch "$GO_FLARE_VERSION" "${GO_FLARE_REPO}" . diff --git a/server/Makefile b/server/Makefile index 727607c..2d78987 100644 --- a/server/Makefile +++ b/server/Makefile @@ -11,7 +11,7 @@ DOCKER_ORG ?= avaplatform DOCKER_IMAGE ?= ${DOCKER_ORG}/${PROJECT} DOCKER_LABEL ?= latest DOCKER_TAG ?= ${DOCKER_IMAGE}:${DOCKER_LABEL} -AVALANCHE_VERSION ?= v1.7.18 +AVALANCHE_VERSION ?= v1.11.9 build: go build -o ./rosetta-server ./cmd/server diff --git a/server/client/info_client.go b/server/client/info_client.go index fc14507..76c79b5 100644 --- a/server/client/info_client.go +++ b/server/client/info_client.go @@ -13,5 +13,5 @@ import ( type InfoClient interface { GetBlockchainID(context.Context, string, ...rpc.Option) (ids.ID, error) IsBootstrapped(context.Context, string, ...rpc.Option) (bool, error) - Peers(context.Context, ...rpc.Option) ([]info.Peer, error) + Peers(context.Context, []ids.NodeID, ...rpc.Option) ([]info.Peer, error) } diff --git a/server/client/mock_client.go b/server/client/mock_client.go index 78429c8..46e8c9c 100644 --- a/server/client/mock_client.go +++ b/server/client/mock_client.go @@ -13,6 +13,7 @@ import ( context "context" big "math/big" reflect "reflect" + time "time" api "github.com/ava-labs/avalanchego/api" info "github.com/ava-labs/avalanchego/api/info" @@ -20,6 +21,7 @@ import ( indexer "github.com/ava-labs/avalanchego/indexer" rpc "github.com/ava-labs/avalanchego/utils/rpc" avm "github.com/ava-labs/avalanchego/vms/avm" + gas "github.com/ava-labs/avalanchego/vms/components/gas" platformvm "github.com/ava-labs/avalanchego/vms/platformvm" signer "github.com/ava-labs/avalanchego/vms/platformvm/signer" types "github.com/ava-labs/coreth/core/types" @@ -300,10 +302,10 @@ func (mr *MockClientMockRecorder) NonceAt(arg0, arg1, arg2 any) *gomock.Call { } // Peers mocks base method. -func (m *MockClient) Peers(arg0 context.Context, arg1 ...rpc.Option) ([]info.Peer, error) { +func (m *MockClient) Peers(arg0 context.Context, arg1 []ids.NodeID, arg2 ...rpc.Option) ([]info.Peer, error) { m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { + varargs := []any{arg0, arg1} + for _, a := range arg2 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Peers", varargs...) @@ -313,9 +315,9 @@ func (m *MockClient) Peers(arg0 context.Context, arg1 ...rpc.Option) ([]info.Pee } // Peers indicates an expected call of Peers. -func (mr *MockClientMockRecorder) Peers(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockClientMockRecorder) Peers(arg0, arg1 any, arg2 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) + varargs := append([]any{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockClient)(nil).Peers), varargs...) } @@ -591,6 +593,28 @@ func (mr *MockPChainClientMockRecorder) GetCurrentValidators(arg0, arg1, arg2 an return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCurrentValidators", reflect.TypeOf((*MockPChainClient)(nil).GetCurrentValidators), varargs...) } +// GetFeeState mocks base method. +func (m *MockPChainClient) GetFeeState(arg0 context.Context, arg1 ...rpc.Option) (gas.State, gas.Price, time.Time, error) { + m.ctrl.T.Helper() + varargs := []any{arg0} + for _, a := range arg1 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "GetFeeState", varargs...) + ret0, _ := ret[0].(gas.State) + ret1, _ := ret[1].(gas.Price) + ret2, _ := ret[2].(time.Time) + ret3, _ := ret[3].(error) + return ret0, ret1, ret2, ret3 +} + +// GetFeeState indicates an expected call of GetFeeState. +func (mr *MockPChainClientMockRecorder) GetFeeState(arg0 any, arg1 ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{arg0}, arg1...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFeeState", reflect.TypeOf((*MockPChainClient)(nil).GetFeeState), varargs...) +} + // GetHeight mocks base method. func (m *MockPChainClient) GetHeight(arg0 context.Context, arg1 ...rpc.Option) (uint64, error) { m.ctrl.T.Helper() @@ -797,10 +821,10 @@ func (mr *MockPChainClientMockRecorder) IssueTx(arg0, arg1 any, arg2 ...any) *go } // Peers mocks base method. -func (m *MockPChainClient) Peers(arg0 context.Context, arg1 ...rpc.Option) ([]info.Peer, error) { +func (m *MockPChainClient) Peers(arg0 context.Context, arg1 []ids.NodeID, arg2 ...rpc.Option) ([]info.Peer, error) { m.ctrl.T.Helper() - varargs := []any{arg0} - for _, a := range arg1 { + varargs := []any{arg0, arg1} + for _, a := range arg2 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "Peers", varargs...) @@ -810,8 +834,8 @@ func (m *MockPChainClient) Peers(arg0 context.Context, arg1 ...rpc.Option) ([]in } // Peers indicates an expected call of Peers. -func (mr *MockPChainClientMockRecorder) Peers(arg0 any, arg1 ...any) *gomock.Call { +func (mr *MockPChainClientMockRecorder) Peers(arg0, arg1 any, arg2 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - varargs := append([]any{arg0}, arg1...) + varargs := append([]any{arg0, arg1}, arg2...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Peers", reflect.TypeOf((*MockPChainClient)(nil).Peers), varargs...) } diff --git a/server/client/pchainclient.go b/server/client/pchainclient.go index d1117e8..7cb7362 100644 --- a/server/client/pchainclient.go +++ b/server/client/pchainclient.go @@ -3,6 +3,7 @@ package client import ( "context" "strings" + "time" "github.com/ava-labs/avalanchego/api" "github.com/ava-labs/avalanchego/api/info" @@ -10,6 +11,7 @@ import ( "github.com/ava-labs/avalanchego/indexer" "github.com/ava-labs/avalanchego/utils/rpc" "github.com/ava-labs/avalanchego/vms/avm" + "github.com/ava-labs/avalanchego/vms/components/gas" "github.com/ava-labs/avalanchego/vms/platformvm" "github.com/ava-labs/avalanchego/vms/platformvm/signer" @@ -61,6 +63,7 @@ type PChainClient interface { IssueTx(ctx context.Context, tx []byte, options ...rpc.Option) (ids.ID, error) GetStake(ctx context.Context, addrs []ids.ShortID, validatorsOnly bool, options ...rpc.Option) (map[ids.ID]uint64, [][]byte, error) GetCurrentValidators(ctx context.Context, subnetID ids.ID, nodeIDs []ids.NodeID, options ...rpc.Option) ([]platformvm.ClientPermissionlessValidator, error) + GetFeeState(ctx context.Context, options ...rpc.Option) (gas.State, gas.Price, time.Time, error) // avm.Client methods GetAssetDescription(ctx context.Context, assetID string, options ...rpc.Option) (*avm.GetAssetDescriptionReply, error) diff --git a/server/cmd/server/main.go b/server/cmd/server/main.go index 6ae0bee..d160604 100644 --- a/server/cmd/server/main.go +++ b/server/cmd/server/main.go @@ -139,7 +139,6 @@ func main() { } pChainBackend, err := pchain.NewBackend( - cfg.Mode, pChainClient, pIndexerParser, avaxAssetID, diff --git a/server/constants/network.go b/server/constants/network.go index 9963090..ceed40b 100644 --- a/server/constants/network.go +++ b/server/constants/network.go @@ -1,6 +1,14 @@ package constants const ( + // MainnetChainID = 43114 + // MainnetAssetID = "FvwEAhmxKfeiG8SnEvq42hc6whRyY3EFYAvebMqDNDGCgxN5Z" + // MainnetNetwork = constants.MainnetName + + // FujiChainID = 43113 + // FujiAssetID = "U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK" + // FujiNetwork = constants.FujiName + MainnetNetwork = "flare" TestnetNetwork = "fuji" // Using fuji for backwards compatibility with tests LocalNetwork = "localflare" diff --git a/server/docker/docker-compose.yml b/server/docker/docker-compose.yml index 8f38424..96a1a23 100644 --- a/server/docker/docker-compose.yml +++ b/server/docker/docker-compose.yml @@ -1,6 +1,6 @@ services: validator1: - image: ghcr.io/flare-foundation/go-flare:v1.11.13-rc0 + image: ghcr.io/flare-foundation/go-flare:v1.12.0 environment: LOG_LEVEL: info NETWORK_ID: localflare @@ -20,7 +20,7 @@ services: test: curl localhost:9650/ext/health validator2: - image: ghcr.io/flare-foundation/go-flare:v1.11.13-rc0 + image: ghcr.io/flare-foundation/go-flare:v1.12.0 environment: LOG_LEVEL: info NETWORK_ID: localflare @@ -37,7 +37,7 @@ services: ipv4_address: 10.20.30.2 validator3: - image: ghcr.io/flare-foundation/go-flare:v1.11.13-rc0 + image: ghcr.io/flare-foundation/go-flare:v1.12.0 environment: LOG_LEVEL: info NETWORK_ID: localflare @@ -55,7 +55,7 @@ services: ipv4_address: 10.20.30.3 validator4: - image: ghcr.io/flare-foundation/go-flare:v1.11.13-rc0 + image: ghcr.io/flare-foundation/go-flare:v1.12.0 environment: LOG_LEVEL: info NETWORK_ID: localflare @@ -72,7 +72,7 @@ services: ipv4_address: 10.20.30.4 validator5: - image: ghcr.io/flare-foundation/go-flare:v1.11.13-rc0 + image: ghcr.io/flare-foundation/go-flare:v1.12.0 environment: LOG_LEVEL: info NETWORK_ID: localflare @@ -102,6 +102,7 @@ services: START_ROSETTA_SERVER_AFTER_BOOTSTRAP: ${START_ROSETTA_SERVER_AFTER_BOOTSTRAP} MODE: ${MODE} ports: + - 7650:9650 - 8080:8080 depends_on: - validator1 diff --git a/server/docker/entrypoint_rosetta.sh b/server/docker/entrypoint_rosetta.sh index 0b0429a..af4ddba 100644 --- a/server/docker/entrypoint_rosetta.sh +++ b/server/docker/entrypoint_rosetta.sh @@ -57,11 +57,10 @@ if [ "$MODE" = "online" ]; then done jq --arg c "${ROSETTA_FLARE_ENDPOINT}" '.rpc_base_url=$c' "${ROSETTA_CONFIG_PATH}" | sponge "${ROSETTA_CONFIG_PATH}" - fi jq --arg m "${MODE}" '.mode=$m' "${ROSETTA_CONFIG_PATH}" | sponge "${ROSETTA_CONFIG_PATH}" -/app/rosetta-server/rosetta-server -config=${ROSETTA_CONFIG_PATH} +/app/rosetta-server/rosetta-server -config="${ROSETTA_CONFIG_PATH}" diff --git a/server/go.mod b/server/go.mod index 6a4981e..381e510 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,50 +1,56 @@ module github.com/ava-labs/avalanche-rosetta -go 1.21 +go 1.22.10 require ( - github.com/ava-labs/avalanchego v1.11.2 - github.com/ava-labs/coreth v0.13.1-rc.5 + github.com/ava-labs/avalanchego v1.12.0 + github.com/ava-labs/coreth v0.13.9-rc.1 github.com/coinbase/rosetta-sdk-go v0.6.5 - github.com/ethereum/go-ethereum v1.12.0 - github.com/stretchr/testify v1.8.4 + github.com/ethereum/go-ethereum v1.13.14 + github.com/stretchr/testify v1.9.0 go.uber.org/mock v0.4.0 - golang.org/x/crypto v0.18.0 - golang.org/x/sync v0.6.0 + golang.org/x/crypto v0.26.0 + golang.org/x/sync v0.8.0 ) require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/VictoriaMetrics/fastcache v1.10.0 // indirect + github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/beorn7/perks v1.0.1 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/btcutil v1.1.3 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect + github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/consensys/bavard v0.1.13 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect + github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect - github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect + github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect + github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect + github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect - github.com/go-stack/stack v1.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect @@ -52,44 +58,47 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/gorilla/rpc v1.2.0 // indirect - github.com/gorilla/websocket v1.4.2 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/klauspost/compress v1.15.15 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pires/go-proxyproto v0.6.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.14.0 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.39.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect - github.com/rogpeppe/go-internal v1.10.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/segmentio/fasthash v1.0.3 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/spf13/cast v1.5.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect - github.com/supranational/blst v0.3.11 // indirect + github.com/supranational/blst v0.3.13 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect - github.com/tklauser/go-sysconf v0.3.5 // indirect - github.com/tklauser/numcpus v0.2.2 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect - github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa // indirect + github.com/urfave/cli/v2 v2.25.7 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opentelemetry.io/otel v1.22.0 // indirect @@ -100,19 +109,20 @@ require ( go.opentelemetry.io/otel/sdk v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/multierr v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.3.0 // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/grpc v1.62.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect + google.golang.org/grpc v1.66.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/server/go.sum b/server/go.sum index 5d7880f..c005d57 100644 --- a/server/go.sum +++ b/server/go.sum @@ -14,8 +14,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= @@ -30,8 +30,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= -github.com/VictoriaMetrics/fastcache v1.10.0 h1:5hDJnLsKLpnUEToub7ETuRu8RCkb40woBZAUiKonXzY= -github.com/VictoriaMetrics/fastcache v1.10.0/go.mod h1:tjiYeEfYXCqacuvYw/7UoDIeJaNxq6132xHICNP77w8= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= @@ -41,15 +41,17 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/avalanchego v1.11.2 h1:8iodZ+RjqpRwHdiXPPtvaNt72qravge7voGzw3yPRzg= -github.com/ava-labs/avalanchego v1.11.2/go.mod h1:oTVnF9idL57J4LM/6RByTmKhI4QvV6OCnF99ysyBljE= -github.com/ava-labs/coreth v0.13.1-rc.5 h1:YcTs9nryZLkf4gPmMyFx1TREFpDTPdg/VCNGGHSF2TY= -github.com/ava-labs/coreth v0.13.1-rc.5/go.mod h1:4y1igTe/sFOIrpAtXoY+AdmfftNHrmrhBBRVfGCAPcw= +github.com/ava-labs/avalanchego v1.12.0 h1:NBx0vSOY1dCT0PeJzojIhNhx0NMQNem4GgTEN+v8Sx4= +github.com/ava-labs/avalanchego v1.12.0/go.mod h1:yhD5dpZyStIVbxQ550EDi5w5SL7DQ/xGE6TIxosb7U0= +github.com/ava-labs/coreth v0.13.9-rc.1 h1:qIICpC/OZGYUP37QnLgIqqwGmxnLwLpZaUlqJNI85vU= +github.com/ava-labs/coreth v0.13.9-rc.1/go.mod h1:7aMsRIo/3GBE44qWZMjnfqdqfcfZ5yShTTm2LObLaYo= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 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/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= @@ -88,9 +90,9 @@ github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -100,20 +102,27 @@ github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 h1:ytcWPaNPhNoGMWEhDvS3zToKcDpRsLuRolQJBVGdozk= -github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811/go.mod h1:Nb5lgvnQ2+oGlE/EyZy4+2/CxRh9KfvCXnag1vtpxVM= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +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/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/coinbase/rosetta-sdk-go v0.6.5 h1:RytFDCPXS64vEYwIOsxsoQGlZZyP9RQvzyYikxymI4w= github.com/coinbase/rosetta-sdk-go v0.6.5/go.mod h1:MvQfsL2KlJ5786OdDviRIJE3agui2YcvS1CaQPDl1Yo= +github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -121,6 +130,10 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= +github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -150,8 +163,8 @@ github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnm github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 h1:+3HCtB74++ClLy8GgjUQYeC8R4ILzVcIe8+5edAJJnE= -github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +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/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -163,9 +176,11 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= +github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-ethereum v1.9.24/go.mod h1:JIfVb6esrqALTExdz9hRYvrP0xBDf6wCncIu1hNwHpM= -github.com/ethereum/go-ethereum v1.12.0 h1:bdnhLPtqETd4m3mS8BGMNvBTf36bO5bx/hxE2zljOa0= -github.com/ethereum/go-ethereum v1.12.0/go.mod h1:/oo2X/dZLJjf2mJ6YT9wcWxa4nNJDBKDBU6sFIpx1Gs= +github.com/ethereum/go-ethereum v1.13.14 h1:EwiY3FZP94derMCIam1iW4HFVrSgIcpsu0HwTQtm6CQ= +github.com/ethereum/go-ethereum v1.13.14/go.mod h1:TN8ZiHrdJwSe8Cb6x+p0hs5CxhJZPbqB7hHkaUXcmIU= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -173,8 +188,6 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -186,6 +199,8 @@ github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= @@ -204,14 +219,13 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= 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-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= @@ -227,8 +241,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -243,8 +257,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2-0.20200707131729-196ae77b8a26/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -265,11 +279,14 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -281,8 +298,8 @@ github.com/gorilla/rpc v1.2.0 h1:WvvdC2lNeT1SP32zrIce5l0ECBfbAlmrmSBsuc57wfk= github.com/gorilla/rpc v1.2.0/go.mod h1:V4h9r+4sF5HnzqbwIez0fKSpANP0zlYd3qR7p36jkTQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= @@ -293,11 +310,13 @@ github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uG github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= +github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c h1:DZfsyhDK1hnSS5lH8l+JggqzEleHteTYfutAiVlSUM8= -github.com/holiman/uint256 v1.2.2-0.20230321075855-87b91420868c/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= @@ -370,12 +389,14 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -390,6 +411,9 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -428,9 +452,8 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -447,25 +470,27 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/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.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= -github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= @@ -504,8 +529,8 @@ github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8 github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -513,10 +538,10 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= +github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a h1:1ur3QoCqvE5fl+nylMaIr9PVV1w343YRDtsy+Rwu7XI= @@ -528,10 +553,10 @@ github.com/tidwall/gjson v1.6.3/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKs github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E= github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/sjson v1.1.2/go.mod h1:SEzaDwxiPzKzNfUEO4HbYF/m4UCSJDsGgNqsS1LvdoY= -github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= @@ -541,8 +566,8 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa h1:5SqCsI/2Qya2bCzK15ozrqo2sZxkh0FHynJZOTVoV6Q= -github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa/go.mod h1:1CNUng3PtjQMtRzJO4FMXBQvkGtuYRxxiR9xMa7jMwI= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= @@ -589,8 +614,8 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -607,8 +632,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= @@ -655,8 +680,8 @@ golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -668,8 +693,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -694,7 +719,6 @@ golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -706,18 +730,21 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -725,12 +752,12 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af h1:Yx9k8YCG3dvF87UAn2tu2HQLf2dt/eR1bXxpLMWeH+Y= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -762,20 +789,18 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 h1:+rdxYoE3E5htTEWIe15GlN6IfvbURM//Jt0mmkmm6ZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117/go.mod h1:OimBR/bc1wPO9iV4NC2bpyjy3VnAwZh5EBPQdtaE5oo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed h1:J6izYgfBXAI3xTKLgxzTmUltdYaLsuBxFCgDHWJ/eXg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.62.0 h1:HQKZ/fa1bXkX1oFOvSjmZEUL8wLSaZTjCcLAlmZRtdk= -google.golang.org/grpc v1.62.0/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -787,8 +812,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -822,3 +847,5 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/server/mapper/pchain/tx_dependency.go b/server/mapper/pchain/tx_dependency.go index be7e23f..8065874 100644 --- a/server/mapper/pchain/tx_dependency.go +++ b/server/mapper/pchain/tx_dependency.go @@ -53,6 +53,16 @@ func GetTxDependenciesIDs(tx txs.UnsignedTx) ([]ids.ID, error) { ins = unsignedTx.Ins case *txs.TransferSubnetOwnershipTx: ins = unsignedTx.Ins + case *txs.ConvertSubnetToL1Tx: + ins = unsignedTx.Ins + case *txs.RegisterL1ValidatorTx: + ins = unsignedTx.Ins + case *txs.IncreaseL1ValidatorBalanceTx: + ins = unsignedTx.Ins + case *txs.SetL1ValidatorWeightTx: + ins = unsignedTx.Ins + case *txs.DisableL1ValidatorTx: + ins = unsignedTx.Ins case *txs.BaseTx: ins = unsignedTx.Ins default: @@ -167,6 +177,16 @@ func (d *SingleTxDependency) GetUtxos() map[avax.UTXOID]*avax.UTXO { outsToAdd = append(outsToAdd, unsignedTx.Stake()...) case *txs.TransferSubnetOwnershipTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.ConvertSubnetToL1Tx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.RegisterL1ValidatorTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.IncreaseL1ValidatorBalanceTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.SetL1ValidatorWeightTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) + case *txs.DisableL1ValidatorTx: + outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) case *txs.BaseTx: outsToAdd = append(outsToAdd, unsignedTx.Outputs()...) default: diff --git a/server/mapper/pchain/tx_parser.go b/server/mapper/pchain/tx_parser.go index c8a4eda..0f0ad2e 100644 --- a/server/mapper/pchain/tx_parser.go +++ b/server/mapper/pchain/tx_parser.go @@ -167,6 +167,21 @@ func (t *TxParser) Parse(signedTx *txs.Tx) (*types.Transaction, error) { case *txs.TransferSubnetOwnershipTx: txType = OpTransferSubnetOwnership ops, err = t.parseTransferSubnetOwnershipTx(txID, unsignedTx) + case *txs.ConvertSubnetToL1Tx: + txType = OpConvertSubnetToL1Tx + ops, err = t.parseConvertSubnetToL1Tx(txID, unsignedTx) + case *txs.RegisterL1ValidatorTx: + txType = OpRegisterL1ValidatorTx + ops, err = t.parseRegisterL1ValidatorTx(txID, unsignedTx) + case *txs.IncreaseL1ValidatorBalanceTx: + txType = OpIncreaseL1ValidatorBalanceTx + ops, err = t.parseIncreaseL1ValidatorBalanceTx(txID, unsignedTx) + case *txs.SetL1ValidatorWeightTx: + txType = OpSetL1ValidatorWeightTx + ops, err = t.parseSetL1ValidatorWeightTx(txID, unsignedTx) + case *txs.DisableL1ValidatorTx: + txType = OpDisableL1ValidatorTx + ops, err = t.parseDisableL1ValidatorTx(txID, unsignedTx) case *txs.BaseTx: txType = OpBase ops, err = t.parseBaseTx(txID, unsignedTx) @@ -420,6 +435,26 @@ func (t *TxParser) parseCreateChainTx(txID ids.ID, tx *txs.CreateChainTx) (*txOp return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpCreateChain) } +func (t *TxParser) parseConvertSubnetToL1Tx(txID ids.ID, tx *txs.ConvertSubnetToL1Tx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpConvertSubnetToL1Tx) +} + +func (t *TxParser) parseRegisterL1ValidatorTx(txID ids.ID, tx *txs.RegisterL1ValidatorTx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpRegisterL1ValidatorTx) +} + +func (t *TxParser) parseIncreaseL1ValidatorBalanceTx(txID ids.ID, tx *txs.IncreaseL1ValidatorBalanceTx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpIncreaseL1ValidatorBalanceTx) +} + +func (t *TxParser) parseSetL1ValidatorWeightTx(txID ids.ID, tx *txs.SetL1ValidatorWeightTx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpSetL1ValidatorWeightTx) +} + +func (t *TxParser) parseDisableL1ValidatorTx(txID ids.ID, tx *txs.DisableL1ValidatorTx) (*txOps, error) { + return t.baseTxToCombinedOperations(txID, &tx.BaseTx, OpDisableL1ValidatorTx) +} + func (t *TxParser) baseTxToCombinedOperations(txID ids.ID, tx *txs.BaseTx, txType string) (*txOps, error) { ops := newTxOps(t.cfg.IsConstruction) @@ -730,6 +765,13 @@ func (t *TxParser) isMultisig(utxoid avax.UTXOID) (bool, error) { utxoMap := dependencyTx.GetUtxos() utxo, ok := utxoMap[utxoid] if !ok { + // Consider the UTXO as multisig if it is not found in the dependency tx. + // Possible for dependency txs like [DisableL1ValidatorTx] or [SetL1ValidatorWeightTx]. + // These unfound UTXOs are generated by the network but are not included in the tx bytes. + switch dependencyTx.Tx.Unsigned.(type) { + case *txs.DisableL1ValidatorTx, *txs.SetL1ValidatorWeightTx: + return true, nil + } return false, errFailedToCheckMultisig } diff --git a/server/mapper/pchain/types.go b/server/mapper/pchain/types.go index 3c8c178..cf65da9 100644 --- a/server/mapper/pchain/types.go +++ b/server/mapper/pchain/types.go @@ -2,24 +2,30 @@ package pchain import ( "github.com/ava-labs/avalanchego/ids" + "github.com/coinbase/rosetta-sdk-go/parser" ) const ( - OpImportAvax = "IMPORT_AVAX" - OpExportAvax = "EXPORT_AVAX" - OpAddValidator = "ADD_VALIDATOR" - OpAddPermissionlessValidator = "ADD_PERMISSIONLESS_VALIDATOR" - OpAddDelegator = "ADD_DELEGATOR" - OpAddPermissionlessDelegator = "ADD_PERMISSIONLESS_DELEGATOR" - OpRewardValidator = "REWARD_VALIDATOR" - OpCreateChain = "CREATE_CHAIN" - OpCreateSubnet = "CREATE_SUBNET" - OpAddSubnetValidator = "ADD_SUBNET_VALIDATOR" - OpRemoveSubnetValidator = "REMOVE_SUBNET_VALIDATOR" - OpTransformSubnetValidator = "TRANSFORM_SUBNET_VALIDATOR" - OpAdvanceTime = "ADVANCE_TIME" - OpBase = "BASE" - OpTransferSubnetOwnership = "TRANSFER_SUBNET_OWNERSHIP" + OpImportAvax = "IMPORT_AVAX" + OpExportAvax = "EXPORT_AVAX" + OpAddValidator = "ADD_VALIDATOR" + OpAddPermissionlessValidator = "ADD_PERMISSIONLESS_VALIDATOR" + OpAddDelegator = "ADD_DELEGATOR" + OpAddPermissionlessDelegator = "ADD_PERMISSIONLESS_DELEGATOR" + OpRewardValidator = "REWARD_VALIDATOR" + OpCreateChain = "CREATE_CHAIN" + OpCreateSubnet = "CREATE_SUBNET" + OpAddSubnetValidator = "ADD_SUBNET_VALIDATOR" + OpRemoveSubnetValidator = "REMOVE_SUBNET_VALIDATOR" + OpTransformSubnetValidator = "TRANSFORM_SUBNET_VALIDATOR" + OpAdvanceTime = "ADVANCE_TIME" + OpBase = "BASE" + OpTransferSubnetOwnership = "TRANSFER_SUBNET_OWNERSHIP" + OpConvertSubnetToL1Tx = "CONVERT_SUBNET_TO_L1_TX" + OpRegisterL1ValidatorTx = "REGISTER_L1_VALIDATOR_TX" + OpIncreaseL1ValidatorBalanceTx = "INCREASE_L1_VALIDATOR_BALANCE_TX" + OpSetL1ValidatorWeightTx = "SET_L1_VALIDATOR_WEIGHT_TX" + OpDisableL1ValidatorTx = "DISABLE_L1_VALIDATOR_TX" OpTypeImport = "IMPORT" OpTypeExport = "EXPORT" @@ -37,6 +43,9 @@ const ( MetadataMessage = "message" MetadataSigner = "signer" + MetadataBaseFee = "base_fee" + MetadataMatches = "matches" + MetadataValidatorRewards = "validator_rewards" MetadataValidatorRewardsOwner = "validator_rewards_owner" MetadataDelegationRewardsOwner = "delegation_rewards_owner" @@ -72,10 +81,11 @@ var ( // OperationMetadata contains metadata fields specific to individual Rosetta operations as opposed to transactions type OperationMetadata struct { - Type string `json:"type"` - SigIndices []uint32 `json:"sig_indices,omitempty"` - Locktime uint64 `json:"locktime"` - Threshold uint32 `json:"threshold,omitempty"` + Type string `json:"type"` + SigIndices []uint32 `json:"sig_indices,omitempty"` + Locktime uint64 `json:"locktime"` + Threshold uint32 `json:"threshold,omitempty"` + Matches []*parser.Match `json:"matches,omitempty"` } // ImportExportOptions contain response fields returned by /construction/preprocess for P-chain Import/Export transactions diff --git a/server/mapper/transaction_test.go b/server/mapper/transaction_test.go index 01c53ce..3ce9624 100644 --- a/server/mapper/transaction_test.go +++ b/server/mapper/transaction_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/vms/components/avax" "github.com/ava-labs/coreth/plugin/evm" "github.com/coinbase/rosetta-sdk-go/types" "github.com/ethereum/go-ethereum/common" @@ -316,7 +315,7 @@ func TestCrossChainExportedOuts(t *testing.T) { } metaBytes, _ = hex.DecodeString("000000000001000000057fc93d85c6d62c5b2ac0b519c87010ea5294012d1e407030d6acd0021cac10d50000000000000000000000000000000000000000000000000000000000000000000000013158e80abd5a1e1aa716003c9db096792c3796210000000000138aee3d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa000000000000003b000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000700000000000f424000000000000000000000000100000001c83ea4dc195a9275a349e4f616cbb45e23eab2fb00000001000000090000000167fb4fdaa15ce6804e680dc182f0e702259e6f9572a9f5fe0fc6053094951f612a3d9e8128d08be17ae5122d1790160ac8f2e6d21c4b7dde702624eb6219de7301") metaUnsignedBytes, _ = hex.DecodeString("000000000001000000057fc93d85c6d62c5b2ac0b519c87010ea5294012d1e407030d6acd0021cac10d50000000000000000000000000000000000000000000000000000000000000000000000013158e80abd5a1e1aa716003c9db096792c3796210000000000138aee3d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa000000000000003b000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000700000000000f424000000000000000000000000100000001c83ea4dc195a9275a349e4f616cbb45e23eab2fb") - meta = &avax.Metadata{} + meta = &evm.Metadata{} ) meta.Initialize(metaUnsignedBytes, metaBytes) diff --git a/server/rosetta-cli-conf/localflare/server-config.json b/server/rosetta-cli-conf/localflare/server-config.json index ba6b4d9..645f45c 100644 --- a/server/rosetta-cli-conf/localflare/server-config.json +++ b/server/rosetta-cli-conf/localflare/server-config.json @@ -2,6 +2,6 @@ "mode": "online", "rpc_base_url": "http://127.0.0.1:9650", "network_name": "localflare", - "genesis_block_hash": "0xc5d448ab94a1aafc9c18ad314ee306cb87d1f7030136d4eb072b145d772fd00c", + "genesis_block_hash": "0x95f311924a832165d415cff61bb87bc7d2761adf44cc0a47ff26d4762b8b32b1", "chain_id": 162 } diff --git a/server/service/backend/pchain/account_test.go b/server/service/backend/pchain/account_test.go index 7b28b12..00eaba1 100644 --- a/server/service/backend/pchain/account_test.go +++ b/server/service/backend/pchain/account_test.go @@ -17,7 +17,6 @@ import ( "github.com/ava-labs/avalanche-rosetta/client" "github.com/ava-labs/avalanche-rosetta/constants" "github.com/ava-labs/avalanche-rosetta/mapper" - "github.com/ava-labs/avalanche-rosetta/service" "github.com/ava-labs/avalanche-rosetta/service/backend/pchain/indexer" pmapper "github.com/ava-labs/avalanche-rosetta/mapper/pchain" @@ -56,7 +55,6 @@ func TestAccountBalance(t *testing.T) { parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) parserMock.EXPECT().ParseNonGenesisBlock(ctx, "", blockHeight).Return(parsedBlock, nil).AnyTimes() backend, err := NewBackend( - service.ModeOnline, pChainMock, parserMock, avaxAssetID, @@ -255,7 +253,6 @@ func TestAccountPendingRewardsBalance(t *testing.T) { } backend, err := NewBackend( - service.ModeOnline, pChainMock, parserMock, avaxAssetID, @@ -361,7 +358,6 @@ func TestAccountCoins(t *testing.T) { parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) parserMock.EXPECT().ParseNonGenesisBlock(ctx, "", blockHeight).Return(parsedBlock, nil).AnyTimes() backend, err := NewBackend( - service.ModeOnline, pChainMock, parserMock, avaxAssetID, diff --git a/server/service/backend/pchain/backend.go b/server/service/backend/pchain/backend.go index 22da846..02efc1f 100644 --- a/server/service/backend/pchain/backend.go +++ b/server/service/backend/pchain/backend.go @@ -2,7 +2,9 @@ package pchain import ( "github.com/ava-labs/avalanchego/codec" + "github.com/ava-labs/avalanchego/genesis" "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/vms/platformvm/block" "github.com/coinbase/rosetta-sdk-go/types" @@ -34,14 +36,15 @@ type Backend struct { codecVersion uint16 avaxAssetID ids.ID txParserCfg pmapper.TxParserConfig + upgradeConfig upgrade.Config + feeConfig genesis.TxFeeConfig } // NewBackend creates a P-chain service backend func NewBackend( - nodeMode string, pClient client.PChainClient, indexerParser indexer.Parser, - assetID ids.ID, + avaxAssetID ids.ID, networkIdentifier *types.NetworkIdentifier, avalancheNetworkID uint32, ) (*Backend, error) { @@ -50,34 +53,35 @@ func NewBackend( return nil, err } - b := &Backend{ + networkHRP, err := mapper.GetHRP(networkIdentifier) + if err != nil { + return nil, err + } + + upgradeConfig := upgrade.GetConfig(avalancheNetworkID) + feeConfig := genesis.GetTxFeeConfig(avalancheNetworkID) + + return &Backend{ genesisHandler: genHandler, networkID: networkIdentifier, + networkHRP: networkHRP, + avalancheNetworkID: avalancheNetworkID, pClient: pClient, + indexerParser: indexerParser, getUTXOsPageSize: 1024, codec: block.Codec, codecVersion: block.CodecVersion, - indexerParser: indexerParser, - avaxAssetID: assetID, - avalancheNetworkID: avalancheNetworkID, - } - - if nodeMode == service.ModeOnline { - var err error - if b.networkHRP, err = mapper.GetHRP(b.networkID); err != nil { - return nil, err - } - } - - b.txParserCfg = pmapper.TxParserConfig{ - IsConstruction: false, - Hrp: b.networkHRP, - ChainIDs: nil, - AvaxAssetID: b.avaxAssetID, - PChainClient: b.pClient, - } - - return b, nil + avaxAssetID: avaxAssetID, + txParserCfg: pmapper.TxParserConfig{ + IsConstruction: false, + Hrp: networkHRP, + ChainIDs: nil, + AvaxAssetID: avaxAssetID, + PChainClient: pClient, + }, + upgradeConfig: upgradeConfig, + feeConfig: feeConfig, + }, nil } // ShouldHandleRequest returns whether a given request should be handled by this backend diff --git a/server/service/backend/pchain/backend_test.go b/server/service/backend/pchain/backend_test.go index a28197f..05d8134 100644 --- a/server/service/backend/pchain/backend_test.go +++ b/server/service/backend/pchain/backend_test.go @@ -35,7 +35,6 @@ func TestShouldHandleRequest(t *testing.T) { parserMock := indexer.NewMockParser(ctrl) parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) backend, err := NewBackend( - service.ModeOnline, clientMock, parserMock, avaxAssetID, diff --git a/server/service/backend/pchain/block_test.go b/server/service/backend/pchain/block_test.go index f8ccfdf..8e60828 100644 --- a/server/service/backend/pchain/block_test.go +++ b/server/service/backend/pchain/block_test.go @@ -99,7 +99,7 @@ func TestFetchBlkDependencies(t *testing.T) { Encoding: formatting.Hex, }).Return(nil, nil) - backend, err := NewBackend(service.ModeOnline, mockPClient, mockIndexerParser, avaxAssetID, networkIdentifier, networkID) + backend, err := NewBackend(mockPClient, mockIndexerParser, avaxAssetID, networkIdentifier, networkID) require.NoError(t, err) deps, err := backend.fetchBlkDependencies(ctx, []*txs.Tx{tx}) diff --git a/server/service/backend/pchain/construction.go b/server/service/backend/pchain/construction.go index fbaba57..dd3475f 100644 --- a/server/service/backend/pchain/construction.go +++ b/server/service/backend/pchain/construction.go @@ -6,6 +6,7 @@ import ( "errors" "fmt" "math/big" + "time" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/utils/rpc" @@ -19,6 +20,7 @@ import ( "github.com/ava-labs/avalanche-rosetta/service/backend/common" pmapper "github.com/ava-labs/avalanche-rosetta/mapper/pchain" + txfee "github.com/ava-labs/avalanchego/vms/platformvm/txs/fee" ) var ( @@ -45,7 +47,9 @@ func (*Backend) ConstructionPreprocess( if reqMetadata == nil { reqMetadata = make(map[string]interface{}) } + reqMetadata[pmapper.MetadataOpType] = matches[0].Operations[0].Type + reqMetadata[pmapper.MetadataMatches] = matches return &types.ConstructionPreprocessResponse{ Options: reqMetadata, @@ -62,15 +66,21 @@ func (b *Backend) ConstructionMetadata( return nil, service.WrapError(service.ErrInvalidInput, err) } - var suggestedFee *types.Amount + if opMetadata.Matches == nil { + return nil, service.WrapError(service.ErrInvalidInput, errors.New("matches not found in options")) + } + var metadata *pmapper.Metadata switch opMetadata.Type { case pmapper.OpImportAvax: - metadata, suggestedFee, err = b.buildImportMetadata(ctx, req.Options) + metadata, err = b.buildImportMetadata(ctx, req.Options) case pmapper.OpExportAvax: - metadata, suggestedFee, err = b.buildExportMetadata(ctx, req.Options) + metadata, err = b.buildExportMetadata(ctx, req.Options) case pmapper.OpAddValidator, pmapper.OpAddDelegator, pmapper.OpAddPermissionlessDelegator, pmapper.OpAddPermissionlessValidator: - metadata, suggestedFee, err = buildStakingMetadata(req.Options) + metadata, err = b.buildStakingMetadata(ctx, req.Options) + if err != nil { + return nil, service.WrapError(service.ErrInternalError, err) + } metadata.Threshold = opMetadata.Threshold metadata.Locktime = opMetadata.Locktime @@ -84,6 +94,22 @@ func (b *Backend) ConstructionMetadata( return nil, service.WrapError(service.ErrInternalError, err) } + // Suggested fee calculation + tx, _, err := pmapper.BuildTx( + opMetadata.Type, + opMetadata.Matches, + *metadata, + b.codec, + b.avaxAssetID, + ) + if err != nil { + return nil, service.WrapError(service.ErrInternalError, err) + } + suggestedFee, err := b.calculateFee(ctx, tx) + if err != nil { + return nil, service.WrapError(service.ErrInternalError, err) + } + pChainID, err := b.pClient.GetBlockchainID(ctx, constants.PChain.String()) if err != nil { return nil, service.WrapError(service.ErrInvalidInput, err) @@ -97,49 +123,46 @@ func (b *Backend) ConstructionMetadata( return nil, service.WrapError(service.ErrInternalError, err) } + suggestedFeeAvax := mapper.AtomicAvaxAmount(big.NewInt(int64(suggestedFee))) return &types.ConstructionMetadataResponse{ Metadata: metadataMap, - SuggestedFee: []*types.Amount{suggestedFee}, + SuggestedFee: []*types.Amount{suggestedFeeAvax}, }, nil } -func (b *Backend) buildImportMetadata(ctx context.Context, options map[string]interface{}) (*pmapper.Metadata, *types.Amount, error) { +func (b *Backend) buildImportMetadata( + ctx context.Context, + options map[string]interface{}, +) (*pmapper.Metadata, error) { var preprocessOptions pmapper.ImportExportOptions if err := mapper.UnmarshalJSONMap(options, &preprocessOptions); err != nil { - return nil, nil, err + return nil, err } sourceChainID, err := b.pClient.GetBlockchainID(ctx, preprocessOptions.SourceChain) if err != nil { - return nil, nil, err - } - - suggestedFee, err := b.getBaseTxFee(ctx) - if err != nil { - return nil, nil, err + return nil, err } importMetadata := &pmapper.ImportMetadata{ SourceChainID: sourceChainID, } - return &pmapper.Metadata{ImportMetadata: importMetadata}, suggestedFee, nil + return &pmapper.Metadata{ImportMetadata: importMetadata}, nil } -func (b *Backend) buildExportMetadata(ctx context.Context, options map[string]interface{}) (*pmapper.Metadata, *types.Amount, error) { +func (b *Backend) buildExportMetadata( + ctx context.Context, + options map[string]interface{}, +) (*pmapper.Metadata, error) { var preprocessOptions pmapper.ImportExportOptions if err := mapper.UnmarshalJSONMap(options, &preprocessOptions); err != nil { - return nil, nil, err + return nil, err } destinationChainID, err := b.pClient.GetBlockchainID(ctx, preprocessOptions.DestinationChain) if err != nil { - return nil, nil, err - } - - suggestedFee, err := b.getBaseTxFee(ctx) - if err != nil { - return nil, nil, err + return nil, err } exportMetadata := &pmapper.ExportMetadata{ @@ -147,17 +170,19 @@ func (b *Backend) buildExportMetadata(ctx context.Context, options map[string]in DestinationChainID: destinationChainID, } - return &pmapper.Metadata{ExportMetadata: exportMetadata}, suggestedFee, nil + return &pmapper.Metadata{ExportMetadata: exportMetadata}, nil } -func buildStakingMetadata(options map[string]interface{}) (*pmapper.Metadata, *types.Amount, error) { +func (*Backend) buildStakingMetadata( + _ context.Context, + options map[string]interface{}, +) (*pmapper.Metadata, error) { var preprocessOptions pmapper.StakingOptions if err := mapper.UnmarshalJSONMap(options, &preprocessOptions); err != nil { - return nil, nil, err + return nil, err } - zeroAvax := mapper.AtomicAvaxAmount(big.NewInt(0)) - return &pmapper.Metadata{ + stakingMetadata := &pmapper.Metadata{ StakingMetadata: &pmapper.StakingMetadata{ NodeID: preprocessOptions.NodeID, BLSPublicKey: preprocessOptions.BLSPublicKey, @@ -171,18 +196,9 @@ func buildStakingMetadata(options map[string]interface{}) (*pmapper.Metadata, *t Locktime: preprocessOptions.Locktime, Threshold: preprocessOptions.Threshold, }, - }, zeroAvax, nil -} - -func (b *Backend) getBaseTxFee(ctx context.Context) (*types.Amount, error) { - fees, err := b.pClient.GetTxFee(ctx) - if err != nil { - return nil, err } - feeAmount := new(big.Int).SetUint64(uint64(fees.TxFee)) - suggestedFee := mapper.AtomicAvaxAmount(feeAmount) - return suggestedFee, nil + return stakingMetadata, nil } // ConstructionPayloads implements /construction/payloads endpoint for P-chain @@ -261,6 +277,42 @@ func (*Backend) CombineTx(tx common.AvaxTx, signatures []*types.Signature) (comm return pTx, nil } +func (b *Backend) calculateFee(ctx context.Context, tx *txs.Tx) (uint64, error) { + feeCalculator, err := b.PickFeeCalculator(ctx, time.Now()) + if err != nil { + return 0, err + } + fee, err := feeCalculator.CalculateFee(tx.Unsigned) + if err != nil { + return 0, err + } + return fee, nil +} + +func (b *Backend) PickFeeCalculator(ctx context.Context, timestamp time.Time) (txfee.Calculator, error) { + if !b.upgradeConfig.IsEtnaActivated(timestamp) { + return b.NewStaticFeeCalculator(timestamp), nil + } + + _, gasPrice, _, err := b.pClient.GetFeeState(ctx) + if err != nil { + return nil, err + } + return txfee.NewDynamicCalculator( + b.feeConfig.DynamicFeeConfig.Weights, + gasPrice, + ), nil +} + +func (b *Backend) NewStaticFeeCalculator(timestamp time.Time) txfee.Calculator { + feeConfig := b.feeConfig.StaticFeeConfig + if !b.upgradeConfig.IsApricotPhase3Activated(timestamp) { + feeConfig.CreateSubnetTxFee = b.feeConfig.CreateAssetTxFee + feeConfig.CreateBlockchainTxFee = b.feeConfig.CreateAssetTxFee + } + return txfee.NewStaticCalculator(feeConfig) +} + // getTxInputs fetches tx inputs based on the tx type. func getTxInputs( unsignedTx txs.UnsignedTx, @@ -294,6 +346,16 @@ func getTxInputs( return utx.Ins, nil case *txs.TransferSubnetOwnershipTx: return utx.Ins, nil + case *txs.ConvertSubnetToL1Tx: + return utx.Ins, nil + case *txs.RegisterL1ValidatorTx: + return utx.Ins, nil + case *txs.IncreaseL1ValidatorBalanceTx: + return utx.Ins, nil + case *txs.SetL1ValidatorWeightTx: + return utx.Ins, nil + case *txs.DisableL1ValidatorTx: + return utx.Ins, nil case *txs.BaseTx: return utx.Ins, nil default: diff --git a/server/service/backend/pchain/construction_test.go b/server/service/backend/pchain/construction_test.go index fbd80af..3384187 100644 --- a/server/service/backend/pchain/construction_test.go +++ b/server/service/backend/pchain/construction_test.go @@ -7,9 +7,13 @@ import ( "fmt" "math/big" "testing" + "time" - "github.com/ava-labs/avalanchego/api/info" "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/upgrade" + "github.com/ava-labs/avalanchego/utils/formatting" + "github.com/ava-labs/avalanchego/vms/components/gas" + "github.com/ava-labs/avalanchego/vms/platformvm/signer" "github.com/coinbase/rosetta-sdk-go/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" @@ -23,7 +27,6 @@ import ( pmapper "github.com/ava-labs/avalanche-rosetta/mapper/pchain" avaconstants "github.com/ava-labs/avalanchego/utils/constants" - avajson "github.com/ava-labs/avalanchego/utils/json" ) var ( @@ -37,7 +40,11 @@ var ( cAccountIdentifier = &types.AccountIdentifier{Address: "C-fuji123zu6qwhtd9qdd45ryu3j0qtr325gjgddys6u8"} pAccountIdentifier = &types.AccountIdentifier{Address: "P-fuji123zu6qwhtd9qdd45ryu3j0qtr325gjgddys6u8"} - stakeRewardAccount = &types.AccountIdentifier{Address: "P-fuji1ea7dxk8zazpyf8tgc8yg3xyfatey0deqvg9pv2"} + + // ewok account identifiers + // Public Key (hex): 0327448e78ffa8cdb24cf19be0204ad954b1bdb4db8c51183534c1eecf2ebd094e + // Private Key: PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN + ewoqAccountP = &types.AccountIdentifier{Address: "P-fuji18jma8ppw3nhx5r4ap8clazz0dps7rv5u6wmu4t"} cChainID, _ = ids.FromString("yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp") pChainID = ids.Empty @@ -48,11 +55,21 @@ var ( avaxAssetID, _ = ids.FromString("U8iRqJoiJm8xZHAacmvYyZVwqQx6uDNtQeP3CQ6fcgQk3JqnK") - txFee = 1_000_000 - coinID1 = "2ryRVCwNSjEinTViuvDkzX41uQzx3g4babXxZMD46ZV1a9X4Eg:0" + + gasPrice = gas.Price(1000) + + sampleBlsPublicKey = "0x90f8c7a0425d6b433fb1bd95b41ef76221cdd05d922247356912abfb14db1642ae410bd627052b023e1ea7fb49a909ff" + sampleProofOfPossession = "0x8df4c907d6d41db47fbe12834789c10572805e61d32d09411ccc3a1d10ea3a978496d6449eb802bc721fed1571ef251300e83bfd41573947b63d4ce631c8724d98b087d0f10ae05426f52e13656be277531fc459f82400e66822d514073bcb7b" ) +func shouldMockGetFeeState(clientMock *client.MockPChainClient) { + upgradeConfig := upgrade.GetConfig(avalancheNetworkID) + if upgradeConfig.IsEtnaActivated(time.Now()) { + clientMock.EXPECT().GetFeeState(context.Background()).Return(gas.State{}, gasPrice, time.Time{}, nil) + } +} + func buildRosettaSignerJSON(coinIdentifiers []string, signers []*types.AccountIdentifier) string { importSigners := []*common.Signer{} for i, s := range signers { @@ -72,7 +89,6 @@ func TestConstructionDerive(t *testing.T) { parserMock := indexer.NewMockParser(ctrl) parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) backend, err := NewBackend( - service.ModeOnline, pChainMock, parserMock, avaxAssetID, @@ -137,6 +153,9 @@ func TestExportTxConstruction(t *testing.T) { }, } + matches, err := common.MatchOperations(exportOperations) + require.NoError(t, err) + preprocessMetadata := map[string]interface{}{ "destination_chain": constants.CChain.String(), } @@ -144,6 +163,7 @@ func TestExportTxConstruction(t *testing.T) { metadataOptions := map[string]interface{}{ "destination_chain": constants.CChain.String(), "type": pmapper.OpExportAvax, + "matches": matches, } payloadsMetadata := map[string]interface{}{ @@ -193,7 +213,6 @@ func TestExportTxConstruction(t *testing.T) { parserMock := indexer.NewMockParser(ctrl) parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) backend, err := NewBackend( - service.ModeOnline, clientMock, parserMock, avaxAssetID, @@ -216,7 +235,7 @@ func TestExportTxConstruction(t *testing.T) { }) t.Run("metadata endpoint", func(t *testing.T) { - clientMock.EXPECT().GetTxFee(ctx).Return(&info.GetTxFeeResponse{TxFee: avajson.Uint64(txFee)}, nil) + shouldMockGetFeeState(clientMock) clientMock.EXPECT().GetBlockchainID(ctx, constants.PChain.String()).Return(pChainID, nil) clientMock.EXPECT().GetBlockchainID(ctx, constants.CChain.String()).Return(cChainID, nil) @@ -350,6 +369,9 @@ func TestImportTxConstruction(t *testing.T) { }, } + matches, err := common.MatchOperations(importOperations) + require.NoError(t, err) + preprocessMetadata := map[string]interface{}{ "source_chain": constants.CChain.String(), } @@ -357,6 +379,7 @@ func TestImportTxConstruction(t *testing.T) { metadataOptions := map[string]interface{}{ "source_chain": constants.CChain.String(), "type": pmapper.OpImportAvax, + "matches": matches, } payloadsMetadata := map[string]interface{}{ @@ -371,7 +394,7 @@ func TestImportTxConstruction(t *testing.T) { unsignedImportTx := "0x000000000011000000050000000000000000000000000000000000000000000000000000000000000000000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000007000000003b8b87c0000000000000000000000001000000015445cd01d75b4a06b6b41939193c0b1c5544490d00000000000000007fc93d85c6d62c5b2ac0b519c87010ea5294012d1e407030d6acd0021cac10d500000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000005000000003b9aca000000000100000000000000004ce8b27d" unsignedImportTxHash, err := hex.DecodeString("e9114ae12065d1f8631bc40729c806a3a4793de714001bfee66482f520dc1865") require.NoError(t, err) - wrappedUnsignedImportTx := `{"tx":"` + unsignedImportTx + `","signers":` + importSigners + `}` //nolint:goconst + wrappedUnsignedImportTx := `{"tx":"` + unsignedImportTx + `","signers":` + importSigners + `}` signingPayloads := []*types.SigningPayload{ { @@ -404,7 +427,6 @@ func TestImportTxConstruction(t *testing.T) { parserMock := indexer.NewMockParser(ctrl) parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) backend, err := NewBackend( - service.ModeOnline, clientMock, parserMock, avaxAssetID, @@ -427,7 +449,7 @@ func TestImportTxConstruction(t *testing.T) { }) t.Run("metadata endpoint", func(t *testing.T) { - clientMock.EXPECT().GetTxFee(ctx).Return(&info.GetTxFeeResponse{TxFee: avajson.Uint64(txFee)}, nil) + shouldMockGetFeeState(clientMock) clientMock.EXPECT().GetBlockchainID(ctx, constants.PChain.String()).Return(pChainID, nil) clientMock.EXPECT().GetBlockchainID(ctx, constants.CChain.String()).Return(cChainID, nil) @@ -534,13 +556,15 @@ func TestAddValidatorTxConstruction(t *testing.T) { startTime := uint64(1659592163) endTime := startTime + 14*86400 shares := uint32(200000) + pop, err := parsePoP(sampleBlsPublicKey, sampleProofOfPossession) + require.NoError(t, err) operations := []*types.Operation{ { OperationIdentifier: &types.OperationIdentifier{Index: 0}, RelatedOperations: nil, - Type: pmapper.OpAddValidator, - Account: pAccountIdentifier, + Type: pmapper.OpAddPermissionlessValidator, + Account: ewoqAccountP, Amount: mapper.AtomicAvaxAmount(big.NewInt(-2_000_000_000_000)), CoinChange: &types.CoinChange{ CoinIdentifier: &types.CoinIdentifier{Identifier: coinID1}, @@ -554,8 +578,8 @@ func TestAddValidatorTxConstruction(t *testing.T) { }, { OperationIdentifier: &types.OperationIdentifier{Index: 1}, - Type: pmapper.OpAddValidator, - Account: pAccountIdentifier, + Type: pmapper.OpAddPermissionlessValidator, + Account: ewoqAccountP, Amount: mapper.AtomicAvaxAmount(big.NewInt(2_000_000_000_000)), Metadata: map[string]interface{}{ "type": pmapper.OpTypeStakeOutput, @@ -567,27 +591,36 @@ func TestAddValidatorTxConstruction(t *testing.T) { "staking_end_time": endTime, "validator_node_id": nodeID, "subnet_id": pChainID.String(), - "delegation_rewards_owner": []string{stakeRewardAccount.Address}, - "validator_rewards_owner": []string{stakeRewardAccount.Address}, + "delegation_rewards_owner": []string{ewoqAccountP.Address}, + "validator_rewards_owner": []string{ewoqAccountP.Address}, + "signer": pop, }, }, } + matches, err := common.MatchOperations(operations) + require.NoError(t, err) + preprocessMetadata := map[string]interface{}{ - "node_id": nodeID, - "start": startTime, - "end": endTime, - "shares": shares, - "reward_addresses": []string{stakeRewardAccount.Address}, + "node_id": nodeID, + "start": startTime, + "end": endTime, + "shares": shares, + "reward_addresses": []string{ewoqAccountP.Address}, + "bls_public_key": sampleBlsPublicKey, + "bls_proof_of_possession": sampleProofOfPossession, } metadataOptions := map[string]interface{}{ - "type": pmapper.OpAddValidator, - "node_id": nodeID, - "start": startTime, - "end": endTime, - "shares": shares, - "reward_addresses": []string{stakeRewardAccount.Address}, + "type": pmapper.OpAddPermissionlessValidator, + "node_id": nodeID, + "start": startTime, + "end": endTime, + "shares": shares, + "reward_addresses": []string{ewoqAccountP.Address}, + "bls_public_key": sampleBlsPublicKey, + "bls_proof_of_possession": sampleProofOfPossession, + "matches": matches, } payloadsMetadata := map[string]interface{}{ @@ -600,38 +633,38 @@ func TestAddValidatorTxConstruction(t *testing.T) { "locktime": 0.0, "subnet": "", "threshold": 1.0, - "reward_addresses": []interface{}{stakeRewardAccount.Address}, + "reward_addresses": []interface{}{ewoqAccountP.Address}, "delegator_reward_addresses": nil, - "bls_proof_of_possession": "", - "bls_public_key": "", + "bls_proof_of_possession": sampleProofOfPossession, + "bls_public_key": sampleBlsPublicKey, } - signers := []*types.AccountIdentifier{pAccountIdentifier} + signers := []*types.AccountIdentifier{ewoqAccountP} stakeSigners := buildRosettaSignerJSON([]string{coinID1}, signers) - unsignedTx := "0x00000000000c0000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000005000001d1a94a200000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e3000001d1a94a2000000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000007000001d1a94a2000000000000000000000000001000000015445cd01d75b4a06b6b41939193c0b1c5544490d0000000b00000000000000000000000100000001cf7cd358e2e882449d68c1c8889889eaf247b72000030d4000000000482f5298" - unsignedTxHash, err := hex.DecodeString("00c9e13de9f32b5808e54c024b15bdeee5925cbb918d90a272def046cedae800") + unsignedTx := "0x0000000000190000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000005000001d1a94a200000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e3000001d1a94a200000000000000000000000000000000000000000000000000000000000000000000000001c90f8c7a0425d6b433fb1bd95b41ef76221cdd05d922247356912abfb14db1642ae410bd627052b023e1ea7fb49a909ff8df4c907d6d41db47fbe12834789c10572805e61d32d09411ccc3a1d10ea3a978496d6449eb802bc721fed1571ef251300e83bfd41573947b63d4ce631c8724d98b087d0f10ae05426f52e13656be277531fc459f82400e66822d514073bcb7b000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000007000001d1a94a2000000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c0000000b000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c0000000b000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c00030d4000000000354ff86b" + unsignedTxHash, err := hex.DecodeString("eb8d33435e683be27907d990c374e64680db91310f3c66e0220f404b5d2433a3") require.NoError(t, err) wrappedUnsignedTx := `{"tx":"` + unsignedTx + `","signers":` + stakeSigners + `}` signingPayloads := []*types.SigningPayload{ { - AccountIdentifier: pAccountIdentifier, + AccountIdentifier: ewoqAccountP, Bytes: unsignedTxHash, SignatureType: types.EcdsaRecovery, }, } - signedTx := "0x00000000000c0000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000005000001d1a94a200000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e3000001d1a94a2000000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000007000001d1a94a2000000000000000000000000001000000015445cd01d75b4a06b6b41939193c0b1c5544490d0000000b00000000000000000000000100000001cf7cd358e2e882449d68c1c8889889eaf247b72000030d400000000100000009000000017403e32bb967e71902a988b7da635b4bca2475eedbfd23176610a88162f3a92f20b61f2185825b04b7f8ee8c76427c8dc80eb6091f9e594ef259a59856e5401b01e228f820" - signedTxSignature, err := hex.DecodeString("7403e32bb967e71902a988b7da635b4bca2475eedbfd23176610a88162f3a92f20b61f2185825b04b7f8ee8c76427c8dc80eb6091f9e594ef259a59856e5401b01") + signedTx := "0x0000000000190000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000005000001d1a94a200000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e3000001d1a94a200000000000000000000000000000000000000000000000000000000000000000000000001c90f8c7a0425d6b433fb1bd95b41ef76221cdd05d922247356912abfb14db1642ae410bd627052b023e1ea7fb49a909ff8df4c907d6d41db47fbe12834789c10572805e61d32d09411ccc3a1d10ea3a978496d6449eb802bc721fed1571ef251300e83bfd41573947b63d4ce631c8724d98b087d0f10ae05426f52e13656be277531fc459f82400e66822d514073bcb7b000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa00000007000001d1a94a2000000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c0000000b000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c0000000b000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c00030d4000000001000000090000000137d7f04741b3492cb9ad8dbeda64513e569a049a5e5fb5d9c53e27bdfa428acb5b526a45fb9de09b38f1d2f4bb7c0a35bfa753e46c5cc339c0d9a0d9ed0aa415019f1a796e" + signedTxSignature, err := hex.DecodeString("37d7f04741b3492cb9ad8dbeda64513e569a049a5e5fb5d9c53e27bdfa428acb5b526a45fb9de09b38f1d2f4bb7c0a35bfa753e46c5cc339c0d9a0d9ed0aa41501") require.NoError(t, err) - signedTxHash := "2Exfhp6qjdNz8HvECFH2sQxvUxJsaygZjWriY8xh3BvBXWh7Nb" + signedTxHash := "7MgvKBj4pWRFoUosicfdzcJf3ejFnnE4LkSPNNfZDCzJ5SVwE" wrappedSignedTx := `{"tx":"` + signedTx + `","signers":` + stakeSigners + `}` signatures := []*types.Signature{{ SigningPayload: &types.SigningPayload{ - AccountIdentifier: cAccountIdentifier, + AccountIdentifier: ewoqAccountP, Bytes: unsignedTxHash, SignatureType: types.EcdsaRecovery, }, @@ -645,7 +678,6 @@ func TestAddValidatorTxConstruction(t *testing.T) { parserMock := indexer.NewMockParser(ctrl) parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) backend, err := NewBackend( - service.ModeOnline, clientMock, parserMock, avaxAssetID, @@ -668,6 +700,7 @@ func TestAddValidatorTxConstruction(t *testing.T) { }) t.Run("metadata endpoint", func(t *testing.T) { + shouldMockGetFeeState(clientMock) clientMock.EXPECT().GetBlockchainID(ctx, constants.PChain.String()).Return(pChainID, nil) resp, err := backend.ConstructionMetadata( @@ -777,8 +810,8 @@ func TestAddDelegatorTxConstruction(t *testing.T) { { OperationIdentifier: &types.OperationIdentifier{Index: 0}, RelatedOperations: nil, - Type: pmapper.OpAddDelegator, - Account: pAccountIdentifier, + Type: pmapper.OpAddPermissionlessDelegator, + Account: ewoqAccountP, Amount: mapper.AtomicAvaxAmount(big.NewInt(-25_000_000_000)), CoinChange: &types.CoinChange{ CoinIdentifier: &types.CoinIdentifier{Identifier: coinID1}, @@ -792,8 +825,8 @@ func TestAddDelegatorTxConstruction(t *testing.T) { }, { OperationIdentifier: &types.OperationIdentifier{Index: 1}, - Type: pmapper.OpAddDelegator, - Account: pAccountIdentifier, + Type: pmapper.OpAddPermissionlessDelegator, + Account: ewoqAccountP, Amount: mapper.AtomicAvaxAmount(big.NewInt(25_000_000_000)), Metadata: map[string]interface{}{ "type": pmapper.OpTypeStakeOutput, @@ -805,24 +838,28 @@ func TestAddDelegatorTxConstruction(t *testing.T) { "staking_end_time": endTime, "validator_node_id": nodeID, "subnet_id": pChainID.String(), - "delegator_rewards_owner": []string{stakeRewardAccount.Address}, + "delegator_rewards_owner": []string{ewoqAccountP.Address}, }, }, } + matches, err := common.MatchOperations(operations) + require.NoError(t, err) + preprocessMetadata := map[string]interface{}{ "node_id": nodeID, "start": startTime, "end": endTime, - "reward_addresses": []string{stakeRewardAccount.Address}, + "reward_addresses": []string{ewoqAccountP.Address}, } metadataOptions := map[string]interface{}{ - "type": pmapper.OpAddDelegator, + "type": pmapper.OpAddPermissionlessDelegator, "node_id": nodeID, "start": startTime, "end": endTime, - "reward_addresses": []string{stakeRewardAccount.Address}, + "reward_addresses": []string{ewoqAccountP.Address}, + "matches": matches, } payloadsMetadata := map[string]interface{}{ @@ -834,39 +871,39 @@ func TestAddDelegatorTxConstruction(t *testing.T) { "shares": 0.0, "locktime": 0.0, "threshold": 1.0, - "reward_addresses": []interface{}{stakeRewardAccount.Address}, + "reward_addresses": []interface{}{ewoqAccountP.Address}, "bls_proof_of_possession": "", "bls_public_key": "", "delegator_reward_addresses": nil, "subnet": "", } - signers := []*types.AccountIdentifier{pAccountIdentifier} + signers := []*types.AccountIdentifier{ewoqAccountP} stakeSigners := buildRosettaSignerJSON([]string{coinID1}, signers) - unsignedTx := "0x00000000000e0000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000500000005d21dba0000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e300000005d21dba00000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000700000005d21dba00000000000000000000000001000000015445cd01d75b4a06b6b41939193c0b1c5544490d0000000b00000000000000000000000100000001cf7cd358e2e882449d68c1c8889889eaf247b72000000000eece5b91" - unsignedTxHash, err := hex.DecodeString("832a55223ef63d8e39d85025df08c9ae82d0f185d4a0f60b14dec360d721b9f4") + unsignedTx := "0x00000000001a0000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000500000005d21dba0000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e300000005d21dba000000000000000000000000000000000000000000000000000000000000000000000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000700000005d21dba00000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c0000000b000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c00000000ebba4acb" + unsignedTxHash, err := hex.DecodeString("b7c169b5608c1b625e9bb0d487ae350f7f4fccb8e9a7ce39ba472aff69c9e175") require.NoError(t, err) wrappedUnsignedTx := `{"tx":"` + unsignedTx + `","signers":` + stakeSigners + `}` signingPayloads := []*types.SigningPayload{ { - AccountIdentifier: pAccountIdentifier, + AccountIdentifier: ewoqAccountP, Bytes: unsignedTxHash, SignatureType: types.EcdsaRecovery, }, } - signedTx := "0x00000000000e0000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000500000005d21dba0000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e300000005d21dba00000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000700000005d21dba00000000000000000000000001000000015445cd01d75b4a06b6b41939193c0b1c5544490d0000000b00000000000000000000000100000001cf7cd358e2e882449d68c1c8889889eaf247b7200000000100000009000000017403e32bb967e71902a988b7da635b4bca2475eedbfd23176610a88162f3a92f20b61f2185825b04b7f8ee8c76427c8dc80eb6091f9e594ef259a59856e5401b0143d545c4" - signedTxSignature, err := hex.DecodeString("7403e32bb967e71902a988b7da635b4bca2475eedbfd23176610a88162f3a92f20b61f2185825b04b7f8ee8c76427c8dc80eb6091f9e594ef259a59856e5401b01") + signedTx := "0x00000000001a0000000500000000000000000000000000000000000000000000000000000000000000000000000000000001f52a5a6dd8f1b3fe05204bdab4f6bcb5a7059f88d0443c636f6c158f838dd1a8000000003d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000500000005d21dba0000000001000000000000000077e1d5c6c289c49976f744749d54369d2129d7500000000062eb5de30000000062fdd2e300000005d21dba000000000000000000000000000000000000000000000000000000000000000000000000013d9bdac0ed1d761330cf680efdeb1a42159eb387d6d2950c96f7d28f61bbe2aa0000000700000005d21dba00000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c0000000b000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c000000010000000900000001ec8550b25b2a82364ae4944b52ed16c645fc51fa3f239fd9430912760a70f6795381ea7d76a59e22443934e015f695a418c30666415773206e1a8e96bc0ff9bb01a538423f" + signedTxSignature, err := hex.DecodeString("ec8550b25b2a82364ae4944b52ed16c645fc51fa3f239fd9430912760a70f6795381ea7d76a59e22443934e015f695a418c30666415773206e1a8e96bc0ff9bb01") require.NoError(t, err) - signedTxHash := "2eppnnog3TwkBTyQKMh44wz5bUy4geDETEeZVCz7m7uMnjGeCP" + signedTxHash := "2qiPWNr3TgsWbiZLWMyVRQQqgLiq4cmvg7e7gsUjgmVZZwtgsD" wrappedSignedTx := `{"tx":"` + signedTx + `","signers":` + stakeSigners + `}` signatures := []*types.Signature{{ SigningPayload: &types.SigningPayload{ - AccountIdentifier: cAccountIdentifier, + AccountIdentifier: ewoqAccountP, Bytes: unsignedTxHash, SignatureType: types.EcdsaRecovery, }, @@ -880,7 +917,6 @@ func TestAddDelegatorTxConstruction(t *testing.T) { parserMock := indexer.NewMockParser(ctrl) parserMock.EXPECT().GetGenesisBlock(ctx).Return(dummyGenesis, nil) backend, err := NewBackend( - service.ModeOnline, clientMock, parserMock, avaxAssetID, @@ -903,6 +939,7 @@ func TestAddDelegatorTxConstruction(t *testing.T) { }) t.Run("metadata endpoint", func(t *testing.T) { + shouldMockGetFeeState(clientMock) clientMock.EXPECT().GetBlockchainID(ctx, constants.PChain.String()).Return(pChainID, nil) resp, err := backend.ConstructionMetadata( @@ -1012,3 +1049,18 @@ func marshalSigningPayloads(payloads []*types.SigningPayload) string { return string(bytes) } + +func parsePoP(blsPublicKey, blsProofOfPossession string) (*signer.ProofOfPossession, error) { + publicKeyBytes, err := formatting.Decode(formatting.HexNC, blsPublicKey) + if err != nil { + return nil, err + } + popBytes, err := formatting.Decode(formatting.HexNC, blsProofOfPossession) + if err != nil { + return nil, err + } + pop := &signer.ProofOfPossession{} + copy(pop.PublicKey[:], publicKeyBytes) + copy(pop.ProofOfPossession[:], popBytes) + return pop, nil +} diff --git a/server/service/backend/pchain/indexer/parser.go b/server/service/backend/pchain/indexer/parser.go index 88ddee5..86aa7c2 100644 --- a/server/service/backend/pchain/indexer/parser.go +++ b/server/service/backend/pchain/indexer/parser.go @@ -202,7 +202,7 @@ func (p *parser) parseProposerBlock(blkBytes []byte) (*ParsedBlock, error) { pChainBlkBytes := blkBytes proposerTime := noProposerTime - proBlk, err := proposervmblock.Parse(blkBytes, time.Time{}) + proBlk, err := proposervmblock.ParseWithoutVerification(blkBytes) if err == nil { // inner proposerVM bytes, to be parsed as P-chain block pChainBlkBytes = proBlk.Block() diff --git a/server/service/backend/pchain/network.go b/server/service/backend/pchain/network.go index ba68dbb..7bb6cd2 100644 --- a/server/service/backend/pchain/network.go +++ b/server/service/backend/pchain/network.go @@ -3,6 +3,7 @@ package pchain import ( "context" + "github.com/ava-labs/avalanchego/ids" "github.com/coinbase/rosetta-sdk-go/types" "github.com/ava-labs/avalanche-rosetta/constants" @@ -21,7 +22,7 @@ func (b *Backend) NetworkIdentifier() *types.NetworkIdentifier { // NetworkStatus implements /network/status endpoint for P-chain func (b *Backend) NetworkStatus(ctx context.Context, _ *types.NetworkRequest) (*types.NetworkStatusResponse, *types.Error) { // Fetch peers - infoPeers, err := b.pClient.Peers(ctx) + infoPeers, err := b.pClient.Peers(ctx, []ids.NodeID{}) if err != nil { return nil, service.WrapError(service.ErrClientError, err) } diff --git a/server/service/config.go b/server/service/config.go index e70b76e..9b7cde4 100644 --- a/server/service/config.go +++ b/server/service/config.go @@ -3,7 +3,6 @@ package service import ( "math/big" - "github.com/ava-labs/coreth/params" "github.com/coinbase/rosetta-sdk-go/types" ethtypes "github.com/ava-labs/coreth/core/types" @@ -59,16 +58,5 @@ func (c Config) IsTokenListEmpty() bool { // Signer returns an eth signer object for a given chain func (c Config) Signer() ethtypes.Signer { - if c.ChainID != nil { - if c.ChainID.Cmp(params.AvalancheMainnetChainID) == 0 { - return ethtypes.LatestSigner(params.AvalancheMainnetChainConfig) - } - if c.ChainID.Cmp(params.AvalancheFujiChainID) == 0 { - return ethtypes.LatestSigner(params.AvalancheFujiChainConfig) - } - if c.ChainID.Cmp(params.AvalancheLocalChainID) == 0 { - return ethtypes.LatestSigner(params.AvalancheLocalChainConfig) - } - } - return ethtypes.LatestSignerForChainID(c.ChainID) + return ethtypes.NewCancunSigner(c.ChainID) } diff --git a/server/service/config_test.go b/server/service/config_test.go index 3d3ddb3..00d9599 100644 --- a/server/service/config_test.go +++ b/server/service/config_test.go @@ -37,6 +37,6 @@ func TestConfig(t *testing.T) { cfg := Config{ ChainID: params.AvalancheMainnetChainID, } - require.IsType(t, ethtypes.NewLondonSigner(params.AvalancheMainnetChainID), cfg.Signer()) + require.IsType(t, ethtypes.NewCancunSigner(params.AvalancheMainnetChainID), cfg.Signer()) }) } diff --git a/server/service/rosetta.go b/server/service/rosetta.go index 99d496f..747a3fb 100644 --- a/server/service/rosetta.go +++ b/server/service/rosetta.go @@ -14,6 +14,6 @@ var NodeVersion = fmt.Sprintf( ) const ( - MiddlewareVersion = "0.1.42" + MiddlewareVersion = "0.1.46" BlockchainName = "flare" ) diff --git a/server/service/service_network.go b/server/service/service_network.go index 8bca36a..03fe6d7 100644 --- a/server/service/service_network.go +++ b/server/service/service_network.go @@ -4,6 +4,7 @@ import ( "context" "math/big" + "github.com/ava-labs/avalanchego/ids" "github.com/coinbase/rosetta-sdk-go/server" "github.com/coinbase/rosetta-sdk-go/types" "github.com/coinbase/rosetta-sdk-go/utils" @@ -81,7 +82,7 @@ func (s *NetworkService) NetworkStatus( } // Fetch peers - infoPeers, err := s.client.Peers(ctx) + infoPeers, err := s.client.Peers(ctx, []ids.NodeID{}) if err != nil { return nil, WrapError(ErrClientError, err) } diff --git a/test-localflare.sh b/test-localflare.sh index d14a207..05746cd 100755 --- a/test-localflare.sh +++ b/test-localflare.sh @@ -77,7 +77,7 @@ log_info "Bootstrapping P-chain using go-flare test scripts..." # Download the test scripts from go-flare repository rm -rf tmp && mkdir tmp -git clone --depth=1 --branch=v1.11.13-rc0 https://github.com/flare-foundation/go-flare.git tmp/go-flare +git clone --depth=1 --branch=v1.12.0 https://github.com/flare-foundation/go-flare.git tmp/go-flare npm install -g ts-node yarn --cwd "tmp/go-flare/test-scripts" yarn --cwd "tmp/go-flare/test-scripts" run p-chain-import