Repository navigation
fix(tasks): hash the declared share, skills and location terms like vAPI - #123
Merged
Merged
Conversation
vAPI freezes every declared order term into the on-chain terms hash, including `share`, `skills` and `location` (orderTermsSchema). The client's terms model did not know those fields, so it hashed other terms than vAPI and predicted another clone address. On Base mainnet the funding of a new pool was refused with "The funding target differs from the prediction for accepted creation terms." Nothing was signed. The client now carries those three declared fields, so its terms hash and clone prediction match vAPI for pools, tasks and bounties. A regression test pins the terms hash of a real mainnet pool posted on 2026-12-02, which makes the pinned pool factory predict vAPI's funding address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: vAPI Development <336934719+vapi-development@users.noreply.github.com>
`share`, `skills` and `location` are set on vAPI, not by this client's post. They now live in `declaredTermsFields`, which only the terms hash reads; `taskTermsFields`, the post input of the SDK, CLI and MCP, is unchanged, so MCP `tasks.post` does not accept fields it would drop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: vAPI Development <336934719+vapi-development@users.noreply.github.com>
Merged
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.
vAPI freezes every declared order term into the on-chain terms hash, including
share,skillsandlocation. The client's terms model did not have those fields, so it computed a different terms hash and predicted a different clone address. Since 0.17.2 the client signs a first funding only when its own prediction equals vAPI's address, so on Base mainnet a new pool was refused:v2_plan_mismatch: The funding target differs from the prediction for accepted creation terms.Nothing was signed.Proof on Base mainnet (order
0eb0adc1…): the pinned pool factory'spredictPoolreturns vAPI's funding address0x96d5…e021for the terms hash withshare, and0xd4FA…4e32for the client's hash without it.Fix:
taskTermsFieldscarriesshare,skillsandlocationexactly like vAPI'sorderTermsSchema, so the terms hash and prediction match for pools, tasks and bounties.Tests (red on
main): the exact terms hash of the mainnet pool;share,skillsandlocationeach change a task's terms hash. Core suite green apart from swarm tests that timed out under laptop load and pass alone (125/125).follow-up: a contract test that fails when vAPI adds a declared order field the client does not hash.
🤖 Generated with Claude Code
follow-up: a hosted order view is a projection:
sharecan change after funding andlocationis redacted for some readers, so recomputing the frozen terms hash from it can fail closed. vAPI should return the frozen declared terms snapshot for V2 orders, and the client should hash that.follow-up: the client proof schema rejects a PR proof with repository, merged and challenge together, which vAPI accepts.