Skip to content

chore(poi): make poi-rs its own workspace on iota v1.35.2 - #356

Draft
eike-hass wants to merge 2 commits into
mainfrom
chore/poi-own-workspace
Draft

eike-hass wants to merge 2 commits into
mainfrom
chore/poi-own-workspace

Conversation

@eike-hass

Copy link
Copy Markdown
Collaborator

Summary

Fast path for Proof of Inclusion: poi-rs becomes its own Cargo workspace (own Cargo.lock, excluded from the root workspace) and moves on its own to iota v1.35.2 (the current mainnet release) and to the crates.io releases of the iota-rust-sdk crates it uses (iota-sdk-types and iota-sdk-grpc-client 1.0.0-rc.2, iota-sdk-grpc-types 1.0.0-rc.1). Single Notarization, Audit Trails and product-core stay on iota v1.29.0, so this needs no product-core release.

This is the isolated alternative to the Proof of Inclusion part of #355, which bumps the whole workspace and waits for iotaledger/product-core#153. Both change poi-rs, so whichever merges second needs a rebase. If this one goes first, #355 keeps the Single Notarization, Audit Trails and product-core bump only.

Proof of Inclusion does not depend on product-core. In the shared workspace it still had to follow product-core's iota version, because one lockfile allows one version of iota-types. As its own workspace it can follow node and SDK releases independently.

Breaking change: ProofV1 JSON

iota-sdk-types renamed several serde variants without aliases (CancelledTransactions to CanceledTransactions, UnchangedSharedKind::Cancelled, ExecutionCancelledDueTo*, MoveAuthenticationError). Proof JSON that contains them does not deserialize across this upgrade in either direction. That covers every consensus commit prologue proof and proofs of canceled transactions or of failed transactions with the renamed errors. Proofs of ordinary programmable transactions are unaffected (byte-identical output before and after on testnet).

Backwards compatibility is not provided, so proof.rs and both Proof of Inclusion READMEs now state that the format is not stable before 1.0. The frozen V1 fixtures stay green because they contain none of the renamed variants.

Changes

  • poi-rs: standalone manifest (own [workspace], explicit dependency versions, own fastcrypto patch, own Cargo.lock), gRPC source ported to the builder-style GrpcClient API, TransactionEffects and TransactionEvents taken from iota-sdk-types, TransactionEnvelope and OwnedObjectReference changes followed.
  • poi_wasm: same pins and renames. iota-sdk-types is pinned exactly because the package has no tracked lockfile.
  • examples: the Proof of Inclusion examples take the newer types through renamed dependencies (poi-iota-grpc-client, poi-iota-sdk-types, poi-iota-types) and carry the identifiers of the notarization they prove over by their bytes. The examples crate is the only place that builds both iota versions.
  • CI: poi-rs check (Ubuntu), build (all platforms), test, clippy, fmt, docs (into target/doc, so the published docs keep poi_rs) and cargo audit of poi-rs/Cargo.lock. The scheduled dependency refresh updates both lockfiles.
  • Docs: README, fixture README and CLAUDE.md commands use --manifest-path poi-rs/Cargo.toml. poi-rs/target is ignored.

Testing

CI steps reproduced against an iota v1.35.2 localnet started from the release binaries:

  • Root workspace: per-member feature checks, cargo test --workspace -- --test-threads=1 (132 tests including the Single Notarization and Audit Trails e2e suites), all 32 Rust examples. The 7 Proof of Inclusion examples notarize with the v1.29 client and prove with poi-rs on v1.35.2.
  • poi-rs: checks for all feature sets, 71 tests, clippy on stable 1.100 with -D warnings, fmt, docs. The poi CLI creates and verifies a live testnet proof.
  • poi_wasm: npm ci, npm run build, 24 unit tests, 6 Node examples.

Not run: release-mode builds and Windows (CI covers both). All localnet proofs are in epoch 0, so the committee walk across an epoch change is covered by the poi-rs tests only.

Release

  • @iota/proof-of-inclusion (npm): releasable after merge through the Wasm publish workflow (package: proof-of-inclusion).
  • poi-rs (crates.io): not publishable yet. It still has git dependencies on the iota monorepo (iota-types, and iota-config behind the cli feature). The Rust publish workflow runs cargo-release on the root workspace and no longer includes poi-rs, which it could not publish before either.

Seen while testing, unrelated to this PR

  • Clippy with Rust 1.100.0 fails poi_wasm on main as well (2 clone_on_copy in wasm-bindgen getters), so that job will likely stay red.
  • Wasm builds rewrite the key order of Move.history.json, and npm run grpc:generate in poi_wasm reformats the committed generated TypeScript.

Move poi-rs into its own Cargo workspace (own Cargo.lock, excluded from the
root workspace) and bump only Proof of Inclusion to iota v1.35.2 and to the
crates.io releases of the iota-rust-sdk crates (iota-sdk-types and
iota-sdk-grpc-client 1.0.0-rc.2, iota-sdk-grpc-types 1.0.0-rc.1). Single
Notarization, Audit Trails and product-core stay on iota v1.29.0.

- poi-rs: standalone manifest, gRPC source ported to the builder-style
  GrpcClient API, TransactionEffects and TransactionEvents taken from
  iota-sdk-types, TransactionEnvelope and OwnedObjectReference changes
  followed.
- poi_wasm: same pins (iota-sdk-types pinned exactly, the package has no
  tracked lockfile) and renames.
- examples: the Proof of Inclusion examples take the newer types through
  renamed dependencies (poi-iota-*) and carry the identifiers of the
  notarization they prove over by their bytes.
- CI: check, build (all platforms), test, clippy, fmt, docs and cargo
  audit cover the poi-rs workspace, and the scheduled dependency refresh
  updates both lockfiles. poi-rs builds into the shared target dir.
- Docs and housekeeping: README, fixture and CLAUDE.md commands use
  --manifest-path poi-rs/Cargo.toml, poi-rs/target is ignored, and the root
  workspace drops dependencies only poi-rs used.

BREAKING CHANGE: iota-sdk-types renamed several serde variants (for example
CancelledTransactions to CanceledTransactions), so ProofV1 JSON that
contains them does not deserialize across this upgrade in either
direction. The proof format is now documented as unstable before 1.0.

This branch has not been deployed

No deployments
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.

1 participant