-
Notifications
You must be signed in to change notification settings - Fork 38
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(blockifier): store block_context as Arc in TransactionContext #4157
Conversation
Artifacts upload workflows: |
348c8ac
to
d9a32da
Compare
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.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @liorgold2)
-- commits
line 2 at r1:
What's the context? What's the feature your working and your plan?
Code quote:
store block_context as Arc in TransactionContext
crates/blockifier/src/context.rs
line 27 at r1 (raw file):
#[derive(Clone, Debug)] pub struct TransactionContext {
Consider implementing new
c-tor, to encapsulate this.
Code quote:
TransactionContext
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @elintul)
Previously, elintul (Elin) wrote…
What's the context? What's the feature your working and your plan?
Adding a meta-tx syscall. This will require creating a TransactionContext
with a different tx_info
, but the same block_info. So I'm changing it to Arc
to avoid cloning it.
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @elintul)
crates/blockifier/src/context.rs
line 27 at r1 (raw file):
Previously, elintul (Elin) wrote…
Consider implementing
new
c-tor, to encapsulate this.
Noted. I think BlockContext should be Arc in more places, so a constructor from BlockContext
that wraps it in Arc
is problematic.
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
crates/blockifier/src/context.rs
line 27 at r1 (raw file):
Previously, liorgold2 wrote…
Noted. I think BlockContext should be Arc in more places, so a constructor from
BlockContext
that wraps it inArc
is problematic.
Not sure I understood.
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
crates/blockifier/src/context.rs
line 27 at r1 (raw file):
Previously, elintul (Elin) wrote…
Not sure I understood.
The question is what the new
constructor will get.
- If it gets
Arc<BlockContext>
then it doesn't encapsulates it. - If it gets
BlockContext
then it needs to create anArc
, but I don't think this is what I want to encourage - if you have anArc<BlockContext>
and you want to createTransactionContext
, then you won't be able to pass through this constructor.
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
crates/blockifier/src/context.rs
line 27 at r1 (raw file):
Previously, liorgold2 wrote…
The question is what the
new
constructor will get.
- If it gets
Arc<BlockContext>
then it doesn't encapsulates it.- If it gets
BlockContext
then it needs to create anArc
, but I don't think this is what I want to encourage - if you have anArc<BlockContext>
and you want to createTransactionContext
, then you won't be able to pass through this constructor.
Okay, I see. Keep in mind as this feature goes, that if the second one is the more common case, new
c-tor can be considered.
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
No description provided.