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

Empty reply from server while calling block height 0x1 #28

Open
barryz opened this issue Apr 18, 2022 · 6 comments
Open

Empty reply from server while calling block height 0x1 #28

barryz opened this issue Apr 18, 2022 · 6 comments

Comments

@barryz
Copy link

barryz commented Apr 18, 2022

After the guardian node and RPC-adaptor are deployed. I tried to call eth_getBlockByNumber via RPC-adaptor. When I call the latest block number, it's fine:

root@server:/opt/apps/theta/bin# curl -X "POST" "http://127.0.0.1:8545/" -H 'Content-Type: application/json' -d '{"id": 1337, "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0xe518e8", false]}'
{"jsonrpc":"2.0","id":1337,"result":{"number":"0xe518e8","hash":"0x593e38309902397f4222c0d94326653fcbd562411bbd40aa591591ee97cfe657","parentHash":"0x198180ec11e8f1fe1b1aa60c2ec77687886a5009bce12d63a983856d2b63d53a","timestamp":"0x625d572b","miner":"0x80eab22e27d4b94511f5906484369b868d6552d2","transactionsRoot":"0xab0e8312f8f4f611000d554a2f176be6f299e89a04f01f01ec9cc5abeab905fa","stateRoot":"0xf631cce5c8267bb6450cbe07cfffc2d7f8820a9c723ca9a8f7163aa245ad2023","receiptsRoot":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x0000000000000000000000000000000000000000000000000000000000000000","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","size":"0x3e8","gasLimit":"0x1312d00","gasUsed":"0x0","extraData":"0x","uncles":[],"transactions":[]}}

When I call the very first block number 0x1. It looks like something is wrong:

root@server:/opt/apps/theta/bin# curl -X "POST" "http://127.0.0.1:8545/" -H 'Content-Type: application/json' -d '{"id": 1337, "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x1", false]}'
curl: (52) Empty reply from server

PS: I followed this doc to build and deploy rpc-adaptor and Theta guardian node.

@jieyilong
Copy link
Member

This is expected. If you start the guardian node from a snapshot, blocks/transactions before the snapshot height won't be available. Thanks.

@barryz
Copy link
Author

barryz commented Apr 19, 2022

This is expected. If you start the guardian node from a snapshot, blocks/transactions before the snapshot height won't be available. Thanks.

The only way I can do was to sync from scratch. And the sync process seems too slow. How can I speed up the sync?

@jieyilong
Copy link
Member

Got it, thanks. May I ask what are your use cases that require syncing from the genesis?

@barryz
Copy link
Author

barryz commented Apr 19, 2022

Got it, thanks. May I ask what are your use cases that require syncing from the genesis?

We would like to integrate with the theta EVM chain so that users can get access to the historical state of the contract (or price of token).

Our website is https://debank.com

@jieyilong
Copy link
Member

jieyilong commented Apr 19, 2022

I see. Syncing from genesis could take a while. We can look into improve the syncing speed in the future. But if you are OK just going back to a certain height, you can download the latest snapshot before that height from the following link:

http://mainnet-data.thetatoken.org/snapshot?height=HEIGHT

For example:
http://mainnet-data.thetatoken.org/snapshot?height=14230301

BTW, if you switch to anther snapshot, you wound need to delete the db folder under your config folder before restarting the Theta node.

@0xChupaCabra
Copy link

Hello, how can i sync theta node from genesis? Everytime i start the service it looks for snapshot file. I need to have full transactions and log history on my node. Thanks in advance

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

No branches or pull requests

5 participants
@barryz @jieyilong @0xChupaCabra and others