Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates all on-chain deadline/challenge-window semantics from block numbers to Unix timestamps (block.timestamp) and refreshes the Solidity protobuf decoders (Pb.sol, PbChain.sol, PbEntity.sol) from the latest generator output.
Changes:
- Replace deadline/timeout comparisons and stored time fields from
block.numbertoblock.timestampacross ledger, pay resolution, registry, and migration logic. - Update Solidity tests to use
vm.warp(...)and adjust assertions/events to timestamp-based deadlines. - Regenerate protobuf decoder libraries and update proto sources + documentation/gas baselines accordingly.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/utils/Base.t.sol | Warp timestamp in base setup to avoid underflow in timestamp math across tests. |
| test/gas_logs/fine_granularity/IntendSettle-OneState.txt | Update committed gas baseline values. |
| test/gas_logs/fine_granularity/ClearPays.txt | Update committed gas baseline values. |
| test/gas_logs/VirtContractResolver.txt | Update committed gas baseline values. |
| test/gas_logs/PayResolver.txt | Update committed gas baseline values. |
| test/gas_logs/CelerLedger-Migrate.txt | Update committed gas baseline values. |
| test/gas_logs/CelerLedger-ETH.txt | Update committed gas baseline values. |
| test/gas_logs/CelerLedger-ERC20.txt | Update committed gas baseline values. |
| test/RouterRegistry.t.sol | Switch tests to timestamp-based liveness tracking and add timestamp anchoring. |
| test/PayResolver.t.sol | Switch resolve-deadline logic to timestamps; add tests for not-finalized dependent conditions. |
| test/PayRegistry.t.sol | Switch finalization checks/tests to timestamp semantics. |
| test/GasReport.t.sol | Use vm.warp and timestamp-based deadlines in gas measurement harness. |
| test/CelerLedger.Migrate.t.sol | Update migration deadline tests to timestamps. |
| test/CelerLedger.ETH.t.sol | Update channel/withdraw/settle deadline tests from block roll to timestamp warp. |
| test/CelerLedger.ERC20.t.sol | Update settle/confirm timing to timestamps. |
| src/lib/ledgerlib/LedgerStruct.sol | Document settle/dispute fields as timestamp/seconds-based. |
| src/lib/ledgerlib/LedgerOperation.sol | Core ledger operations now use block.timestamp for deadlines/timeouts. |
| src/lib/ledgerlib/LedgerMigrate.sol | Migration deadline enforcement switched to block.timestamp. |
| src/lib/interface/IRouterRegistry.sol | Update interface docs to timestamp semantics. |
| src/lib/interface/IPayRegistry.sol | Update interface docs to timestamp semantics. |
| src/lib/interface/ICelerLedger.sol | Update interface docs for timestamp-based settle/withdraw intent timing. |
| src/lib/data/proto/entity.proto | Proto formatting/metadata refresh (copyright, ordering, typos). |
| src/lib/data/proto/chain.proto | Proto formatting/metadata refresh (copyright, ordering, whitespace). |
| src/lib/data/PbEntity.sol | Regenerated protobuf entity decoders (new decoding approach + helpers). |
| src/lib/data/PbChain.sol | Regenerated protobuf chain decoders. |
| src/lib/data/Pb.sol | Regenerated protobuf runtime support library (new primitive decoders). |
| src/helper/NumericCondMock.sol | Update mock to decode finalization/outcome from query bytes for richer testing. |
| src/helper/BooleanCondMock.sol | Update mock to decode finalization/outcome from query bytes for richer testing. |
| src/RouterRegistry.sol | Store router liveness as timestamp instead of block number. |
| src/PayResolver.sol | Resolve logic now uses timestamps for pay deadlines/timeouts. |
| src/PayRegistry.sol | Finalization checks now use timestamps. |
| src/CelerLedgerMock.sol | Keep mock ledger consistent with timestamp-based timing. |
| docs/contracts.md | Update documentation to describe timestamp-based deadlines and router timestamps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pb.sol/PbChain.sol/PbEntity.solto the latestpb3-gen-soloutput