From 3a2027fc61d6cf3dc803402afc969422a78c2ef6 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Sun, 18 Jan 2026 12:41:57 -0500 Subject: [PATCH 1/5] fix: make outputs_match_asset respect policy-id-only matches --- src/serve/grpc/watch.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/serve/grpc/watch.rs b/src/serve/grpc/watch.rs index 87cb4033..daf5ab4a 100644 --- a/src/serve/grpc/watch.rs +++ b/src/serve/grpc/watch.rs @@ -43,16 +43,19 @@ fn outputs_match_asset( asset_pattern: &u5c::cardano::AssetPattern, outputs: &[u5c::cardano::TxOutput], ) -> bool { - (asset_pattern.asset_name.is_empty() && asset_pattern.policy_id.is_empty()) - || outputs.iter().any(|o| { - o.assets.iter().any(|ma| { - ma.policy_id.eq(&asset_pattern.policy_id) - && ma - .assets - .iter() - .any(|a| a.name.eq(&asset_pattern.asset_name)) - }) + outputs.iter().any(|o| { + o.assets.iter().any(|ma| { + if !asset_pattern.policy_id.is_empty() && asset_pattern.policy_id.ne(&ma.policy_id) { + return false; + } + if asset_pattern.asset_name.is_empty() { + return true; + } + ma.assets + .iter() + .any(|ma| asset_pattern.asset_name.eq(&ma.name)) }) + }) } fn matches_output( From 6277e8e74e2bb73c388113369125551a0006ec64 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Sun, 18 Jan 2026 12:42:41 -0500 Subject: [PATCH 2/5] fix: return phase-1 validation errors to user --- crates/core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index ba80097a..0925b2fe 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -444,7 +444,7 @@ pub enum ChainError { #[error("invalid proposal params")] InvalidProposalParams, - #[error("phase-1 script rejected the transaction")] + #[error("phase-1 script rejected the transaction: {0}")] Phase1ValidationRejected(#[from] pallas::ledger::validate::utils::ValidationError), #[error("couldn't evaluate phase-2 script: {0}")] From 7dc5e494d7ad21ddd5b4bea39a0f0d71a353d8cd Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Sun, 18 Jan 2026 12:50:22 -0500 Subject: [PATCH 3/5] fix: stop running tests against macos-13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e559c01..e4d40d0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: needs: check strategy: matrix: - os: [ubuntu-latest, macos-14, macos-13, windows-latest] + os: [ubuntu-latest, macos-14, windows-latest] steps: - uses: actions/checkout@v4 From 679521ae3ad19b63ea948b851c97b05deafff352 Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 19 Jan 2026 15:14:27 -0500 Subject: [PATCH 4/5] fix: include correlating block in Watch matches --- src/serve/grpc/watch.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/serve/grpc/watch.rs b/src/serve/grpc/watch.rs index daf5ab4a..2e5c2a61 100644 --- a/src/serve/grpc/watch.rs +++ b/src/serve/grpc/watch.rs @@ -154,6 +154,7 @@ fn block_to_txs( mapper: &interop::Mapper, request: &u5c::watch::WatchTxRequest, ) -> Vec { + let bytes = block; let block = MultiEraBlock::decode(block).unwrap(); let txs = block.txs(); @@ -167,8 +168,12 @@ fn block_to_txs( }) .map(|x| u5c::watch::AnyChainTx { chain: Some(u5c::watch::any_chain_tx::Chain::Cardano(x)), - // TODO(p): should it be none? - block: None, + block: Some(u5c::watch::AnyChainBlock { + native_bytes: bytes.to_vec().into(), + chain: Some(u5c::watch::any_chain_block::Chain::Cardano( + mapper.map_block(&block), + )), + }), }) .collect() } From 0479a24878c888b1ff6ef50bec5cbb70293ff6aa Mon Sep 17 00:00:00 2001 From: Simon Gellis Date: Mon, 2 Feb 2026 22:25:36 -0500 Subject: [PATCH 5/5] fix: clippy error --- tests/cardano/harness/compare.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cardano/harness/compare.rs b/tests/cardano/harness/compare.rs index 99881dc8..8f647694 100644 --- a/tests/cardano/harness/compare.rs +++ b/tests/cardano/harness/compare.rs @@ -59,7 +59,7 @@ pub fn compare_csvs_with_ignore( let mut ignored = 0usize; for record in diff_results.as_slice() { - if ignore(&record) { + if ignore(record) { ignored += 1; if count < max_rows || max_rows == 0 { let prefix = match &record {