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

governance: use concurrent build #5043

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 17 additions & 12 deletions crates/core/app/src/action_handler/actions/submit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,18 +346,23 @@ async fn build_community_pool_transaction(
transaction_plan: TransactionPlan,
) -> Result<Transaction> {
let effect_hash = transaction_plan.effect_hash(&COMMUNITY_POOL_FULL_VIEWING_KEY)?;
transaction_plan.build(
&COMMUNITY_POOL_FULL_VIEWING_KEY,
&WitnessData {
anchor: penumbra_sdk_tct::Tree::new().root(),
state_commitment_proofs: Default::default(),
},
&AuthorizationData {
effect_hash: Some(effect_hash),
spend_auths: Default::default(),
delegator_vote_auths: Default::default(),
},
)
Ok(transaction_plan
.build_concurrent(
&COMMUNITY_POOL_FULL_VIEWING_KEY,
&WitnessData {
anchor: penumbra_sdk_tct::Tree::new().root(),
state_commitment_proofs: Default::default(),
},
&AuthorizationData {
effect_hash: Some(effect_hash),
spend_auths: Default::default(),
delegator_vote_auths: Default::default(),
},
)
.await
.expect(
"community pool transactions are always well-formed and should never fail to build",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is this true? also general question, why is this logic embedded in the top-level action handler?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can switch from .build() to .build_concurrent() without introducing an expect(). Let's be cautious about introducing changes to how errors are handled.

))
}

#[cfg(test)]
Expand Down
Loading