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

feat!: throttle with retries provider changes #1230

Conversation

shaspitz
Copy link
Contributor

@shaspitz shaspitz commented Aug 22, 2023

Description


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • Included the correct type prefix in the PR title
  • Added ! to the type prefix if state-machine breaking change (i.e., requires coordinated upgrade)
  • Confirmed this PR does not introduce changes requiring state migrations, OR migration code has been added to consumer and/or provider modules
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Followed the guidelines for building SDK modules
  • Included the necessary unit and integration tests
  • Added a changelog entry to CHANGELOG.md
  • Included comments for documenting Go code
  • Updated the relevant documentation or specification
  • Reviewed "Files changed" and left comments if necessary
  • Confirmed all CI checks have passed

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...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed this PR does not introduce changes requiring state migrations, OR confirmed migration code has been added to consumer and/or provider modules
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage

@github-actions github-actions bot added C:Testing Assigned automatically by the PR labeler C:x/provider Assigned automatically by the PR labeler labels Aug 22, 2023
@@ -80,33 +79,6 @@ func (s *CCVTestSuite) TestStopConsumerChain() {
return nil
},
},
{
func(suite *CCVTestSuite) error {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any test or test case that was removed, is a test that is only relevant to provider queuing logic which is removed in this PR

// via new result acks from the provider.
//
// TODO: This test will need updating once provider changes are made.
// TestSlashRetries tests the throttling v2 retry logic at an integration level.
func (s *CCVTestSuite) TestSlashRetries() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test has been adjusted to validate the full throttling v2 logic (provider/consumer both having v2 throttling), previously it just tested that a consumer running the v2 throttling protocol is compatible with a provider running the v1 throttling protocol

// This ensures the meter value is replenished, and not greater than the allowance (max value)
// for the block, before the throttling logic is executed.
// BeginBlockCIS contains the BeginBlock logic needed for the Consumer Initiated Slashing sub-protocol.
func (k Keeper) BeginBlockCIS(ctx sdk.Context) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slash meter replenishment now happens on beginblock, since we want to replenish the meter before slash packets are handled DURING the block. Whereas previously all slash packets were handled in endblocker after the replenishment call

// to enforce order of handling between the two packet data types.
if err := k.QueueThrottledSlashPacketData(ctx, chainID, packet.Sequence, data); err != nil {
return ccv.NewErrorAcknowledgementWithLog(ctx, fmt.Errorf("failed to queue slash packet data: %s", err.Error()))
meter := k.GetSlashMeter(ctx)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Meat of provider changes is here. If slash meter is negative, bounce packet, otherwise decrement meter and handle packet

@github-actions github-actions bot added C:x/consumer Assigned automatically by the PR labeler C:x/types Assigned automatically by the PR labeler labels Aug 24, 2023
@shaspitz
Copy link
Contributor Author

shaspitz commented Sep 6, 2023

do you know why the labels indicate the PR contains changes to the consumer?

Not sure, I don't see any changes to the consumer, it might have to do with merging main on this branch and how many times I had to change the base (feat) branch to reflect changes in main

@github-actions github-actions bot added the C:CI Assigned automatically by the PR labeler label Sep 6, 2023
@github-actions github-actions bot removed C:x/consumer Assigned automatically by the PR labeler C:x/types Assigned automatically by the PR labeler C:CI Assigned automatically by the PR labeler C:Docs Assigned automatically by the PR labeler C:ADR Assigned automatically by the PR labeler labels Sep 6, 2023
Copy link
Contributor

@jtremback jtremback left a comment

Choose a reason for hiding this comment

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

LGTM but I didn't really review the tests. Great work!

Copy link
Contributor

@p-offtermatt p-offtermatt left a comment

Choose a reason for hiding this comment

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

First part of review, more reviewing to come

break
}

if time.Now().After(timeout) {
panic(fmt.Sprintf("\n\n\nwaitForSlashThrottleDequeuemethod has timed out after: %s\n\n", action.timeout))
panic(fmt.Sprintf("\n\nwaitForSlashMeterReplenishment has timed out after: %s\n\n", action.timeout))
}

time.Sleep(500 * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we replace this with tr.waitBlocks/tr.waitTime?

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 it should be waitTime from my understanding of the slashMeter (it fills by timestamp, not by blockcount?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch 53c02ea

tests/e2e/steps_downtime.go Outdated Show resolved Hide resolved
@@ -667,9 +654,10 @@ func (tr TestRun) getProviderAddressFromConsumer(consumerChain chainID, validato
return addr
}

func (tr TestRun) getGlobalSlashQueueSize() uint {
func (tr TestRun) getSlashMeter() int64 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this take the chain as an argument instead of always using provi?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Imo no because the slash meter is only relevant to the provider. If we ever plan to have multiple providers in these tests then that's a different story, but I don't see that happening

validatorID("carol"): 500,
},
},
},
},
// TODO(Shawn): Improve this test to have the consumer retry it's downtime slash, and to assert queue size on consumer.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to confirm, we are removing the Queue size from the chain state, despite this TODO, right? It reads to me as if that would reintroduce it, but maybe I'm missing context

// for meter to become positive again. 3*20 = 60 seconds + buffer = 80 seconds
timeout: 80 * time.Second,
// for meter to become positive again. 3*20 = 60 seconds + buffer = 100 seconds
timeout: 100 * time.Second,
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, was there a reason the buffer needs to be increased?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is an artifact of #1304 and trying to get this to work with cometmock

Copy link
Contributor

@p-offtermatt p-offtermatt left a comment

Choose a reason for hiding this comment

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

I added some more comments. Long list of removed code, nothing I was looked seriously problematic, so I'll approve. I mostly looked at the tests, but it was hard for me to tell whether something that should be tested is untested

x/ccv/provider/client/cli/query.go Outdated Show resolved Hide resolved
x/ccv/provider/client/cli/query.go Outdated Show resolved Hide resolved
@@ -150,24 +149,6 @@ func (k Keeper) QueryThrottleState(goCtx context.Context, req *types.QueryThrott
candidate := k.GetSlashMeterReplenishTimeCandidate(ctx) // always UTC
packets := []*types.ThrottledSlashPacket{}
Copy link
Contributor

Choose a reason for hiding this comment

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

This serves no purpose anymore, right? I assume we are not changing the return type here to not break protobufs?

Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed we are already removing a message type, can't we adjust this type as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea my original intention here was to avoid breaking the query API. But you make a good point that this PR is already "query breaking", might as well make things clean -> 1ceddcb

Copy link
Contributor Author

@shaspitz shaspitz Sep 14, 2023

Choose a reason for hiding this comment

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

To be consistent I should also remove this deprecated provider query too -> e228953 and 7d3dd64


return &types.QueryThrottledConsumerPacketDataResponse{
ChainId: req.ChainId,
Size_: k.GetThrottledPacketDataSize(ctx, req.ChainId),
Size_: 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, this type seems irrelevant now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this entire query

@@ -525,28 +524,6 @@ func TestStopConsumerChain(t *testing.T) {
},
expErr: true,
},
{
description: "valid stop of consumer chain, throttle related queues are cleaned",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we really remove the whole test case here, not just the fact that it checks for cleaned queues? Not sure how easy this is to separate

Copy link
Contributor Author

@shaspitz shaspitz Sep 14, 2023

Choose a reason for hiding this comment

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

I believe the entire intention of this test case was to confirm the provider queues are cleared. Since those queues no longer exist it seems neccessary to remove the whole test case

if initialGlobalQueueSize != action.currentQueueSize {
panic(fmt.Sprintf("wrong initial queue size: %d - expected global queue: %d\n", initialGlobalQueueSize, action.currentQueueSize))
if initialSlashMeter >= 0 {
panic(fmt.Sprintf("No need to wait for slash meter replenishment, current value: %d", initialSlashMeter))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a bad idea to panic on? It makes the tests flakey, because if they happen to run slowly, the slash meter might be already-full, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm I don't see a good way to decouple the logic of the slash meter away from time. Any test for throttling must have a pretty good and mostly deterministic control over chain time

@shaspitz shaspitz merged commit 727e731 into feat/throttle-complete-attempt-2 Sep 14, 2023
13 of 14 checks passed
@shaspitz shaspitz deleted the shawn/throttle-with-retries-provider-changes branch September 14, 2023 19:20
shaspitz added a commit that referenced this pull request Oct 6, 2023
…#1321)

* merge main into throttle feat branch (#1267)

* build(deps): bump actions/checkout from 3 to 4 (#1257)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps)!: bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0 (#1258)

* build(deps): bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0

Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](cosmos/ibc-go@v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.4 to 0.47.5 (#1259)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.3 to 0.47.5

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.3 to 0.47.5.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.3...v0.47.5)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* chore: Separate semver (#1217)

separate semver

* docs: cleanup changelog (#1260)

fix changelog

* fix!: validate MsgTransfer before calling Transfer() (#1244)

* validate MsgTransfer

* add TestSendRewardsToProvider

* update DefaultConsumerUnbondingPeriod to 14 days

* update changelog

* fix linter

* fix test

* apply review suggestions

* update changelog

* docs: Create adr-012-separate-releasing.md (#1229)

* Create adr-011-separate-releasing.md

* Update docs/docs/adrs/adr-011-separate-releasing.md

Co-authored-by: Philip Offtermatt <[email protected]>

* adr 12 not 11

* correct that we use postfix not prefix

* explanation on example release flow

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* fix: remove addr validation for provider fee pool addr param (#1262)

* fix: remove validation for provider chain address since we cannot validate it properly on consumer

* add changelog entry

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>

* feat!: throttle with retries provider changes (#1230)

* wip, tests not fixed yet

* rm packet query on provider

* rm unneeded UTs

* rm tests from relay_test

* rm query and more tests

* rm more tests

* builds again and rm debug tests

* lint

* fix handling of slash packet and integration test

* Fix TestMultiConsumerSlashPacketThrottling

* fix two more slashing integration tests

* Update TestSlashRetries, cleanup neededc

* cleaned up TestSlashRetries

* UT for TestOnRecvDowntimeSlashPacket

* cleans

* use helper in throttle test

* lintz

* Revert "rm packet query on provider"

This reverts commit a10a239.

* cmd file too

* fully restore query

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 73db33b, reversing
changes made to 78a8269.

* make e2e test pass, with todos

* clean

* Revert "Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes""

This reverts commit 5bfccc3.

* lint

* Update CHANGELOG.md

* slightly longer buffer

* build(deps): bump actions/checkout from 3 to 4 (#1257)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps)!: bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0 (#1258)

* build(deps): bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0

Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](cosmos/ibc-go@v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.4 to 0.47.5 (#1259)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.3 to 0.47.5

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.3 to 0.47.5.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.3...v0.47.5)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* chore: Separate semver (#1217)

separate semver

* docs: cleanup changelog (#1260)

fix changelog

* fix!: validate MsgTransfer before calling Transfer() (#1244)

* validate MsgTransfer

* add TestSendRewardsToProvider

* update DefaultConsumerUnbondingPeriod to 14 days

* update changelog

* fix linter

* fix test

* apply review suggestions

* update changelog

* docs: Create adr-012-separate-releasing.md (#1229)

* Create adr-011-separate-releasing.md

* Update docs/docs/adrs/adr-011-separate-releasing.md

Co-authored-by: Philip Offtermatt <[email protected]>

* adr 12 not 11

* correct that we use postfix not prefix

* explanation on example release flow

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* fix: remove addr validation for provider fee pool addr param (#1262)

* fix: remove validation for provider chain address since we cannot validate it properly on consumer

* add changelog entry

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 6bdfff9, reversing
changes made to d8f5690.

* fmt

* Update steps_downtime.go

* Update tests/e2e/steps_downtime.go

Co-authored-by: Philip Offtermatt <[email protected]>

* waittime instead of sleep

* Update x/ccv/provider/client/cli/query.go

Co-authored-by: Philip Offtermatt <[email protected]>

* Update x/ccv/provider/client/cli/query.go

Co-authored-by: Philip Offtermatt <[email protected]>

* rm throttled packets from query

* rm provider query

* whoopsies forgot to rm some boilerplate

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>

* feat: consumer throttle state query (#1285)

* wip, tests not fixed yet

* rm packet query on provider

* rm unneeded UTs

* rm tests from relay_test

* rm query and more tests

* rm more tests

* builds again and rm debug tests

* lint

* fix handling of slash packet and integration test

* Fix TestMultiConsumerSlashPacketThrottling

* fix two more slashing integration tests

* Update TestSlashRetries, cleanup neededc

* cleaned up TestSlashRetries

* UT for TestOnRecvDowntimeSlashPacket

* cleans

* use helper in throttle test

* lintz

* Revert "rm packet query on provider"

This reverts commit a10a239.

* cmd file too

* fully restore query

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 73db33b, reversing
changes made to 78a8269.

* make e2e test pass, with todos

* clean

* Revert "Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes""

This reverts commit 5bfccc3.

* lint

* Update CHANGELOG.md

* slightly longer buffer

* build(deps): bump actions/checkout from 3 to 4 (#1257)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps)!: bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0 (#1258)

* build(deps): bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0

Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](cosmos/ibc-go@v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.4 to 0.47.5 (#1259)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.3 to 0.47.5

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.3 to 0.47.5.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.3...v0.47.5)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* chore: Separate semver (#1217)

separate semver

* docs: cleanup changelog (#1260)

fix changelog

* fix!: validate MsgTransfer before calling Transfer() (#1244)

* validate MsgTransfer

* add TestSendRewardsToProvider

* update DefaultConsumerUnbondingPeriod to 14 days

* update changelog

* fix linter

* fix test

* apply review suggestions

* update changelog

* docs: Create adr-012-separate-releasing.md (#1229)

* Create adr-011-separate-releasing.md

* Update docs/docs/adrs/adr-011-separate-releasing.md

Co-authored-by: Philip Offtermatt <[email protected]>

* adr 12 not 11

* correct that we use postfix not prefix

* explanation on example release flow

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* fix: remove addr validation for provider fee pool addr param (#1262)

* fix: remove validation for provider chain address since we cannot validate it properly on consumer

* add changelog entry

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 6bdfff9, reversing
changes made to d8f5690.

* fmt

* protobuf gen

* impl query resp

* add query assertion to e2e tests

* lint

* add consumer to pending packets name

* add panic for invalid bytes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>

* feat: retry delay period as param (#1308)

* boilerplate

* fix test

* Update proposal_test.go

* apply new param to keeper code

* Update params_test.go

* tests: throttle retry e2e tests (#1312)

* boilerplate

* fix test

* Update proposal_test.go

* apply new param to keeper code

* wip

* add action

* incorporate queue assertions. Also make retry delay period 200s

* correct queue size assertion

* make wait time just 30 seconds

* change naming

* feat!: throttle v2 provider migration (#1317)

* migration.go and incr consensus version

* throttle v1 code for migration

* old methods

* finish test

* register those migs

* Update migration_test.go

* lint

* consumer keeper -> provider keeper

* some fixes

* fix the rest o the shit

* lint

* Addressing simon's comments

* whoopies

* height assertion

* Update x/ccv/provider/keeper/migration.go

Co-authored-by: Simon Noetzlin <[email protected]>

* action boilerplate

* feat: remove max throttled packets param (#1332)

* rm param

* Update proto/interchain_security/ccv/provider/v1/provider.proto

Co-authored-by: Philip Offtermatt <[email protected]>

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* merge fixes

* update e2e jsons

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Shawn <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
mergify bot pushed a commit that referenced this pull request Nov 13, 2023
…#1321)

* merge main into throttle feat branch (#1267)

* build(deps): bump actions/checkout from 3 to 4 (#1257)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps)!: bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0 (#1258)

* build(deps): bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0

Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](cosmos/ibc-go@v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.4 to 0.47.5 (#1259)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.3 to 0.47.5

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.3 to 0.47.5.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.3...v0.47.5)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* chore: Separate semver (#1217)

separate semver

* docs: cleanup changelog (#1260)

fix changelog

* fix!: validate MsgTransfer before calling Transfer() (#1244)

* validate MsgTransfer

* add TestSendRewardsToProvider

* update DefaultConsumerUnbondingPeriod to 14 days

* update changelog

* fix linter

* fix test

* apply review suggestions

* update changelog

* docs: Create adr-012-separate-releasing.md (#1229)

* Create adr-011-separate-releasing.md

* Update docs/docs/adrs/adr-011-separate-releasing.md

Co-authored-by: Philip Offtermatt <[email protected]>

* adr 12 not 11

* correct that we use postfix not prefix

* explanation on example release flow

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* fix: remove addr validation for provider fee pool addr param (#1262)

* fix: remove validation for provider chain address since we cannot validate it properly on consumer

* add changelog entry

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>

* feat!: throttle with retries provider changes (#1230)

* wip, tests not fixed yet

* rm packet query on provider

* rm unneeded UTs

* rm tests from relay_test

* rm query and more tests

* rm more tests

* builds again and rm debug tests

* lint

* fix handling of slash packet and integration test

* Fix TestMultiConsumerSlashPacketThrottling

* fix two more slashing integration tests

* Update TestSlashRetries, cleanup neededc

* cleaned up TestSlashRetries

* UT for TestOnRecvDowntimeSlashPacket

* cleans

* use helper in throttle test

* lintz

* Revert "rm packet query on provider"

This reverts commit a10a239.

* cmd file too

* fully restore query

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 73db33b, reversing
changes made to 78a8269.

* make e2e test pass, with todos

* clean

* Revert "Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes""

This reverts commit 5bfccc3.

* lint

* Update CHANGELOG.md

* slightly longer buffer

* build(deps): bump actions/checkout from 3 to 4 (#1257)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps)!: bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0 (#1258)

* build(deps): bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0

Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](cosmos/ibc-go@v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.4 to 0.47.5 (#1259)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.3 to 0.47.5

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.3 to 0.47.5.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.3...v0.47.5)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* chore: Separate semver (#1217)

separate semver

* docs: cleanup changelog (#1260)

fix changelog

* fix!: validate MsgTransfer before calling Transfer() (#1244)

* validate MsgTransfer

* add TestSendRewardsToProvider

* update DefaultConsumerUnbondingPeriod to 14 days

* update changelog

* fix linter

* fix test

* apply review suggestions

* update changelog

* docs: Create adr-012-separate-releasing.md (#1229)

* Create adr-011-separate-releasing.md

* Update docs/docs/adrs/adr-011-separate-releasing.md

Co-authored-by: Philip Offtermatt <[email protected]>

* adr 12 not 11

* correct that we use postfix not prefix

* explanation on example release flow

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* fix: remove addr validation for provider fee pool addr param (#1262)

* fix: remove validation for provider chain address since we cannot validate it properly on consumer

* add changelog entry

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 6bdfff9, reversing
changes made to d8f5690.

* fmt

* Update steps_downtime.go

* Update tests/e2e/steps_downtime.go

Co-authored-by: Philip Offtermatt <[email protected]>

* waittime instead of sleep

* Update x/ccv/provider/client/cli/query.go

Co-authored-by: Philip Offtermatt <[email protected]>

* Update x/ccv/provider/client/cli/query.go

Co-authored-by: Philip Offtermatt <[email protected]>

* rm throttled packets from query

* rm provider query

* whoopsies forgot to rm some boilerplate

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>

* feat: consumer throttle state query (#1285)

* wip, tests not fixed yet

* rm packet query on provider

* rm unneeded UTs

* rm tests from relay_test

* rm query and more tests

* rm more tests

* builds again and rm debug tests

* lint

* fix handling of slash packet and integration test

* Fix TestMultiConsumerSlashPacketThrottling

* fix two more slashing integration tests

* Update TestSlashRetries, cleanup neededc

* cleaned up TestSlashRetries

* UT for TestOnRecvDowntimeSlashPacket

* cleans

* use helper in throttle test

* lintz

* Revert "rm packet query on provider"

This reverts commit a10a239.

* cmd file too

* fully restore query

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 73db33b, reversing
changes made to 78a8269.

* make e2e test pass, with todos

* clean

* Revert "Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes""

This reverts commit 5bfccc3.

* lint

* Update CHANGELOG.md

* slightly longer buffer

* build(deps): bump actions/checkout from 3 to 4 (#1257)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps)!: bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0 (#1258)

* build(deps): bump github.com/cosmos/ibc-go/v7 from 7.2.0 to 7.3.0

Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.2.0 to 7.3.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md)
- [Commits](cosmos/ibc-go@v7.2.0...v7.3.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.4 to 0.47.5 (#1259)

* build(deps): bump github.com/cosmos/cosmos-sdk from 0.47.3 to 0.47.5

Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.47.3 to 0.47.5.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/main/CHANGELOG.md)
- [Commits](cosmos/cosmos-sdk@v0.47.3...v0.47.5)

---
updated-dependencies:
- dependency-name: github.com/cosmos/cosmos-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* add changelog entries

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>

* chore: Separate semver (#1217)

separate semver

* docs: cleanup changelog (#1260)

fix changelog

* fix!: validate MsgTransfer before calling Transfer() (#1244)

* validate MsgTransfer

* add TestSendRewardsToProvider

* update DefaultConsumerUnbondingPeriod to 14 days

* update changelog

* fix linter

* fix test

* apply review suggestions

* update changelog

* docs: Create adr-012-separate-releasing.md (#1229)

* Create adr-011-separate-releasing.md

* Update docs/docs/adrs/adr-011-separate-releasing.md

Co-authored-by: Philip Offtermatt <[email protected]>

* adr 12 not 11

* correct that we use postfix not prefix

* explanation on example release flow

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* fix: remove addr validation for provider fee pool addr param (#1262)

* fix: remove validation for provider chain address since we cannot validate it properly on consumer

* add changelog entry

* Revert "Merge branch 'main' into shawn/throttle-with-retries-provider-changes"

This reverts commit 6bdfff9, reversing
changes made to d8f5690.

* fmt

* protobuf gen

* impl query resp

* add query assertion to e2e tests

* lint

* add consumer to pending packets name

* add panic for invalid bytes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>

* feat: retry delay period as param (#1308)

* boilerplate

* fix test

* Update proposal_test.go

* apply new param to keeper code

* Update params_test.go

* tests: throttle retry e2e tests (#1312)

* boilerplate

* fix test

* Update proposal_test.go

* apply new param to keeper code

* wip

* add action

* incorporate queue assertions. Also make retry delay period 200s

* correct queue size assertion

* make wait time just 30 seconds

* change naming

* feat!: throttle v2 provider migration (#1317)

* migration.go and incr consensus version

* throttle v1 code for migration

* old methods

* finish test

* register those migs

* Update migration_test.go

* lint

* consumer keeper -> provider keeper

* some fixes

* fix the rest o the shit

* lint

* Addressing simon's comments

* whoopies

* height assertion

* Update x/ccv/provider/keeper/migration.go

Co-authored-by: Simon Noetzlin <[email protected]>

* action boilerplate

* feat: remove max throttled packets param (#1332)

* rm param

* Update proto/interchain_security/ccv/provider/v1/provider.proto

Co-authored-by: Philip Offtermatt <[email protected]>

---------

Co-authored-by: Philip Offtermatt <[email protected]>

* merge fixes

* update e2e jsons

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Shawn <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mpoke <[email protected]>
Co-authored-by: Philip Offtermatt <[email protected]>
Co-authored-by: Dmitry Kolupaev <[email protected]>
Co-authored-by: Simon Noetzlin <[email protected]>
(cherry picked from commit 88499b7)

# Conflicts:
#	CHANGELOG.md
#	tests/e2e/action_rapid_test.go
#	tests/e2e/actions.go
#	tests/e2e/json_utils.go
#	tests/e2e/main.go
#	tests/e2e/state.go
#	tests/e2e/state_rapid_test.go
#	tests/e2e/steps_downtime.go
#	tests/e2e/tracehandler_testdata/changeover.json
#	tests/e2e/tracehandler_testdata/democracy.json
#	tests/e2e/tracehandler_testdata/democracyRewardsSteps.json
#	tests/e2e/tracehandler_testdata/happyPath.json
#	tests/e2e/tracehandler_testdata/multipleConsumers.json
#	tests/e2e/tracehandler_testdata/shorthappy.json
#	tests/e2e/tracehandler_testdata/slashThrottle.json
#	tests/integration/common.go
#	tests/integration/slashing.go
#	tests/integration/throttle.go
#	tests/integration/throttle_retry.go
#	x/ccv/consumer/types/query.pb.go
#	x/ccv/provider/types/provider.pb.go
#	x/ccv/provider/types/query.pb.go
#	x/ccv/types/params.go
#	x/ccv/types/shared_consumer.pb.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Testing Assigned automatically by the PR labeler C:x/provider Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider changes for throttle v2
5 participants