Skip to content
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 MsgClaimMorsePOKT #1046

Open
wants to merge 7 commits into
base: issues/1034/feat/upload-state
Choose a base branch
from

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Jan 29, 2025

Summary

ignite scaffold message claim-morse-pokt --module migration --signer shannon_dest_address morse_src_address morse_signature --response balance

  • Add message validation.

Issue

Type of change

Select one or more from the following:

Testing

  • Documentation: make docusaurus_start; only needed if you make doc changes
  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have commented my code
  • I have performed a self-review of my own code; both comments & source code
  • I create and reference any new tickets, if applicable
  • I have left TODOs throughout the codebase, if applicable

@bryanchriswhite bryanchriswhite added on-chain On-chain business logic consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. labels Jan 29, 2025
@bryanchriswhite bryanchriswhite self-assigned this Jan 29, 2025
@bryanchriswhite bryanchriswhite force-pushed the scaffold/migration/claim branch from 2325c35 to 46f2a04 Compare January 29, 2025 14:29
@bryanchriswhite bryanchriswhite force-pushed the scaffold/migration/claim branch from 46f2a04 to 1078e15 Compare January 29, 2025 14:54
@bryanchriswhite bryanchriswhite changed the base branch from issues/1034/scaffold/morse_account_state to issues/1034/feat/upload-state January 29, 2025 14:55
@bryanchriswhite bryanchriswhite force-pushed the scaffold/migration/claim branch from 8749d8f to c9e4493 Compare January 29, 2025 16:00
@bryanchriswhite bryanchriswhite marked this pull request as ready for review January 29, 2025 16:15
@Olshansk Olshansk self-requested a review January 29, 2025 18:30
@Olshansk Olshansk added the migration Morse to Shannon migration related work label Jan 29, 2025
"github.com/pokt-network/poktroll/x/migration/types"
)

func (k msgServer) ClaimMorsePokt(goCtx context.Context, msg *types.MsgClaimMorsePokt) (*types.MsgClaimMorsePoktResponse, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#PUC


message MsgClaimMorsePoktResponse {
cosmos.base.v1beta1.Coin balance = 1 [(gogoproto.jsontag) = "balance"];
bytes state_hash = 2 [(gogoproto.jsontag) = "state_hash"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#PUC - unclear how this is being used

message MsgClaimMorsePokt {
option (cosmos.msg.v1.signer) = "shannon_dest_address";

string shannon_dest_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString", (gogoproto.jsontag) = "shannon_dest_address"];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#PUC w.r.t address types (bech32 or not) and signature types (e.g. ed25519, secp256, etc)

}, {
name: "invalid address",
msg: MsgClaimMorsePokt{
MorseSrcAddress: hex.EncodeToString(sample.ConsAddress().Bytes()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind moving these into local vars and adding some comments to the fact that

Consensus Address == Ed25519 == Morse

Feel free to link to https://www.notion.so/buildwithgrove/Background-Addresses-Key-Schemes-175a36edfff680ff8f23fc7599fd9107?pvs=4

}
}

func (msg *MsgClaimMorsePokt) ValidateBasic() error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

#PUC onw hat it validates too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. migration Morse to Shannon migration related work on-chain On-chain business logic
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

2 participants