-
Notifications
You must be signed in to change notification settings - Fork 391
Restore flush logic (Nuclear option for state recovery) #2121
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
Conversation
MarcosNicolau
left a comment
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.
Tested with description from #2119.
JuArce
left a comment
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.
The queue is being nuked, but the users connection is not being closed
Logs from batcher:
...
...
[2025-09-17T17:28:44Z WARN aligned_batcher] User 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f has insufficient balance, flushing entire queue as safety measure
[2025-09-17T17:28:44Z WARN aligned_batcher] Resetting state... Flushing queue and nonces
[2025-09-17T17:28:44Z ERROR aligned_batcher] Batch finalization failed: Batcher state was corrupted and flushed: Queue and user states flushed due to insufficient balance for user 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f
[2025-09-17T17:28:44Z INFO aligned_batcher] State was corrupted and flushed - not restoring proofs
[2025-09-17T17:28:44Z ERROR aligned_batcher] Error when handling new block: Batcher state was corrupted and flushed: Queue and user states flushed due to insufficient balance for user 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f
...
...
Logs from user
...
...
[2025-09-17T17:25:42Z WARN aligned] Nonce: 0
[2025-09-17T17:25:42Z INFO aligned] Randomizing proof generator address for each proof...
[2025-09-17T17:25:42Z INFO aligned] Submitting proofs to the Aligned batcher...
[2025-09-17T17:25:42Z INFO aligned_sdk::communication::messaging] All proofs sent
|
Following Juli's comment, it seems we are not sending the message to the |
b1d1312 to
c59f69a
Compare
Restore flush logic (Nuclear option for state recovery)
Description
Restore flush logic (Nuclear option for state recovery)
How to test
You can test it with an anvil rich account private key:
crates/batcher/src/lib.rs) code so that you have enough time to unlock and withdraw eth from the batcher payment contract:cd crates/cli cargo run --release -- deposit-to-batcher --amount 1ether --private_key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 --network devnet --rpc_url http://localhost:8545cargo run --release -- submit \ --proving_system Risc0 \ --proof ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input_3_0_3.proof \ --vm_program ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input_id_3_0_3.bin \ --rpc_url http://localhost:8545 \ --network devnet \ --instant_fee_estimate \ --private_key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 \ --random_address[2025-09-15T15:13:17Z WARN aligned_batcher] SLEEPING BEFORE FINALIZING BLOCK ADVANCE BLOCKS NOW!!!!Now hurry up (you only have 60 seconds to unlock, advance blocks and withdraw from the batcher payment service)
cast send 0x7bc06c482DEAd17c0e297aFbC32f6e63d3846650 "unlock()" --rpc-url http://localhost:8545 --private-key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97anvilseconds to not wait:cast call 0x7bc06c482DEAd17c0e297aFbC32f6e63d3846650 "user_balances(address)" --rpc-url http://localhost:8545 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f