-
Notifications
You must be signed in to change notification settings - Fork 126
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
R4R: Make more validate about the MsgCreateValidator
in CollectStdTxs
#853
Conversation
modules/auth/stdtx.go
Outdated
var ( | ||
_ sdk.Tx = (*StdTx)(nil) | ||
|
||
maxGasWanted = uint64((1 << 63) - 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.
uint64((1 << 63) - 1) --> math.MaxInt64
modules/auth/stdtx.go
Outdated
|
||
if tx.Fee.Gas > maxGasWanted { | ||
return sdk.ErrGasOverflow(fmt.Sprintf("invalid gas supplied; %d > %d", tx.Fee.Gas, maxGasWanted)) | ||
} |
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.
change the tendermint to use uint64 for gas instead of int64
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.
split the PR into 2 parts. The other one is for changing the tendermint to use uint64 for gas instead of int64
We have checked gas overflow in FeePreprocessHandler, so I removed the relevant commits. |
MsgCreateValidator
in CollectStdTxs
R4R: CollectStdTxs() must check DelegatorAddr against accounts cosmos/cosmos-sdk#3004