Skip to content

--history.state value doesn’t seem to be taken into account #3469

@bgiegel

Description

@bgiegel

Hello !

I’m using the latest v1.6.3 version of BNB geth.

I am starting it with the following options : 

exec /usr/bin/geth
--http
--mainnet
--config /configs/geth.toml
--state.scheme=path
--history.state=4000000
--datadir.ancient=/var/lib/geth-ancient

and this in the geth.toml

[Eth]
SyncMode = "snap"
NetworkId = 56
TrieTimeout = 150000000000 # 1 minute

The node synced correctly in like a day. But somehow when I run a query like the following :

curl -X POST -H "Content-Type: application/json" --data '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": [
"0x38944092685a336cb6b9ea58836436709a2adc89",
"0x4121AEC"
],
"id": 1
}' http://localhost:8545

I get the following error :  state histories haven't been fully indexed yet

Which is surprising to me I was expecting the node to hold at least 4M blocksd like specified in the history.state flag. Also given the documentation this param should work in path based storage : 

    --history.state value               (default: 600000)                  ($GETH_HISTORY_STATE)
          Number of recent blocks to retain state history for, only relevant in
          state.scheme=path (default = 90,000 blocks, 0 = entire chain)

But this documentation seems outdated because I looked into the code and the real default is not 90k block but 600k like mentioned in (default: 600000).

Do I need to fallback to hash storage scheme to keep the history of the blocks ?  Or is there a bug ? Or maybe I missed something in the documentation  ?

By doing some tests I noticed that the node is actually keeping the history of only the last 128 blocks.

Note : I already tried the discord but I got scammed so I just left.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions