-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
tendermint: Update to master #6471
Conversation
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/prometheus/client_golang/releases) - [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md) - [Commits](prometheus/client_golang@v1.6.0...v1.7.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
…s/client_golang-1.7.0
…s/client_golang-1.7.0
@marbar3778 you also need to update the makefile to point to the commit in order to update the proto deps |
yup yup i know. There isnt a need for that right now. |
this is currently blocked on |
this may be blocked on a possible bug in tendermint. The bug has been present in all previous versions but only now is known due to the strictness of proto |
@@ -552,3 +554,19 @@ func splitPath(requestPath string) (path []string) { | |||
|
|||
return path | |||
} | |||
|
|||
func (app *BaseApp) ListSnapshots(abci.RequestListSnapshots) abci.ResponseListSnapshots { |
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.
Do we plan on supporting state sync for stargate?
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.
yes, there is a separate PR that integrates it but it's blocked on this PR. anyways these are added as no-ops for now
@@ -151,7 +152,7 @@ func encryptPrivKey(privKey crypto.PrivKey, passphrase string) (saltBytes []byte | |||
} | |||
|
|||
key = crypto.Sha256(key) // get 32 bytes | |||
privKeyBytes := privKey.Bytes() | |||
privKeyBytes := legacy.Cdc.Amino.MustMarshalBinaryBare(privKey) |
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.
Why use the legacy amino codec 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.
bytes before was the amino encoding. I wasn't sure if I should work on the migration of keys in this PR as its already large.
Linking to tendermint/tendermint#5138 but my understanding is that it's blocking. |
var bzArr [32]byte | ||
copy(bzArr[:], bz) | ||
return secp256k1.PrivKeySecp256k1(bzArr) | ||
var bzArr = make([]byte, secp256k1.PrivKeySize) |
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.
var bzArr = make([]byte, secp256k1.PrivKeySize) | |
bzArr := make([]byte, secp256k1.PrivKeySize) |
@@ -154,3 +154,5 @@ func (pk PubKeyMultisigThreshold) Equals(other crypto.PubKey) bool { | |||
} | |||
return true | |||
} | |||
|
|||
func (pk PubKeyMultisigThreshold) Type() string { return " PubKeyMultisigThreshold" } |
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.
func (pk PubKeyMultisigThreshold) Type() string { return " PubKeyMultisigThreshold" } | |
func (pk PubKeyMultisigThreshold) Type() string { return "PubKeyMultisigThreshold" } |
google.golang.org/grpc v1.30.0 | ||
gopkg.in/yaml.v2 v2.3.0 | ||
) | ||
|
||
replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.2-alpha.regen.4 | ||
|
||
replace github.com/tendermint/tendermint => ../tendermint |
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.
remove
MaxAgeNumBlocks: cp.Evidence.MaxAgeNumBlocks, | ||
MaxAgeDuration: cp.Evidence.MaxAgeDuration, | ||
// TODO: expand to house other params |
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.
address
t.Cleanup(iterator.Close) | ||
t.Cleanup(func() { | ||
if err := iterator.Close; err != nil { | ||
t.Logf("error cleaning up iterator: %v", err()) |
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.
is err a function?
t.Cleanup(reverseIterator.Close) | ||
t.Cleanup(func() { | ||
if err := reverseIterator.Close; err != nil { | ||
t.Logf("error cleaning up iterator: %v", err()) |
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.
ditto
expectedValue: nil, | ||
expectedOut: "{\"operation\":\"read\",\"key\":\"\",\"value\":\"\",\"metadata\":{\"blockHeight\":64}}\n", | ||
}, | ||
// TODO: key types can not me empty |
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.
address?
@@ -45,10 +46,12 @@ func startInProcess(cfg Config, val *Validator) error { | |||
logger.With("module", val.Moniker), | |||
) | |||
if err != nil { | |||
fmt.Println(err) |
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.
fmt.Println(err) |
expectedValue: nil, | ||
expectedOut: "{\"operation\":\"read\",\"key\":\"\",\"value\":\"\",\"metadata\":{\"blockHeight\":64}}\n", | ||
}, | ||
// TODO: key types can not me empty |
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.
address
I would like to know how many files diff just based on package renaming compared to logic changes. It might really simplify the review process if we could have 1 PR that is just for pkg renaming changes and separate PRs for logic changes -- no matter how small. The base PR (pkg renaming) should be the first PR and approved immediately, but not merged. Then subsequent PRs are based against the base PR and are merged after thorough review. This way, we can tackle all logic changes piecemeal. I know you already put a bunch of work into this @marbar3778, but reviewing a 200+ file diff is just not feasible. |
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.
did a first pass mostly over IBC stuff, mostly looks good to me 👍 just left comments on things that stood out
@@ -13,7 +13,7 @@ this [blog post](https://blog.cosmos.network/bug-bounty-program-for-tendermint-c | |||
|
|||
The following is a list of examples of the kinds of bugs we're most interested | |||
in for the Cosmos SDK. See [here](https://github.com/tendermint/tendermint/blob/master/SECURITY.md) for vulnerabilities we are interested | |||
in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com/tendermint/iavl)). | |||
in for Tendermint and other lower-level libraries (eg. [IAVL](https://github.com/cosmos/iavl)). |
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.
shouldn't this be removed? I imagine IAVL bugs will now be reported to cosmos and not tendermint
return err | ||
} | ||
|
||
if err := tmNode.Start(); err != nil { | ||
fmt.Println(err) |
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.
fmt.Println(err) |
@@ -1,6 +1,7 @@ | |||
package network | |||
|
|||
import ( | |||
"fmt" |
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.
"fmt" |
@@ -366,7 +366,7 @@ func convertProofs(mproof MerkleProof) ([]*ics23.CommitmentProof, error) { | |||
|
|||
// Empty returns true if the root is empty | |||
func (proof MerkleProof) Empty() bool { | |||
return proof.Proof.Equal(nil) || proof.Equal(MerkleProof{}) || proof.Proof.Equal(nil) || proof.Proof.Equal(merkle.Proof{}) | |||
return proto.Equal(proof.Proof, nil) || proto.Equal(&proof, &MerkleProof{}) || proto.Equal(proof.Proof, nil) || proto.Equal(proof.Proof, &tmmerkle.ProofOps{}) |
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.
this is outside the scope of this pr, but there is a duplicate check here with proto.Equal(proof.Proof, nil)
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 this is a bug, I think the first check should be proto.Equal(proof, nil)
@@ -109,7 +109,12 @@ func QueryTendermintHeader(clientCtx client.Context) (ibctmtypes.Header, int64, | |||
return ibctmtypes.Header{}, 0, err | |||
} | |||
|
|||
validators, err := node.Validators(&height, 0, 10000) | |||
page := new(int) | |||
*page = 0 |
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.
is there no way to condense these lines?
@@ -91,7 +91,12 @@ func NewLevelDB(name, dir string) (db dbm.DB, err error) { | |||
err = fmt.Errorf("couldn't create db: %v", r) | |||
} | |||
}() | |||
return dbm.NewDB(name, backend, dir), err | |||
|
|||
if err != nil { |
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.
is this necessary? won't the error be returned because the err error
definition in the return
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 a direct return of the error in the defer func makes the most sense
@@ -79,8 +78,8 @@ func (a Attribute) String() string { | |||
} | |||
|
|||
// ToKVPair converts an Attribute object into a Tendermint key/value pair. | |||
func (a Attribute) ToKVPair() tmkv.Pair { | |||
return tmkv.Pair{Key: toBytes(a.Key), Value: toBytes(a.Value)} | |||
func (a Attribute) ToKVPair() abci.EventAttribute { |
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.
shouldn't this be using the cosmos kv instead of returning an abci.EventAttribute
? the func name and comment differs with behavior with this update
I agree with @alexanderbez suggestion, I think it'll lead to a faster review process and not require multiple people to scan 200 files worth of import name changes. @marbar3778 I can lend a hand with doing import name changes on a base PR tomorrow, we could divide up the work like I could do ibc and some other modules so we can work at the same time |
breaking this pr into multiple ones |
closing this in favor of #6892 |
Description
Updating sdk to latest tendermint (master) in order to start testing things on our side with the sdk.
This PR removes:
--trust-node:
closes: #XXXX