The aztec-rpc-server currently starts the Synchroniser and then becomes immediately available for the user to start sending txs. However, this means that the user could send txs without having the history of the nullifiers they have already consumed. We should perform an initial blocking sync to the tip of the chain, and only then allow users to send txs.
We have a few options here:
- Block the entire rpc-server should block during that initial sync (ie start does not return until that sync is done)
- The RPC server has a state "INITIAL_SYNCING" during which tx methods throw
- The RPC server has a state "INITIAL_SYNCING" during which tx methods block until the initial syncing finishes
We should also identify which methods need to be blocked. Is it just those related to sending txs? Or queries like getStorageAt should also be affected?
Original discussion here.
The aztec-rpc-server currently starts the Synchroniser and then becomes immediately available for the user to start sending txs. However, this means that the user could send txs without having the history of the nullifiers they have already consumed. We should perform an initial blocking sync to the tip of the chain, and only then allow users to send txs.
We have a few options here:
We should also identify which methods need to be blocked. Is it just those related to sending txs? Or queries like getStorageAt should also be affected?
Original discussion here.