Repository navigation
build: Dash Platform v4.2.0-beta.7 (Rust tag, npm SDK, contract-validate findBy/where) - #153
Merged
Merged
Conversation
…e #5053 remap wasm-sdk 4.2.0-beta.6 gives a refusal at the broadcast check the node's consensus code (platform#5112) on a Protocol error, which the decoder took for a block verdict and so reported as charged. A code is now charged only on a StateTransitionBroadcastError. The platform#5053 remap (consensus-shift.ts) is deleted: beta.6 decodes BasicError in the node's order. Adds a parse test of a contract using the beta.6 propertyConstraints forms. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ainst the balance Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…_commit; immutable releases as an owner option Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…a.6-shaped tests StateTransitionBroadcastError is charged, Protocol is not, any other kind is unknown; an undecodable block verdict is unknown. A coded 10405 still takes the stale-id path before the refusal decode. The engine tests throw the beta.6 shapes and cover replace and delete refusals at the broadcast check and in a block; the live test adds a replace refused at the broadcast check with the balance unchanged; the rules test judges a document locally. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
forge-web, tools/mint-identity and forge-contracts/sdk-v2 move from 4.2.0-beta.5 to npm 4.2.0-beta.7 (beta.6 never reached npm). beta.7 refuses the refersTo lookup/propertyAgreement keywords (platform#5197), so it cannot read moutai's current contracts: this lands with the fresh findBy registration at the next wipe. The vendoring doc now describes vendoring as fallback tooling and notes the beta.7 APIs (documentCreateCost, documentTypeLayout, validateUpdate). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…here The workspace and tools/contract-validate move to the v4.2.0-beta.7 tag. DocumentV0 literals gain moderated_at/moderated_by. check_leaf names a findBy by its properties (the index name is gone, platform#5197) and treats a revealed property like an identifier reference, as drive-abci does. negative.sh takes a contracts directory, validates the unmutated contracts first, accepts a third contract (forge-community), spells every mutation in findBy/where, and checks that the old lookup/propertyAgreement keywords are refused. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ling The three-contract layout and contracts.yml belong to the schema PR on wipe/beta7. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…a snapshot text match The engine broadcasts and waits itself, so platform#5136 (which changed only documents.create/delete) does not reach it: an indexOnly create (star, follow) now waits with waitForAffectedState and a stored document with the strict waitForResponse, instead of reading the strict wait's 'VerifiedDocuments snapshot' refusal as landed. The SDK's own indexOnly delete resolves on its proof from beta.7, so the delete path's snapshot branch is gone. Mocked star/unstar tests cover both; two fail on the old engine. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
platform#5136 changed only the SDK's own document put and delete; this engine broadcasts and waits itself, and the strict wait still refuses an indexOnly outcome. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rrors never read as stale ids Addresses the review of the beta.7 bump: an undecodable refusal (kind Protocol, code -1, from CheckTx or a block) has charged=null on the replace and delete paths too; isStaleDocumentIdError trusts a code over text; the stored-document wait test counts the waits; the live test is renamed for beta.7; stale version strings, the sdk-vendoring note on the engine's indexOnly wait, and one negative.sh label are corrected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The delete path's proven flag was always true (no snapshot branch left); a result-wait verdict is unknown only when undecodable, as its comment says; the tests share one pair of SDK error shapes and named texts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
This PR covers WIPE-PLAN §2.1 (the SDK bumps) for the fresh beta.7 registration. It targets the integration branch
wipe/beta7, not master, so master stays on beta.6 Rust and beta.5 JS until the wipe.Rust.
tools/contract-validatemove to thev4.2.0-beta.7tag, and both lockfiles are updated.DocumentV0 { … }literals gainmoderated_at: None, moderated_by: None.npm.
@dashevo/evo-sdkand@dashevo/wasm-sdkmove to4.2.0-beta.7, pinned exact, in forge-web,tools/mint-identityandforge-contracts/sdk-v2.pnpm-workspace.yaml'sminimumReleaseAgeExcludenow names beta.7.consensus-shift.ts deleted. This was the platform#5053 remap, which beta.5 JS needed to decode a beta.6 node's refusals.
Reading refusals on beta.6/beta.7 JS (platform#5112).
Protocolwith the node's code. It used to beGenericwith code -1.asConsensusRefusalnow reads the charge from the error kind:StateTransitionBroadcastError: charged.Protocol: not charged.10405(stale document id) takes the re-prepare path before the refusal decode. A code always beats the text, so a figure like "required 104050000" is not read as a stale id.indexOnly writes (platform#5136).
documents.createdoesn't reach it. An indexOnly create (star, follow, watch, starBeat) now waits withstateTransitions.waitForAffectedState, instead of matching the strict wait's "VerifiedDocuments snapshot" text. Stored documents keep the strict wait.documents.deleteresolves an indexOnly delete on its own from beta.7.wait_for_affected_state, for the same reason: it broadcasts and waits itself. A comment now says so.contract-validate.
check_leafnames afindByby its properties, since the index name is gone in platform#5197.PropertyReference::Revealedis checked like aValue, as drive-abci's reference validation v0 does.negative.share respelled tofindBy/where. Its three-contract layout, the sample documents andcontracts.ymlbelong to the schema PR, as agreed.Docs.
docs/dev/sdk-vendoring.md: npm pins, with vendoring as fallback tooling. Thevendor-sdk-v4.2.0-beta.6pre-release is used by nothing. The doc also has API notes for beta.6 and beta.7:documentCreateCostanddocumentTypeLayoutare exported from evo-sdk.validateUpdateis in wasm-dpp2 only.documentCreateCostcan replacecost.ts's constants: partly, after the fresh registration. This is tracked in BACKLOG.Tests
Offline, local.
next buildpass. The unit suite gives 2581 passed and 1 test failed, in 2 files; both files are expected (see "Expected red" below).tools/mint-identity: 23/23 pass.cargo clippy --workspace --all-targets -D warningsandcargo fmt --checkare clean.cargo test --workspace: 951 passed and 4 failed, all expected (see "Expected red" below).New or changed tests. These fail on the code before the change and pass after it.
write-errors.test.tscovers coded CheckTx refusals, block verdicts, and other kinds, which give an unknown charge.write-engine.test.ts:{name:'Protocol', kind:3, code}at broadcast and{name:'StateTransitionBroadcastError', kind:22, code}at the wait.refused:<type>; when undecodable the charge is unknown.contract-rules-beta6.test.tsparses a contract using the beta.6propertyConstraintsforms (countOf,sumOf,ifThen,notIn,$ownerId,$createdAtBlockHeight) and judges a document locally withcheckDocumentPropertyConstraints. beta.5 refuses the contract.forge-contracts/contracts/forge-collab.jsononce the fresh contracts land.negative.sh: all respelled mutations are rejected for the intended reason againstdesign/final-schema/fallback, the new-syntax contracts.Live.
charged=falsewith the balance unchanged; a 40120 gate refusal is charged, matching the balance.lib/repo/sdk-beta7.live.test.tsrepeats this for beta.7, plus a CheckTx refusal on a replace (the balance is polled, not read once). It needs a beta.7 moutai with findBy-syntax contracts, so it runs after the wipe.contracts.fetchrefuses both forge contracts with "refersTo lookup was replaced by findBy".Known red until the schema PR
These are the only red checks on this PR. Each one was checked in its CI log to fail only because beta.7 refuses the old-syntax contracts on every parse (platform#5197: "refersTo lookup was replaced by findBy").
web(CI):lib/private/conformance.test.ts(parsesforge-contracts/contracts/forge-core.json) andlib/sdk/contract-seed.test.ts(the moutai snapshots). 156 other test files pass.rust build + test(Rust):forge-coreplatform::wrap::tests::{a_wrong_shape_is_refused_before_decryption, envelope_names_both_keys, sdk_round_trip_both_directions}andprivate::conformance::private_conformance_vectors. All four panic atwrap.rs:196parsingforge-core.json; 527 other tests pass.contract-validate(Contracts): the validator refuses the currentforge-core.json("'lookup' was unexpected").negative.sh's twoexpect_update_refusedchecks need a new-syntaxregistered/forge-core.v1.json.playwright (read-only, devnet moutai)(Web e2e): a beta.7 build cannot fetch moutai's current contracts (checked live:contracts.fetchrefuses both forge contracts). It can only pass after the wipe, once the contracts are registered in the findBy syntax.contracts.yml:37still says beta.6 in a comment. It is left for the schema PR, which owns that file.The schema PR (#154) replaces the contracts on the same branch and turns everything green except playwright, which waits for the wipe. wipe/beta7 is an integration branch and deploys nothing.
🤖 Generated with Claude Code