Skip to content

Commit

Permalink
Merge pull request #294 from bobanetwork/update-erigon
Browse files Browse the repository at this point in the history
Update ledgerwatch to erigontech
  • Loading branch information
boyuan-chen authored Jan 15, 2025
2 parents 816d38e + de511e3 commit c8dc6e5
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 268 deletions.
2 changes: 1 addition & 1 deletion op-e2e/external_erigon/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestShim(t *testing.T) {
require.NoError(t, err)
workDir, err := filepath.Abs(filepath.Join("..", "..", "op-erigon"))
require.NoError(t, err)
cmd = exec.Command("go", "build", "-tags", "nosqlite,noboltdb,nosilkworm", "-o", opErigonPath, "github.com/ledgerwatch/erigon/cmd/erigon")
cmd = exec.Command("go", "build", "-tags", "nosqlite,noboltdb,nosilkworm", "-o", opErigonPath, "github.com/erigontech/erigon/cmd/erigon")
cmd.Dir = workDir
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
Expand Down
2 changes: 1 addition & 1 deletion op-erigon/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A simple make target to build erigon
.PHONY: erigon
erigon:
@go build -tags nosqlite,noboltdb,nosilkworm github.com/ledgerwatch/erigon/cmd/erigon
@go build -tags nosqlite,noboltdb,nosilkworm github.com/erigontech/erigon/cmd/erigon

.PHONY: clean
clean:
Expand Down
264 changes: 137 additions & 127 deletions op-erigon/go.mod

Large diffs are not rendered by default.

261 changes: 126 additions & 135 deletions op-erigon/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion op-erigon/tools.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package op_erigon

import _ "github.com/ledgerwatch/erigon/cmd/erigon"
import _ "github.com/erigontech/erigon/cmd/erigon"
2 changes: 1 addition & 1 deletion op-service/sources/eth_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ func (s *EthClient) GetProof(ctx context.Context, address common.Address, storag

// GetStorageAt returns the storage value at the given address and storage slot, **without verifying the correctness of the result**.
// This should only ever be used as alternative to GetProof when the user opts in.
// E.g. Erigon L1 node users may have to use this, since Erigon does not support eth_getProof, see https://github.com/ledgerwatch/erigon/issues/1349
// E.g. Erigon L1 node users may have to use this, since Erigon does not support eth_getProof, see https://github.com/erigontech/erigon/issues/1349
func (s *EthClient) GetStorageAt(ctx context.Context, address common.Address, storageSlot common.Hash, blockTag string) (common.Hash, error) {
var out common.Hash
err := s.client.CallContext(ctx, &out, "eth_getStorageAt", address, storageSlot, blockTag)
Expand Down
4 changes: 2 additions & 2 deletions op-service/sources/receipts_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const (
// - QuickNode: https://www.quicknode.com/docs/ethereum/eth_getBlockReceipts
// - Alchemy: https://docs.alchemy.com/reference/eth-getblockreceipts
// Erigon has this available, but does not support block-hash argument to the method:
// https://github.com/ledgerwatch/erigon/blob/287a3d1d6c90fc6a7a088b5ae320f93600d5a167/cmd/rpcdaemon/commands/eth_receipts.go#L571
// https://github.com/erigontech/erigon/blob/287a3d1d6c90fc6a7a088b5ae320f93600d5a167/cmd/rpcdaemon/commands/eth_receipts.go#L571
EthGetBlockReceipts
// ErigonGetBlockReceiptsByBlockHash is an Erigon-specific receipt fetching method,
// the same as EthGetBlockReceipts but supporting a block-hash argument.
Expand All @@ -311,7 +311,7 @@ const (
// Returns:
// - Erigon: array of json-ified receipts
// See:
// https://github.com/ledgerwatch/erigon/blob/287a3d1d6c90fc6a7a088b5ae320f93600d5a167/cmd/rpcdaemon/commands/erigon_receipts.go#LL391C24-L391C51
// https://github.com/erigontech/erigon/blob/287a3d1d6c90fc6a7a088b5ae320f93600d5a167/cmd/rpcdaemon/commands/erigon_receipts.go#LL391C24-L391C51
ErigonGetBlockReceiptsByBlockHash

// Other:
Expand Down

0 comments on commit c8dc6e5

Please sign in to comment.