mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-07-24 08:33:16 +00:00
* refactor: rename PrivateUnauthorized to PrivateForeignInit The account_identity's is_authorized flag no longer determines authorization for this variant, so keep the name tied to what actually distinguishes it: no nsk, only npk (a foreign account init). * chore: rebuild guest artifacts and bump spin to clear yanked advisory Regenerate ELF artifacts after the PrivateForeignInit rename in lee_core (compiled into every guest program), and update spin 0.9.8 -> 0.9.9 since 0.9.8 was yanked from crates.io, per cargo deny check advisories. * test: align is_authorized with PrivateForeignInit's flipped semantics Recipient pre-states built for PrivateForeignInit now need is_authorized: true to match the assertion in output.rs. Also rewrites the boundary test that checked the old invalid case to check the new one, and updates stale "unauthorized" wording left over from the PrivateUnauthorized name. * chore: rebuild guest artifacts Reproducible across repeated local builds; likely toolchain drift since the prior artifact commit rather than a source change, since no guest-relevant source or Cargo.lock changed in between. * fix(tests): align integration tests with PrivateForeignInit and regenerate fixture prove_init_with_commitment_root (private.rs) and build_privacy_transaction (tps.rs) still built PrivateForeignInit recipients with is_authorized: false, same stale-semantics bug fixed earlier in the lee crate's own tests. The prebuilt sequencer DB dump embeds program IDs derived from guest ELF bytes, which shifted once the PrivateForeignInit rename changed lee_core (compiled into every guest program). The stale dump caused widespread "Unknown program" failures across integration test suites that exercise deployed programs (wallet_ffi, auth_transfer, bridge, amm, token, pinata, ata, indexer state-consistency checks). Regenerated via `just regenerate-test-fixture`. * fix(tests): rename leftover PrivateUnauthorized to PrivateForeignInit and regenerate fixture * test: align is_authorized with PrivateForeignInit's flipped semantics * chore: regenerate test fixture after rebase onto dev * chore: regenerate test fixture after rebase onto dev Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
test_fixtures
Shared test/bench fixtures that spin up bedrock + sequencer + indexer + wallet end-to-end.
Library
TestContext drives the full stack for integration tests and benches:
let ctx = TestContext::new().await?; // fast: restores the prebuilt db dump
let ctx = TestContext::builder()
.from_scratch() // apply genesis + claim supply live
.with_genesis(actions) // custom genesis (implies from_scratch)
.disable_indexer()
.build().await?;
TestContext::new() restores fixtures/prebuilt_sequencer_db.dump (genesis + initial-supply claim
blocks) instead of re-applying genesis and re-proving the private claims, then syncs the wallet. Use
from_scratch() to build genesis live.
Binary
regenerate_test_fixture regenerates that dump (needs Docker):
just regenerate-test-fixture # RISC0_DEV_MODE=1 cargo run -p test_fixtures --bin regenerate_test_fixture
Rerun and commit fixtures/prebuilt_sequencer_db.dump after changing genesis, the default accounts,
block format, or initial state.