Skip to content

Conversation

@AndrewWestberg
Copy link

@AndrewWestberg AndrewWestberg commented Nov 13, 2025

This PR has a basic framework for creating an output that only has a datum hash and not inline datum. However, it's stuck in that I can't seem to reference source fields.

The other issue is in Pallas: txpipe/pallas#711

The test transaction that gets built has no script datum hash value because there are no redeemers. This is an incorrect behavior of pallas.

@AndrewWestberg AndrewWestberg force-pushed the feat_support_hashed_datum_options_for_inputs_and_outputs-AndrewWestberg branch from 651375a to aa54d50 Compare November 14, 2025 20:40
to: MyParty,
amount: source - fees,

// FIXME: We can't seem to reference source fields here yet.
Copy link
Author

Choose a reason for hiding this comment

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

@scarmuega I don't understand how the system works for referencing inputs from outputs. I get an error currently when I attempt to do this.

thread 'tests::input_hashed_datum_test' (2249654) panicked at crates/tx3-cardano/src/tests.rs:107:31:
called `Result::unwrap()` on an `Err` value: PropertyIndexNotFound(0, "UtxoSet({Utxo { ref: UtxoRef { txid: [38, 122, 174, 53, 79, 13, 20, 216, 40, 119, 250, 87, 32, 247, 221, 201, 176, 227, 238, 163, 205, 42, 7, 87, 175, 119, 219, 77, 151, 91, 168, 28], index: 0 }, address: [1, 158, 56, 80, 3, 97, 138, 11, 77, 174, 227, 220, 115, 173, 230, 69, 208, 72, 166, 145, 191, 125, 171, 4, 199, 226, 106, 93, 108, 163, 154, 184, 56, 55, 113, 27, 210, 132, 208, 59, 221, 126, 30, 38, 23, 249, 254, 14, 90, 132, 37, 145, 80, 181, 239, 184, 116], datum: Some(Struct(StructExpr { constructor: 0, fields: [Number(1), Bytes([97, 98, 99])] })), assets: CanonicalAssets({Naked: 500000000}), script: None }})")
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/panicking.rs:75:14
   2: core::result::unwrap_failed
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/result.rs:1855:5
   3: core::result::Result<T,E>::unwrap
             at /home/westbam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1226:23
   4: tx3_cardano::tests::fill_inputs
             at ./src/tests.rs:107:31
   5: tx3_cardano::tests::compile_tx_round
             at ./src/tests.rs:122:10
   6: tx3_cardano::tests::test_compile
             at ./src/tests.rs:133:24
   7: tx3_cardano::tests::input_hashed_datum_test::{{closure}}
             at ./src/tests.rs:327:14
   8: pollster::block_on
             at /home/westbam/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pollster-0.4.0/src/lib.rs:126:28
   9: tx3_cardano::tests::input_hashed_datum_test
             at ./src/tests.rs:301:1
  10: tx3_cardano::tests::input_hashed_datum_test::{{closure}}
             at ./src/tests.rs:302:35
  11: core::ops::function::FnOnce::call_once
             at /home/westbam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  12: core::ops::function::FnOnce::call_once
             at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant