Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make into_transaction fallible #4710

Merged
merged 3 commits into from
Sep 21, 2023
Merged

Conversation

DaniPopes
Copy link
Member

Fixes #4704

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #4710 (16e5879) into main (6016da7) will decrease coverage by 0.09%.
Report is 15 commits behind head on main.
The diff coverage is 12.12%.

Impacted file tree graph

Files Changed Coverage Δ
crates/rpc/rpc-types-compat/src/transaction/mod.rs 0.00% <0.00%> (ø)
crates/rpc/rpc-types/src/eth/call.rs 58.88% <ø> (ø)
...rates/rpc/rpc-types/src/eth/transaction/request.rs 2.08% <0.00%> (ø)
crates/rpc/rpc-types/src/eth/transaction/typed.rs 0.00% <0.00%> (ø)
crates/rpc/rpc/src/eth/api/sign.rs 68.00% <0.00%> (-2.84%) ⬇️
crates/rpc/rpc/src/eth/api/transactions.rs 30.76% <0.00%> (ø)
crates/rpc/rpc/src/eth/error.rs 9.34% <0.00%> (-0.21%) ⬇️
crates/rpc/rpc/src/eth/signer.rs 87.16% <66.66%> (+0.67%) ⬆️
crates/rpc/rpc-types/src/eth/transaction/mod.rs 100.00% <100.00%> (ø)

... and 50 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.75% <0.00%> (+<0.01%) ⬆️
unit-tests 63.30% <12.12%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 32.17% <ø> (ø)
blockchain tree 83.75% <ø> (ø)
pipeline 88.53% <ø> (-0.01%) ⬇️
storage (db) 72.52% <ø> (-0.50%) ⬇️
trie 94.69% <ø> (-0.08%) ⬇️
txpool 49.82% <ø> (-0.11%) ⬇️
networking 77.16% <ø> (-0.02%) ⬇️
rpc 57.87% <12.12%> (+0.05%) ⬆️
consensus 62.97% <ø> (-0.29%) ⬇️
revm 28.38% <ø> (+0.21%) ⬆️
payload builder 8.35% <ø> (-0.11%) ⬇️
primitives 86.53% <ø> (-0.04%) ⬇️

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm,

pending suggestion re nonce U256 -> U64

/// Converts a typed transaction request into a primitive transaction.
///
/// Returns `None` if any of the following are true:
/// - `nonce` is greater than [`u64::MAX`]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just checked geth reference and nonce on rpc methods is U64,

I think we can also change this in our types?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

@DaniPopes DaniPopes Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we're using ruint for these txrequest anyway? I don't see any serde derives or whatever

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are two steps here

TransactionRequest -> TypedTransactionRequest -> Transaction

arguably this could also be one step, but having a typed request is still useful

@mattsse mattsse added this pull request to the merge queue Sep 21, 2023
Merged via the queue into paradigmxyz:main with commit 6a60175 Sep 21, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in TypedTransactionRequest .into_transaction()
2 participants