Back-merge v0.13 hotfix (#185)
This commit is contained in:
commit
9a79a85f0d
12 changed files with 25 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-addresses"
|
name = "pallas-addresses"
|
||||||
description = "Ergonomic library to work with different Cardano addresses"
|
description = "Ergonomic library to work with different Cardano addresses"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -821,4 +821,10 @@ mod tests {
|
||||||
|
|
||||||
assert_eq!(addr.to_bech32().unwrap(), MAINNET_TEST_VECTORS[0].0);
|
assert_eq!(addr.to_bech32().unwrap(), MAINNET_TEST_VECTORS[0].0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_minted_invalid_pointed_address() {
|
||||||
|
let addr = Address::from_hex("40C19D7D05E90EEB6394B53313FE79D47077DE33068C6B813BBE5C9D5681FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7F81FFFFFFFFFFFFFFFF7F81FFFFFFFFFFFFFFFF7F");
|
||||||
|
assert!(matches!(addr, Ok(Address::Shelley(_))));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,14 @@ pub fn read(cursor: &mut Cursor<&[u8]>) -> Result<u64, Error> {
|
||||||
output = (output << 7) | (byte & 0x7F) as u128;
|
output = (output << 7) | (byte & 0x7F) as u128;
|
||||||
|
|
||||||
if output > u64::MAX.into() {
|
if output > u64::MAX.into() {
|
||||||
return Err(Error::VarUintOverflow);
|
// Strictly speaking, if we find a value above max u64, an overflow error should
|
||||||
|
// be returned. The problem is that testnet has some invalid address values
|
||||||
|
// somehow minted in valid blocks. The node and many explorers, instead of
|
||||||
|
// throwing an error, return max u64 as a workaround. We copy the same behavior
|
||||||
|
// to maintain homogeneity.
|
||||||
|
//
|
||||||
|
// return Err(Error::VarUintOverflow);
|
||||||
|
return Ok(u64::MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (byte & 0x80) == 0 {
|
if (byte & 0x80) == 0 {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-codec"
|
name = "pallas-codec"
|
||||||
description = "Pallas common CBOR encoding interface and utilities"
|
description = "Pallas common CBOR encoding interface and utilities"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-crypto"
|
name = "pallas-crypto"
|
||||||
description = "Cryptographic primitives for Cardano"
|
description = "Cryptographic primitives for Cardano"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-miniprotocols"
|
name = "pallas-miniprotocols"
|
||||||
description = "Implementation of the Ouroboros network mini-protocols state-machines"
|
description = "Implementation of the Ouroboros network mini-protocols state-machines"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-multiplexer"
|
name = "pallas-multiplexer"
|
||||||
description = "Multithreaded Ouroboros multiplexer implementation using mpsc channels"
|
description = "Multithreaded Ouroboros multiplexer implementation using mpsc channels"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-primitives"
|
name = "pallas-primitives"
|
||||||
description = "Ledger primitives and cbor codec for the different Cardano eras"
|
description = "Ledger primitives and cbor codec for the different Cardano eras"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -1469,6 +1469,8 @@ mod tests {
|
||||||
include_str!("../../../test_data/alonzo22.block"),
|
include_str!("../../../test_data/alonzo22.block"),
|
||||||
// peculiar block with indef byte array in plutus data
|
// peculiar block with indef byte array in plutus data
|
||||||
include_str!("../../../test_data/alonzo23.block"),
|
include_str!("../../../test_data/alonzo23.block"),
|
||||||
|
// peculiar block with invalid address (pointer overflow)
|
||||||
|
include_str!("../../../test_data/alonzo27.block"),
|
||||||
];
|
];
|
||||||
|
|
||||||
for (idx, block_str) in test_blocks.iter().enumerate() {
|
for (idx, block_str) in test_blocks.iter().enumerate() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas-traverse"
|
name = "pallas-traverse"
|
||||||
description = "Utilities to traverse over multi-era block data"
|
description = "Utilities to traverse over multi-era block data"
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pallas"
|
name = "pallas"
|
||||||
description = "Rust-native building blocks for the Cardano blockchain ecosystem."
|
description = "Rust-native building blocks for the Cardano blockchain ecosystem."
|
||||||
version = "0.13.1"
|
version = "0.13.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/txpipe/pallas"
|
repository = "https://github.com/txpipe/pallas"
|
||||||
homepage = "https://github.com/txpipe/pallas"
|
homepage = "https://github.com/txpipe/pallas"
|
||||||
|
|
|
||||||
1
test_data/alonzo27.block
Normal file
1
test_data/alonzo27.block
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue