You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spec: add deposit counter for transparent deposit confirmation (#355)
* spec: add deposit counter for transparent deposit confirmation
Add a monotonic deposit counter alongside the existing hash chain so that
checking whether a deposit was processed is a simple integer comparison
(lastProcessedDepositNumber >= myDepositNumber) instead of requiring
hash chain reconstruction.
- Add depositCount and lastProcessedDepositNumber storage to ZonePortal
- Add prevDepositNumber/nextDepositNumber to DepositQueueTransition
- Emit depositNumber in DepositMade, EncryptedDepositMade, BounceBack events
- Emit lastProcessedDepositNumber in BatchSubmitted and TempoAdvanced events
- Add processedDepositNumber storage to ZoneInbox
- Document deposit counter and status checking in overview.md
Made-with: Cursor
* style: fix forge fmt formatting in test files
Made-with: Cursor
* fix: update Rust ABI bindings and zone monitor for deposit counter
Align Rust code with the updated Solidity spec:
- Add prevDepositNumber/nextDepositNumber to DepositQueueTransition struct
- Add depositNumber to DepositMade, EncryptedDepositMade, BounceBack events
- Add lastProcessedDepositNumber to BatchSubmitted and TempoAdvanced events
- Add depositCount, lastProcessedDepositNumber views to ZonePortal ABI
- Add processedDepositNumber view to ZoneInbox ABI
- Track prev_processed_deposit_number in ZoneMonitor and BatchData
- Read processedDepositNumber in fetch_block_snapshot
Co-Authored-By: dankrad <[email protected]>
* fix: update ZoneInbox bytecode in zone-test-genesis
Recompile ZoneInbox with the deposit counter changes so the
embedded TempoAdvanced event signature matches the updated ABI.
Co-Authored-By: dankrad <[email protected]>
* fix: set config and tempoState immutables in ZoneInbox genesis bytecode
The raw forge deployedBytecode has all immutables zeroed. The genesis
patching code replaces 32-byte zero needles with the portal address,
so config and tempoState must be pre-set to avoid being overwritten.
Co-Authored-By: dankrad <[email protected]>
* fix: recompile ZoneInbox bytecode in zone-test-genesis
The genesis bytecode was compiled from an older version of ZoneInbox.sol
that didn't include the deposit counter changes, causing a function
selector mismatch. The Rust ABI generates selector 0xd01e8d31 for
advanceTempo, but the old genesis bytecode didn't have that selector,
so all advanceTempo calls hit the fallback and reverted with empty output.
Also fixes the advance_tempo test's local sol! declaration which was
missing the EnabledToken[] parameter.
Co-Authored-By: dankrad <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-019d5485-9b88-71df-8d85-a0bafe2f6815
---------
Co-authored-by: Dankrad Feist <[email protected]>
Co-authored-by: dankrad <[email protected]>
0 commit comments