-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a new implementation of a `TxPool` based on the kv-store introduced in #3628. It also amends the p2p-client's bootstrap flow. The p2p-client saves the block number its on to the database and restores it the next time it is started. The initial sync happens as before (it syncs to the the tip of the chain, but instead of syncing from 0, it syncs from the last known block number) and after that, it re-publishes any transactions in its TxPool that haven't been processed already. Fix #3365
- Loading branch information
Showing
21 changed files
with
308 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ | |
}, | ||
{ | ||
"path": "../world-state" | ||
}, | ||
{ | ||
"path": "../kv-store" | ||
} | ||
], | ||
"include": ["src"] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { EthAddress } from '@aztec/circuits.js'; | ||
import { AztecLmdbStore } from '@aztec/kv-store'; | ||
|
||
import { AztecKVTxPool } from './aztec_kv_tx_pool.js'; | ||
import { describeTxPool } from './tx_pool_test_suite.js'; | ||
|
||
describe('In-Memory TX pool', () => { | ||
let txPool: AztecKVTxPool; | ||
beforeEach(async () => { | ||
txPool = new AztecKVTxPool(await AztecLmdbStore.create(EthAddress.random())); | ||
}); | ||
|
||
describeTxPool(() => txPool); | ||
}); |
Oops, something went wrong.