Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

"ancient block sync is still in progress" even though it completed. #10261

Closed
gmajoulet opened this issue Jan 29, 2019 · 14 comments
Closed

"ancient block sync is still in progress" even though it completed. #10261

gmajoulet opened this issue Jan 29, 2019 · 14 comments
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@gmajoulet
Copy link
Contributor

  • Parity Ethereum version: 2.3.0
  • Operating system: Linux
  • Installation: one-line installer
  • Fully synchronized: yes
  • Network: ethereum
  • Restarted: yes
  1. Install parity with the one line installer
  2. Run parity --jsonrpc-server-threads=5 --min-peers 50 --max-peers 200 --geth --no-ancient-blocks and wait for the node to be up to date (it started importing the latest block every ~10sec)
  3. Got errors Error: Block information is incomplete while ancient block sync is still in progress, before it's finished we can't determine the existence of requested item. for anything I'd try to do (retrieving a tx, publishing one, anything).
  4. Run parity db kill
  5. Run parity --jsonrpc-server-threads=5 --min-peers 50 --max-peers 200 --geth and wait for the node to sync
  6. Got the same errors mentioning ancient block sync again even though the node doesn't run with this parameter.
@jam10o-new jam10o-new added the Z1-question 🙋‍♀️ Issue is a question. Closer should answer. label Jan 30, 2019
@jam10o-new
Copy link
Contributor

jam10o-new commented Jan 30, 2019

Hey, could you share more examples of what requests you are making, and how you are making them?

Edit: I misread the source,

@jam10o-new jam10o-new added F2-bug 🐞 The client fails to follow expected behavior. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. M6-rpcapi 📣 RPC API. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. labels Jan 30, 2019
@jam10o-new
Copy link
Contributor

If you disable --no-ancient-blocks, your node will be syncing ancient blocks in the background which you can verify that status of with https://wiki.parity.io/JSONRPC-parity-module#parity_chainstatus

@jam10o-new jam10o-new added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. and removed F2-bug 🐞 The client fails to follow expected behavior. labels Jan 30, 2019
@gmajoulet
Copy link
Contributor Author

My node did sync the ancient blocks and is now working as expected, but this was not documented nor written anywhere in the CLI. :(
Would it help if I could repro the exact issue I had with using --no-ancient-blocks? I was executing a smart contract function, so I would need to investigate and test what was actually triggering the error, if that helps. If not, feel free to close this ticket.
Thanks!

@jam10o-new
Copy link
Contributor

jam10o-new commented Feb 1, 2019

Well, it depends on what queries you were making - ordinary eth_calls shouldn't be emitting this error even if you are running with --no-ancient-blocks (and this would be a valid issue) but getting transactions or block information from blocks you don't have is expected to throw this error.

@gmajoulet
Copy link
Contributor Author

Thanks for the context.
For what it's worth, I still think the error message is confusing: it suggests the node is still syncing, even though it will actually never work since --no-ancient-blocks was used. The title of this issue is still relevant, but I understand that this issue must be very very low priority. :) Feel free to edit the title or close the issue as needed.
Thanks!

@5chdn 5chdn added this to the 2.4 milestone Feb 7, 2019
@bonanblock
Copy link

bonanblock commented Apr 2, 2019

try to call the rpc with the following command {"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x649356", "0x0"],"id":1}.
getting the error message {"id": 1, "error": {"code": -32000, "message": "Ancient block sync is still in progress"}, "jsonrpc": "2.0"}
all other rpc calls are working fine.

@jam10o-new
Copy link
Contributor

@bonanblock
Copy link

tried curl --data '{"method":"parity_chainStatus","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:2211
Gives
{"jsonrpc":"2.0","result":{"blockGap":null},"id":1}

@bonanblock
Copy link

bonanblock commented Apr 3, 2019

updates: this rpc call eth_getUncleByBlockNumberAndIndex is broken. It will return Ancient block sync is still in progress when there is no such uncle exist
'{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0x75e1271bdfa6bcbcc9e9a1ad8b340297215dc6dc9323e55c2c3e7816f7f93a19", "0x0"],"id":1}' gives the correct response. {"id": 1, "result": null, "jsonrpc": "2.0"}
While '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x726485", "0x0"],"id":1}' will return {"id": 1, "error": {"code": -32000, "message": "Ancient block sync is still in progress"}, "jsonrpc": "2.0"}
Even tho they are the same block

@jam10o-new jam10o-new reopened this Apr 3, 2019
@jam10o-new
Copy link
Contributor

jam10o-new commented Apr 3, 2019

@bonanblock could you please share what version you are running and which cli/config parameters you are using?

@jam10o-new jam10o-new modified the milestones: 2.4, 2.6 Apr 3, 2019
@jam10o-new jam10o-new added F2-bug 🐞 The client fails to follow expected behavior. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. labels Apr 3, 2019
@bonanblock
Copy link

version Parity-Ethereum/v2.4.4-beta-8f6911a-20190401/x86_64-linux-gnu/rustc1.33.0

[parity]
base_path = "/srv/blockchain/eth"

[rpc]
interface = "127.0.0.1"
port = 2211
apis = ["web3", "eth", "net", "rpc", "parity"]
hosts = ["127.0.0.1/8"]

[websockets]
disable = false
port = 2223
interface = "127.0.0.1"
origins = ["none"]
apis = ["web3", "eth", "pubsub"]
hosts = ["127.0.0.1/8"]

[footprint]
db_compaction = "ssd"
pruning = "archive"
cache_size = 8192

[snapshots]
disable_periodic = false

[network]
snapshot_peers = 0
~

@jam10o-new
Copy link
Contributor

So not only is ancient block sync not running, you are running an archive node. I can find the relevant error message and change it but I'm not certain what the correct error message would be for this situation.

@bonanblock
Copy link

I would suggest give the same response as {"id": 1, "result": null, "jsonrpc": "2.0"}. If it returns {"id": 1, "error": {"code": -32000, "message": "Ancient block sync is still in progress"}, it is misleading which makes the developers doubt if their node is fully synced but in reality it just means there no uncle blocks attached to this block

@jam10o-new jam10o-new added P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. labels Apr 3, 2019
@seunlanlege
Copy link
Member

Just investigated the code, found the reason for the misleading error messages,

soc1c pushed a commit that referenced this issue May 10, 2019
* adds error message for --no-ancient-blocks, closes #10261

* Apply suggestions from code review

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>
soc1c added a commit that referenced this issue May 10, 2019
* version: bump beta to 2.5.1

* fix(whisper expiry): current time + work + ttl (#10587)

* update bootnodes (#10595)

* config: update goerli bootnodes

* config: update kotti bootnodes

* adds rpc error message for --no-ancient-blocks (#10608)

* adds error message for --no-ancient-blocks, closes #10261

* Apply suggestions from code review

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>

* Constantinople HF on POA Core (#10606)

* Constantinople HF on POA Core

Plan Constantinople/St.Petersfork HF on POA Core network at block 8582254.
Original PR in POA repository: poanetwork/poa-chain-spec#110

* Remove extra empty line

* evm: add some mulmod benches (#10600)

* evm: add blockhash_mulmod bench

* evm: use num-bigint for mod ops

* Clique: zero-fill extradata when the supplied value is less than 32 bytes in length (#10605)

* Update kovan.json to switch validator set to POA Consensus Contracts (#10628)

* Fix publish docs (#10635)

* Fix publish docs

* this never should be forced, either way compiling previous versions will produce outdated docs

* fix array, var was moved to the group project global variables list

* Fix rinkeby petersburg fork (#10632)
ordian pushed a commit that referenced this issue Jun 24, 2019
* adds error message for --no-ancient-blocks, closes #10261

* Apply suggestions from code review

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>
s3krit added a commit that referenced this issue Jun 25, 2019
* ethcore/res: activate atlantis classic hf on block 8772000 (#10766)

* fix docker tags for publishing (#10741)

* merge-backports

* Update version

* remove clique engine from backports

* Reset blockchain properly (#10669)

* delete BlockDetails from COL_EXTRA

* better proofs

* added tests

* PR suggestions

* adds rpc error message for --no-ancient-blocks (#10608)

* adds error message for --no-ancient-blocks, closes #10261

* Apply suggestions from code review

Co-Authored-By: seunlanlege <seunlanlege@gmail.com>

* Treat empty account the same as non-exist accounts in EIP-1052 (#10775)

* fix: aura don't add `SystemTime::now()` (#10720)

This commit does the following:
- Prevent overflow in `verify_timestamp()` by not adding `now` to found faulty timestamp
- Use explicit `CheckedSystemTime::checked_add` to prevent potential consensus issues because SystemTime is platform
depedent
- remove `#[cfg(not(time_checked_add))]` conditional compilation

* DevP2p: Get node IP address and udp port from Socket, if not included in PING packet (#10705)

* get node IP address and udp port from Socket, if not included in PING packet

* prevent bootnodes from being added to host nodes

* code corrections

* code corrections

* code corrections

* code corrections

* docs

* code corrections

* code corrections

* Apply suggestions from code review

Co-Authored-By: David <dvdplm@gmail.com>

* Revert "fix: aura don't add `SystemTime::now()` (#10720)"

This reverts commit f104784.

* Add a way to signal shutdown to snapshotting threads (#10744)

* Add a way to signal shutdown to snapshotting threads

* Pass Progress to fat_rlps() so we can abort from there too.

* Checking for abort in a single spot

* Remove nightly-only weak/strong counts

* fix warning

* Fix tests

* Add dummy impl to abort snapshots

* Add another dummy impl for TestSnapshotService

* Remove debugging code

* Return error instead of the odd Ok(())
Switch to AtomicU64

* revert .as_bytes() change

* fix build

* fix build maybe
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F2-bug 🐞 The client fails to follow expected behavior. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

No branches or pull requests

5 participants