Is it necessary to query account balance at any block number?

Conflux is a high-performance public chain, we are working on integrating with Rosetta. But we have encountered a problem that is Our chain default won’t save all historical states, which means only supporting query account balance in the latest blocks for example latest 5w blocks.

If one want query balance in any block height, the fullnode’s disk storage will be very very big

So if it is Ok for the query balance Data-API only support query balance at latest 5w blocks ?

@swapna Can you help answer my question ?

Hi @PanaW welcome to the community.

Yes it is okay and the balance lookup can be from the latest block is block number is not provided. If you look at how rosetta-ethereum is implemented, the query won’t have block index if not provided and will give the balance from current block.

Also to pass the rosetta-cli in this case you might want to put HistoricalBalanceEnabled to false in the DataConfiguration

Thanks @shrimalmadhur very much

Hi @shrimalmadhur, when I set the HistoricalBalanceEnabled to false, also I need to set block start_index and set all users whose balance is not zero on that block in file bootstrap_balances.json?