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

Allow smaller contract calls after a considered mempool tx would hit block limit #5606

Open
hstove opened this issue Dec 20, 2024 · 1 comment

Comments

@hstove
Copy link
Contributor

hstove commented Dec 20, 2024

In our block building code, we have the following behavior:

  • Fetch a bunch of potential transactions from the mempool
  • For each transaction, call try_mine_tx
  • If one of the contract calls is too big to fit, we set block_limit_behavior to BlockLimitFunction::CONTRACT_LIMIT_HIT
  • If block_limit_behavior is CONTRACT_LIMIT_HIT, we don't even try to mine any other considered contract calls

This is problematic, because there are times where a very big transaction would hit this limit, but there are a bunch of smaller transactions that would fit just fine into the block.

We may want to tweak this behavior. We may simply want to "ignore" the big transaction and/or not skip future considered contract calls if we hit CONTRACT_LIMIT_HIT.

@hstove
Copy link
Contributor Author

hstove commented Dec 21, 2024

Note: I've pushed a branch that contains an integration test replicating this behavior. https://github.com/stacks-network/stacks-core/blob/feat/big-tx-utils/testnet/stacks-node/src/tests/nakamoto_integrations.rs#L10335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant