Compare commits

..

No commits in common. "main" and "release-0.1.1" have entirely different histories.

9 changed files with 1072 additions and 364 deletions

View File

@ -1,29 +0,0 @@
name: Notion Sync
on:
workflow_dispatch:
issues:
types:
[
opened,
edited,
labeled,
unlabeled,
assigned,
unassigned,
milestoned,
demilestoned,
reopened,
closed,
]
jobs:
notion_job:
runs-on: ubuntu-latest
name: Add GitHub Issues to Notion
steps:
- name: Add GitHub Issues to Notion
uses: vulcanize/notion-github-action@v1.2.4-issueid
with:
notion-token: ${{ secrets.NOTION_TOKEN }}
notion-db: ${{ secrets.NOTION_DATABASE }}

View File

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

View File

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

122
go.mod
View File

@ -1,114 +1,20 @@
module github.com/cerc-io/leveldb-ethdb-rpc
module github.com/vulcanize/leveldb-ethdb-rpc
go 1.21
go 1.16
require (
github.com/ethereum/go-ethereum v1.14.5
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.10.1
)
require (
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/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/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/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/deepmap/oapi-codegen v1.8.2 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // 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/getsentry/sentry-go v0.18.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
github.com/ethereum/go-ethereum v1.10.17
github.com/go-kit/kit v0.10.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/graph-gophers/graphql-go v1.3.0 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // 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/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.0.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/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // 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/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mitchellh/pointerstructure v1.2.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.13.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.14.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/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/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/status-im/keycard-go v0.2.0 // indirect
github.com/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/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.25.7 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
github.com/shirou/gopsutil v3.21.5+incompatible // indirect
github.com/sirupsen/logrus v1.7.0
github.com/spf13/cobra v1.1.1
github.com/spf13/viper v1.10.1
github.com/tklauser/go-sysconf v0.3.6 // indirect
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect
)

1230
go.sum

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -17,14 +17,11 @@
package leveldb_ethdb_rpc
import (
"errors"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/ethdb/leveldb"
)
var errNotSupported = errors.New("this operation is not supported")
var _ ethdb.Database = &LevelDBBackend{}
// NewLevelDBBackend creates a new levelDB RPC server backend
@ -69,7 +66,7 @@ func (s *LevelDBBackend) AncientRange(kind string, start, count, maxBytes uint64
return s.ethDB.AncientRange(kind, start, count, maxBytes)
}
func (s *LevelDBBackend) ReadAncients(fn func(ethdb.AncientReaderOp) error) error {
func (s *LevelDBBackend) ReadAncients(fn func(ethdb.AncientReader) error) error {
return s.ethDB.ReadAncients(fn)
}
@ -97,12 +94,16 @@ func (s *LevelDBBackend) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int
return 0, errWriteNotAllowed
}
func (s *LevelDBBackend) TruncateHead(n uint64) (uint64, error) {
return 0, errWriteNotAllowed
func (s *LevelDBBackend) TruncateAncients(n uint64) error {
return errWriteNotAllowed
}
func (s *LevelDBBackend) TruncateTail(n uint64) (uint64, error) {
return 0, errWriteNotAllowed
func (s *LevelDBBackend) TruncateHead(n uint64) error {
return errWriteNotAllowed
}
func (s *LevelDBBackend) TruncateTail(n uint64) error {
return errWriteNotAllowed
}
func (s *LevelDBBackend) Sync() error {
@ -140,8 +141,3 @@ func (s *LevelDBBackend) MigrateTable(string, func([]byte) ([]byte, error)) erro
func (s *LevelDBBackend) NewSnapshot() (ethdb.Snapshot, error) {
return s.ethDB.NewSnapshot()
}
// AncientDatadir returns an error as we don't have a backing chain freezer.
func (d *LevelDBBackend) AncientDatadir() (string, error) {
return "", errNotSupported
}

View File

@ -200,7 +200,7 @@ func (d *DatabaseClient) AncientRange(kind string, start, count, maxBytes uint64
}
// ReadAncients applies the provided AncientReader function
func (d *DatabaseClient) ReadAncients(fn func(ethdb.AncientReaderOp) error) (err error) {
func (d *DatabaseClient) ReadAncients(fn func(ethdb.AncientReader) error) (err error) {
return fn(d)
}
@ -212,14 +212,14 @@ func (d *DatabaseClient) ModifyAncients(f func(ethdb.AncientWriteOp) error) (int
// TruncateHead satisfies the ethdb.AncientWriter interface.
// TruncateHead discards all but the first n ancient data from the ancient store.
func (d *DatabaseClient) TruncateHead(n uint64) (uint64, error) {
return 0, errNotSupported
func (d *DatabaseClient) TruncateHead(n uint64) error {
return errNotSupported
}
// TruncateTail satisfies the ethdb.AncientWriter interface.
// TruncateTail discards the first n ancient data from the ancient store.
func (d *DatabaseClient) TruncateTail(n uint64) (uint64, error) {
return 0, errNotSupported
func (d *DatabaseClient) TruncateTail(n uint64) error {
return errNotSupported
}
// Sync satisfies the ethdb.AncientWriter interface
@ -239,8 +239,3 @@ func (d *DatabaseClient) MigrateTable(string, func([]byte) ([]byte, error)) erro
func (d *DatabaseClient) NewSnapshot() (ethdb.Snapshot, error) {
return nil, errNotSupported
}
// AncientDatadir returns an error as we don't have a backing chain freezer.
func (d *DatabaseClient) AncientDatadir() (string, error) {
return "", errNotSupported
}

View File

@ -29,7 +29,7 @@ import (
func StartHTTPEndpoint(endpoint string, apis []rpc.API, modules []string, cors []string, vhosts []string, timeouts rpc.HTTPTimeouts) (*rpc.Server, error) {
srv := rpc.NewServer()
err := node.RegisterApis(apis, modules, srv)
err := node.RegisterApis(apis, modules, srv, false)
if err != nil {
utils.Fatalf("Could not register HTTP API: %w", err)
}