This commits fixes the flat encoding and decoding (and consequently,
the zigzag) for large integers in the following ways:
- It removes support for encoding and decoding i128 values.
- It optionally (feature = "num-bigint") introduces encoding and
decoding of large sized integers through the num-bigint::BigInt
type.
Without the feature enabled, it is still possible to encode and decode
isize values; but the use of i128 is now prohibited (as it would
overflow on boundaries) in favor of arbitrarily sized integers.
The commit also introduces a missing property roundtrip for encoding
and decoding large integers, which was missing and thus, failed to
identify the overflow problem.
See related issue: https://github.com/aiken-lang/aiken/issues/796
28 lines
742 B
TOML
28 lines
742 B
TOML
[package]
|
|
name = "pallas-codec"
|
|
description = "Pallas common CBOR encoding interface and utilities"
|
|
version = "0.21.0"
|
|
edition = "2021"
|
|
repository = "https://github.com/txpipe/pallas"
|
|
homepage = "https://github.com/txpipe/pallas"
|
|
documentation = "https://docs.rs/pallas-codec"
|
|
license = "Apache-2.0"
|
|
readme = "README.md"
|
|
authors = [
|
|
"Santiago Carmuega <santiago@carmuega.me>",
|
|
"Lucas Rosa <x@rvcas.dev>",
|
|
"Kasey White <kwhitemsg@gmail.com>",
|
|
]
|
|
|
|
[features]
|
|
default = []
|
|
|
|
[dependencies]
|
|
hex = "0.4.3"
|
|
minicbor = { version = "0.20", features = ["std", "half", "derive"] }
|
|
num-bigint = { version = "0.4.4", optional = true }
|
|
serde = { version = "1.0.143", features = ["derive"] }
|
|
thiserror = "1.0.39"
|
|
|
|
[dev-dependencies]
|
|
proptest = "1.1.0"
|