Skip to content

"UnknownBlockNumberInRootDB" exception during requesting eth_getBalacnce to 0 block on arhival node  #827

Open
@oleksandrSydorenkoJ

Description

Versions
skalenetwork/schain:3.18.0-beta.0-historic

Preconditions:
Active schain with connected archival node and access to docker containers logs

Steps to reproduce:

  1. Send eth_getBalance("0x<address>", 0) call to archival node
curl -X POST --data '{"id":48,"jsonrpc":"2.0","method":"eth_getBalance","params":["0xd2ba3e0000000000000000000000000000000000","0"]}' http://1.1.1.1:10195
  1. check skaled logs on the archival node

Expected behavior
Skaled should return the actual balance for the address in the 0 block without any errors logs in a docker container.

Actual state:
Skaled returns the actual balance for the 0-block, but prints the "UnknownBlockNumberInRootDB" error in skaled logs.

Logs

2024-02-02 18:01:23.994928   http://localhost:32892 >>> {"id":48,"jsonrpc":"2.0","method":"eth_getBalance","params":["0xd2ba3e0000000000000000000000000000000000","0x5f5e100"]}
2024-02-02 18:01:23.998884   
                                                                               
                                                                             
   Import Failure     /home/s5/actions-runner-1/_work/skaled/skaled/libhistoric/HistoricState.cpp(280): Throw in function void dev::eth::HistoricState::setRootByBlockNumber(uint64_t)
Dynamic exception type: boost::exception_detail::clone_impl<dev::eth::UnknownBlockNumberInRootDB>
[skale::error::tag_block*] = [ type: std::vector<unsigned char, std::allocator<unsigned char> >, size: 24, dump: b0 38 01 bc 00 7f 00 00 8b 3a 01 bc 00 7f 00 00 ]
   
                                                                             
                      Bad Block #00091556.cf785208…                      
                                                                             
                                                                               
2024-02-02 18:01:23.999008   http://localhost:32892 <<< {"id":48,"jsonrpc":"2.0","result":"0x0"}

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions