Skip to content

Avoid querying AN for latest block on each tx submission #895

@m-Peter

Description

@m-Peter

Issue To Be Solved

Currently, the gateway will query the Access node for its latest block for each transaction it sends. This is used to get the block ID and then to set the Reference Block ID when preparing the Cadence tx.

When the gateways are handling a large number of transactions, this will result in lots of calls to the AN, which will get rate-limited eventually.

Solution

Move the latest block fetching outside of the request/response lifecycle of eth_sendRawTransaction, to its own process. This will make the tx submission faster, and reduce the load on ANs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions