diff --git a/go.mod b/go.mod index 1774cd1..97507f6 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,8 @@ module github.com/cerc-io/eth-ipfs-state-validator/v4 go 1.18 require ( - github.com/cerc-io/go-eth-state-node-iterator v1.1.11 - github.com/cerc-io/ipfs-ethdb/v4 v4.0.12-alpha - github.com/ethereum/go-ethereum v1.11.4 + github.com/cerc-io/ipfs-ethdb/v4 v4.0.13-alpha + github.com/ethereum/go-ethereum v1.11.5 github.com/ipfs/go-blockservice v0.5.0 github.com/ipfs/go-cid v0.3.2 github.com/ipfs/go-ipfs-blockstore v1.2.0 @@ -77,6 +76,7 @@ require ( github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/holiman/uint256 v1.2.0 // indirect github.com/huin/goupnp v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect @@ -238,4 +238,4 @@ require ( lukechampine.com/blake3 v1.1.7 // indirect ) -replace github.com/ethereum/go-ethereum v1.11.4 => github.com/cerc-io/go-ethereum v1.11.4-statediff-4.3.9-alpha +replace github.com/ethereum/go-ethereum v1.11.5 => github.com/cerc-io/go-ethereum v1.11.5-statediff-4.3.9-alpha diff --git a/go.sum b/go.sum index 7925cc4..f14ec66 100644 --- a/go.sum +++ b/go.sum @@ -108,9 +108,9 @@ github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcug github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -130,12 +130,10 @@ github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8 github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/ceramicnetwork/go-dag-jose v0.1.0 h1:yJ/HVlfKpnD3LdYP03AHyTvbm3BpPiz2oZiOeReJRdU= -github.com/cerc-io/go-eth-state-node-iterator v1.1.11 h1:KrrmEO4byx37sZmq4QmJ8PxU6bfUeH48nQOiZBzPcdw= -github.com/cerc-io/go-eth-state-node-iterator v1.1.11/go.mod h1:te4Jw+t3Rpykj/ZdCTXkKItA/8oZyZHjV7UpOaneV8o= -github.com/cerc-io/go-ethereum v1.11.4-statediff-4.3.9-alpha h1:6sUU9DD33TK3eOeDd9NuCmDXNYLOd9FsgHWyn/tmtwc= -github.com/cerc-io/go-ethereum v1.11.4-statediff-4.3.9-alpha/go.mod h1:Q4LXiMcJCctVW1uoIuF59VRCW1W+zrc5GkewoARwAmk= -github.com/cerc-io/ipfs-ethdb/v4 v4.0.12-alpha h1:E527/yxMWwg12ov9txMN7N26ZJaULB5a9Wb6kjgdBuw= -github.com/cerc-io/ipfs-ethdb/v4 v4.0.12-alpha/go.mod h1:sb5vGA6+trn1ss8c4YECz9dA5+0iNFaqZHwgiBfiPho= +github.com/cerc-io/go-ethereum v1.11.5-statediff-4.3.9-alpha h1:nzy/bUmzq8ImRIxchClNoO7Bytom8ETDuOFHzuHFBXs= +github.com/cerc-io/go-ethereum v1.11.5-statediff-4.3.9-alpha/go.mod h1:Q4LXiMcJCctVW1uoIuF59VRCW1W+zrc5GkewoARwAmk= +github.com/cerc-io/ipfs-ethdb/v4 v4.0.13-alpha h1:9UBH+8rOmXTgO9w4qxqc8dHxBi5/z1wjz9tOxzrMDyY= +github.com/cerc-io/ipfs-ethdb/v4 v4.0.13-alpha/go.mod h1:HKzAT0Rvayc7XxKdTHubT40toKsCrqRyF9+F4fECcTc= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -423,6 +421,7 @@ github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:Fecb github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= @@ -460,6 +459,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= 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.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= +github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= diff --git a/pkg/validator.go b/pkg/validator.go index 485202f..8782d6c 100644 --- a/pkg/validator.go +++ b/pkg/validator.go @@ -20,9 +20,10 @@ import ( "bytes" "context" "fmt" - "github.com/spf13/viper" "time" + "github.com/spf13/viper" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" @@ -36,10 +37,10 @@ import ( log "github.com/sirupsen/logrus" "golang.org/x/sync/errgroup" - nodeiter "github.com/cerc-io/go-eth-state-node-iterator" - "github.com/cerc-io/go-eth-state-node-iterator/tracker" ipfsethdb "github.com/cerc-io/ipfs-ethdb/v4" pgipfsethdb "github.com/cerc-io/ipfs-ethdb/v4/postgres" + nodeiter "github.com/ethereum/go-ethereum/trie/concurrent_iterator" + "github.com/ethereum/go-ethereum/trie/concurrent_iterator/tracker" ) // Validator is used for validating Ethereum state and storage tries on PG-IPFS