Compare commits

...

11 Commits

Author SHA1 Message Date
08b34fb733 Update to Geth 1.14 (#24)
Reviewed-on: #24
2024-06-24 16:43:26 +00:00
Ian Norden
efd956b58a
Merge pull request #23 from cerc-io/ian_dev
use stock v1.11.5 geth version
2023-03-30 16:30:03 -05:00
i-norden
0dd2c39312 use stock v1.11.5 geth version 2023-03-30 16:18:24 -05:00
Michael
d8950625d7
Merge pull request #21 from cerc-io/rebase-1.11.4-wip
version update for geth 1.11.4 statediffing 4.3.8 and comment cleanup
2023-03-17 09:41:54 -04:00
Michael Shaw
0abadf55e0 version update for geth 1.11.4 statediffing 4.3.8 and comment cleanup 2023-03-17 09:41:01 -04:00
Michael
2f12715789
Merge pull request #20 from cerc-io/rebase-1.11.2-wip
update for geth 1.11.2 statediff rebase and cerc-io refactoring
2023-03-10 13:25:39 -05:00
Michael Shaw
e2432b7c97 update for geth 1.11.2 statediff rebase and cerc-io refactoring 2023-03-10 13:00:21 -05:00
Michael
93baf6bc09
Merge pull request #19 from cerc-io/v0.1.9-wip
messed up go.mod declaration after cerc migration
2022-11-07 15:41:31 -05:00
Michael Shaw
88d7dabca6 messed up go.mod declaration after cerc migration 2022-11-07 15:18:34 -05:00
Michael
ab847166c4
Merge pull request #18 from cerc-io/v0.1.9-wip
dependency update for geth 1.10.26 release
2022-11-07 11:40:36 -05:00
Michael Shaw
473d62b873 dependency update for geth 1.10.26 release 2022-11-07 11:39:00 -05:00
7 changed files with 258 additions and 916 deletions

View File

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
"os" "os"
leveldb_ethdb_rpc "github.com/vulcanize/leveldb-ethdb-rpc/pkg" leveldb_ethdb_rpc "github.com/cerc-io/leveldb-ethdb-rpc/pkg"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -26,9 +26,9 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
leveldb_ethdb_rpc "github.com/vulcanize/leveldb-ethdb-rpc/pkg" leveldb_ethdb_rpc "github.com/cerc-io/leveldb-ethdb-rpc/pkg"
srpc "github.com/vulcanize/leveldb-ethdb-rpc/pkg/rpc" srpc "github.com/cerc-io/leveldb-ethdb-rpc/pkg/rpc"
"github.com/vulcanize/leveldb-ethdb-rpc/version" "github.com/cerc-io/leveldb-ethdb-rpc/version"
) )
var ( var (

152
go.mod
View File

@ -1,130 +1,114 @@
module github.com/vulcanize/leveldb-ethdb-rpc module github.com/cerc-io/leveldb-ethdb-rpc
go 1.18 go 1.21
require ( require (
github.com/ethereum/go-ethereum v1.10.25 github.com/ethereum/go-ethereum v1.14.5
github.com/sirupsen/logrus v1.7.0 github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.1.1 github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.10.1 github.com/spf13/viper v1.10.1
) )
require ( require (
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/VictoriaMetrics/fastcache v1.12.2 // 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.2.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v1.1.0 // indirect
github.com/cockroachdb/redact v1.1.5 // 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/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c // indirect
github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/deepmap/oapi-codegen v1.8.2 // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/ferranbt/fastssz v0.1.2 // indirect
github.com/fjl/memsize v0.0.2 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/georgysavva/scany v0.2.9 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-kit/kit v0.10.0 // indirect github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/gofrs/flock v0.8.1 // indirect
github.com/go-stack/stack v1.8.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/gogo/protobuf v1.3.1 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v4 v4.3.0 // indirect github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.3.0 // indirect github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect github.com/gorilla/websocket v1.4.2 // indirect
github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/graph-gophers/graphql-go v1.3.0 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect
github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.0 // indirect github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.0.3 // indirect github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/influxdata/influxdb v1.8.3 // indirect
github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect
github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/go-block-format v0.0.3 // indirect
github.com/ipfs/go-cid v0.2.0 // indirect
github.com/ipfs/go-datastore v0.5.0 // indirect
github.com/ipfs/go-ipfs-blockstore v1.2.0 // indirect
github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
github.com/ipfs/go-ipld-format v0.4.0 // indirect
github.com/ipfs/go-log v0.0.1 // indirect
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.10.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.8.1 // indirect
github.com/jackc/pgx/v4 v4.13.0 // indirect
github.com/jackc/puddle v1.1.3 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect github.com/klauspost/compress v1.15.15 // indirect
github.com/jmoiron/sqlx v1.2.0 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/lib/pq v1.10.6 // indirect github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multihash v0.1.0 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect
github.com/pganalyze/pg_query_go/v2 v2.1.0 // indirect
github.com/pkg/errors v0.9.1 // 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/tsdb v0.10.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect
github.com/rjeczalik/notify v0.9.1 // indirect github.com/prometheus/common v0.39.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/rs/cors v1.7.0 // indirect github.com/rs/cors v1.7.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.6.0 // indirect github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 // indirect github.com/status-im/keycard-go v0.2.0 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.7.2 // indirect
github.com/subosito/gotenv v1.2.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/thoas/go-funk v0.9.2 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/go-sysconf v0.3.6 // indirect github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef // indirect github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/urfave/cli/v2 v2.10.2 // indirect
github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.uber.org/atomic v1.6.0 // indirect golang.org/x/crypto v0.22.0 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.3.7 // indirect golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect
lukechampine.com/blake3 v1.1.6 // indirect
) )
replace github.com/ethereum/go-ethereum v1.10.25 => github.com/vulcanize/go-ethereum v1.10.25-statediff-4.2.1-alpha

986
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
package main package main
import "github.com/vulcanize/leveldb-ethdb-rpc/cmd" import "github.com/cerc-io/leveldb-ethdb-rpc/cmd"
func main() { func main() {
cmd.Execute() cmd.Execute()

View File

@ -97,16 +97,12 @@ func (s *LevelDBBackend) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int
return 0, errWriteNotAllowed return 0, errWriteNotAllowed
} }
func (s *LevelDBBackend) TruncateAncients(n uint64) error { func (s *LevelDBBackend) TruncateHead(n uint64) (uint64, error) {
return errWriteNotAllowed return 0, errWriteNotAllowed
} }
func (s *LevelDBBackend) TruncateHead(n uint64) error { func (s *LevelDBBackend) TruncateTail(n uint64) (uint64, error) {
return errWriteNotAllowed return 0, errWriteNotAllowed
}
func (s *LevelDBBackend) TruncateTail(n uint64) error {
return errWriteNotAllowed
} }
func (s *LevelDBBackend) Sync() error { func (s *LevelDBBackend) Sync() error {

View File

@ -186,9 +186,9 @@ func (d *DatabaseClient) AncientSize(kind string) (uint64, error) {
// AncientRange retrieves all the items in a range, starting from the index 'start'. // AncientRange retrieves all the items in a range, starting from the index 'start'.
// It will return // It will return
// - at most 'count' items, // - at most 'count' items,
// - at least 1 item (even if exceeding the maxBytes), but will otherwise // - at least 1 item (even if exceeding the maxBytes), but will otherwise
// return as many items as fit into maxBytes. // return as many items as fit into maxBytes.
func (d *DatabaseClient) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error) { func (d *DatabaseClient) AncientRange(kind string, start, count, maxBytes uint64) ([][]byte, error) {
var resp [][]byte var resp [][]byte
err := d.client.Call(&resp, "leveldb_ancientRange", kind, start, count, maxBytes) err := d.client.Call(&resp, "leveldb_ancientRange", kind, start, count, maxBytes)
@ -212,14 +212,14 @@ func (d *DatabaseClient) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int
// TruncateHead satisfies the ethdb.AncientWriter interface. // TruncateHead satisfies the ethdb.AncientWriter interface.
// TruncateHead discards all but the first n ancient data from the ancient store. // TruncateHead discards all but the first n ancient data from the ancient store.
func (d *DatabaseClient) TruncateHead(n uint64) error { func (d *DatabaseClient) TruncateHead(n uint64) (uint64, error) {
return errNotSupported return 0, errNotSupported
} }
// TruncateTail satisfies the ethdb.AncientWriter interface. // TruncateTail satisfies the ethdb.AncientWriter interface.
// TruncateTail discards the first n ancient data from the ancient store. // TruncateTail discards the first n ancient data from the ancient store.
func (d *DatabaseClient) TruncateTail(n uint64) error { func (d *DatabaseClient) TruncateTail(n uint64) (uint64, error) {
return errNotSupported return 0, errNotSupported
} }
// Sync satisfies the ethdb.AncientWriter interface // Sync satisfies the ethdb.AncientWriter interface