-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ICS07 follow up changes #5606
ICS07 follow up changes #5606
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.
Great start, still need to be able to pass in UnbondingPeriod/trustingPeriod as part of the CreateClient msg
@@ -21,18 +23,52 @@ var _ clientexported.ClientState = ClientState{} | |||
type ClientState struct { | |||
// Client ID | |||
ID string `json:"id" yaml:"id"` | |||
// Duration of the period since the LastestTimestamp during which the | |||
// submitted headers are valid for upgrade | |||
TrustingPeriod time.Duration `json:"trusting_period" yaml:"trusting_period"` |
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 need both trusting and unbonding? Can't we default trusting to a fraction of the unbonding period?
x/ibc/02-client/keeper/keeper.go
Outdated
) (exported.ClientState, error) { | ||
var clientState exported.ClientState | ||
height := uint64(ctx.BlockHeight()) |
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.
Should not be using our own chain's BlockHeight here. Should be using the other chain's height.
Fixed this on my branch by adding Height field and GetHeight
method to ConsensusState
…dekunze/ics07-follow-ups
* refactor tendermint package to move msgs here * fix rest of package to accomadate 07 refactor * added GetHeight to ConsensusState and moved clientstate struct creation to 07-tendermint * start work on making misbehavior retrieve consensusState LTE misbehavior * allow misbehavior submission at height not equal to persisted consensusState * optimize submitMisbehavior by erroring earlier * cleanup misbehavior and propose lazy fix * fix bug * Update x/ibc/02-client/keeper/client.go Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * address fede review * add chain-id into clientstate * address necessary fede review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
… fedekunze/ics07-follow-ups
} | ||
|
||
func (suite *KeeperTestSuite) SetupTest() { | ||
testHeight = 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.
unnecessary conversion (from unconvert
)
} | ||
|
||
func (suite *KeeperTestSuite) SetupTest() { | ||
isCheckTx := false | ||
suite.now = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC) | ||
now2 := suite.now.Add(time.Duration(time.Hour * 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.
unnecessary conversion (from unconvert
)
isCheckTx := false | ||
app := simapp.Setup(isCheckTx) | ||
suite.now = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC) | ||
now2 := suite.now.Add(time.Duration(time.Hour * 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.
unnecessary conversion (from unconvert
)
Description
Addresses comments from #5485 (review)
Implements changes from cosmos/ibc#367
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)