Skip to content

Commit

Permalink
Merge branch 'main' into make-type-same
Browse files Browse the repository at this point in the history
  • Loading branch information
programskillforverification committed Jan 6, 2025
2 parents 9382311 + ae64f26 commit e8c437d
Show file tree
Hide file tree
Showing 142 changed files with 2,041 additions and 1,116 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ jobs:
- name: Build documentation
run: cargo doc --workspace --all-features --no-deps --document-private-items
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings --show-type-layout --generate-link-to-definition -Zunstable-options
RUSTDOCFLAGS: --cfg docsrs -D warnings -Zunstable-options --show-type-layout --generate-link-to-definition

fmt:
runs-on: ubuntu-latest
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,56 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0](https://github.com/alloy-rs/alloy/releases/tag/v0.10.0) - 2025-01-06

### Documentation

- Enable some useful rustdoc features on docs.rs ([#1890](https://github.com/alloy-rs/alloy/issues/1890))

### Features

- Remove T: Transport from public APIs ([#1859](https://github.com/alloy-rs/alloy/issues/1859))
- Add match_versioned_hashes ([#1882](https://github.com/alloy-rs/alloy/issues/1882))
- Add RecoveredTx::try_map_transaction ([#1885](https://github.com/alloy-rs/alloy/issues/1885))
- Add additional conversion fn ([#1883](https://github.com/alloy-rs/alloy/issues/1883))
- Add additional conversion fn ([#1881](https://github.com/alloy-rs/alloy/issues/1881))
- Add missing helper fns ([#1880](https://github.com/alloy-rs/alloy/issues/1880))

### Miscellaneous Tasks

- Improve FromStr for `BlockNumberOrTag` to be case-insensitive ([#1891](https://github.com/alloy-rs/alloy/issues/1891))
- Shift std::error impls to core ([#1888](https://github.com/alloy-rs/alloy/issues/1888))
- Use core::error for blob validation error ([#1887](https://github.com/alloy-rs/alloy/issues/1887))
- Use safe get api ([#1886](https://github.com/alloy-rs/alloy/issues/1886))
- Add storage_slots helper ([#1884](https://github.com/alloy-rs/alloy/issues/1884))

### Refactor

- Use the params struct in more places ([#1892](https://github.com/alloy-rs/alloy/issues/1892))

### Testing

- Fix warnings on windows ([#1895](https://github.com/alloy-rs/alloy/issues/1895))
- Add parity test ([#1889](https://github.com/alloy-rs/alloy/issues/1889))

## [0.9.2](https://github.com/alloy-rs/alloy/releases/tag/v0.9.2) - 2025-01-03

### Bug Fixes

- [eip7251] Update contract address and bytecode ([#1877](https://github.com/alloy-rs/alloy/issues/1877))
- Skip empty request objects ([#1873](https://github.com/alloy-rs/alloy/issues/1873))

### Features

- Sort and skip empty requests for hash ([#1878](https://github.com/alloy-rs/alloy/issues/1878))
- Add conversions from rpc block to consensus ([#1869](https://github.com/alloy-rs/alloy/issues/1869))
- Add block to payloadv1 ([#1875](https://github.com/alloy-rs/alloy/issues/1875))
- Add block to payloadbodyv1 ([#1874](https://github.com/alloy-rs/alloy/issues/1874))

### Miscellaneous Tasks

- Release 0.9.2

## [0.9.1](https://github.com/alloy-rs/alloy/releases/tag/v0.9.1) - 2024-12-30

### Features
Expand All @@ -14,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Miscellaneous Tasks

- Release 0.9.1
- Add arbitrary for blockbody ([#1867](https://github.com/alloy-rs/alloy/issues/1867))
- Add history serve window ([#1865](https://github.com/alloy-rs/alloy/issues/1865))

Expand Down
78 changes: 37 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.9.1"
version = "0.10.0"
edition = "2021"
rust-version = "1.81"
authors = ["Alloy Contributors"]
Expand All @@ -30,47 +30,43 @@ use-self = "warn"
option-if-let-else = "warn"
redundant-clone = "warn"

[workspace.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[workspace.dependencies]
alloy-consensus = { version = "0.9", path = "crates/consensus", default-features = false }
alloy-consensus-any = { version = "0.9", path = "crates/consensus-any", default-features = false }
alloy-contract = { version = "0.9", path = "crates/contract", default-features = false }
alloy-eips = { version = "0.9", path = "crates/eips", default-features = false }
alloy-eip7547 = { version = "0.9", path = "crates/eip7547", default-features = false }
alloy-genesis = { version = "0.9", path = "crates/genesis", default-features = false }
alloy-json-rpc = { version = "0.9", path = "crates/json-rpc", default-features = false }
alloy-network = { version = "0.9", path = "crates/network", default-features = false }
alloy-network-primitives = { version = "0.9", path = "crates/network-primitives", default-features = false }
alloy-node-bindings = { version = "0.9", path = "crates/node-bindings", default-features = false }
alloy-provider = { version = "0.9", path = "crates/provider", default-features = false }
alloy-pubsub = { version = "0.9", path = "crates/pubsub", default-features = false }
alloy-rpc-client = { version = "0.9", path = "crates/rpc-client", default-features = false }
alloy-rpc-types-admin = { version = "0.9", path = "crates/rpc-types-admin", default-features = false }
alloy-rpc-types-anvil = { version = "0.9", path = "crates/rpc-types-anvil", default-features = false }
alloy-rpc-types-any = { version = "0.9", path = "crates/rpc-types-any", default-features = false }
alloy-rpc-types-beacon = { version = "0.9", path = "crates/rpc-types-beacon", default-features = false }
alloy-rpc-types-debug = { version = "0.9", path = "crates/rpc-types-debug", default-features = false }
alloy-rpc-types-engine = { version = "0.9", path = "crates/rpc-types-engine", default-features = false }
alloy-rpc-types-eth = { version = "0.9", path = "crates/rpc-types-eth", default-features = false }
alloy-rpc-types-mev = { version = "0.9", path = "crates/rpc-types-mev", default-features = false }
alloy-rpc-types-trace = { version = "0.9", path = "crates/rpc-types-trace", default-features = false }
alloy-rpc-types-txpool = { version = "0.9", path = "crates/rpc-types-txpool", default-features = false }
alloy-rpc-types = { version = "0.9", path = "crates/rpc-types", default-features = false }
alloy-serde = { version = "0.9", path = "crates/serde", default-features = false }
alloy-signer = { version = "0.9", path = "crates/signer", default-features = false }
alloy-signer-aws = { version = "0.9", path = "crates/signer-aws", default-features = false }
alloy-signer-gcp = { version = "0.9", path = "crates/signer-gcp", default-features = false }
alloy-signer-ledger = { version = "0.9", path = "crates/signer-ledger", default-features = false }
alloy-signer-local = { version = "0.9", path = "crates/signer-local", default-features = false }
alloy-signer-trezor = { version = "0.9", path = "crates/signer-trezor", default-features = false }
alloy-transport = { version = "0.9", path = "crates/transport", default-features = false }
alloy-transport-http = { version = "0.9", path = "crates/transport-http", default-features = false }
alloy-transport-ipc = { version = "0.9", path = "crates/transport-ipc", default-features = false }
alloy-transport-ws = { version = "0.9", path = "crates/transport-ws", default-features = false }
alloy-eip5792 = { version = "0.9", path = "crates/eip5792", default-features = false }
alloy-consensus = { version = "0.10", path = "crates/consensus", default-features = false }
alloy-consensus-any = { version = "0.10", path = "crates/consensus-any", default-features = false }
alloy-contract = { version = "0.10", path = "crates/contract", default-features = false }
alloy-eips = { version = "0.10", path = "crates/eips", default-features = false }
alloy-eip7547 = { version = "0.10", path = "crates/eip7547", default-features = false }
alloy-genesis = { version = "0.10", path = "crates/genesis", default-features = false }
alloy-json-rpc = { version = "0.10", path = "crates/json-rpc", default-features = false }
alloy-network = { version = "0.10", path = "crates/network", default-features = false }
alloy-network-primitives = { version = "0.10", path = "crates/network-primitives", default-features = false }
alloy-node-bindings = { version = "0.10", path = "crates/node-bindings", default-features = false }
alloy-provider = { version = "0.10", path = "crates/provider", default-features = false }
alloy-pubsub = { version = "0.10", path = "crates/pubsub", default-features = false }
alloy-rpc-client = { version = "0.10", path = "crates/rpc-client", default-features = false }
alloy-rpc-types-admin = { version = "0.10", path = "crates/rpc-types-admin", default-features = false }
alloy-rpc-types-anvil = { version = "0.10", path = "crates/rpc-types-anvil", default-features = false }
alloy-rpc-types-any = { version = "0.10", path = "crates/rpc-types-any", default-features = false }
alloy-rpc-types-beacon = { version = "0.10", path = "crates/rpc-types-beacon", default-features = false }
alloy-rpc-types-debug = { version = "0.10", path = "crates/rpc-types-debug", default-features = false }
alloy-rpc-types-engine = { version = "0.10", path = "crates/rpc-types-engine", default-features = false }
alloy-rpc-types-eth = { version = "0.10", path = "crates/rpc-types-eth", default-features = false }
alloy-rpc-types-mev = { version = "0.10", path = "crates/rpc-types-mev", default-features = false }
alloy-rpc-types-trace = { version = "0.10", path = "crates/rpc-types-trace", default-features = false }
alloy-rpc-types-txpool = { version = "0.10", path = "crates/rpc-types-txpool", default-features = false }
alloy-rpc-types = { version = "0.10", path = "crates/rpc-types", default-features = false }
alloy-serde = { version = "0.10", path = "crates/serde", default-features = false }
alloy-signer = { version = "0.10", path = "crates/signer", default-features = false }
alloy-signer-aws = { version = "0.10", path = "crates/signer-aws", default-features = false }
alloy-signer-gcp = { version = "0.10", path = "crates/signer-gcp", default-features = false }
alloy-signer-ledger = { version = "0.10", path = "crates/signer-ledger", default-features = false }
alloy-signer-local = { version = "0.10", path = "crates/signer-local", default-features = false }
alloy-signer-trezor = { version = "0.10", path = "crates/signer-trezor", default-features = false }
alloy-transport = { version = "0.10", path = "crates/transport", default-features = false }
alloy-transport-http = { version = "0.10", path = "crates/transport-http", default-features = false }
alloy-transport-ipc = { version = "0.10", path = "crates/transport-ipc", default-features = false }
alloy-transport-ws = { version = "0.10", path = "crates/transport-ws", default-features = false }
alloy-eip5792 = { version = "0.10", path = "crates/eip5792", default-features = false }

alloy-core = { version = "0.8.15", default-features = false }
alloy-dyn-abi = { version = "0.8.15", default-features = false }
Expand Down
18 changes: 18 additions & 0 deletions crates/alloy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0](https://github.com/alloy-rs/alloy/releases/tag/v0.10.0) - 2025-01-06

### Documentation

- Enable some useful rustdoc features on docs.rs ([#1890](https://github.com/alloy-rs/alloy/issues/1890))

## [0.9.2](https://github.com/alloy-rs/alloy/releases/tag/v0.9.2) - 2025-01-03

### Miscellaneous Tasks

- Release 0.9.2

## [0.9.1](https://github.com/alloy-rs/alloy/releases/tag/v0.9.1) - 2024-12-30

### Miscellaneous Tasks

- Release 0.9.1

## [0.9.0](https://github.com/alloy-rs/alloy/releases/tag/v0.9.0) - 2024-12-30

### Miscellaneous Tasks
Expand Down
6 changes: 5 additions & 1 deletion crates/alloy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ exclude.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = [
"-Zunstable-options",
"--generate-link-to-definition",
"--show-type-layout",
]

[lints]
workspace = true
Expand Down
18 changes: 18 additions & 0 deletions crates/consensus-any/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,26 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0](https://github.com/alloy-rs/alloy/releases/tag/v0.10.0) - 2025-01-06

### Documentation

- Enable some useful rustdoc features on docs.rs ([#1890](https://github.com/alloy-rs/alloy/issues/1890))

## [0.9.2](https://github.com/alloy-rs/alloy/releases/tag/v0.9.2) - 2025-01-03

### Miscellaneous Tasks

- Release 0.9.2

## [0.9.1](https://github.com/alloy-rs/alloy/releases/tag/v0.9.1) - 2024-12-30

### Miscellaneous Tasks

- Release 0.9.1

## [0.9.0](https://github.com/alloy-rs/alloy/releases/tag/v0.9.0) - 2024-12-30

### Bug Fixes

- Use u64 for all gas values ([#1848](https://github.com/alloy-rs/alloy/issues/1848))
Expand Down
6 changes: 5 additions & 1 deletion crates/consensus-any/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ exclude.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = [
"-Zunstable-options",
"--generate-link-to-definition",
"--show-type-layout",
]

[lints]
workspace = true
Expand Down
19 changes: 19 additions & 0 deletions crates/consensus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0](https://github.com/alloy-rs/alloy/releases/tag/v0.10.0) - 2025-01-06

### Documentation

- Enable some useful rustdoc features on docs.rs ([#1890](https://github.com/alloy-rs/alloy/issues/1890))

### Features

- Remove T: Transport from public APIs ([#1859](https://github.com/alloy-rs/alloy/issues/1859))
- Add RecoveredTx::try_map_transaction ([#1885](https://github.com/alloy-rs/alloy/issues/1885))
- Add missing helper fns ([#1880](https://github.com/alloy-rs/alloy/issues/1880))

## [0.9.2](https://github.com/alloy-rs/alloy/releases/tag/v0.9.2) - 2025-01-03

### Miscellaneous Tasks

- Release 0.9.2

## [0.9.1](https://github.com/alloy-rs/alloy/releases/tag/v0.9.1) - 2024-12-30

### Features
Expand All @@ -13,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Miscellaneous Tasks

- Release 0.9.1
- Add arbitrary for blockbody ([#1867](https://github.com/alloy-rs/alloy/issues/1867))

## [0.9.0](https://github.com/alloy-rs/alloy/releases/tag/v0.9.0) - 2024-12-30
Expand Down
6 changes: 5 additions & 1 deletion crates/consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ exclude.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = [
"-Zunstable-options",
"--generate-link-to-definition",
"--show-type-layout",
]

[lints]
workspace = true
Expand Down
10 changes: 9 additions & 1 deletion crates/consensus/src/block/header.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::constants::{EMPTY_OMMER_ROOT_HASH, EMPTY_ROOT_HASH};
use crate::{
constants::{EMPTY_OMMER_ROOT_HASH, EMPTY_ROOT_HASH},
Block, BlockBody,
};
use alloc::vec::Vec;
use alloy_eips::{
eip1559::{calc_next_block_base_fee, BaseFeeParams},
Expand Down Expand Up @@ -168,6 +171,11 @@ impl Sealable for Header {
}

impl Header {
/// Create a [`Block`] from the body and its header.
pub const fn into_block<T>(self, body: BlockBody<T>) -> Block<T> {
body.into_block(self)
}

/// Heavy function that will calculate hash of data and will *not* save the change to metadata.
///
/// Use [`Header::seal_slow`] and unlock if you need the hash to be persistent.
Expand Down
5 changes: 5 additions & 0 deletions crates/consensus/src/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ pub struct Block<T, H = Header> {
}

impl<T, H> Block<T, H> {
/// Creates a new block with the given header and body.
pub const fn new(header: H, body: BlockBody<T>) -> Self {
Self { header, body }
}

/// Creates a new empty uncle block.
pub fn uncle(header: H) -> Self {
Self { header, body: Default::default() }
Expand Down
3 changes: 3 additions & 0 deletions crates/consensus/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

extern crate alloc;

#[cfg(feature = "arbitrary")]
use rand as _;

pub use alloy_trie::TrieAccount;

#[deprecated(since = "0.7.3", note = "use TrieAccount instead")]
Expand Down
8 changes: 8 additions & 0 deletions crates/consensus/src/transaction/recovered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ impl<T> Recovered<T> {
pub fn map_transaction<Tx>(self, f: impl FnOnce(T) -> Tx) -> Recovered<Tx> {
Recovered::new_unchecked(f(self.tx), self.signer)
}

/// Applies the given fallible closure to the inner transactions.
pub fn try_map_transaction<Tx, E>(
self,
f: impl FnOnce(T) -> Result<Tx, E>,
) -> Result<Recovered<Tx>, E> {
Ok(Recovered::new_unchecked(f(self.tx)?, self.signer))
}
}

impl<T: Encodable> Encodable for Recovered<T> {
Expand Down
22 changes: 22 additions & 0 deletions crates/contract/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.0](https://github.com/alloy-rs/alloy/releases/tag/v0.10.0) - 2025-01-06

### Documentation

- Enable some useful rustdoc features on docs.rs ([#1890](https://github.com/alloy-rs/alloy/issues/1890))

### Features

- Remove T: Transport from public APIs ([#1859](https://github.com/alloy-rs/alloy/issues/1859))

## [0.9.2](https://github.com/alloy-rs/alloy/releases/tag/v0.9.2) - 2025-01-03

### Miscellaneous Tasks

- Release 0.9.2

## [0.9.1](https://github.com/alloy-rs/alloy/releases/tag/v0.9.1) - 2024-12-30

### Miscellaneous Tasks

- Release 0.9.1

## [0.9.0](https://github.com/alloy-rs/alloy/releases/tag/v0.9.0) - 2024-12-30

### Miscellaneous Tasks
Expand Down
6 changes: 5 additions & 1 deletion crates/contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ exclude.workspace = true

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
rustdoc-args = [
"-Zunstable-options",
"--generate-link-to-definition",
"--show-type-layout",
]

[lints]
workspace = true
Expand Down
Loading

0 comments on commit e8c437d

Please sign in to comment.