Commit graph

7 commits

Author SHA1 Message Date
288e5815a0 diag: also exercise aldabra-core's build_unsigned_payment_extras 2026-05-07 16:30:20 -07:00
f685e53889 diag: also test through aldabra's hex_decode 2026-05-07 16:26:55 -07:00
a627403492 diag: reproducer also reports script bytes-header consistency 2026-05-07 16:24:34 -07:00
d71b543ae6 fix repro_script_corruption imports 2026-05-07 16:10:58 -07:00
340a4ee408 diag: standalone reproducer for large-bytestring ref-script corruption
cargo run --example repro_script_corruption -p aldabra-dao --release

Reads a hex-encoded Plutus V2 script, builds a minimal Conway tx
with that script as inline reference, calls build_conway_raw, then
searches the tx body for the input bytes verbatim. Also tests the
known on-chain block-swap corruption fingerprint (bytes 2390-2398
swapped with bytes 2416-2424) to determine whether pallas
reproduces the corruption locally.

If verbatim found: pallas is byte-clean, bug is downstream
(transport / Koios / chain submit). If swapped variant found:
pallas itself produces the corruption.

No chain query, no MCP, no JSON-RPC — pure local serialization.
2026-05-07 16:09:41 -07:00
6708d448d8 feat(examples): dump_stake — emit StakeDatum CBOR hex for bootstrap
Companion to dump_governor (committed earlier this branch). Edit
owner_pkh_hex + staked_amount in the source, then `cargo run` to
print the inline datum CBOR for a wallet_plutus_mint_unsigned call
that mints StakeST + sends to stakes_addr.

No locks at bootstrap (locked_by = []) and no delegation
(delegated_to = None). For a stake that's been used in proposals,
locked_by would carry the ProposalLock entries; reuse this scaffold
when reseeding a stake from a snapshot.
2026-05-07 10:21:27 -07:00
ca2f69d28e feat(plutus_mint): set language_view per Plutus version + add V2 cost model
Without language_view, pallas does not compute script_data_hash on
the tx body. Plutus txs without script_data_hash get rejected with
ConwayUtxowFailure (PPViewHashesDontMatch SNothing (SJust ...)).

Caught 2026-05-07 attempting governor bootstrap on preprod against
Agora's V2 GST policy. Previous code only set language_view when
the policy was V3 — every V2 mint hit the chain rejection.

Three changes:

1. crates/aldabra-core/src/plutus_cost_models.rs — append
   PLUTUS_V2_COST_MODEL_PREPROD constant (175 i64 entries), pulled
   live from preprod Koios epoch_params 2026-05-07. Same protocol-
   version convention as the existing V3 constant: V2 cost model
   is identical mainnet vs preprod (cost models are protocol-version
   parameters, not network), so the _PREPROD suffix is naming
   convention, not a separation point.

2. crates/aldabra-core/src/plutus_mint.rs — replace the V3-only
   language_view block with a per-PlutusVersion match. V2 wires
   the new constant; V3 keeps the existing
   params.plutus_v3_cost_model path; V1 left as TODO with a note
   (no V1 mint use case yet).

3. crates/aldabra-dao/examples/dump_governor.rs — small cargo
   example that encodes a sample GovernorDatum to CBOR hex via
   the existing aldabra_dao::agora::GovernorDatum::to_plutus_data
   path. Used during preprod DAO bringup to construct the inline
   datum for the governor bootstrap tx. Edit values + re-run for
   any DAO bringup. Builds against the existing pallas-codec
   dev-dependency.
2026-05-07 08:52:59 -07:00