Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ metrics-process = "2.4.3"
nix = { version = "0.30", default-features = false, features = ["signal"] }
ntest = "0.9.5"
num_cpus = "1"
pallas-addresses = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
pallas-codec = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
pallas-crypto = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
pallas-hardano = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
pallas-network = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
pallas-primitives = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
pallas-traverse = { git = "https://github.com/blockfrost/pallas.git", tag = "blockfrost-platform-0.0.3-alpha4" }
# FIXME: use a proper Pallas release after they merge <https://github.com/txpipe/pallas/pull/624>:
pallas-addresses = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pallas-codec = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pallas-crypto = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pallas-hardano = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pallas-network = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pallas-primitives = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pallas-traverse = { git = "https://github.com/txpipe/pallas.git", rev = "ed422bc0d5a09f77617d4882dd4c71089a8bcdb2" }
pretty_assertions = "1.4.1"
proptest = "1.10.0"
rand = "0.8.5"
Expand Down
2 changes: 1 addition & 1 deletion crates/build_utils/src/testgen_hs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub fn ensure() {
return;
}

let testgen_lib_version = "10.4.1.1";
let testgen_lib_version = "10.6.3.0";

let target_os = if cfg!(target_os = "macos") {
"darwin"
Expand Down
2 changes: 1 addition & 1 deletion crates/node/src/cbor/fallback_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl FallbackDecoder {
"contents": {
"era": "ShelleyBasedEraConway",
"error": [
"ConwayCertsFailure (WithdrawalsNotInRewardsCERTS (fromList []))"
"ConwayCertsFailure (WithdrawalsNotInRewardsCERTS (Withdrawals {unWithdrawals = fromList []}))"
],
"kind": "ShelleyTxValidationError"
},
Expand Down
2 changes: 1 addition & 1 deletion crates/node/src/cbor/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ async fn verify_one(cbor: &str) {

let our_decoding = decode_error(&cbor);

let our_json = serialize_error(our_decoding);
let our_json = serialize_error(our_decoding).unwrap();
assert_json_eq!(reference_json, our_json)
}
#[cfg(not(feature = "tarpaulin"))]
Expand Down
2 changes: 1 addition & 1 deletion crates/node/src/cbor/tests/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn proptest_with_params(

let test_one = move || {
let cbor = hex::decode(case.cbor).map_err(|e| e.to_string())?;
let our_json = serialize_error(decode_error(&cbor));
let our_json = serialize_error(decode_error(&cbor)).map_err(|e| e.to_string())?;

if our_json == case.json {
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions crates/node/src/cbor/tests/specific.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ async fn test_cbor_145() {
#[tokio::test]
#[allow(non_snake_case)]
async fn test_cbor_146() {
verify_one("818206818201820083030020").await
verify_one("818206818201820083030001").await
}
#[tokio::test]
#[allow(non_snake_case)]
Expand Down Expand Up @@ -729,7 +729,7 @@ async fn test_cbor_165() {
#[tokio::test]
#[allow(non_snake_case)]
async fn test_cbor_166() {
verify_one("8182068282018200830320208201820a80").await
verify_one("8182068282018200830301018201820a80").await
}
#[tokio::test]
#[allow(non_snake_case)]
Expand Down
16 changes: 8 additions & 8 deletions crates/node/src/cbor/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ pub(crate) fn validate_tx_cbor(tx: &[u8]) -> Result<(), BlockfrostError> {
match pallas_codec::minicbor::decode::<Tx>(tx) {
Ok(decoded) => {
if _check_multiasset_zero(decoded) {
Err(BlockfrostError::custom_400(as_cbor_decode_failure(
"MultiAsset cannot contain zeros".to_string(),
0,
)))
Err(BlockfrostError::custom_400(
as_cbor_decode_failure("MultiAsset cannot contain zeros".to_string(), 0)
.unwrap_or_else(|e| format!("Failed to format decode error: {e}")),
))
} else {
Ok(())
}
},
Err(e) => {
info!("Invalid TX CBOR: {:?}, CBOR: {}", e, hex::encode(tx));
Err(BlockfrostError::custom_400(as_cbor_decode_failure(
e.to_string(),
e.position().unwrap_or(0) as u64,
)))
Err(BlockfrostError::custom_400(
as_cbor_decode_failure(e.to_string(), e.position().unwrap_or(0) as u64)
.unwrap_or_else(|e| format!("Failed to format decode error: {e}")),
))
},
}
}
Expand Down
3 changes: 2 additions & 1 deletion crates/node/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ impl NodeClient {
Ok(txid)
},
Ok(Response::Rejected(reason)) => {
let haskell_display = as_node_submit_error(reason);
let haskell_display = as_node_submit_error(reason)
.unwrap_or_else(|e| format!("Failed to format submit error: {e}"));
info!(
connection_id = self.connection_id,
"TxSubmitFail: {}, CBOR: {}",
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
flake = false;
};
cardano-node = {
url = "github:IntersectMBO/cardano-node/10.5.3";
url = "github:IntersectMBO/cardano-node/10.6.3";
flake = false; # otherwise, +2k dependencies we don’t really use
};
dolos = {
Expand All @@ -37,7 +37,7 @@
};
mithril.url = "github:input-output-hk/mithril/2524.0";
testgen-hs = {
url = "github:input-output-hk/testgen-hs/10.4.1.1"; # make sure it follows cardano-node
url = "github:input-output-hk/testgen-hs/10.6.3.0"; # make sure it follows cardano-node
flake = false; # otherwise, +2k dependencies we don’t really use
};
hydra = {
Expand All @@ -49,7 +49,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
cardano-playground = {
url = "github:input-output-hk/cardano-playground/c0715c2b04628ce1946803b0a829b3e1445b5c4d";
url = "github:input-output-hk/cardano-playground/419fcc2150552930944624e7a19aad6420539df0";
flake = false; # otherwise, +9k dependencies in flake.lock…
};
advisory-db = {
Expand Down