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

One instance per contract function call #326

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Conversation

ureeves
Copy link
Member

@ureeves ureeves commented Feb 10, 2024

Changes the instance reclamation code to allow for exactly one module instance per contract function call. This changes the way in which the node processes the state, leading to diverging state roots on errorring calls.

Simplifies the instance code by using a boolean to appropriately drop the instance. This allows the data in the struct to be passed around the Env, whilst fixing some bad dereferences previously occurring under certain situations.

Resolves: #325

@ureeves ureeves marked this pull request as draft February 10, 2024 02:11
@ureeves ureeves force-pushed the single-instance-per-call branch 2 times, most recently from 2509e52 to 1e7fbdf Compare February 12, 2024 12:45
@ureeves ureeves marked this pull request as ready for review February 12, 2024 12:45
Changes the instance reclamation code to allow for exactly one module
instance per contract function call. This changes the way in which the
node processes the state, leading to diverging state roots on errorring
calls.

Simplifies the instance code by using a boolean to appropriately drop
the instance. This allows the data in the struct to be passed around
the `Env`, whilst fixing some bad dereferences previously occurring
under certain situations.

Resolves: #325
@ureeves ureeves force-pushed the single-instance-per-call branch from 1e7fbdf to cfe6134 Compare February 12, 2024 15:30
Copy link
Member

@moCello moCello left a comment

Choose a reason for hiding this comment

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

LGTM

@ureeves ureeves merged commit a3a669f into main Feb 12, 2024
6 checks passed
@ureeves ureeves deleted the single-instance-per-call branch February 12, 2024 16:29
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.

Only one instance should exist per function call
2 participants