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

Make payload_builder function accept BestTxterator directly #11889

Closed
mattsse opened this issue Oct 19, 2024 · 4 comments · Fixed by #11978
Closed

Make payload_builder function accept BestTxterator directly #11889

mattsse opened this issue Oct 19, 2024 · 4 comments · Fixed by #11978
Assignees
Labels
A-block-building Related to block building A-tx-pool Related to the transaction mempool C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Oct 19, 2024

Describe the feature

Currently we create the iterator like this:

let mut best_txs = pool.best_transactions_with_attributes(BestTransactionsAttributes::new(
base_fee,
initialized_block_env.get_blob_gasprice().map(|gasprice| gasprice as u64),
));

in:

pub fn default_ethereum_payload<EvmConfig, Pool, Client>(
evm_config: EvmConfig,
args: BuildArguments<Pool, Client, EthPayloadBuilderAttributes, EthBuiltPayload>,
initialized_cfg: CfgEnvWithHandlerCfg,
initialized_block_env: BlockEnv,
) -> Result<BuildOutcome<EthBuiltPayload>, PayloadBuilderError>
where
EvmConfig: ConfigureEvm<Header = Header>,
Client: StateProviderFactory + ChainSpecProvider<ChainSpec = ChainSpec>,
Pool: TransactionPool,
{

it would be nicer if this would accept any iterator

we can make this easily work by changing the requested type of the pool

Pool: TransactionPool,

which should not be TxPool but something that returns a new BestTransactionsIter given a BestTransactionsAttributes, so something like

Pool: FnOnce(BestTransactionsAttributes) -> BestTransactionsIter

see also:

#11890

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Oct 19, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-block-building Related to block building A-tx-pool Related to the transaction mempool and removed S-needs-triage This issue needs to be labelled labels Oct 19, 2024
@edisontim
Copy link
Contributor

Hello! Can I get assigned on this one?

@mahmudsudo
Copy link

Hello! Can I get assigned on this one?

@edisontim
Copy link
Contributor

edisontim commented Oct 21, 2024

Hey @mattsse, I'm wondering if this is possible as we need the pool later on for ?

blob_sidecars = pool.get_all_blobs_exact(

Maybe I'm missing something, I apologize if that's the case

@mattsse
Copy link
Collaborator Author

mattsse commented Oct 22, 2024

I see, then we need this as extra argument instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-block-building Related to block building A-tx-pool Related to the transaction mempool C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants