Repository navigation
market: Track 104 — wallet signing, chain pinning, escrow watches - #58
Merged
Merged
Conversation
settlement_signer=wallet lands the autonomous local signer: WalletSender decrypts the shared web3 wallet key (keyring or RHIZOME_WALLET_PASSPHRASE), fills, signs, and broadcasts raw txs; keys are zeroed after each send. approval stays the default; direct serves unlocked/dev endpoints. Chain pinning checks live eth_chainId == escrow_chain_id at rail assembly and again inside every wallet SendTx; chain 1 refuses unless escrow_allow_mainnet=true. Signer modes on the fixture rail warn — fixture signs nothing. pkg/web3.DecodeSignedTx parses and ecrecovers legacy + EIP-1559 signed transactions so FakeChain serves eth_sendRawTransaction (plus getTransactionCount/estimateGas/gasPrice) — wallet-signed buys land on-chain in tests. The module runs a per-purchase escrow event watcher: eth_getLogs on each non-terminal purchase's clone at escrow_watch_interval (default 60s, 0=off), transitioning on Release/Lock/Withdraw/Resolve/Verified and auditing market.escrow.event; watch_block persists progress and disputed stays watched for the arbiter's resolve. Recorded testnet E2E remains deferred to v0.16.0 Track 132. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Summary
Track 104 closes the signer gap from Track 103 —
settlement_signer=walletis now a real autonomous local signer, with chain pinning, a mainnet gate, and per-purchase escrow event watches.pkg/settlement.WalletSender— signs locally with the shared web3 wallet key (PrivateKey→FillTxDefaults→SignTx→eth_sendRawTransaction); keyring orRHIZOME_WALLET_PASSPHRASEdecryption, key material zeroed after each send.approvalremains the default;directstays for unlocked/dev endpoints.pkg/web3.DecodeSignedTx— RLP decodes legacy + EIP-1559 signed transactions and ecrecovers the sender; FakeChain now serveseth_sendRawTransaction/eth_getTransactionCount/eth_estimateGas/eth_gasPrice, so wallet-signed buys land on-chain in tests — no mocked signing.eth_chainIdmust equalescrow_chain_idat rail assembly and on every walletSendTx; mismatches refuse.escrow_allow_mainnet(default false) refuses chain 1.wallet/directon the fixture rail warn — fixture signs nothing.cmd/rhizome-market/watch.gopollseth_getLogsper non-terminal purchase clone onescrow_watch_interval(default 60s, 0=off): Release→completed, Lock→disputed, Withdraw→refunded, Resolve→resolved (disputed stays watched for the arbiter), Verified audited.watch_blockpersists progress on the purchase record.escrow_allow_mainnet,escrow_watch_interval, updatedsettlement_signer), config.example, modules.md, sprint doc, ROADMAP, AGENTS, .todo.md all synced.Test plan
TestBuy_WalletSignerEndToEnd— wallet-signed open+release land on FakeChain; provider balance movesgo test -p 1 -tags goolm,stdjson ./...— all packages, 0 failuresRecorded two-node testnet E2E stays deferred to v0.16.0 Track 132 — the rail is bound and test-proven but unverified on live Sepolia; docs mark it experimental.
Generated with Devin