-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[fastpath] support locking transactions and returning effects without signatures #20128
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
4b31444
to
0938b37
Compare
0938b37
to
9a73738
Compare
9a73738
to
7efa105
Compare
7efa105
to
460cc2c
Compare
return Err(SuiError::UnexpectedMessage( | ||
"ConsensusTransactionKind::UserTransaction is unsupported".to_string(), | ||
) | ||
.into()); | ||
} | ||
// TODO(fastpath): implement verification for uncertified user transactions. |
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.
why is this todo no longer required? Is it because we verify when we vote?
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.
Yeah I was thinking the verifications in vote_transactions()
make this TODO obsolete. But it may be better to still keep track of the TODO to move those checks here.
460cc2c
to
a98452b
Compare
a98452b
to
96a00d4
Compare
dfa9202
to
a860847
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.
I am good to approved but let's catch up regarding the QuorumExecuted
changes , would like to make sure I understand this correctly
@@ -1062,7 +1079,7 @@ impl AuthorityState { | |||
|
|||
pub(crate) fn check_system_overload( | |||
&self, | |||
consensus_adapter: &Arc<ConsensusAdapter>, | |||
consensus_overload_checker: &(impl ConsensusOverloadChecker + ?Sized), |
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.
I know that is legit, but why not an Arc<dyn ConsensusOverloadChecker>
?
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.
That will require a clone of the Arc<>
at the callsite, which seems unnecessary. Also &Arc<dyn ConsensusOverloadChecker>
does not work which is my initial attempt.
transaction_digest: &TransactionDigest, | ||
) -> SuiResult<Option<(TransactionEffects, TransactionEvents)>> { | ||
let effects = self | ||
.get_transaction_cache_reader() |
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.
Haven't followed the cache work semantics, but my understanding is that it will guarantee to check in storage if data are not in cache, right?
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.
As clarified by @mystenmark, yes.
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.
Yep, apologies, that was a comment that I put yesterday before our discussion. All good.
@@ -781,7 +773,7 @@ impl ValidatorService { | |||
ConsensusTransactionKind::CertifiedTransaction(tx) => { | |||
tx.contains_shared_object() | |||
} | |||
ConsensusTransactionKind::UserTransaction(_) => true, | |||
ConsensusTransactionKind::UserTransaction(tx) => tx.contains_shared_object(), |
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.
We might want to have for the UserTransaction without a shared obj a separate metric I guess?
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.
Yeah this metric is not too useful so far. For what it is measuring, maybe removing all the conditional is better.
async fn run(&mut self, quorum_driver: Arc<QuorumDriver<NetworkAuthorityClient>>) { | ||
async fn run( | ||
&mut self, | ||
updatable: Arc<dyn AuthorityAggregatorUpdatable<NetworkAuthorityClient>>, |
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.
I think the updatable
is a bit generic. Why not just authority_aggregator
?
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 value is not authority_aggregator itself, but a value that supports updating its underneath authority_aggregator, including QuorumDriver and TransactionDriver later. Renamed this to driver
.
if let Some(signed_transaction) = signed_transaction { | ||
batch.insert_batch( | ||
&self.signed_transactions, | ||
std::iter::once(( | ||
*signed_transaction.digest(), | ||
signed_transaction.serializable_ref(), | ||
)), | ||
)?; | ||
} |
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.
Is my understanding correct that we'll no longer need for fastpath the signed_transactions
anyways since we do not individually sign the transactions anymore? Looking on the read path this is mostly being used to tell via our APIs whether the transaction has been signed or not. Not sure if those APIs will be used in the future.
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.
Transactions will not be signed with BLS any more. But if there are use cases for handle_transaction_info_request()
other than getting effects, we will have to figure out ways to migrate the existing users. I will leave a TODO over that API.
pub struct VerifiedExecuteTransactionResponseV3 { | ||
pub effects: VerifiedCertifiedTransactionEffects, | ||
pub events: Option<TransactionEvents>, | ||
// Input objects will only be populated in the happy path | ||
pub input_objects: Option<Vec<Object>>, | ||
// Output objects will only be populated in the happy path | ||
pub output_objects: Option<Vec<Object>>, | ||
pub auxiliary_data: Option<Vec<u8>>, | ||
} |
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.
I know this is dead code but is it ok to remove?
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.
Since there is no reference to this type else where, it should be safe to remove.
601d1aa
to
754ebfc
Compare
754ebfc
to
11003ee
Compare
Description
ConsensusTransactionKind::UserTransaction
in callsites that already handleConsensusTransactionKind::CertifiedTransaction
.QuorumDriver
, in reconfig observers.Test plan
CI
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.