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: update types & drop bundle support #256

Merged
merged 5 commits into from
Oct 3, 2024
Merged

Conversation

mempirate
Copy link
Contributor

Closes #217

@mempirate mempirate marked this pull request as ready for review October 2, 2024 14:30
Copy link
Contributor

@thedevbirb thedevbirb left a comment

Choose a reason for hiding this comment

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

Two little q's!

bolt-sidecar/src/driver.rs Show resolved Hide resolved
Comment on lines +231 to +241
let signed_constraints = match self.constraint_signer.sign(&message.digest()).await {
Ok(signature) => SignedConstraints { message, signature },
Err(err) => {
error!(?err, "Failed to sign constraints");
let _ = response.send(Err(CommitmentError::Internal));
return;
}
};

ApiMetrics::increment_transactions_preconfirmed(tx_type);
self.execution.add_constraint(slot, signed_constraints);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work if a transaction appears twice, first time in a commitment request with just one tx and the second time in a commitment with a batch of two transactions?
Because there is a risk otherwise we increment the nonce of balance of the user two times

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created a quick test with a duplicate tx in a batch, which should and does fail with nonce too low. It's not exactly what you described but should cover it.

@mempirate mempirate requested a review from thedevbirb October 3, 2024 08:24
@thedevbirb thedevbirb merged commit cc303ea into unstable Oct 3, 2024
2 checks passed
@thedevbirb thedevbirb deleted the jonas/smol-fixes branch October 3, 2024 10:13
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.

Drop support for bundle preconfs
3 participants