Initial stab at 0.6.0 contracts #1254
Merged
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.
Upgrade local chain and test Anvil containers to contracts v0.6.0 and update generated ABI bindings, events, and parameter parsing across blockchain and indexer code
Align the repo with contracts v0.6.0, updating generated bindings for event signatures and topics, adjusting parameter parsing to return a string key, and revising payer report and registry logic to include
uint24nonceandbytes32payerReportIdwhile switching node ID hashing to ABI-encodeduint32[]with keccak256. Docker and Anvil images move toghcr.io/xmtp/contracts:v0.6.0, and anvil environment addresses refresh.📍Where to Start
Start with the generated bindings changes and their downstream usage in
payerregistryand parameter registry parsing, then follow into blockchain adapters and tests: pkg/abi/payerregistry/PayerRegistry.go, pkg/blockchain/parameter_registry_admin.go, and pkg/utils/hash.go.📊 Macroscope summarized 10c738e. 7 files reviewed, 1 issue evaluated, 1 issue filtered, 0 comments posted
🗂️ Filtered Issues
pkg/utils/hash.go — 0 comments posted, 1 evaluated, 1 filtered
PackSortAndHashNodeIDsnow feedsargs.Pack(nodeIDs)(i.e. fullabi.encodefor a dynamicuint32[]) into the hash. ABI encoding a dynamic array prepends the head/offset and the element count before the element words. The previous implementation hashed only the concatenation of the 32-byte, left-padded element words (equivalent toabi.encodePackedof the array). As a result, every call with a non-emptyactiveNodeIDsslice now produces a differentactiveNodeIdsHash, and thereforeBuildPayerReportIDreturns a differentReportIDfor the same report payload. Any previously stored or on-chain report IDs will no longer match what the node computes after this change, breaking report verification/lookup. Example: for[]uint32{1}, the old code hashedkeccak256(0…01), while the new code hasheskeccak256( offset || length || 0…01 ), yielding a different digest. This is a breaking runtime regression affecting every caller. [ Low confidence ]