-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
remove TxContext from the executor API #20000
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
20000!!! |
and it's mine!!! |
db9b0f0
to
4b575ae
Compare
4b575ae
to
b8eb872
Compare
b8eb872
to
a4b3820
Compare
a4b3820
to
4d70b21
Compare
41922dd
to
f4ffb2f
Compare
f4ffb2f
to
b3c154d
Compare
b3c154d
to
74f5783
Compare
74f5783
to
e6d718f
Compare
e6d718f
to
39059c7
Compare
tx_ctx.clone(), | ||
gas_charger, | ||
advance_epoch_pt, | ||
); | ||
// advance epoch has a non standard behavior in that it can run multiple `execute` functions | ||
// with the same `TxContext`. This call updates the `TxContext` to reflect the new objects created. | ||
// `objects_created_count` may contain the number of packages published as well and in that sense | ||
// it is not a true count of objects created. However even with that we are growing the `ids_created` | ||
// and we avoid conflicts anyway even if the range of values is not contiguous (has gaps). | ||
tx_ctx.add_ids_created(temporary_store.objects_created_count() as u64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fairly error prone to remember to update the ids created from the "older" instance of a context. If we're not careful we'll generate multiple object ids which are identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, agree! and this is what the behavior as it has always been. This is just to make it more obvious.
If you have an idea of how to change all of that please let us know. I could not find a good, simple way to do it without reworking the entire space which, at the moment, feels outside the scope of this work.
Also please notice this is all inside execution, so from a "client" perspective no one sees this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having said all of that I'll review the usage of TxContext
and see is there is another way to plug that in cleanly
39059c7
to
2e2c9b0
Compare
2e2c9b0
to
f4a9f76
Compare
Description
Describe the changes or additions included in this PR.
Test plan
How did you test the new or updated feature?
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.