-
Notifications
You must be signed in to change notification settings - Fork 417
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
GRPC refactor #2905
GRPC refactor #2905
Conversation
…etwork/abacus-monorepo into trevor/grpc-refactor-1
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.
master grpc optimizor 🏎️
/// Note that in Tendermint, validators come to consensus on a block | ||
/// before they execute the transactions in that block. This means that | ||
/// we may not be able to make state queries against this block until | ||
/// the next one is committed! |
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.
Much needed comments 🙏
// As this function is only used for estimating gas or sending transactions, | ||
// we can reasonably expect to have a signer. | ||
let signer = self.get_signer()?; | ||
let account_info = self.account_query(signer.address.clone()).await?; |
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 assume we're not precomputing this in the constructor because we want to keep it synchronous? Don't think it's worth caching otherwise but was just wondering
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 "account number" can be cached but fetching the sequence number (i.e. the nonce to use for the next tx) should still be done. Just in case other txs from that key happen to have been made elsewhere
|
||
let tx_body = tx::Body::new( | ||
msgs, | ||
"", |
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.
cleaner to use Default::default()
here
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.
the expected value is impl Into<String>
so I'll just do String::default()
let raw_tx = TxRaw { | ||
body_bytes: sign_doc.body_bytes, | ||
auth_info_bytes: sign_doc.auth_info_bytes, | ||
// The poorly documented trick to simuluating a tx without a valid signature is to just pass |
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.
nice
a95d424
into
trevor/new-featv3-cosmos-oct-28
Description
Drive-by changes
n/a
Related issues
n/a
Backward compatibility
yee
Testing
builds, local test