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

Autopilot Channel Verification #728

Merged
merged 24 commits into from
Apr 21, 2023
Merged

Autopilot Channel Verification #728

merged 24 commits into from
Apr 21, 2023

Conversation

sampocs
Copy link
Collaborator

@sampocs sampocs commented Apr 19, 2023

Closes: #XXX

Context and purpose of the change

Brief Changelog

Author's Checklist

I have...

  • Run and PASSED locally all GAIA integration tests
  • If the change is contentful, I either:
    • Added a new unit test OR
    • Added test cases to existing unit tests
  • OR this change is a trivial rework / code cleanup without any test coverage

If skipped any of the tests above, explain.

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • reviewed state machine logic
  • reviewed API design and naming
  • manually tested (if applicable)
  • confirmed the author wrote unit tests for new logic
  • reviewed documentation exists and is accurate

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md?
  • This pull request updates existing proto field values (and require a backend and frontend migration)?
  • Does this pull request change existing proto field names (and require a frontend migration)?
    How is the feature or change documented?
    • not applicable
    • jira ticket XXX
    • specification (x/<module>/spec/)
    • README.md
    • not documented

@sampocs sampocs requested a review from a team April 19, 2023 06:14
@sampocs sampocs changed the title Port & Channel Check in Autopilot Autopilot Channel Verification Apr 19, 2023
@sampocs sampocs marked this pull request as ready for review April 19, 2023 06:55
@sampocs sampocs force-pushed the airdrop-channel-check branch from a019426 to 1ea62da Compare April 20, 2023 17:34
@sampocs sampocs force-pushed the airdrop-channel-check branch from 1ea62da to 0f49b0f Compare April 20, 2023 17:40
Copy link
Contributor

@riley-stride riley-stride left a comment

Choose a reason for hiding this comment

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

Looks pretty good, requesting a couple new tests

x/autopilot/keeper/airdrop.go Outdated Show resolved Hide resolved
x/autopilot/keeper/airdrop.go Show resolved Hide resolved
x/autopilot/keeper/airdrop_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shellvish shellvish left a comment

Choose a reason for hiding this comment

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

Looks great, a few small comments but should be very quick. Excellent test coverage. Thank you for doing this!

@@ -0,0 +1,23 @@
## Airdrop Integration Tests
Each airdrop testing script (1 through 4) tests differnet aspects of the airdrop.
Copy link
Contributor

Choose a reason for hiding this comment

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

extreme nit: differnet -> different

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

dockernet/scripts/airdrop/airdrop1.sh Outdated Show resolved Hide resolved
sleep 5

# AIRDROP CLAIMS
# Check balances before claims
echo "Initial balance before claim:"
$STRIDE_MAIN_CMD query bank balances stride1nf6v2paty9m22l3ecm7dpakq2c92ueyununayr
# QUESTION: I assume these tests cannot be run back to back - but if they can then I can change the expectations below to be deltas
Copy link
Contributor

Choose a reason for hiding this comment

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

I think they actually can be re-run but it requires the airdrop duration (line 38) to be something smaller, like 240s. imo not worth prioritizing this now, given it'll also take time to modify all of the queries, and I don't think we'll be running these back-to-back very often

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yup agreed! I think for now we should treat these tests as idempotent scripts that need a dockernet restart each time. And we can always come back and try to make them idempotent later, but low priority!

@@ -13,6 +13,7 @@ message Params { repeated Airdrop airdrops = 1; }
message Airdrop {
string airdrop_identifier = 1
[ (gogoproto.moretags) = "yaml:\"airdrop_identifier\"" ];
string chain_id = 7;
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, why add chain_id here instead of after param 6?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just my OCD taking over haha, It felt like a more logical ordering of the fields, plus it aligns with the ordering of the cli args

x/autopilot/keeper/airdrop.go Show resolved Hide resolved
x/autopilot/keeper/airdrop_test.go Show resolved Hide resolved
x/claim/keeper/claim.go Outdated Show resolved Hide resolved
@riley-stride
Copy link
Contributor

Resolutions look good to me

Copy link
Contributor

@asalzmann asalzmann left a comment

Choose a reason for hiding this comment

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

couple of minor changes, otherwise lgtm!

dockernet/scripts/airdrop/README.md Outdated Show resolved Hide resolved
dockernet/scripts/airdrop/README.md Show resolved Hide resolved
x/stakeibc/keeper/host_zone.go Show resolved Hide resolved
x/claim/types/params.go Outdated Show resolved Hide resolved
x/claim/keeper/claim.go Show resolved Hide resolved
x/autopilot/keeper/airdrop.go Show resolved Hide resolved
x/autopilot/keeper/airdrop.go Show resolved Hide resolved
x/autopilot/keeper/airdrop.go Show resolved Hide resolved
Copy link
Contributor

@asalzmann asalzmann left a comment

Choose a reason for hiding this comment

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

lgtm

@sampocs sampocs force-pushed the airdrop-channel-check branch from 118df0d to 0c68fa1 Compare April 21, 2023 21:53
@sampocs sampocs merged commit 62295e3 into main Apr 21, 2023
@faddat faddat mentioned this pull request May 8, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants