Skip to content

Aztec RPC server should block until an initial sync is done before allowing the user to send txs #466

@spalladino

Description

@spalladino

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions