Skip to content

Commit

Permalink
feat(op-consensus): Trim and complete OP modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Apr 13, 2024
1 parent 1eb8cff commit 4ae4b22
Show file tree
Hide file tree
Showing 19 changed files with 372 additions and 978 deletions.
42 changes: 0 additions & 42 deletions Justfile

This file was deleted.

4 changes: 2 additions & 2 deletions crates/op-consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
exclude.workspace = true

[dependencies]
alloy-primitives = { workspace = true, features = ["rlp", "rand"] }
alloy-primitives = { workspace = true, features = ["rlp"] }
alloy-rlp.workspace = true
alloy-eips.workspace = true
alloy-serde = { workspace = true, optional = true }
Expand Down Expand Up @@ -41,5 +41,5 @@ default = ["std"]
std = ["alloy-eips/std", "sha2/std", "c-kzg?/std"]
k256 = ["alloy-primitives/k256"]
kzg = ["dep:c-kzg", "dep:thiserror", "alloy-eips/kzg", "std"]
arbitrary = ["std", "dep:arbitrary", "alloy-eips/arbitrary", "alloy-primitives/arbitrary"]
arbitrary = ["std", "dep:arbitrary", "alloy-eips/arbitrary", "alloy-primitives/rand"]
serde = ["dep:serde", "alloy-primitives/serde", "dep:alloy-serde", "alloy-eips/serde"]
23 changes: 8 additions & 15 deletions crates/op-consensus/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# alloy-consensus
# op-alloy-consensus

Ethereum consensus interface.
OP Stack consensus interface.

This crate contains constants, types, and functions for implementing Ethereum
EL consensus and communication. This includes headers, blocks, transactions,
[EIP-2718] envelopes, [EIP-2930], [EIP-4844], and more.
This crate contains constants, types, and functions for implementing Optimism EL consensus and communication. This
includes transactions, [EIP-2718] envelopes, [EIP-2930], [EIP-4844], [deposit transactions][deposit], and receipts.

In general a type belongs in this crate if it is committed to in the EL block
header. This includes:

- transactions
- blocks
- headers
- receipts
- [EIP-2718] envelopes.
In general a type belongs in this crate if it exists in the `alloy-consensus` crate, but was modified from the base Ethereum protocol in the OP Stack.
For consensus types that are not modified by the OP Stack, the `alloy-consensus` types should be used instead.

[alloy-network]: ../network
[EIP-2718]: https://eips.ethereum.org/EIPS/eip-2718
[EIP-2930]: https://eips.ethereum.org/EIPS/eip-2930
[EIP-4844]: https://eips.ethereum.org/EIPS/eip-4844
[deposit]: https://specs.optimism.io/protocol/deposits.html

## Provenance

Much of this code was ported from [reth-primitives] as part of ongoing alloy
migrations.
Much of this code was ported from [reth-primitives] as part of ongoing alloy migrations.

[reth-primitives]: https://github.com/paradigmxyz/reth/tree/main/crates/primitives
72 changes: 0 additions & 72 deletions crates/op-consensus/src/constants.rs

This file was deleted.

Loading

0 comments on commit 4ae4b22

Please sign in to comment.