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

chore(txpool): implement ensure_max_init_code_size() #1062

Merged

Conversation

jinsankim
Copy link
Contributor

Closes #924

I'm not much sure whether it could close #924. I'll be really appreciate to point out me if I misunderstood the issue.

@codecov-commenter
Copy link

Codecov Report

Merging #1062 (516f946) into main (b5dab61) will increase coverage by 0.00%.
The diff coverage is 6.25%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main    #1062   +/-   ##
=======================================
  Coverage   74.91%   74.91%           
=======================================
  Files         313      313           
  Lines       34108    34140   +32     
=======================================
+ Hits        25551    25576   +25     
- Misses       8557     8564    +7     
Flag Coverage Δ
unit-tests 74.91% <6.25%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
crates/transaction-pool/src/error.rs 0.00% <0.00%> (ø)
crates/transaction-pool/src/traits.rs 3.44% <0.00%> (-0.13%) ⬇️
crates/transaction-pool/src/validate.rs 50.74% <0.00%> (-20.09%) ⬇️
crates/transaction-pool/src/test_utils/mock.rs 58.51% <22.22%> (+5.39%) ⬆️
crates/net/eth-wire/src/capability.rs 62.13% <0.00%> (-0.98%) ⬇️
crates/stages/src/stages/sender_recovery.rs 92.51% <0.00%> (-0.54%) ⬇️
crates/stages/src/stages/bodies.rs 92.96% <0.00%> (+0.43%) ⬆️
crates/transaction-pool/src/pool/txpool.rs 59.32% <0.00%> (+0.50%) ⬆️
crates/net/network/src/listener.rs 83.72% <0.00%> (+2.32%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@onbjerg onbjerg added C-enhancement New feature or request A-tx-pool Related to the transaction mempool labels Jan 27, 2023
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.

smol nit, otherwise lgtm

crates/transaction-pool/src/traits.rs Outdated Show resolved Hide resolved
Comment on lines +60 to +64
fn ensure_max_init_code_size(
&self,
transaction: Self::Transaction,
max_init_code_size: usize,
) -> Result<(), PoolError> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems ok for now, we'll figure out the right ergonomics later

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
@jinsankim jinsankim marked this pull request as ready for review January 27, 2023 16:59
@jinsankim jinsankim marked this pull request as draft January 27, 2023 17:04
@jinsankim jinsankim marked this pull request as ready for review January 27, 2023 17:33
@mattsse mattsse merged commit 072a6c5 into paradigmxyz:main Jan 27, 2023
@jinsankim jinsankim deleted the add-max-init-code-size-txpool-test branch January 28, 2023 04:59
literallymarvellous pushed a commit to literallymarvellous/reth that referenced this pull request Feb 5, 2023
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
literallymarvellous pushed a commit to literallymarvellous/reth that referenced this pull request Feb 5, 2023
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
literallymarvellous pushed a commit to literallymarvellous/reth that referenced this pull request Feb 6, 2023
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tx-pool Related to the transaction mempool C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add maxInitCodeSize txpool test
4 participants