Git Product home page Git Product logo

Comments (6)

aflock avatar aflock commented on July 28, 2024

Hey thanks @sljeff - This looks like your node can't fetch the L1 block that contained Base genesis. Can you share what L1 RPC URL you are using? Or if you are running your L1 node yourself, what clients and configuration you have set up?

from node.

sljeff avatar sljeff commented on July 28, 2024

I'm using a paid blockpi node

It seems that the error 0x5c13d307623a926cd31415036c8b7fa14572f9dac64528e857a470511fc30771 is not a legal eth tx hash

from node.

aflock avatar aflock commented on July 28, 2024

That is the hash for the L1 block that included Base mainnet genesis info: https://etherscan.io/block/17481768
I wonder if the blockpi node is a full node and not an archive node?

from node.

mdehoog avatar mdehoog commented on July 28, 2024

What does this return?

curl -d '{"id":0,"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xe080e65b2f599279599ba4c59b96bad843ec29a50490ab15cab330b9c945e1c4"]}' -H "Content-Type: application/json" <BLOCKPI_RPC_URL>

It should return a JSON blob containing "transactionIndex":"0x2" within. If anything else, it seems like possibly your L1 node is malfunctioning.

from node.

sljeff avatar sljeff commented on July 28, 2024

@aflock

Yes, this is an archive node.

@mdehoog

Yes, it returned content does contain "transactionIndex":"0x2" as you said.

I'm sorry, but I haven't tried starting a node myself anymore as the node provider I use, blockpi, already offers direct access to the base chain.

from node.

mdehoog avatar mdehoog commented on July 28, 2024

I have reproduced this on a blockpi node. It looks like sometimes their eth_getTransactionReceipt returns an empty response. For example: {"jsonrpc":"2.0","id":26,"method":"eth_getTransactionReceipt","params":["0x2094a0de142cfebbcbdfc38d5c2410e6cdba0e81dad1e27e874fb69901484995"]} normally works fine, but occasionally returns {"jsonrpc":"2.0","id":26,"result":null}.

You can reproduce this with the following script. This will panic on the public-facing blockpi node, but succeed using another node. Would recommend using another provider for your L1 node.

package main

import (
	"context"
	"github.com/ethereum-optimism/optimism/op-node/client"
	"github.com/ethereum-optimism/optimism/op-node/sources"
	"github.com/ethereum/go-ethereum/ethclient"
	"github.com/ethereum/go-ethereum/log"
	"github.com/ethereum/go-ethereum/rpc"
	"math/big"
	"time"
)

func main() {
	ctx := context.Background()
	c, err := rpc.DialContext(ctx, "https://ethereum.blockpi.network/v1/rpc/public")
	if err != nil {
		panic(err)
	}
	r := client.NewBaseRPCClient(c)
	e := ethclient.NewClient(c)
	block, err := e.BlockByNumber(ctx, big.NewInt(17481768))
	if err != nil {
		panic(err)
	}
	testCfg := &sources.EthClientConfig{
		// receipts and transactions are cached per block
		ReceiptsCacheSize:     1000,
		TransactionsCacheSize: 1000,
		HeadersCacheSize:      1000,
		PayloadsCacheSize:     1000,
		MaxRequestsPerBatch:   20,
		MaxConcurrentRequests: 10,
		TrustRPC:              true,
		MustBePostMerge:       false,
		RPCProviderKind:       sources.RPCKindBasic,
		MethodResetDuration:   time.Minute,
	}
	ec, err := sources.NewEthClient(r, log.Root(), nil, testCfg)
	if err != nil {
		panic(err)
	}
	_, _, err = ec.FetchReceipts(ctx, block.Hash())
	if err != nil {
		panic(err)
	}
}

from node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.