-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
geth full node is too slow.Only about 50 blocks can be synchronized per minute. #27747
Comments
You don't need to do a full sync to get receipts for all transactions. Snap sync should suffice. Also you're doing an archive sync which is the slowest form of sync and needs 14Tb of storage :) you should really only do an archive sync if you need to do tracing of arbitrarily old transactions. |
Thank you for the answer. I need all the receipts, Is snap has all receipts? What is the real difference between archive and full? Which way should I try to switch to? ./geth --syncmode snap --gcmode archive --maxpeers 500 --cache 2000 .
or
./geth --syncmode full --gcmode full --maxpeers 500 --cache 2000 . |
Yes
archive sync will preserve all the past states, full sync won't have this guarantee(for all past states) but only the latest states.
|
I tried snap and couldn't get all receipts. Thanks again. I tried snap and can't get all receipts, is my command wrong? nohup ./geth --syncmode snap --port 31303 --maxpeers 200 --cache 2000 > snap.out& I changed the nohup ./geth --syncmode full --gcmode full --maxpeers 500 --cache 2000 |
Can you give us more info how you're trying to get receipts? If you're querying by transaction hash then you will also need to add |
You need to wait for all the historical data are fully synced, then you can read transactions and receipts. You can check by eth_blockNumber RPC to see it's synced or not |
Sorry , I use RPC. syncing is done. > eth.syncing
false
> eth.blockNumber
17741625
> This is my curl request. curl --location 'http://localhost:8645' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xbf229e0e912b9bb96fb73c8770213266b6c4b9c6edba6a7d49389c693e259d56"
],
"id": 1
}'
|
Thanks, look like it's synced done.
|
yeah, the chain is synced, and as @s1na mentioned, you need to add |
Thank you very much, I knew |
And after #27702 merged, you can direct query the block receipts, no need to query by transaction. |
ok, thanks. I am using geth-linux-amd64-1.12.0-e501b3b0. |
./geth --syncmode snap --txlookuplimit 0 --maxpeers 200 I added this is my curl request: this transaction hash is in block 5701010. curl --location 'http://localhost:8645' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xc89d2800987de4c084f51cc38c4d9d427d1047287244acb896befaadb246ce4d"
],
"id": 1
}' |
Normally you shouldn't need to delete the database. By adding the |
Yes ,Still can't get a receipt. |
@chinaliuhan you can't get all transaction receipts, or can't get some old transaction receipts? And can you get the recent transaction receipt? If possible, can you post your script to fetch the receipts? |
I can't get some old transaction receipts. I can get the recent transaction receipt. this is my curl request: this transaction hash is in block 5701010. curl --location 'http://localhost:8645' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": [
"0xc89d2800987de4c084f51cc38c4d9d427d1047287244acb896befaadb246ce4d"
],
"id": 1
}' |
@chinaliuhan thanks for your reply, after you reset the
could you please have a look to see if the indexing process is done or not? (check with the below |
Yes the Indexing transactions transaction seemed to complete. |
No you don't need to, if you removed them, then need to resync |
Is there anything in the logs when you make that request and it fails? Can you get receipts from other old blocks let's say 6m 7m or sth? Also can you try getting the same block and the transaction seeing if they work as expected? |
it worked, thanks. |
it worked, thanks. |
geth full node is too slwo.Only about 50 blocks can be synchronized per minute
However I use snap mode to sync very quickly.
Unfortunately what I need receipts for all transactions.
this is my server:
this is my geth:
What should I do to increase the sync speed? It's been a week and only 5 million blocks have been synced. At this rate, it will never be finished.
The text was updated successfully, but these errors were encountered: