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

fix(sync): deployed_contract_address computed in async context #2414

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CHr15F0x
Copy link
Member

@CHr15F0x CHr15F0x commented Nov 28, 2024

Fixes: #2074

A quick test on my pc (ryzen 3700x) shows that ContractAddress::deployed_contract_address on average takes > 150us, which is more than the rule of thumb in https://ryhl.io/blog/async-what-is-blocking/ of 10-100us.

@CHr15F0x CHr15F0x requested a review from a team as a code owner November 28, 2024 09:12
Copy link
Contributor

@vbar vbar left a comment

Choose a reason for hiding this comment

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

LGTM, modulo typos in comments

@@ -441,6 +441,8 @@ impl ToDto<p2p_proto::common::L1DataAvailabilityMode> for L1DataAvailabilityMode
}

impl TryFromDto<p2p_proto::transaction::TransactionVariant> for TransactionVariant {
/// Caller must take care to compute the contract address for deploy and
/// deploy account transactions separately is a non-async context.
Copy link
Contributor

Choose a reason for hiding this comment

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

"in"

@@ -688,6 +678,8 @@ impl TryFromDto<p2p_proto::transaction::TransactionVariant> for TransactionVaria
}

impl TryFromDto<p2p_proto::transaction::Transaction> for Transaction {
/// Caller must take care to compute the contract address for deploy and
/// deploy account transactions separately is a non-async context.
Copy link
Contributor

Choose a reason for hiding this comment

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

"in"

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.

defer deployed contract address computation to a stage during sync
3 participants