-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Removing is_dev_net
flag
#8275
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @LHerskind and the rest of your teammates on Graphite |
5b614c2
to
fea8a7d
Compare
7b4a5dc
to
93bef50
Compare
Benchmark resultsMetrics with a significant change:
Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Proof generationEach column represents the number of threads used in proof generation.
L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 8 txs.
Circuits statsStats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
AVM SimulationTime to simulate various public functions in the AVM.
Public DB AccessTime to access various public DBs.
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | |
93bef50
to
ad57586
Compare
Will add an extra test to make sure that single sequencer node running walltime anvil will work to ensure that it is not something that could break devnet. |
ad57586
to
434aada
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well documented, good stuff man
revert Errors.DevNet__NoPruningAllowed(); | ||
} | ||
|
||
function prune() external override(IRollup) onlyOwner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will we need an issue to deactivate this guard? maybe not if its a debugging thing anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the onlyOwner should go away when we move out of spartan so think it is ok to have it here 🤷
const submitTxsTo = async (pxe: PXEService, numTxs: number) => { | ||
const txs: SentTx[] = []; | ||
for (let i = 0; i < numTxs; i++) { | ||
// const tx = getSchnorrAccount(pxe, Fr.random(), GrumpkinScalar.random(), Fr.random()).deploy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmt
} | ||
|
||
({ teardown, config, logger } = await setup(0, { initialValidators, ...options })); | ||
({ teardown, config, logger, deployL1ContractsValues } = await setup(0, { initialValidators, ...options })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if setup even needs initial validators if it will always contain a single one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not always contain a single, it will just allow anyone if no initial. For this test, think we will also need to alter it when using larger slots. At least I ran into issues when using a walltime and aztec_slot_duration > ethereum_slot_duration.
|
||
//@note Now we jump ahead to the next epoch such that the validator committee is picked | ||
// INTERVAL MINING: If we are using anvil interval mining this will NOT progress the time! | ||
// Which means that the validator set will still be empty! So anyone can propose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good note, i previously got tripped up here
@@ -300,6 +300,8 @@ type SetupOptions = { | |||
salt?: number; | |||
/** An initial set of validators */ | |||
initialValidators?: EthAddress[]; | |||
/** Anvil block time (interval) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
|
||
beforeEach(() => { | ||
lastBlockNumber = 0; | ||
|
||
block = L2Block.random(lastBlockNumber + 1); | ||
|
||
mockedGlobalVariables = new GlobalVariables( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dub
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try { | ||
// @note It is very important that the following function will FAIL and not just return early | ||
// if it have made any state changes. If not, we won't rollback the state, and you will | ||
// be in for a world of pain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bit dramatic m8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/7962): inefficient to have a round trip in here - this should be cached | ||
const committee = await this.publisher.getCurrentEpochCommittee(); | ||
|
||
if (committee.length === 0) { | ||
return undefined; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be nested in the else if the if is a guard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not lmao.
45e21fa
to
e55f244
Compare
e55f244
to
ed7db37
Compare
* master: git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg chore(revert): earthfile accidental change (#8309) chore: fix warnings in `avm-transpiler` (#8307) refactor(bb): more graceful pippenger on non-powers-of-2 (#8279) git subrepo push --branch=master noir-projects/aztec-nr git_subrepo.sh: Fix parent in .gitrepo file. [skip ci] chore: replace relative paths to noir-protocol-circuits git subrepo push --branch=master barretenberg feat: Removing `is_dev_net` flag (#8275)
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.52.0</summary> ## [0.52.0](aztec-package-v0.51.1...aztec-package-v0.52.0) (2024-09-01) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.52.0</summary> ## [0.52.0](barretenberg.js-v0.51.1...barretenberg.js-v0.52.0) (2024-09-01) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.52.0</summary> ## [0.52.0](aztec-packages-v0.51.1...aztec-packages-v0.52.0) (2024-09-01) ### ⚠ BREAKING CHANGES * Check unused generics are bound (noir-lang/noir#5840) ### Features * Add `Expr::as_assert` (noir-lang/noir#5857) ([cf5b667](cf5b667)) * Add `Expr::resolve` and `TypedExpr::as_function_definition` (noir-lang/noir#5859) ([cf5b667](cf5b667)) * Add `FunctionDef::body` (noir-lang/noir#5825) ([cf5b667](cf5b667)) * Add `FunctionDef::has_named_attribute` (noir-lang/noir#5870) ([cf5b667](cf5b667)) * Add `Type::as_string` (noir-lang/noir#5871) ([cf5b667](cf5b667)) * Clarify state in Protogalaxy 3 ([#8181](#8181)) ([4a9bb9d](4a9bb9d)) * LSP signature help for assert and assert_eq (noir-lang/noir#5862) ([cf5b667](cf5b667)) * **meta:** Comptime keccak (noir-lang/noir#5854) ([cf5b667](cf5b667)) * **optimization:** Avoid merging identical (by ID) arrays (noir-lang/noir#5853) ([cf5b667](cf5b667)) * **perf:** Simplify poseidon2 cache zero-pad (noir-lang/noir#5869) ([cf5b667](cf5b667)) * Populate epoch 0 from initial validator set ([#8286](#8286)) ([cbdec54](cbdec54)) * Remove unnecessary copying of vector size during reversal (noir-lang/noir#5852) ([cf5b667](cf5b667)) * Removing `is_dev_net` flag ([#8275](#8275)) ([fc1f307](fc1f307)) * Show backtrace on comptime assertion failures (noir-lang/noir#5842) ([cf5b667](cf5b667)) * Simplify constant calls to `poseidon2_permutation`, `schnorr_verify` and `embedded_curve_add` (noir-lang/noir#5140) ([cf5b667](cf5b667)) * Sync from aztec-packages (noir-lang/noir#5790) ([cf5b667](cf5b667)) * Warn on unused imports (noir-lang/noir#5847) ([cf5b667](cf5b667)) ### Bug Fixes * Check unused generics are bound (noir-lang/noir#5840) ([cf5b667](cf5b667)) * Enforce parity of sequencer tx validation and node tx validation ([#7951](#7951)) ([c7eaf92](c7eaf92)) * Make simulations validate resulting tx by default ([#8157](#8157)) ([f5e388d](f5e388d)) * **nargo:** Resolve Brillig assertion payloads (noir-lang/noir#5872) ([cf5b667](cf5b667)) * Prevent honk proof from getting stale inputs on syncs ([#8293](#8293)) ([2598108](2598108)) * Remove fee juice mint public ([#8260](#8260)) ([2395af3](2395af3)) * **sha256:** Add extra checks against message size when constructing msg blocks (noir-lang/noir#5861) ([cf5b667](cf5b667)) * **sha256:** Fix upper bound when building msg block and delay final block compression under certain cases (noir-lang/noir#5838) ([cf5b667](cf5b667)) * **sha256:** Perform compression per block and utilize ROM instead of RAM when setting up the message block (noir-lang/noir#5760) ([cf5b667](cf5b667)) ### Miscellaneous * Add documentation to `to_be_bytes`, etc. (noir-lang/noir#5843) ([cf5b667](cf5b667)) * Add missing cases to arithmetic generics (noir-lang/noir#5841) ([cf5b667](cf5b667)) * Add test to reproduce [#8306](#8306) ([41d418c](41d418c)) * Alert slack on Sepolia test ([#8263](#8263)) ([6194b94](6194b94)) * **bb:** Make compile on stock mac clang ([#8278](#8278)) ([7af80ff](7af80ff)) * **bb:** More graceful pippenger on non-powers-of-2 ([#8279](#8279)) ([104ea85](104ea85)) * Bump noir-bignum to 0.3.2 ([#8276](#8276)) ([4c6fe1a](4c6fe1a)) * **ci:** Try to debug 'command brotli not found' ([#8305](#8305)) ([9ee8dd6](9ee8dd6)) * Don't require empty `Prover.toml` for programs with zero arguments but a return value (noir-lang/noir#5845) ([cf5b667](cf5b667)) * Fix a bunch of generics issues in aztec-nr ([#8295](#8295)) ([6e84970](6e84970)) * Fix more issues with generics ([#8302](#8302)) ([4e2ce80](4e2ce80)) * Fix warnings in `avm-transpiler` ([#8307](#8307)) ([359fe05](359fe05)) * Introduce the Visitor pattern (noir-lang/noir#5868) ([cf5b667](cf5b667)) * **perf:** Simplify poseidon2 algorithm (noir-lang/noir#5811) ([cf5b667](cf5b667)) * **perf:** Update to stdlib keccak for reduced Brillig code size (noir-lang/noir#5827) ([cf5b667](cf5b667)) * Redo typo PR by nnsW3 (noir-lang/noir#5834) ([cf5b667](cf5b667)) * Renaming around Protogalaxy Prover ([#8272](#8272)) ([be2169d](be2169d)) * Replace relative paths to noir-protocol-circuits ([56e3fbf](56e3fbf)) * Replace relative paths to noir-protocol-circuits ([1b245c4](1b245c4)) * Replace relative paths to noir-protocol-circuits ([9c3bc43](9c3bc43)) * **revert:** Earthfile accidental change ([#8309](#8309)) ([2d3e0b6](2d3e0b6)) * Underconstrained check in parallel (noir-lang/noir#5848) ([cf5b667](cf5b667)) ### Documentation * **bb:** Transcript spec ([#8301](#8301)) ([18abf37](18abf37)) </details> <details><summary>barretenberg: 0.52.0</summary> ## [0.52.0](barretenberg-v0.51.1...barretenberg-v0.52.0) (2024-09-01) ### Features * Clarify state in Protogalaxy 3 ([#8181](#8181)) ([4a9bb9d](4a9bb9d)) ### Bug Fixes * Prevent honk proof from getting stale inputs on syncs ([#8293](#8293)) ([2598108](2598108)) ### Miscellaneous * **bb:** Make compile on stock mac clang ([#8278](#8278)) ([7af80ff](7af80ff)) * **bb:** More graceful pippenger on non-powers-of-2 ([#8279](#8279)) ([104ea85](104ea85)) * Renaming around Protogalaxy Prover ([#8272](#8272)) ([be2169d](be2169d)) * **revert:** Earthfile accidental change ([#8309](#8309)) ([2d3e0b6](2d3e0b6)) ### Documentation * **bb:** Transcript spec ([#8301](#8301)) ([18abf37](18abf37)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.52.0</summary> ## [0.52.0](AztecProtocol/aztec-packages@aztec-package-v0.51.1...aztec-package-v0.52.0) (2024-09-01) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.52.0</summary> ## [0.52.0](AztecProtocol/aztec-packages@barretenberg.js-v0.51.1...barretenberg.js-v0.52.0) (2024-09-01) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.52.0</summary> ## [0.52.0](AztecProtocol/aztec-packages@aztec-packages-v0.51.1...aztec-packages-v0.52.0) (2024-09-01) ### ⚠ BREAKING CHANGES * Check unused generics are bound (noir-lang/noir#5840) ### Features * Add `Expr::as_assert` (noir-lang/noir#5857) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Add `Expr::resolve` and `TypedExpr::as_function_definition` (noir-lang/noir#5859) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Add `FunctionDef::body` (noir-lang/noir#5825) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Add `FunctionDef::has_named_attribute` (noir-lang/noir#5870) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Add `Type::as_string` (noir-lang/noir#5871) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Clarify state in Protogalaxy 3 ([#8181](AztecProtocol/aztec-packages#8181)) ([4a9bb9d](AztecProtocol/aztec-packages@4a9bb9d)) * LSP signature help for assert and assert_eq (noir-lang/noir#5862) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **meta:** Comptime keccak (noir-lang/noir#5854) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **optimization:** Avoid merging identical (by ID) arrays (noir-lang/noir#5853) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **perf:** Simplify poseidon2 cache zero-pad (noir-lang/noir#5869) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Populate epoch 0 from initial validator set ([#8286](AztecProtocol/aztec-packages#8286)) ([cbdec54](AztecProtocol/aztec-packages@cbdec54)) * Remove unnecessary copying of vector size during reversal (noir-lang/noir#5852) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Removing `is_dev_net` flag ([#8275](AztecProtocol/aztec-packages#8275)) ([fc1f307](AztecProtocol/aztec-packages@fc1f307)) * Show backtrace on comptime assertion failures (noir-lang/noir#5842) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Simplify constant calls to `poseidon2_permutation`, `schnorr_verify` and `embedded_curve_add` (noir-lang/noir#5140) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Sync from aztec-packages (noir-lang/noir#5790) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Warn on unused imports (noir-lang/noir#5847) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) ### Bug Fixes * Check unused generics are bound (noir-lang/noir#5840) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Enforce parity of sequencer tx validation and node tx validation ([#7951](AztecProtocol/aztec-packages#7951)) ([c7eaf92](AztecProtocol/aztec-packages@c7eaf92)) * Make simulations validate resulting tx by default ([#8157](AztecProtocol/aztec-packages#8157)) ([f5e388d](AztecProtocol/aztec-packages@f5e388d)) * **nargo:** Resolve Brillig assertion payloads (noir-lang/noir#5872) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Prevent honk proof from getting stale inputs on syncs ([#8293](AztecProtocol/aztec-packages#8293)) ([2598108](AztecProtocol/aztec-packages@2598108)) * Remove fee juice mint public ([#8260](AztecProtocol/aztec-packages#8260)) ([2395af3](AztecProtocol/aztec-packages@2395af3)) * **sha256:** Add extra checks against message size when constructing msg blocks (noir-lang/noir#5861) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **sha256:** Fix upper bound when building msg block and delay final block compression under certain cases (noir-lang/noir#5838) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **sha256:** Perform compression per block and utilize ROM instead of RAM when setting up the message block (noir-lang/noir#5760) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) ### Miscellaneous * Add documentation to `to_be_bytes`, etc. (noir-lang/noir#5843) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Add missing cases to arithmetic generics (noir-lang/noir#5841) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Add test to reproduce [#8306](AztecProtocol/aztec-packages#8306) ([41d418c](AztecProtocol/aztec-packages@41d418c)) * Alert slack on Sepolia test ([#8263](AztecProtocol/aztec-packages#8263)) ([6194b94](AztecProtocol/aztec-packages@6194b94)) * **bb:** Make compile on stock mac clang ([#8278](AztecProtocol/aztec-packages#8278)) ([7af80ff](AztecProtocol/aztec-packages@7af80ff)) * **bb:** More graceful pippenger on non-powers-of-2 ([#8279](AztecProtocol/aztec-packages#8279)) ([104ea85](AztecProtocol/aztec-packages@104ea85)) * Bump noir-bignum to 0.3.2 ([#8276](AztecProtocol/aztec-packages#8276)) ([4c6fe1a](AztecProtocol/aztec-packages@4c6fe1a)) * **ci:** Try to debug 'command brotli not found' ([#8305](AztecProtocol/aztec-packages#8305)) ([9ee8dd6](AztecProtocol/aztec-packages@9ee8dd6)) * Don't require empty `Prover.toml` for programs with zero arguments but a return value (noir-lang/noir#5845) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Fix a bunch of generics issues in aztec-nr ([#8295](AztecProtocol/aztec-packages#8295)) ([6e84970](AztecProtocol/aztec-packages@6e84970)) * Fix more issues with generics ([#8302](AztecProtocol/aztec-packages#8302)) ([4e2ce80](AztecProtocol/aztec-packages@4e2ce80)) * Fix warnings in `avm-transpiler` ([#8307](AztecProtocol/aztec-packages#8307)) ([359fe05](AztecProtocol/aztec-packages@359fe05)) * Introduce the Visitor pattern (noir-lang/noir#5868) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **perf:** Simplify poseidon2 algorithm (noir-lang/noir#5811) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * **perf:** Update to stdlib keccak for reduced Brillig code size (noir-lang/noir#5827) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Redo typo PR by nnsW3 (noir-lang/noir#5834) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) * Renaming around Protogalaxy Prover ([#8272](AztecProtocol/aztec-packages#8272)) ([be2169d](AztecProtocol/aztec-packages@be2169d)) * Replace relative paths to noir-protocol-circuits ([56e3fbf](AztecProtocol/aztec-packages@56e3fbf)) * Replace relative paths to noir-protocol-circuits ([1b245c4](AztecProtocol/aztec-packages@1b245c4)) * Replace relative paths to noir-protocol-circuits ([9c3bc43](AztecProtocol/aztec-packages@9c3bc43)) * **revert:** Earthfile accidental change ([#8309](AztecProtocol/aztec-packages#8309)) ([2d3e0b6](AztecProtocol/aztec-packages@2d3e0b6)) * Underconstrained check in parallel (noir-lang/noir#5848) ([cf5b667](AztecProtocol/aztec-packages@cf5b667)) ### Documentation * **bb:** Transcript spec ([#8301](AztecProtocol/aztec-packages#8301)) ([18abf37](AztecProtocol/aztec-packages@18abf37)) </details> <details><summary>barretenberg: 0.52.0</summary> ## [0.52.0](AztecProtocol/aztec-packages@barretenberg-v0.51.1...barretenberg-v0.52.0) (2024-09-01) ### Features * Clarify state in Protogalaxy 3 ([#8181](AztecProtocol/aztec-packages#8181)) ([4a9bb9d](AztecProtocol/aztec-packages@4a9bb9d)) ### Bug Fixes * Prevent honk proof from getting stale inputs on syncs ([#8293](AztecProtocol/aztec-packages#8293)) ([2598108](AztecProtocol/aztec-packages@2598108)) ### Miscellaneous * **bb:** Make compile on stock mac clang ([#8278](AztecProtocol/aztec-packages#8278)) ([7af80ff](AztecProtocol/aztec-packages@7af80ff)) * **bb:** More graceful pippenger on non-powers-of-2 ([#8279](AztecProtocol/aztec-packages#8279)) ([104ea85](AztecProtocol/aztec-packages@104ea85)) * Renaming around Protogalaxy Prover ([#8272](AztecProtocol/aztec-packages#8272)) ([be2169d](AztecProtocol/aztec-packages@be2169d)) * **revert:** Earthfile accidental change ([#8309](AztecProtocol/aztec-packages#8309)) ([2d3e0b6](AztecProtocol/aztec-packages@2d3e0b6)) ### Documentation * **bb:** Transcript spec ([#8301](AztecProtocol/aztec-packages#8301)) ([18abf37](AztecProtocol/aztec-packages@18abf37)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This PR tries to get rid of the
is_dev_net
flag that we had in theconstants.nr
. This is to simplify the flows such that is just one flow used by both the devnet and spartan.Alters our
createNode
andsetup
such that they will always assume active validators, since it will be required for proper sequencing.Changes the
l1-publisher
slightly to reduce the probability thatvalidateBlockForSubmission
would fail due to an Ethereum block arriving between the check and thepropose
call.Alters the
sequencer::work()
function such that there is a cleaner split between when we can return early, and when we have to throw an error and revert to properly rollback the global state.Alters the
collectAttestations
functions slightly, i) to cover the case where a validator client is not provided but a committee is needed, and ii) to ensure that the sequencers own attestation also makes it way into the attestations collected.Graveyard
Below this point is the graveyard where old issues very talked about and insanity ensued.
Currently running into issues where tests are behaving "strange". Namely, it seems like we sometimes will have a passing test and sometimes wont.
This especially is encountered when many tests are run at once, such as the
e2e_token_contract
tests. A snippet below shares some frustration. If we are running all the tests, they always fail, but if running only some, it seems to depend on what is being logged...Somewhat interesting, if using
AZTEC_SLOT_DURATION = 36
many of these issues seems to go away, e.g., transactions are not dropped anymore etc. However, this really should not be the case, hence this time influence is not walltime, as it is using an anvil instance behind the scenes. Main reason around this is more likely to be that we don't encounter the case where asubmitProof
have progressed time and moved the slot.Looking at logs!
What do I see in the logs
validateHeader
(the slot have changed because ofsubmitProof
)Note from this: There is no block after BLOCK_A where TX_A could have been included, but when the sequencer is FAILING to publish the new block, it seems to be keeping the state but dropping the block AND its transactions. So the setup fails because the user will get the response from the node that "this is a double-spend, go away".
I tried using
PROVER_NODE_DISABLE_AUTOMATIC_PROVING
to turn of the proving, but that don't seem to have any effect, and if I try to just bypass the submitProofs it seems to cause the application to infinite loop where it just never tries anything ever again.The tree that the sequencer is checking against that is larger than what you get from sync seem to only be larger for a "short" time before it figures out something is messed up, and will "rollback", but the damage is done and we just dropped potentially a lot of transactions
There exact timing of the failure also "depends", so that is kinda pain.
Update:
Issue seemed to be that if we returned early from
work()
in the sequencer, when not proposing a block. We would not rollback the state, so if state changes were made, it would WRECK the next block.