-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Morse->Shannon Migration] scaffold: MorseAccountState
single
#1045
base: chore/migration/state-prep
Are you sure you want to change the base?
[Morse->Shannon Migration] scaffold: MorseAccountState
single
#1045
Conversation
89b83f7
to
b720680
Compare
b720680
to
cf4a0c5
Compare
|
||
val, found := k.GetMorseAccountState(ctx) | ||
if !found { | ||
return nil, status.Error(codes.NotFound, "not found") |
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.
Can we do some logging here as well?
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.
To what end, can you elaborate?
@@ -0,0 +1,48 @@ | |||
package keeper_test |
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.
NOTE: I'm skiping reviewing unit tests in leu of time.
} | ||
} | ||
|
||
func (msg *MsgCreateMorseAccountState) ValidateBasic() error { |
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 not need to validate morseAccountState?
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 you have something specific in mind? I've add a hash comparison in #ValidateBasic()
, but I'm reluctant to add logic that requires iterating over all accounts for similar reasons as mentioned elsewhere (performance). This seems redundant to me regardless, so long as we intend to rely on off-chain verification/consensus.
We should be able to assume the validity because it's generated from the new migrate sub-command and should be deterministically reproducible and should have social consensus prior to being created on-chain in Shannon.
message QueryGetMorseAccountStateRequest {} | ||
|
||
message QueryGetMorseAccountStateResponse { |
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.
E2E test for this? Doesn't have to be in this PR.
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.
We have unit/integration coverage over this.
…orse_account_state
Summary
Scaffolds the on-chain
MorseAccountState
single as well as a create message/query handlers. Supersedes #1035.Changes:
Issue
Type of change
Select one or more from the following:
consensus-breaking
label if so. See [Infra] Automatically add theconsensus-breaking
label #791 for detailsSanity Checklist
assignees
,reviewers
,labels
,project
,iteration
andmilestone
make docusaurus_start
make go_develop_and_test
andmake test_e2e
devnet-test-e2e
label to run E2E tests in CI