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

feat(common): remove need for tx queue in createContract #1271

Merged
merged 3 commits into from
Aug 9, 2023

Conversation

holic
Copy link
Member

@holic holic commented Aug 9, 2023

closes #1263

I initially thought we needed a queue to handle nonces. But once I separated the transaction simulation (to determine gas) from the nonce handling (incrementing before writing to the mem pool), I discovered we don't even need the queue anymore.

I tried this locally against our testnet and couldn't get nonce issues to appear.

We could improve this further by handling other mem pool cases and re-simulating as needed (would be nice for failures due to gas price increases).

@changeset-bot
Copy link

changeset-bot bot commented Aug 9, 2023

🦋 Changeset detected

Latest commit: efca6a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@latticexyz/common Patch
@latticexyz/block-logs-stream Patch
@latticexyz/cli Patch
@latticexyz/config Patch
@latticexyz/dev-tools Patch
@latticexyz/network Patch
@latticexyz/protocol-parser Patch
@latticexyz/std-client Patch
@latticexyz/store-cache Patch
@latticexyz/store-indexer Patch
@latticexyz/store-sync Patch
@latticexyz/store Patch
@latticexyz/world Patch
@latticexyz/ecs-browser Patch
@latticexyz/react Patch
create-mud Patch
@latticexyz/gas-report Patch
@latticexyz/noise Patch
@latticexyz/phaserx Patch
@latticexyz/recs Patch
@latticexyz/schema-type Patch
@latticexyz/services Patch
@latticexyz/solecs Patch
solhint-config-mud Patch
solhint-plugin-mud Patch
@latticexyz/std-contracts Patch
@latticexyz/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@holic holic changed the title feat(common): remove need for tx queue feat(common): remove need for tx queue in `createContract Aug 9, 2023
@holic holic changed the title feat(common): remove need for tx queue in `createContract feat(common): remove need for tx queue in createContract Aug 9, 2023
@holic holic marked this pull request as ready for review August 9, 2023 17:47
@holic holic requested a review from alvrs as a code owner August 9, 2023 17:47
Copy link
Member

@alvrs alvrs left a comment

Choose a reason for hiding this comment

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

nice!

@holic holic merged commit 35c9f33 into main Aug 9, 2023
@holic holic deleted the holic/separate-tx-queues branch August 9, 2023 18:08
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.

separate tx simulate queue from tx write queue in createContract
2 participants