Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light sync mode returns transaction receipts as null for synced block #22644

Closed
rajesh1158 opened this issue Apr 10, 2021 · 2 comments
Closed
Labels

Comments

@rajesh1158
Copy link

System information

Geth version: 1.10.2-stable
OS & Version: linux (centos)
Commit hash : 97d11b0187b4695ccf44e3b71b54155fe405a36f

Expected behaviour

Transaction receipt should not be null for synced block

Actual behaviour

Transaction receipt is null

Steps to reproduce the behaviour

Start blockchain sync using geth in light mode

I installed geth (v1.10.2-stable) on my server and started the sync in light mode, the exact command is below:

geth --http --http.api personal,eth,net,web3 --http.addr=0.0.0.0 --http.port 8545 --gcmode full --syncmode light --cache 1024

I have a nodejs script which gets the latest block synced and iterate over all the transactions in it and then get the receipt for each transaction. Randomly I get null value instead of the receipt object. I am using web3 package from npm to do all this work. I even added a delay of 60 seconds from the block timestamp and then try to read the transaction receipt, but I still get null values. It is all random and has no fixed pattern. In some cases, receipt for all transactions in a block return null while in other cases only a few return null. Any idea why could this be happening?

@lukerQuant
Copy link

Hi there.

We have also encountered this issue with geth release 1.10.1.

We are getting receipts for the latest txs but null for tx receipts of a certain time period ago (e.g. 2 years)

We retried with a full node fast synced and also experienced this issue.

Please advise

@rajesh1158
Copy link
Author

I have an update for my issue. I realised I get null receipts because I was reading the blocks immediately once its synced and I was not waiting for a minimum block confirmation (say wait for 3 or 5 blocks), and due to that there is a very high chance of blocks or transactions inside a block getting dropped and replaced. I have changed my code to wait for 5 block confirmations for now and I no longer get null receipts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants