2019-02-14 01:09:18 +00:00
|
|
|
[package]
|
|
|
|
name = "types"
|
2022-10-30 04:04:24 +00:00
|
|
|
version = "0.2.1"
|
2019-02-14 05:46:33 +00:00
|
|
|
authors = ["Paul Hauner <paul@paulhauner.com>", "Age Manning <Age@AgeManning.com>"]
|
2023-09-22 04:30:56 +00:00
|
|
|
edition = { workspace = true }
|
2019-02-14 01:09:18 +00:00
|
|
|
|
2019-12-06 05:44:03 +00:00
|
|
|
[[bench]]
|
|
|
|
name = "benches"
|
|
|
|
harness = false
|
|
|
|
|
2019-02-14 01:09:18 +00:00
|
|
|
[dependencies]
|
2023-09-22 04:30:56 +00:00
|
|
|
merkle_proof = { workspace = true }
|
|
|
|
bls = { workspace = true, features = ["arbitrary"] }
|
2023-09-26 00:32:18 +00:00
|
|
|
kzg = { workspace = true }
|
2023-09-22 04:30:56 +00:00
|
|
|
compare_fields = { workspace = true }
|
|
|
|
compare_fields_derive = { workspace = true }
|
2020-05-18 11:24:23 +00:00
|
|
|
eth2_interop_keypairs = { path = "../../common/eth2_interop_keypairs" }
|
2023-09-22 04:30:56 +00:00
|
|
|
ethereum-types = { workspace = true, features = ["arbitrary"] }
|
|
|
|
ethereum_hashing = { workspace = true }
|
|
|
|
hex = { workspace = true }
|
|
|
|
int_to_bytes = { workspace = true }
|
|
|
|
log = { workspace = true }
|
|
|
|
rayon = { workspace = true }
|
|
|
|
rand = { workspace = true }
|
|
|
|
safe_arith = { workspace = true }
|
|
|
|
serde = { workspace = true, features = ["rc"] }
|
|
|
|
slog = { workspace = true }
|
|
|
|
ethereum_ssz = { workspace = true, features = ["arbitrary"] }
|
|
|
|
ethereum_ssz_derive = { workspace = true }
|
|
|
|
ssz_types = { workspace = true, features = ["arbitrary"] }
|
|
|
|
swap_or_not_shuffle = { workspace = true, features = ["arbitrary"] }
|
2020-05-18 11:24:23 +00:00
|
|
|
test_random_derive = { path = "../../common/test_random_derive" }
|
2023-09-22 04:30:56 +00:00
|
|
|
tree_hash = { workspace = true, features = ["arbitrary"] }
|
|
|
|
tree_hash_derive = { workspace = true }
|
2022-04-04 00:26:16 +00:00
|
|
|
rand_xorshift = "0.3.0"
|
2023-09-22 04:30:56 +00:00
|
|
|
cached_tree_hash = { workspace = true }
|
|
|
|
serde_yaml = { workspace = true }
|
|
|
|
tempfile = { workspace = true }
|
|
|
|
derivative = { workspace = true }
|
|
|
|
rusqlite = { workspace = true }
|
2023-01-12 04:17:03 +00:00
|
|
|
# The arbitrary dependency is enabled by default since Capella to avoid complexity introduced by
|
|
|
|
# `AbstractExecPayload`
|
2023-09-22 04:30:56 +00:00
|
|
|
arbitrary = { workspace = true, features = ["derive"] }
|
|
|
|
ethereum_serde_utils = { workspace = true }
|
|
|
|
regex = { workspace = true }
|
|
|
|
lazy_static = { workspace = true }
|
|
|
|
parking_lot = { workspace = true }
|
|
|
|
itertools = { workspace = true }
|
|
|
|
superstruct = { workspace = true }
|
2023-01-09 03:11:59 +00:00
|
|
|
metastruct = "0.1.0"
|
2023-09-22 04:30:56 +00:00
|
|
|
serde_json = { workspace = true }
|
|
|
|
smallvec = { workspace = true }
|
|
|
|
maplit = { workspace = true }
|
|
|
|
strum = { workspace = true }
|
2019-02-15 05:12:24 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-09-22 04:30:56 +00:00
|
|
|
criterion = { workspace = true }
|
|
|
|
beacon_chain = { workspace = true }
|
|
|
|
state_processing = { workspace = true }
|
|
|
|
tokio = { workspace = true }
|
|
|
|
paste = { workspace = true }
|
2020-05-05 23:12:28 +00:00
|
|
|
|
|
|
|
[features]
|
Remove saturating arith from state_processing (#1644)
## Issue Addressed
Resolves #1100
## Proposed Changes
* Implement the `SafeArith` trait for `Slot` and `Epoch`, so that methods like `safe_add` become available.
* Tweak the `SafeArith` trait to allow a different `Rhs` type (analagous to `std::ops::Add`, etc).
* Add a `legacy-arith` feature to `types` and `state_processing` that conditionally enables implementations of
the `std` ops with saturating semantics.
* Check compilation of `types` and `state_processing` _without_ `legacy-arith` on CI,
thus guaranteeing that they only use the `SafeArith` primitives :tada:
## Additional Info
The `legacy-arith` feature gets turned on by all higher-level crates that depend on `state_processing` or `types`, thus allowing the beacon chain, networking, and other components to continue to rely on the availability of ops like `+`, `-`, `*`, etc.
**This is a consensus-breaking change**, but brings us in line with the spec, and our incompatibilities shouldn't have been reachable with any valid configuration of Eth2 parameters.
2020-09-25 05:18:21 +00:00
|
|
|
default = ["sqlite", "legacy-arith"]
|
|
|
|
# Allow saturating arithmetic on slots and epochs. Enabled by default, but deprecated.
|
|
|
|
legacy-arith = []
|
2023-09-22 04:30:56 +00:00
|
|
|
sqlite = []
|
2023-01-12 04:17:03 +00:00
|
|
|
# The `arbitrary-fuzz` feature is a no-op provided for backwards compatibility.
|
|
|
|
# For simplicity `Arbitrary` is now derived regardless of the feature's presence.
|
|
|
|
arbitrary-fuzz = []
|
2023-10-20 07:30:27 +00:00
|
|
|
portable = ["bls/supranational-portable"]
|