Skip to content

fix: adopt current People proof contexts - #587

Open
pgherveou wants to merge 4 commits into
mainfrom
fix/current-proof-contexts
Open

fix: adopt current People proof contexts#587
pgherveou wants to merge 4 commits into
mainfrom
fix/current-proof-contexts

Conversation

@pgherveou

@pgherveou pgherveou commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

Statement-store allowance renewal was rejected by the deployed People-chain runtime with Invalid Transaction (1010). The host used legacy proof contexts and the old two-key RingRoots storage layout, while the deployed runtime and both mobile clients use product-scoped contexts, the live network suffix, the current generation, and the three-key ring-root layout.

Solution

  • Replace the legacy proof behavior with the current product/peopl context derivation for statement, long-term-secret, and proof-of-gas allowances.
  • Thread the live network suffix through allowance scans, aliases, proof creation, and included-block verification.
  • Read CurrentGeneration and the deployed three-key MembersSubscriber.RingRoots layout.
  • Remove the superseded proof families and storage fallback instead of retaining legacy behavior.
  • Update the CLI, fixtures, and tests for the current runtime contract.

Mobile implementation PRs

This PR is stacked on #571.

@pgherveou pgherveou changed the title fix/current proof contexts fix: adopt current People proof contexts Sep 3, 2026
@pgherveou
pgherveou marked this pull request as ready for review September 3, 2026 10:47
@pgherveou
pgherveou requested a review from a team September 3, 2026 10:47
@pgherveou
pgherveou force-pushed the fix/current-proof-contexts branch from e4de217 to cd342e4 Compare September 3, 2026 10:51
Base automatically changed from fix/announce-boot-auth-state to main September 3, 2026 12:26
Proofs must include the live network suffix or the People runtime rejects them as BadProof.
Remove legacy LTS and PGAS contexts and scope every proof family by the live network suffix. Follow the generation-prefixed Asset Hub ring-root layout used by current mobile clients and runtime.
@pgherveou
pgherveou force-pushed the fix/current-proof-contexts branch from cd342e4 to 01a9321 Compare September 3, 2026 12:27
Comment thread rust/crates/truapi-server/src/runtime/statement_allowance/pgas.rs Outdated
Comment thread rust/crates/truapi-server/src/runtime/statement_allowance/pgas.rs Outdated
Comment thread rust/crates/truapi-server/src/runtime/statement_allowance/pgas.rs
Comment thread rust/crates/truapi-server/src/test_support.rs Outdated
Comment thread rust/crates/truapi-server/src/runtime/statement_allowance/slot.rs Outdated
Comment thread rust/crates/truapi-server/tests/fixtures/README.md Outdated

@TarikGul TarikGul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving to not be a blocker

Address review on #587.

`read_current_generation` gates on the runtime declaring
`MembersSubscriber.CurrentGeneration` before treating an absent value as the
`ValueQuery` default, so a renamed pallet or item is named instead of reading as
generation 0, and decodes with `decode_all`, so an entry that stops being a bare
`u32` fails here rather than yielding the first four bytes of another layout.
Either way the failure would otherwise be a key nothing answers and a wait that
can only time out.

`await_ring_revision` re-reads the generation each poll. A rebuild landing during
the wait is what the loop waits through, and a generation read once up front
would key every remaining poll at a generation the roots have left.

`method_keyed_responses` panics when a method's scripted answers run out instead
of replaying the last one, so a script that answers fewer calls than the code
makes fails rather than feeding one read's response to another.

The Asset Hub fixture is recaptured at spec 3000000, which is what declares
`CurrentGeneration`, and the fixtures README records the generation the committed
ring-roots value is addressed under.

Pins the fourth statement-slot context vector iOS carries, family 2 at period 0
seq 0, where every suffix field is already zero and an offset slip would hide.
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