Skip to content

update for agent-pay-contracts breaking changes#6

Merged
hhl42 merged 4 commits into
mainfrom
upgrade-contracts
May 6, 2026
Merged

update for agent-pay-contracts breaking changes#6
hhl42 merged 4 commits into
mainfrom
upgrade-contracts

Conversation

@hhl42
Copy link
Copy Markdown
Contributor

@hhl42 hhl42 commented May 5, 2026

Sync with the contracts repo's domain-binding hardening:

  • Replace proto/entity.proto and regenerate entity.pb.go.
  • Regenerate Go contract bindings (forge build + abigen).
  • Set ChainId on every ConditionalPay we sign, and ChainId + LedgerAddress on every PaymentChannelInitializer; receivers reject mismatches before signing or forwarding so the cross-chain / wrong-ledger replay surface is closed off-chain too.
  • Mirror the new walletId derivation (chainid prefix) in computePscID so off-chain channel IDs match what CelerLedger emits.
  • Rename SimplexPaymentChannel.last_pay_resolve_deadline -> pay_clear_deadline (wire-compat, same tag 6) and update validators / printers. We only emit single-segment pay lists, so no clearMargin is added; comment at the assignment site flags where to add one if multi-segment support is ever introduced.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates agent-pay to match the latest contract/domain-binding changes so off-chain data structures, signatures, and derived IDs stay aligned with the contracts repo.

Changes:

  • Extends payment and channel initializer protobufs/bindings with chain_id / ledger_address, and regenerates generated Go artifacts.
  • Renames simplex deadline semantics from last_pay_resolve_deadline to pay_clear_deadline and updates validation/printing paths.
  • Updates off-chain signing/open-channel logic to populate chain-aware fields and derive channel IDs with the new wallet ID formula.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/pbprint.go Updates debug printers for renamed/open-channel fields.
server/server.go Adds ChainId when admin token sends create pays.
server/osp_webapi_backend.go Adds ChainId to OSP boolean-pay creation.
route/routerregistry/routerregistry.go Regenerated binding header comment.
proto/entity.proto Adds new proto fields and renames simplex deadline field.
messager/send_cond_pay_request.go Updates simplex pending-pay deadline handling.
handlers/msghdl/handle_pay_settle_request.go Renames settle-side deadline validation.
handlers/msghdl/handle_cond_pay_request.go Adds pay chain-id validation and updates simplex checks.
go.sum Removes unused dependency checksum entries.
go.mod Drops unused go.uber.org/atomic dependency.
entity/entity.pb.go Regenerated protobuf Go code for entity changes.
dispute/utils.go Renames logged simplex deadline field.
dispute/dispute_channel.go Renames simplex summary output field.
delegate/delegate.go Adds ChainId to delegated token-send pays.
common/errs.go Replaces old deadline error with chain-id/pay-clear errors.
cnode/open_channel.go Binds initializers to chain/ledger and updates channel ID derivation.
client/api.go Adds ChainId to client-created boolean pays.
chain/erc20.go Regenerated binding header comment.
chain/channel-eth-go/wallet/wallet.go Regenerated wallet binding for new wallet ID derivation.
chain/channel-eth-go/virtresolver/virtresolver.go Regenerated binding header comment.
chain/channel-eth-go/routerregistry/routerregistry.go Regenerated binding header comment.
chain/channel-eth-go/payresolver/payresolver.go Regenerated pay resolver binding.
chain/channel-eth-go/payregistry/payregistry.go Regenerated pay registry binding and renamed ABI parameter docs.
chain/channel-eth-go/migrate/migrate.go Regenerated migrate binding.
chain/channel-eth-go/ledgerstruct/ledgerstruct.go Regenerated ledger struct binding.
chain/channel-eth-go/ledger/ledger.go Regenerated ledger binding for renamed deadline getter.
chain/channel-eth-go/ethpool/ethpool.go Regenerated eth pool binding.
chain/channel-eth-go/channel/channel.go Regenerated channel binding.
chain/channel-eth-go/balancelimit/balancelimit.go Regenerated balance limit binding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread handlers/msghdl/handle_cond_pay_request.go
Comment thread cnode/open_channel.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread proto/entity.proto Outdated
@hhl42 hhl42 merged commit e6bae4b into main May 6, 2026
2 checks passed
@hhl42 hhl42 deleted the upgrade-contracts branch May 6, 2026 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants