silkrpc icon indicating copy to clipboard operation
silkrpc copied to clipboard

Add full state replica activated by dedicated option

Open canepat opened this issue 2 years ago • 0 comments

Add implementation of full state replica (i.e. loading all plain state in state cache at the startup, so that applying state changes will keep the full state local to Silkrpc) and lookup for state values just on such local state that must be coherent. If it is not coherent, it is an error and should be treated as such w/o falling back to accessing remote state.

This is required in order to support one specific scenario, which is very relevant for node operators:

  • Silkrpc gets deployed on a data center machine having much fast RAM (200/300 GB) even with slow HDD
  • only eth_call on LATEST block are forwarded to such instance by the load balancer
  • all the state lookups happen on local state in memory and hence are fast

This feature should be made available under a command-line option called --state_replica or something.

This feature does in fact also benefit from implementation of erigon_cacheCheck API.

canepat avatar Jan 26 '23 09:01 canepat