-
Notifications
You must be signed in to change notification settings - Fork 18
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
Conversation
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.
Two little q's!
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); |
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.
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
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 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.
Closes #217