Skip to content

Commit

Permalink
Use upstream Ethereum transaction types from alloy-consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Apr 13, 2024
1 parent 6c67854 commit 2fb8518
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 2,850 deletions.
13 changes: 4 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ exclude = ["benches/", "tests/"]
[workspace.dependencies]
alloy-rlp = { version = "0.3", default-features = false }
alloy-primitives = { version = "0.7.0", default-features = false }
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", branch = "main", default-features = false }
alloy-eips = { git = "https://github.com/alloy-rs/alloy", branch = "main", default-features = false }
alloy-signer = { git = "https://github.com/alloy-rs/alloy", branch = "main", default-features = false }
alloy-serde = { git = "https://github.com/alloy-rs/alloy", branch = "main", default-features = false }

## crypto
c-kzg = { version = "1.0", default-features = false }
k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
alloy-consensus = { git = "https://github.com/clabby/alloy", branch = "cl/consensus-expose-encoding", default-features = false }
alloy-eips = { git = "https://github.com/clabby/alloy", branch = "cl/consensus-expose-encoding", default-features = false }
alloy-signer = { git = "https://github.com/clabby/alloy", branch = "cl/consensus-expose-encoding", default-features = false }
alloy-serde = { git = "https://github.com/clabby/alloy", branch = "cl/consensus-expose-encoding", default-features = false }

## serde
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
Expand All @@ -31,7 +27,6 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
## misc
tokio = "1"
arbitrary = "1.3"
thiserror = "1.0"

[workspace.metadata.docs.rs]
all-features = true
Expand Down
13 changes: 3 additions & 10 deletions crates/op-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ alloy-rlp.workspace = true
alloy-eips.workspace = true
alloy-serde = { workspace = true, optional = true }

sha2 = { version = "0.10", default-features = false }

# kzg
thiserror = { workspace = true, optional = true }
c-kzg = { workspace = true, features = ["serde"], optional = true }

# arbitrary
arbitrary = { workspace = true, features = ["derive"], optional = true }

Expand All @@ -33,14 +27,13 @@ serde = { workspace = true, features = ["derive"], optional = true }
[dev-dependencies]
alloy-signer.workspace = true
arbitrary = { workspace = true, features = ["derive"] }
k256.workspace = true
tokio = { workspace = true, features = ["macros"] }
serde_json.workspace = true

[features]
default = ["std"]
std = ["alloy-eips/std", "alloy-consensus/std", "sha2/std", "c-kzg?/std"]
std = ["alloy-eips/std", "alloy-consensus/std"]
k256 = ["alloy-primitives/k256", "alloy-consensus/k256"]
kzg = ["dep:c-kzg", "dep:thiserror", "alloy-eips/kzg", "alloy-consensus/kzg", "std"]
kzg = ["alloy-eips/kzg", "alloy-consensus/kzg", "std"]
arbitrary = ["std", "dep:arbitrary", "alloy-consensus/arbitrary", "alloy-eips/arbitrary", "alloy-primitives/rand"]
serde = ["dep:serde", "alloy-primitives/serde", "alloy-consensus/serde", "dep:alloy-serde", "alloy-eips/serde"]
serde = ["dep:serde", "dep:alloy-serde", "alloy-primitives/serde", "alloy-consensus/serde", "alloy-eips/serde"]
12 changes: 1 addition & 11 deletions crates/op-consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,4 @@ mod receipt;
pub use receipt::{OpReceipt, OpReceiptEnvelope, OpReceiptWithBloom, OpTxReceipt};

mod transaction;
pub use transaction::{
eip4844_utils, Blob, BlobTransactionSidecar, Bytes48, OpTxEnvelope, OpTxType,
OpTypedTransaction, SidecarBuilder, SidecarCoder, SimpleCoder, TxDeposit, TxEip1559, TxEip2930,
TxEip4844, TxEip4844Variant, TxEip4844WithSidecar, TxLegacy,
};

#[cfg(feature = "kzg")]
pub use transaction::BlobTransactionValidationError;

#[cfg(feature = "kzg")]
pub use alloy_eips::eip4844::env_settings::EnvKzgSettings;
pub use transaction::{OpTxEnvelope, OpTxType, OpTypedTransaction, TxDeposit};
Loading

0 comments on commit 2fb8518

Please sign in to comment.