Skip to content

Commit

Permalink
Merge pull request #31 from deep-stack/pm-upgrade-geth
Browse files Browse the repository at this point in the history
Upgrade geth to v1.10.17
  • Loading branch information
ashwinphatak authored May 2, 2022
2 parents e0c235c + 83b3f18 commit 2966e45
Show file tree
Hide file tree
Showing 4 changed files with 224 additions and 88 deletions.
46 changes: 37 additions & 9 deletions database.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,16 @@ func (d *Database) NewBatch() ethdb.Batch {
return b
}

// NewBatchWithSize satisfies the ethdb.Batcher interface.
// NewBatchWithSize creates a write-only database batch with pre-allocated buffer.
func (d *Database) NewBatchWithSize(size int) ethdb.Batch {
b, err := NewBatch(d.blockService, size)
if err != nil {
panic(err)
}
return b
}

// NewIterator satisfies the ethdb.Iteratee interface
// it creates a binary-alphabetical iterator over a subset
// of database content with a particular key prefix, starting at a particular
Expand Down Expand Up @@ -195,18 +205,18 @@ func (d *Database) Ancients() (uint64, error) {
return 0, errNotSupported
}

// Tail satisfies the ethdb.AncientReader interface.
// Tail returns the number of first stored item in the freezer.
func (d *Database) Tail() (uint64, error) {
return 0, errNotSupported
}

// AncientSize satisfies the ethdb.AncientReader interface
// AncientSize returns the ancient size of the specified category
func (d *Database) AncientSize(kind string) (uint64, error) {
return 0, errNotSupported
}

// AppendAncient satisfies the ethdb.AncientWriter interface
// AppendAncient injects all binary blobs belong to block at the end of the append-only immutable table files
func (d *Database) AppendAncient(number uint64, hash, header, body, receipt, td []byte) error {
return errNotSupported
}

// AncientRange retrieves all the items in a range, starting from the index 'start'.
// It will return
// - at most 'count' items,
Expand All @@ -221,9 +231,15 @@ func (d *Database) ReadAncients(fn func(ethdb.AncientReader) error) (err error)
return errNotSupported
}

// TruncateAncients satisfies the ethdb.AncientWriter interface
// TruncateAncients discards all but the first n ancient data from the ancient store
func (d *Database) TruncateAncients(n uint64) error {
// TruncateHead satisfies the ethdb.AncientWriter interface.
// TruncateHead discards all but the first n ancient data from the ancient store.
func (d *Database) 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 *Database) TruncateTail(n uint64) error {
return errNotSupported
}

Expand All @@ -232,3 +248,15 @@ func (d *Database) TruncateAncients(n uint64) error {
func (d *Database) Sync() error {
return errNotSupported
}

// MigrateTable satisfies the ethdb.AncientWriter interface.
// MigrateTable processes and migrates entries of a given table to a new format.
func (d *Database) MigrateTable(string, func([]byte) ([]byte, error)) error {
return errNotSupported
}

// NewSnapshot satisfies the ethdb.Snapshotter interface.
// NewSnapshot creates a database snapshot based on the current state.
func (d *Database) NewSnapshot() (ethdb.Snapshot, error) {
return nil, errNotSupported
}
25 changes: 13 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
module github.com/vulcanize/ipfs-ethdb

go 1.13
go 1.15

require (
github.com/ethereum/go-ethereum v1.10.14
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/ethereum/go-ethereum v1.10.17
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/ipfs/go-block-format v0.0.2
github.com/ipfs/go-block-format v0.0.3
github.com/ipfs/go-blockservice v0.1.3
github.com/ipfs/go-cid v0.0.5
github.com/ipfs/go-ipfs-blockstore v1.0.0
github.com/ipfs/go-cid v0.0.7
github.com/ipfs/go-ipfs-blockstore v1.0.1
github.com/ipfs/go-ipfs-ds-help v1.0.0
github.com/ipfs/go-ipfs-exchange-interface v0.0.1
github.com/jmoiron/sqlx v1.2.0
github.com/lib/pq v1.0.0
github.com/mailgun/groupcache/v2 v2.2.1
github.com/multiformats/go-multihash v0.0.13
github.com/onsi/ginkgo v1.14.0
github.com/onsi/gomega v1.10.1
google.golang.org/appengine v1.6.7 // indirect
github.com/jmoiron/sqlx v1.3.5
github.com/lib/pq v1.10.5
github.com/mailgun/groupcache/v2 v2.3.0
github.com/multiformats/go-multihash v0.1.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.19.0
)
Loading

0 comments on commit 2966e45

Please sign in to comment.