-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: archive public testnet tx data (#11192)
Adds a p2p config flag (`P2P_ARCHIVED_TX_LIMIT`) for enabling archiving tx data for testnet nodes and adds a new public function to the p2p client for accessing archived txs by hash. The flag specifies the number of recent txs to archive for future lookup and is disabled if set to 0. Once the limit is reached, then the oldest archived txs will be purged to satisy the archived tx limit. All tx information other than the proof is archived and returned by the p2p client. The KV Tx Pool is utilized to archive all txs as they are seen by the node. To allow a constant insertion, deletion, and lookup time, a mapping of archived tx indices and the current head and tail index of archived txs is stored as well. An alternative approach here would be to introduce an `AztecQueue` data structure to the `kv-store` interfaces, please let me know if you would prefer me to implement that data structure instead of manually tracking archived tx indices. Fix: #8939
- Loading branch information
1 parent
9f389a7
commit 66f2014
Showing
8 changed files
with
159 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters