-
Notifications
You must be signed in to change notification settings - Fork 110
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!: added E2E test and docs for ConsumerModificationProposal #1949
Conversation
d7681f9
to
bd97181
Compare
bd97181
to
dc4b913
Compare
@@ -12,7 +12,7 @@ The experience gained in the testnet will prepare you for validating interchain | |||
:::tip | |||
Provider and consumer chain represent distinct networks and infrastructures operated by the same validator set. | |||
|
|||
For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs | |||
For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs |
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.
Because this PR was touching docs as well, fixed those stale links.
@@ -85,7 +85,7 @@ At present, the consumer chain can report evidence about downtime infractions to | |||
:::info | |||
Causing a downtime infraction on any consumer chain will not incur a slash penalty. Instead, the offending validator will be jailed on the provider chain and consequently on all consumer chains. | |||
|
|||
To unjail, the validator must wait for the jailing period to elapse on the provider chain and [submit an unjail transaction](https://hub.cosmos.network/validators/validator-setup#unjail-validator) on the provider chain. After unjailing on the provider, the validator will be unjailed on all consumer chains. | |||
To unjail, the validator must wait for the jailing period to elapse on the provider chain and [submit an unjail transaction](https://hub.cosmos.network/main/validators/validator-setup#unjail-validator) on the provider chain. After unjailing on the provider, the validator will be unjailed on all consumer chains. |
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.
Because this PR was touching docs as well, fixed those stale links.
WalkthroughWalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CI/CD
participant GoSetup
participant LFSCheckout
participant E2ETests
participant ProviderHandler
participant TestSuite
User->>CI/CD: Commit changes
CI/CD->>GoSetup: Setup Go environment
CI/CD->>LFSCheckout: Checkout LFS objects
CI/CD->>E2ETests: Run E2E tests for `ConsumerModificationProposal`
E2ETests->>ProviderHandler: Trigger `ConsumerModificationProposal` handler
ProviderHandler->>TestSuite: Execute proposal actions
TestSuite->>ProviderHandler: Verify proposal results
ProviderHandler->>E2ETests: Return results
E2ETests->>CI/CD: Report test outcomes
CI/CD->>User: Notify test results
Recent review detailsConfiguration used: .coderabbit.yml Files selected for processing (1)
Additional context usedPath-based instructions (1)
LanguageTool
Markdownlint
Additional comments not posted (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 11
Outside diff range and nitpick comments (4)
x/ccv/provider/types/proposal.go (1)
Line range hint
99-99
: Applygofumpt
formatting.The file is not formatted according to the
gofumpt
tool with the-extra
flag. This is important for maintaining consistent coding style.app/provider/app.go (1)
Line range hint
105-106
: Remove duplicate import to clean up the code.- import ibcprovider "github.com/cosmos/interchain-security/v4/x/ccv/provider"
tests/e2e/actions.go (2)
Line range hint
2173-2173
: Consider using constants for repeated strings.The string
auto
is used multiple times across the file. Defining it as a constant can improve maintainability and prevent errors in case of changes.+ const autoGasSetting = "auto" - gas := "auto" + gas := autoGasSettingTools
golangci-lint
466-466: File is not
gofumpt
-ed with-extra
(gofumpt)GitHub Check: CodeQL
[failure] 443-443: Potentially unsafe quoting
If this JSON value contains a single quote, it could break out of the enclosing quotes.
466-466
: Format the file according to Go standards.The file is not formatted according to
gofumpt
standards. Consider runninggofumpt -w -extra
on the file to ensure it adheres to enhanced Go formatting standards.Tools
golangci-lint
466-466: File is not
gofumpt
-ed with-extra
(gofumpt)
case "/interchain_security.ccv.provider.v1.ConsumerModificationProposal": | ||
chainId := gjson.Get(string(bz), `messages.0.content.chain_id`).String() | ||
|
||
var chain ChainID | ||
for i, conf := range tr.chainConfigs { | ||
if string(conf.ChainId) == chainId { | ||
chain = i | ||
break | ||
} | ||
} | ||
|
||
return ConsumerModificationProposal{ | ||
Deposit: uint(deposit), | ||
Status: status, | ||
Chain: chain, | ||
} |
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.
Address potential non-determinism in map iteration.
The iteration over tr.chainConfigs
map in the switch case for ConsumerModificationProposal
could lead to non-deterministic behavior as the order of map iteration in Go is not guaranteed. Consider sorting the keys or using a slice if the order is important for the application logic.
- for i, conf := range tr.chainConfigs {
+ keys := make([]string, 0, len(tr.chainConfigs))
+ for k := range tr.chainConfigs {
+ keys = append(keys, k)
+ }
+ sort.Strings(keys) // Ensure the keys are sorted if order is important
+ for _, k := range keys {
+ conf := tr.chainConfigs[k]
if string(conf.ChainId) == chainId {
chain = i
break
}
}
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
case "/interchain_security.ccv.provider.v1.ConsumerModificationProposal": | |
chainId := gjson.Get(string(bz), `messages.0.content.chain_id`).String() | |
var chain ChainID | |
for i, conf := range tr.chainConfigs { | |
if string(conf.ChainId) == chainId { | |
chain = i | |
break | |
} | |
} | |
return ConsumerModificationProposal{ | |
Deposit: uint(deposit), | |
Status: status, | |
Chain: chain, | |
} | |
case "/interchain_security.ccv.provider.v1.ConsumerModificationProposal": | |
chainId := gjson.Get(string(bz), `messages.0.content.chain_id`).String() | |
var chain ChainID | |
keys := make([]string, 0, len(tr.chainConfigs)) | |
for k := range tr.chainConfigs { | |
keys = append(keys, k) | |
} | |
sort.Strings(keys) // Ensure the keys are sorted if order is important | |
for _, k := range keys { | |
conf := tr.chainConfigs[k] | |
if string(conf.ChainId) == chainId { | |
chain = i | |
break | |
} | |
} | |
return ConsumerModificationProposal{ | |
Deposit: uint(deposit), | |
Status: status, | |
Chain: chain, | |
} |
Tools
GitHub Check: CodeQL
[warning] 497-502: Iteration over map
Iteration over map may be a possible source of non-determinism
Deposit: 10000001, | ||
Chain: ChainID("consu"), | ||
Status: "PROPOSAL_STATUS_PASSED", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Action: RelayPacketsAction{ | ||
ChainA: ChainID("provi"), | ||
ChainB: ChainID("consu"), | ||
Port: "provider", | ||
Channel: 0, | ||
}, | ||
State: State{ | ||
ChainID("provi"): ChainState{ | ||
ValPowers: &map[ValidatorID]uint{ | ||
ValidatorID("alice"): 100, | ||
ValidatorID("bob"): 200, | ||
ValidatorID("carol"): 300, | ||
}, | ||
}, | ||
ChainID("consu"): ChainState{ | ||
ValPowers: &map[ValidatorID]uint{ | ||
ValidatorID("alice"): 0, // "alice" is denylisted | ||
ValidatorID("bob"): 200, | ||
ValidatorID("carol"): 300, | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
// 5. modify the chain from Opt In to Top 100% | ||
{ | ||
Action: SubmitConsumerModificationProposalAction{ | ||
Chain: ChainID("provi"), | ||
From: ValidatorID("alice"), | ||
Deposit: 10000001, | ||
ConsumerChain: ChainID("consu"), | ||
TopN: 100, | ||
}, | ||
State: State{ | ||
ChainID("provi"): ChainState{ | ||
Proposals: &map[uint]Proposal{ | ||
6: ConsumerModificationProposal{ | ||
Deposit: 10000001, | ||
Chain: ChainID("consu"), | ||
Status: "PROPOSAL_STATUS_VOTING_PERIOD", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Action: VoteGovProposalAction{ | ||
Chain: ChainID("provi"), | ||
From: []ValidatorID{ValidatorID("alice"), ValidatorID("bob"), ValidatorID("carol")}, | ||
Vote: []string{"yes", "yes", "yes"}, | ||
PropNumber: 6, | ||
}, | ||
State: State{ | ||
ChainID("provi"): ChainState{ | ||
Proposals: &map[uint]Proposal{ | ||
6: ConsumerModificationProposal{ | ||
Deposit: 10000001, | ||
Chain: ChainID("consu"), | ||
Status: "PROPOSAL_STATUS_PASSED", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Action: OptOutAction{ | ||
Chain: ChainID("consu"), | ||
Validator: ValidatorID("alice"), | ||
ExpectError: true, // because this chain is now Top 100%, no validator can opt out | ||
}, | ||
State: State{}, | ||
}, | ||
{ | ||
Action: OptOutAction{ | ||
Chain: ChainID("consu"), | ||
Validator: ValidatorID("bob"), | ||
ExpectError: true, // because this chain is now Top 100%, no validator can opt out | ||
}, | ||
State: State{}, | ||
}, | ||
{ | ||
Action: OptOutAction{ | ||
Chain: ChainID("consu"), | ||
Validator: ValidatorID("carol"), | ||
ExpectError: true, // because this chain is now Top 100%, no validator can opt out | ||
}, | ||
State: State{}, | ||
}} | ||
|
||
return s | ||
} |
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.
The function stepsModifyChain
effectively simulates various scenarios for ConsumerModificationProposal
. It covers a comprehensive range of test cases, ensuring robust testing of the proposal system. However, consider adding more inline comments to explain the purpose and expected outcomes of each test case, especially for complex scenarios. This will enhance maintainability and readability for other developers or testers who might work on this code in the future.
Tools
golangci-lint
2247-2247: File is not
gofumpt
-ed with-extra
(gofumpt)
2435-2435: File is not
gofumpt
-ed with-extra
(gofumpt)
Deposit: 10000001, | ||
Chain: ChainID("consu"), | ||
Status: "PROPOSAL_STATUS_PASSED", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Action: RelayPacketsAction{ | ||
ChainA: ChainID("provi"), | ||
ChainB: ChainID("consu"), | ||
Port: "provider", | ||
Channel: 0, | ||
}, | ||
State: State{ | ||
ChainID("provi"): ChainState{ | ||
ValPowers: &map[ValidatorID]uint{ | ||
ValidatorID("alice"): 100, | ||
ValidatorID("bob"): 200, | ||
ValidatorID("carol"): 300, | ||
}, | ||
}, | ||
ChainID("consu"): ChainState{ | ||
ValPowers: &map[ValidatorID]uint{ | ||
ValidatorID("alice"): 0, // "alice" is denylisted | ||
ValidatorID("bob"): 200, | ||
ValidatorID("carol"): 300, | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
// 5. modify the chain from Opt In to Top 100% | ||
{ | ||
Action: SubmitConsumerModificationProposalAction{ | ||
Chain: ChainID("provi"), | ||
From: ValidatorID("alice"), | ||
Deposit: 10000001, | ||
ConsumerChain: ChainID("consu"), | ||
TopN: 100, | ||
}, | ||
State: State{ | ||
ChainID("provi"): ChainState{ | ||
Proposals: &map[uint]Proposal{ | ||
6: ConsumerModificationProposal{ | ||
Deposit: 10000001, | ||
Chain: ChainID("consu"), | ||
Status: "PROPOSAL_STATUS_VOTING_PERIOD", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Action: VoteGovProposalAction{ | ||
Chain: ChainID("provi"), | ||
From: []ValidatorID{ValidatorID("alice"), ValidatorID("bob"), ValidatorID("carol")}, | ||
Vote: []string{"yes", "yes", "yes"}, | ||
PropNumber: 6, | ||
}, | ||
State: State{ | ||
ChainID("provi"): ChainState{ | ||
Proposals: &map[uint]Proposal{ | ||
6: ConsumerModificationProposal{ | ||
Deposit: 10000001, | ||
Chain: ChainID("consu"), | ||
Status: "PROPOSAL_STATUS_PASSED", | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
Action: OptOutAction{ | ||
Chain: ChainID("consu"), | ||
Validator: ValidatorID("alice"), | ||
ExpectError: true, // because this chain is now Top 100%, no validator can opt out | ||
}, | ||
State: State{}, | ||
}, | ||
{ | ||
Action: OptOutAction{ | ||
Chain: ChainID("consu"), | ||
Validator: ValidatorID("bob"), | ||
ExpectError: true, // because this chain is now Top 100%, no validator can opt out | ||
}, | ||
State: State{}, | ||
}, | ||
{ | ||
Action: OptOutAction{ | ||
Chain: ChainID("consu"), | ||
Validator: ValidatorID("carol"), | ||
ExpectError: true, // because this chain is now Top 100%, no validator can opt out | ||
}, | ||
State: State{}, | ||
}} | ||
|
||
return s | ||
} |
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.
The comprehensive testing of various ConsumerModificationProposal
scenarios, including power caps and validator set modifications, is well-executed. However, consider adding detailed comments explaining the rationale behind each test case and the expected outcomes. This will aid in understanding the test's purpose and ensure easier maintenance.
Tools
golangci-lint
2247-2247: File is not
gofumpt
-ed with-extra
(gofumpt)
2435-2435: File is not
gofumpt
-ed with-extra
(gofumpt)
@@ -12,7 +12,7 @@ The experience gained in the testnet will prepare you for validating interchain | |||
:::tip | |||
Provider and consumer chain represent distinct networks and infrastructures operated by the same validator set. | |||
|
|||
For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs | |||
For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs |
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.
Update URLs to point to the correct resources.
Consider adding a comma after "chains" for better readability.
- For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs
+ For general information about running cosmos-sdk based chains, check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
For general information about running cosmos-sdk based chains check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs | |
For general information about running cosmos-sdk based chains, check out the [validator basics](https://hub.cosmos.network/main/validators/validator-setup) and [Running a Node section](https://docs.cosmos.network/main/run-node/run-node) of Cosmos SDK docs |
Tools
LanguageTool
[uncategorized] ~15-~15: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ...ormation about running cosmos-sdk based chains check out the [validator basics](https:...
@@ -235,7 +235,7 @@ func (sccp *ConsumerRemovalProposal) ValidateBasic() error { | |||
return nil | |||
} | |||
|
|||
// NewConsumerModificationProposal creates a new consumer modificaton proposal. | |||
// NewConsumerModificationProposal creates a new consumer modification proposal. |
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.
Ensure proper documentation for parameters in NewConsumerModificationProposal
.
The function documentation should include details about each parameter to improve clarity and maintainability. Consider adding a comment block above the function.
Validate parameters in NewConsumerModificationProposal
.
The function should validate its parameters to prevent invalid data from being used to create a proposal. Consider adding checks for nil
values and other inappropriate inputs.
"partial-set-security-modification-proposal": { | ||
name: "partial-set-security-modification-proposal", | ||
steps: stepsModifyChain(), | ||
description: "test partial set security parameters can be changed through a modification proposal", | ||
testConfig: DefaultTestCfg, | ||
}, |
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.
Ensure comprehensive test coverage for partial-set-security-modification-proposal
.
The new test case should thoroughly test all aspects of the security modifications it aims to cover. Consider adding more detailed steps or checks to ensure comprehensive coverage.
type SubmitConsumerModificationProposalAction struct { | ||
Chain ChainID | ||
From ValidatorID | ||
Deposit uint | ||
ConsumerChain ChainID | ||
TopN uint32 | ||
ValidatorsPowerCap uint32 | ||
ValidatorSetCap uint32 | ||
Allowlist []string | ||
Denylist []string | ||
} | ||
|
||
func (tr TestConfig) submitConsumerModificationProposal( | ||
action SubmitConsumerModificationProposalAction, | ||
target ExecutionTarget, | ||
verbose bool, | ||
) { | ||
prop := client.ConsumerModificationProposalJSON{ | ||
Title: "Propose the modification of the PSS parameters of a chain", | ||
Summary: "summary of a modification proposal", | ||
ChainId: string(tr.chainConfigs[action.ConsumerChain].ChainId), | ||
Deposit: fmt.Sprint(action.Deposit) + `stake`, | ||
TopN: action.TopN, | ||
ValidatorsPowerCap: action.ValidatorsPowerCap, | ||
ValidatorSetCap: action.ValidatorSetCap, | ||
Allowlist: action.Allowlist, | ||
Denylist: action.Denylist, | ||
} | ||
|
||
bz, err := json.Marshal(prop) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
jsonStr := string(bz) | ||
if strings.Contains(jsonStr, "'") { | ||
log.Fatal("prop json contains single quote") | ||
} | ||
|
||
//#nosec G204 -- bypass unsafe quoting warning (no production code) | ||
bz, err = target.ExecCommand( | ||
"/bin/bash", "-c", fmt.Sprintf(`echo '%s' > %s`, jsonStr, "/temp-proposal.json"), | ||
).CombinedOutput() | ||
if err != nil { | ||
log.Fatal(err, "\n", string(bz)) | ||
} | ||
|
||
// CONSUMER MODIFICATION PROPOSAL | ||
cmd := target.ExecCommand( | ||
tr.chainConfigs[action.Chain].BinaryName, | ||
"tx", "gov", "submit-legacy-proposal", "consumer-modification", "/temp-proposal.json", | ||
`--from`, `validator`+fmt.Sprint(action.From), | ||
`--chain-id`, string(tr.chainConfigs[action.Chain].ChainId), | ||
`--home`, tr.getValidatorHome(action.Chain, action.From), | ||
`--gas`, `900000`, | ||
`--node`, tr.getValidatorNode(action.Chain, action.From), | ||
`--keyring-backend`, `test`, | ||
`-y`, | ||
) | ||
if verbose { | ||
log.Println("submitConsumerModificationProposal cmd: ", cmd.String()) | ||
} | ||
|
||
bz, err = cmd.CombinedOutput() | ||
|
||
if err != nil { | ||
log.Fatal(err, "\n", string(bz)) | ||
} | ||
|
||
// wait for inclusion in a block -> '--broadcast-mode block' is deprecated | ||
tr.waitBlocks(ChainID("provi"), 2, 10*time.Second) | ||
} |
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.
Review the implementation of SubmitConsumerModificationProposalAction
.
The function submitConsumerModificationProposal
handles the submission of a consumer modification proposal. However, there are several issues and improvements to consider:
- Error Handling: The use of
log.Fatal
for error handling is not recommended in production code as it will stop the execution of the program. Consider returning errors to the caller instead. - Potential Security Issue: The use of
fmt.Sprintf
with user-controlled input can lead to command injection vulnerabilities. Ensure that inputs are properly sanitized before use. - Code Duplication: The JSON marshaling and command execution logic is repeated multiple times in the file. Consider refactoring this into a helper function to improve code maintainability.
- log.Fatal(err, "\n", string(bz))
+ return err
Committable suggestion was skipped due to low confidence.
Tools
golangci-lint
466-466: File is not
gofumpt
-ed with-extra
(gofumpt)
GitHub Check: CodeQL
[failure] 443-443: Potentially unsafe quoting
If this JSON value contains a single quote, it could break out of the enclosing quotes.
|
||
//#nosec G204 -- bypass unsafe quoting warning (no production code) | ||
bz, err = target.ExecCommand( | ||
"/bin/bash", "-c", fmt.Sprintf(`echo '%s' > %s`, jsonStr, "/temp-proposal.json"), |
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.
Address potential security vulnerability with unsafe quoting.
The use of fmt.Sprintf
to dynamically generate a bash command with user-controlled input can lead to command injection vulnerabilities. Consider using more secure alternatives or ensuring that inputs are properly sanitized.
- fmt.Sprintf(`echo '%s' > %s`, jsonStr, "/temp-proposal.json"),
+ fmt.Sprintf(`echo '%s' > %s`, jsonStr, "/temp-proposal.json"), // Ensure jsonStr is sanitized
Committable suggestion was skipped due to low confidence.
Tools
GitHub Check: CodeQL
[failure] 443-443: Potentially unsafe quoting
If this JSON value contains a single quote, it could break out of the enclosing quotes.
docs/docs/features/proposals.md
Outdated
## `ConsumerModificationProposal` | ||
Proposal type used to change the power shaping parameters of a running consumer chain, as well as to change a Top N running | ||
consumer chain to an Opt-In chain and vice versa. | ||
|
||
When a `ConsumerModificationProposal` passes for a running consumer chain, the consumer chain would change all its | ||
parameters to the ones passed in the `ConsumerModificationProposal`. | ||
|
||
Assume, a `chain-1` is a Top N chain. If the following `ConsumerModificationProposal` passes, then `chain-1` would become | ||
an Opt-In chain with a 40% validators power cap, a maximum number of 30 validators, and one denylisted validator. | ||
```js | ||
{ | ||
"title": "Modify consumer chain", | ||
"description": ".md description of your chain and all other relevant information", | ||
"chain_id": "chain-1", | ||
"top_N": 0, | ||
"validators_power_cap": 40, | ||
"validator_set_cap": 30, | ||
"allowlist": [], | ||
"denylist": ["cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq"] | ||
} | ||
``` | ||
|
||
:::warning | ||
If `top_N`, `validators_power_cap`, etc. or some other argument is not included in the proposal, then it is considered | ||
that the default value is set for this argument. For example, if a Top 50% chain wants to only modify `validators_power_cap` | ||
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise | ||
`top_N` would be set to its default value of 0, and the chain would become an Opt-In chain. | ||
|
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.
Expand the ConsumerModificationProposal
section to include transitioning between Top N and Opt-In chains.
Consider adding blank lines around headings for better markdown formatting.
- ## `ConsumerModificationProposal`
+
+ ## `ConsumerModificationProposal`
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
## `ConsumerModificationProposal` | |
Proposal type used to change the power shaping parameters of a running consumer chain, as well as to change a Top N running | |
consumer chain to an Opt-In chain and vice versa. | |
When a `ConsumerModificationProposal` passes for a running consumer chain, the consumer chain would change all its | |
parameters to the ones passed in the `ConsumerModificationProposal`. | |
Assume, a `chain-1` is a Top N chain. If the following `ConsumerModificationProposal` passes, then `chain-1` would become | |
an Opt-In chain with a 40% validators power cap, a maximum number of 30 validators, and one denylisted validator. | |
```js | |
{ | |
"title": "Modify consumer chain", | |
"description": ".md description of your chain and all other relevant information", | |
"chain_id": "chain-1", | |
"top_N": 0, | |
"validators_power_cap": 40, | |
"validator_set_cap": 30, | |
"allowlist": [], | |
"denylist": ["cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq"] | |
} | |
``` | |
:::warning | |
If `top_N`, `validators_power_cap`, etc. or some other argument is not included in the proposal, then it is considered | |
that the default value is set for this argument. For example, if a Top 50% chain wants to only modify `validators_power_cap` | |
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise | |
`top_N` would be set to its default value of 0, and the chain would become an Opt-In chain. | |
## `ConsumerModificationProposal` | |
Proposal type used to change the power shaping parameters of a running consumer chain, as well as to change a Top N running | |
consumer chain to an Opt-In chain and vice versa. | |
When a `ConsumerModificationProposal` passes for a running consumer chain, the consumer chain would change all its | |
parameters to the ones passed in the `ConsumerModificationProposal`. | |
Assume, a `chain-1` is a Top N chain. If the following `ConsumerModificationProposal` passes, then `chain-1` would become | |
an Opt-In chain with a 40% validators power cap, a maximum number of 30 validators, and one denylisted validator. | |
```js | |
{ | |
"title": "Modify consumer chain", | |
"description": ".md description of your chain and all other relevant information", | |
"chain_id": "chain-1", | |
"top_N": 0, | |
"validators_power_cap": 40, | |
"validator_set_cap": 30, | |
"allowlist": [], | |
"denylist": ["cosmosvalcons1qmq08eruchr5sf5s3rwz7djpr5a25f7xw4mceq"] | |
} | |
``` | |
:::warning | |
If `top_N`, `validators_power_cap`, etc. or some other argument is not included in the proposal, then it is considered | |
that the default value is set for this argument. For example, if a Top 50% chain wants to only modify `validators_power_cap` | |
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise | |
`top_N` would be set to its default value of 0, and the chain would become an Opt-In chain. |
Tools
LanguageTool
[uncategorized] ~113-~113: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ...ill need to include thattop_N
is 50. Otherwisetop_N
would be set to its default val...
Markdownlint
88-88: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
97-97: null (MD031, blanks-around-fences)
Fenced code blocks should be surrounded by blank lines
## Can a consumer chain modify its power shaping parameters? | ||
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal). | ||
|
||
## Can a Top N consumer chain become Opt-In or vice versa? | ||
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal). |
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.
Add FAQ entries about modifying power shaping parameters and transitioning between Top N and Opt-In chains using ConsumerModificationProposal
.
Consider adding blank lines around headings for better markdown formatting.
- ## Can a Top N consumer chain become Opt-In or vice versa?
+
+ ## Can a Top N consumer chain become Opt-In or vice versa?
+
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
## Can a consumer chain modify its power shaping parameters? | |
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal). | |
## Can a Top N consumer chain become Opt-In or vice versa? | |
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal). | |
## Can a consumer chain modify its power shaping parameters? | |
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal). | |
## Can a Top N consumer chain become Opt-In or vice versa? | |
Yes, by issuing a [`ConsumerModificationProposal`](./features/proposals.md#consumermodificationproposal). |
Tools
Markdownlint
136-136: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces
133-133: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
136-136: Expected: 1; Actual: 0; Below (MD022, blanks-around-headings)
Headings should be surrounded by blank lines
137-137: null (MD047, single-trailing-newline)
Files should end with a single newline character
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.
LGTM, thanks!
Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
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.
Actionable comments posted: 1
:::warning | ||
If `top_N`, `validators_power_cap`, or some other argument is not included in the proposal, then it is considered | ||
that the default value is set for this argument. For example, if a Top 50% chain wants to only modify `validators_power_cap` | ||
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise |
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.
Add a comma after 'Otherwise' for grammatical correctness.
- Otherwise `top_N` would be set to its default value of 0, and the chain would become an Opt-In chain.
+ Otherwise, `top_N` would be set to its default value of 0, and the chain would become an Opt-In chain.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise | |
from 35 to 40, then the `ConsumerModificationProposal` would still need to include that `top_N` is 50. Otherwise, `top_N` would be set to its default value of 0, and the chain would become an Opt-In chain. |
Tools
LanguageTool
[uncategorized] ~113-~113: A comma may be missing after the conjunctive/linking adverb ‘Otherwise’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ...ill need to include thattop_N
is 50. Otherwisetop_N
would be set to its default val...
LGTM. Thanks for the work! |
* added E2E test for the ConsumerModificationProposal * added docs * add to nightly tests * fix markdown links * Update docs/docs/features/proposals.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
* feat!: added E2E test and docs for ConsumerModificationProposal (#1949) * added E2E test for the ConsumerModificationProposal * added docs * add to nightly tests * fix markdown links * Update docs/docs/features/proposals.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * fix e2e test 'ConsumerModificationProposal' * app: added missing ConsumerModificationProposalHandle * Apply suggestions from code review Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
* added E2E test for the ConsumerModificationProposal * added docs * add to nightly tests * fix markdown links * Update docs/docs/features/proposals.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com>
* build(deps): bump slackapi/slack-github-action from 1.25.0 to 1.26.0 (#1803) Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.25.0 to 1.26.0. - [Release notes](https://github.com/slackapi/slack-github-action/releases) - [Commits](https://github.com/slackapi/slack-github-action/compare/v1.25.0...v1.26.0) --- updated-dependencies: - dependency-name: slackapi/slack-github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: add v4.1.x to docs and cleanup bots (#1812) * add v4.1.x to releases and features * cleanup mergify and dependabot * build(deps): bump github.com/cosmos/cosmos-proto from 1.0.0-beta.4 to 1.0.0-beta.5 (#1802) build(deps): bump github.com/cosmos/cosmos-proto Bumps [github.com/cosmos/cosmos-proto](https://github.com/cosmos/cosmos-proto) from 1.0.0-beta.4 to 1.0.0-beta.5. - [Release notes](https://github.com/cosmos/cosmos-proto/releases) - [Commits](https://github.com/cosmos/cosmos-proto/compare/v1.0.0-beta.4...v1.0.0-beta.5) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-proto dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: add docs versioning and legacy page (pre v4.0.0) (#1833) * Updated build to allow for versioned docs * wip: add steps to build legacy docs * docs: add build legacy website * docs: add v4; rename to legacy * docs: add docs versioning for docusaurus v3.x * docs: add docs version sync and deploy scripts * update makefile * docs: rm deprecated build script * docs: fix banner in v4.1.0 * docs: update build script & config * update .gitignore * docs: update build script & config * docs: update Readme * build: update docs build script * build: update docs README.md * address review comments * address review comments -- update readme --------- Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com> * build(deps): bump JamesIves/github-pages-deploy-action from 4.5.0 to 4.6.0 (#1804) build(deps): bump JamesIves/github-pages-deploy-action Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.5.0...v4.6.0) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: add release/v5.x bots targets (#1829) * chore: fix spelling errors (#1835) chore: spelling errors fixes Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * build(deps): bump github.com/hashicorp/go-getter from 1.7.1 to 1.7.4 (#1826) Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.7.1 to 1.7.4. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml) - [Commits](https://github.com/hashicorp/go-getter/compare/v1.7.1...v1.7.4) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-getter dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: update docs deployment (#1841) * build(deps): bump amannn/action-semantic-pull-request from 5.4.0 to 5.5.2 (#1831) build(deps): bump amannn/action-semantic-pull-request Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5.4.0 to 5.5.2. - [Release notes](https://github.com/amannn/action-semantic-pull-request/releases) - [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md) - [Commits](https://github.com/amannn/action-semantic-pull-request/compare/v5.4.0...v5.5.2) --- updated-dependencies: - dependency-name: amannn/action-semantic-pull-request dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump bufbuild/buf-setup-action from 1.30.1 to 1.31.0 (#1832) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.30.1 to 1.31.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.30.1...v1.31.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat!: Introduce Partial Set Security (#1809) * cleanup ./changelog entries * docs: changelog and release notes for v4.0.0 (#1564) * add v4.0.0 section to changelog * add release notes * fix!: Validation of SlashAcks fails due to marshaling to Bech32 (backport #1570) (#1577) fix!: Validation of SlashAcks fails due to marshaling to Bech32 (#1570) * add different Bech32Prefix for consumer and provider * separate app encoding and params * remove ConsumerValPubKey from ValidatorConfig * update addresses in tests * make SlashAcks consistent across chains * add comments for clarity * Regenerate traces * Fix argument order * set bech32prefix for provider to cosmos * add changelog entries * add consumer-double-downtime e2e test * update nightly-e2e workflow * fix typo * add consumer-double-downtime to testConfigs * remove changes on provider * skip invalid SlashAcks * seal the config * clear the outstanding downtime flag for new vals * add info on upgrading to v4.0.0 * fix upgrade handler * fix changeover e2e test * Update tests/e2e/config.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update tests/e2e/config.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * add AccountPrefix to ChainConfig * fix docstrings * update AccountAddressPrefix in app.go * fix consumer-misb e2e test --------- Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> (cherry picked from commit 86046926502f7b0ba795bebcdd1fdc97ac776573) Co-authored-by: Marius Poke <marius.poke@posteo.de> * docs: update changelog for v4.0.0 (#1578) update changelog * docs: prepare for v4.0.0 (#1581) * unclog build * update release notes * update release date * feat!: enable Opt In and Top N chains through gov proposals (#1615) * init commit * added test * fixed tests * added changelog entry and comment * Update x/ccv/provider/keeper/proposal_test.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update .changelog/unreleased/features/1587-enable-opt-in-chains-through-gov-proposals.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update x/ccv/provider/keeper/keeper.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * changed to tabular test --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * feat!: introduce MsgOptIn and MsgOptOut (#1620) * init commit * cleaning up * changed cons to val address * Revert "changed cons to val address" This reverts commit a32e8829fee3cbbe50e363a0aa91ad62117a8a1d. * Update x/ccv/provider/keeper/keeper.go Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * took into account comments * added key assignment * add contraint such that opt out only works if the chain is running --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * test: MBT: Add partial set security to model (feature branch version) (#1627) * Port changes from branch to main * Add model analysis changes to Makefile * test: Ports key assignment to the driver on the PSS feature branch (#1628) * Port key assignment to MBT driver * Add comment and make var names clearer * feat!: automatically opt in validators that vote Yes on consumer addition proposals (#1629) * init commit * changed providerKeeper.GetProposedConsumerChain to return a bool * add logging mesages * one more log message * fix comment * added one more test case of NO vote and made tabular test * test: Add driver for PSS (#1636) * Port key assignment to MBT driver * Add PSS trace generation * Add PSS trace gen to longer trace gen * Start handling top N parameter for new consumers * Finish merge * Add handling for optin/optout steps * Remove expected error from OptIn, which should not error * set top N parameter during path setup * Add comment to setup.go * feat!: add PSS reward distribution spike (#1632) * PSS reward distribution * "add optin mapping to test" * Update app/provider/app.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * docs * add TODO * fix Dos vector in IBCMiddlewarea * add reformat * fix DOS issue and make integration tests pass * doc * add integration test * doc * Compute total vp per consumer * add comments * remove opt-in comments and add TODOs * format * Update x/ccv/provider/keeper/distribution.go Co-authored-by: insumity <karolos@informal.systems> * add UT + doc * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * nits * Update x/ccv/provider/ibc_middleware.go Co-authored-by: Marius Poke <marius.poke@posteo.de> * add panics in IBC Middleware ICS4wrapper funcs * address comments --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Marius Poke <marius.poke@posteo.de> * feat! use protos to serialize opted-in validators (#1659) move OptedInValidators to proto Co-authored-by: insumity <karolos@informal.systems> * feat!: PSS enable per-consumer chain commission (#1657) * add draft commission * implement consumer commission draft * formatting * add msg handling * improve UT * nits * Update x/ccv/provider/keeper/keeper.go Co-authored-by: insumity <karolos@informal.systems> * Update proto/interchain_security/ccv/provider/v1/tx.proto Co-authored-by: Marius Poke <marius.poke@posteo.de> * optimize keys * Update x/ccv/provider/keeper/keeper.go Co-authored-by: insumity <karolos@informal.systems> * address comments * address comments * remove unnecessary check * Revert "remove unnecessary check" This reverts commit 2951e9bace04f6436d6ad1e4a11efcedd0be8cb1. * fix minor bug in StopConsumerChain --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Marius Poke <marius.poke@posteo.de> * test: update integration test suite for PSS (#1687) * draft multi consumer transfer setup and test * format multi consumer distribution test * update test for democ consumer chains * nits * nit * docs: changelog and release notes for v4.0.0 (#1564) * add v4.0.0 section to changelog * add release notes * fix!: Validation of SlashAcks fails due to marshaling to Bech32 (backport #1570) (#1577) fix!: Validation of SlashAcks fails due to marshaling to Bech32 (#1570) * add different Bech32Prefix for consumer and provider * separate app encoding and params * remove ConsumerValPubKey from ValidatorConfig * update addresses in tests * make SlashAcks consistent across chains * add comments for clarity * Regenerate traces * Fix argument order * set bech32prefix for provider to cosmos * add changelog entries * add consumer-double-downtime e2e test * update nightly-e2e workflow * fix typo * add consumer-double-downtime to testConfigs * remove changes on provider * skip invalid SlashAcks * seal the config * clear the outstanding downtime flag for new vals * add info on upgrading to v4.0.0 * fix upgrade handler * fix changeover e2e test * Update tests/e2e/config.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update tests/e2e/config.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * add AccountPrefix to ChainConfig * fix docstrings * update AccountAddressPrefix in app.go * fix consumer-misb e2e test --------- Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> (cherry picked from commit 86046926502f7b0ba795bebcdd1fdc97ac776573) Co-authored-by: Marius Poke <marius.poke@posteo.de> * docs: update changelog for v4.0.0 (#1578) update changelog * feat!: enable Opt In and Top N chains through gov proposals (#1615) * init commit * added test * fixed tests * added changelog entry and comment * Update x/ccv/provider/keeper/proposal_test.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update .changelog/unreleased/features/1587-enable-opt-in-chains-through-gov-proposals.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update proto/interchain_security/ccv/provider/v1/provider.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update x/ccv/provider/keeper/keeper.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * changed to tabular test --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * feat!: introduce MsgOptIn and MsgOptOut (#1620) * init commit * cleaning up * changed cons to val address * Revert "changed cons to val address" This reverts commit a32e8829fee3cbbe50e363a0aa91ad62117a8a1d. * Update x/ccv/provider/keeper/keeper.go Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * took into account comments * added key assignment * add contraint such that opt out only works if the chain is running --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * test: MBT: Add partial set security to model (feature branch version) (#1627) * Port changes from branch to main * Add model analysis changes to Makefile * feat!: add PSS reward distribution spike (#1632) * PSS reward distribution * "add optin mapping to test" * Update app/provider/app.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * docs * add TODO * fix Dos vector in IBCMiddlewarea * add reformat * fix DOS issue and make integration tests pass * doc * add integration test * doc * Compute total vp per consumer * add comments * remove opt-in comments and add TODOs * format * Update x/ccv/provider/keeper/distribution.go Co-authored-by: insumity <karolos@informal.systems> * add UT + doc * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * nits * Update x/ccv/provider/ibc_middleware.go Co-authored-by: Marius Poke <marius.poke@posteo.de> * add panics in IBC Middleware ICS4wrapper funcs * address comments --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Marius Poke <marius.poke@posteo.de> * feat!: PSS enable per-consumer chain commission (#1657) * add draft commission * implement consumer commission draft * formatting * add msg handling * improve UT * nits * Update x/ccv/provider/keeper/keeper.go Co-authored-by: insumity <karolos@informal.systems> * Update proto/interchain_security/ccv/provider/v1/tx.proto Co-authored-by: Marius Poke <marius.poke@posteo.de> * optimize keys * Update x/ccv/provider/keeper/keeper.go Co-authored-by: insumity <karolos@informal.systems> * address comments * address comments * remove unnecessary check * Revert "remove unnecessary check" This reverts commit 2951e9bace04f6436d6ad1e4a11efcedd0be8cb1. * fix minor bug in StopConsumerChain --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Marius Poke <marius.poke@posteo.de> * fix nits in MBT model after merging #1676 from main * Fix merging ccv model * Remove conflict markers * Remove more conflict markers * EndProviderEpoch takes ConsumerAdditionMsg * Fix using consumer addition msgs instead of chain names in boundeddrift.qnt * lint * chore: rebase PSS branch with main (#1689) * Update tests/mbt/driver/mbt_test.go * nits * revert unwanted line deletion from linter --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * feat!: complete the PSS reward distribution (#1709) * update compute consumer total power for reward distribution * update distribution logic to work with epochcs * Adapt reward distribution mem test to epochs * doc * nits * other nits * nits * Update tests/integration/distribution.go * feat!: Add slashing logic for PSS (#1710) * add check for consumer validators in downtime logic * fix UT * try to fix weird errors in gh worfklow * fix silly merge bug * nits * ci: do not scan the tests for security issues (#1717) init commit * feat!: compute partial sets (#1702) * init commit * nit change * cleaning up * clean up * fix distribution test * Update x/ccv/provider/keeper/hooks.go Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * took into Simon's comments * took into rest of the comments * nit change * return an error if validator cannot opt out from a Top N chain * removed automatic opt-in for validators that vote Yes on proposals * tiny fix for E2E tests * nit change to remove unecessary else * fixed topN == 0 issue --------- Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * feat!: update PSS cli (#1708) finalize PSS CLI cmds * Rename and add comission rate command to commands * feat!: only perform consumer additions for non-empty chains (#1730) * init commit * Update x/ccv/provider/keeper/proposal.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * feat: Add queries for PSS and consumer commission rate (#1733) * init commit * nit change * cleaning up * clean up * fix distribution test * Update x/ccv/provider/keeper/hooks.go Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * took into Simon's comments * took into rest of the comments * nit change * return an error if validator cannot opt out from a Top N chain * removed automatic opt-in for validators that vote Yes on proposals * tiny fix for E2E tests * nit change to remove unecessary else * update consumer chains query to return topN * update query consu chains proto * add consumer chains per validator query * Add PSS command to provider's cli * nits * add consumer commission rate query * nits * big renaming * fix doc * nits * nits * docs * Update proto/interchain_security/ccv/provider/v1/query.proto Co-authored-by: insumity <karolos@informal.systems> * nit * add OptedIn in QueryConsumerChainsValidatorHasToValidate * remove OptIn field in consumer chains query response * include validators that opt-in during the next epochs * update has-to-validate condition * fix tinny bug in the tests after merging feat/partial-security * update doc * update cli description * Update x/ccv/provider/keeper/grpc_query.go Co-authored-by: insumity <karolos@informal.systems> * changes --------- Co-authored-by: insumity <karolos@informal.systems> * fix!: Fix opt-in assignment (#1732) * Make the same validator assigning the same key a noop instead of an error * Adjust test * Update tests * Fix newline warning * Regenerate traces * Add key assignment change to changelog * Add info log for same key same validator assignments * Add changelog entry to api-breaking * Update x/ccv/provider/handler_test.go Co-authored-by: insumity <karolos@informal.systems> * Add more comments to test and return right validator --------- Co-authored-by: insumity <karolos@informal.systems> * fix silly bug in PSS opted-in val query * fix logging in ibc_module.go * test: add partial-set-security E2E tests (#1737) * init commit * fix traces * Add PSS to default tests * Update tests/e2e/steps_partial_set_security.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update tests/e2e/steps_partial_set_security.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> --------- Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Nit changes based on Simons comments. To be pushed directly because E2E PR 1737 were the comments were written was accidentally merged. * fix!: return a SlashAck even if the validator is not a consumer validator (#1763) * init commit * fix test * test: Expand PSS e2e test to include slashing (#1752) * Expand test to include slashing * Add back existing steps * Add downtime to top N test * Fix nits * fix!: update unbonding pausing for PSS (#1728) * draft PSS unbonding fix * fix hook logic to retrieve validator address from ubd op * add unbonding pausing unit-test * remove panic in hook * Get back 3.2.0 and 3.3.0 changelog from main * Port epilogue from main * Fix proto conflict * generate proto files * Port RELEASE_NOTES * Fix merge for tests * Merge declaration and assignment * Clean up model files * Add pss tests to MBT readme * Restore MsgSubmitConsumerDoubleVoting handler * Remove local driver files * Remove Quint guidelines * Add optin/optout to MBT readme * Fix types in model * Fix model * Add migration * Ensure SlashAcks are sent even when the valset does not change * adding changelog entry * Empty DowntimeSlachAcks on EndBlock * Remove logs * Change condition for sending slash acks * Revert model changes * Start fixing PSS issues in model * Add expected errors to opt out action * Revert PSS quint model changes * Add parameter to ComputeNextEpochConsumerValSet * Set top N param in setup * Fix: do not try key assignment if there is no nonjailed validator * Do not assign keys for jailed validators * Only jail validators with non-zero-power * Add unit test * Add unit test for unset case * Panic on not being able to unmarshal * Move packet handling into ack.Success block * Format * Remove unnecessary comment * Add parens for clarity * Format and fix typo * Move OptIn/OptOut events to provider events * Remove unused function * Improve comments for keys * Improve comments for key getter functions * Remove order change for existing keys * Re-add nolint instruction * nit comment fix * Move ConsumerAllocationTests to correct folder * nit comment fix * fix!: handle consumer commission marshalling errors gracefully (#1836) * handle consumer commission setter/getter gracefully to avoid BeginBlock panic + add msg in codec * fix consumer commission query rest path * fix: update queries REST path for PSS (#1839) update queries rest path * Clarify that GetProposedConsumerChain is test-only * fix: Fix has-to-validate query (#1823) * Fix has-to-validate query * Flip comparison sign for checking minPower * Regenerate traces * Remove unnecessary print * Address comments * fix!: fix slashing in PSS (#1838) * drop slash packet for opted-out validators before updating slash meter * fix integration test * fix ut * update UT * Update x/ccv/provider/types/msg.go Co-authored-by: Marius Poke <marius.poke@posteo.de> * Remove BlockValidatorUpdate from expected staking keeper * added an error response value to ComputeMinPowerToOptIn * delete additional state when we stop a chain * Assign keys and change voting power only for unjailed nodes with >0 power * fix: Validate consumer commission rate against minimal rate (#1834) * Validate consumer commission rate * Add test for commission rates * Remove static minimum commission rate validation from Set * feat!: introduce power shaping (#1830) * added power shaping * fixes * Add property based test for power cap * fixed tests & added algorithm's idea * nit changes * Update x/ccv/provider/keeper/proposal.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * remove empty-validator-set check * implicit memory aliasing issue fixed * added keeper tests * updated HasToValidate query * Update x/ccv/provider/keeper/keeper.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update x/ccv/provider/keeper/keeper.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * took into account comments * do not use cached ctx * Fix E2E test. A jailed validator does not have to validate. * fix merge issue and format --------- Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update v4 to v5 in package version * Bump consensus version * Add migration in correct folder * Update version from v4 to v5 in migration --------- Co-authored-by: mpoke <marius.poke@posteo.de> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: insumity <insumity@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * chore: add v5.0.x-provider and v5.0.x-provider to mergify and dependabot (#1845) updated bots for v5.0.x-provider release * fix: revert version bump to v5 (#1847) * revert bump version to 5 * register migration * chore: rm v5-provider; add v4.2.0; rm old versions (#1849) * chore: rm v5-provider; add v4.2.0; rm old versions * chore: rm v5-provider; add v4.2.0; rm old versions * chore: Add coderabbit configuration file (#1852) * Add coderabbit configuration file * Add release and feat base branches to coderabbit * Change config to not auto-post review status on unreviewed PRs * refactor: remove redundant code from MakeConsumerGenesis (#1807) * remove redundant code from MakeConsumerGenesis * fix tests * refactor: nit naming changes (#1854) * small naming fix * reverts name to ComputeNextValidators because the semantics of ComputeNextEpochConsumerValSet were different in v4.1 * docs: ADR for Security Aggregation solution (#1866) * ADR CosmoLayer: Initial draft * update adr: slinky api * cleanup * Apply suggestions from code review Co-authored-by: Marius Poke <marius.poke@posteo.de> * addressed comments * cleanup of pseudo code, power sources * renaming to security aggregation * mv adr * removed comments * minor change in code example * Apply suggestions from code review Grammar Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Marius Poke <marius.poke@posteo.de> Co-authored-by: Jehan <jehan.tremback@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * chore: Make coderabbit ignore docs folder (#1864) Make bot ignore docs folder * chore: Fix codespell config (#1869) * Add optin and opt-in to codespell ignored words * Fix typo on multiple * Fix typo on assignment * feat: PSS - Add minimum power in top N & power shaping params to consumer chain list (#1863) * Add minimum power in top N to the list-consumer-chains query * Add test for MinPowerInTop_N * Add changelog entry * Update x/ccv/provider/keeper/keeper_test.go Co-authored-by: insumity <karolos@informal.systems> * Add other validator shaping params to consumer chain list * Add power shaping params to query test * Adjust changelog for extra fields * Add changelog entry for API breaking --------- Co-authored-by: insumity <karolos@informal.systems> * chore: fixed all-pairs-valconsensus-address CLI command usage (#1870) * chore: Try to make coderabbit ignore missing/extra newlines in md files (#1877) Update .coderabbit.yml * docs: Add PSS docs (#1859) * Add params to proposals * Start rewriting intro * Finish overview and terminology * Write up generics about PSS and power shaping * Add more info about top N and optin * Nit: apostrophe * Clarify governance proposal process for Opt In chains * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add missing newlines * Update docs/docs/features/partial-set-security.md Co-authored-by: insumity <karolos@informal.systems> * Update docs/docs/features/power-shaping.md Co-authored-by: insumity <karolos@informal.systems> * Use Interchain Security instead of ICSv2 * docs: Add PSS docs (Part 2) (#1861) * first version * first commit * one more warning on having all validators opt out * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update docs/docs/frequently-asked-questions.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update docs/docs/frequently-asked-questions.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * took into account some comments * small comment changes --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add warning that vals have to manually opt out if going out of top N * Add short PSS FAQ * Add FAQ on how many chains vals can opt in on * Change first to third person * Fix typo * Add missing comma * added a warning * Add more guidelines to 'how to choose the power shaping parameters' * Mention list-consumer-chains query * Add tip about default commission rate --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> * docs: Minor improvements (#1882) * Fix typo in tip * Minor improvements around commission rate * Mention soft opt-out * Link to normal consumer addition prop * Remove confusing line from changeover prop * Remove instructions about not assigning keys * Clarify starting condition for top N chains * Incorporate comments * Update docs/docs/validators/joining-testnet.md Co-authored-by: insumity <karolos@informal.systems> * Reformulate opting out --------- Co-authored-by: insumity <karolos@informal.systems> * build(deps): bump google.golang.org/protobuf from 1.33.0 to 1.34.1 (#1862) Bumps google.golang.org/protobuf from 1.33.0 to 1.34.1. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: add a query to retrieve validator set that was last sent to the consumer chain (#1867) * init commit * took into account comments * add docs * Update docs/docs/validators/partial-set-security-for-validators.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix!: drop chain proposals with empty validator set at spawn time (#1888) * init commit * Update x/ccv/provider/keeper/proposal.go Co-authored-by: MSalopek <matija.salopek994@gmail.com> * added one more test case --------- Co-authored-by: MSalopek <matija.salopek994@gmail.com> * test: Remove v5.0.0 (pre-release) be tested within e2e compatibility (#1894) * Remove v5.0.0 (pre-release) from last version to be tested within e2e comopatibility tests * Apply suggestions from code review Co-authored-by: Marius Poke <marius.poke@posteo.de> --------- Co-authored-by: Marius Poke <marius.poke@posteo.de> * test: add E2E test for power-shaping features (#1853) * added E2E tests * Update tests/e2e/steps_partial_set_security.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * added to nightly tests --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * build(deps): bump comet to v0.37.6 (#1876) * bump comet to v0.37.6 * add changelog entry * fix exp deps and pin it to go.mod * bump comet to 0.37.5 and sdk to 0.47.11 to match * bump comet back to 0.37.6 * add changelog entry for SDK --------- Co-authored-by: MSalopek <matija.salopek994@gmail.com> * docs: add v4.2.0; bump v5.0.0 (#1900) * docs: add v4.2.0; bump v5.0.0 * docs: add v4.2.0; bump v5.0.0 * docs: fix broken docs deploy (v4.2.0) (#1903) * docs: add v4.2.0; bump v5.0.0 * docs: add v4.2.0; bump v5.0.0 * sync * sync stuff * fix * try docs tag * add version alias * chore: fix spelling errors (#1904) chore: spelling errors fixes Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * build(deps): bump JamesIves/github-pages-deploy-action from 4.6.0 to 4.6.1 (#1905) build(deps): bump JamesIves/github-pages-deploy-action Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.6.0 to 4.6.1. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.6.0...v4.6.1) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump bufbuild/buf-setup-action from 1.31.0 to 1.32.0 (#1906) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.31.0 to 1.32.0. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.31.0...v1.32.0) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump google.golang.org/grpc from 1.63.2 to 1.64.0 (#1908) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.63.2 to 1.64.0. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](https://github.com/grpc/grpc-go/compare/v1.63.2...v1.64.0) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: document democracy modules in more detail (#1915) * docs: document democracy modules in more detail * docs: add diff to config * Update docs/docs/features/democracy-modules.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs/docs/features/democracy-modules.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update docs/docs/features/democracy-modules.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * cleanup after applying bot comments --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * docs: bring v4.2.0 changelog to main (#1909) bring v4.2.0 changelog to main * build(deps): bump github.com/cosmos/ibc-go/v7 from 7.4.0 to 7.5.0 (#1907) * build(deps): bump github.com/cosmos/ibc-go/v7 from 7.4.0 to 7.5.0 Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.4.0 to 7.5.0. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v7.4.0...v7.5.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] <support@github.com> * add changelong entry --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mpoke <marius.poke@posteo.de> * chore: fix spelling errors (#1922) chore: spelling errors fixes Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> * fix(client): write unbonding period advisory to stderr instead of stdout (#1921) * fix(client): write unbonding period advisory to stderr instead of stdout * Add changelog for unbonding period advisory --------- Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com> * docs: update ADR metadata (#1910) * update ADR metadata * fix broken link * fix: migration and error code duplication + e2e tests (#1930) * e2e tests pss * go version 1.22 * fix error code issue * fix e2e tests * fix RegisterMigration * test: e2e fix PSS tests (#1931) * e2e fix PSS tests * Fix message signing for MsgOptIn and MsgOptOut * chore!: fix PSS mem-tests (SDK v50 upgrade) (#1933) * fix mem-tests * nits * nits * other nits * chore!: Add last PSS changes (#1941) * build(deps): bump github.com/cosmos/ibc-go/v7 from 7.5.0 to 7.5.1 (#1924) * build(deps): bump github.com/cosmos/ibc-go/v7 from 7.5.0 to 7.5.1 Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.5.0 to 7.5.1. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v7.5.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v7.5.0...v7.5.1) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update changelog entry --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mpoke <marius.poke@posteo.de> * build(deps): bump bufbuild/buf-setup-action from 1.32.0 to 1.32.1 (#1923) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.32.0 to 1.32.1. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.32.0...v1.32.1) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix mem-tests * nits * nits * other nits * build(deps): bump bufbuild/buf-setup-action from 1.32.1 to 1.32.2 (#1934) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.32.1 to 1.32.2. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.32.1...v1.32.2) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#1936) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.18.2 to 1.19.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.18.2...v1.19.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump docker/login-action from 3.1.0 to 3.2.0 (#1935) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/e92390c5fb421da1463c202d546fed0ec5c39f20...0d4c9c5ea7693da7b068278f7b52bda2a190a446) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: Add draft ADR for validators outside of the active set (#1879) * Add draft ADR for active set validators * Remove unused changelog entry * Add initial date and remove square brackets * Suggest alternative approach: unbonded validators can validate * Expand unbonded validators section a bit * Incorporate comments * Update docs/docs/adrs/adr-017-allowing-inactive-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * Update docs/docs/adrs/adr-017-allowing-inactive-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * Update docs/docs/adrs/adr-017-allowing-inactive-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * Clarify consensus validators vs staking validators * Update ADR to roll context doc into it * Fix image links * Add negative consequence * Add sentence about module wiring * Address review comments * Add source code for diagrams and make text more technical * Update docs/docs/adrs/adr-017-allowing-inactive-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * Update docs/docs/adrs/adr-017-allowing-inactive-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * Update docs/docs/adrs/adr-017-allowing-inactive-validators.md Co-authored-by: Jehan <jehan.tremback@gmail.com> * Write changes to state * Update intro, links, mitigations --------- Co-authored-by: Marius Poke <marius.poke@posteo.de> Co-authored-by: Jehan <jehan.tremback@gmail.com> * chore: fix struct name in comment (#1938) Signed-off-by: xiaoxiangirl <fliter@tom.com> * feat!: allow consumer chains to change their PSS parameters (#1932) * added modification proposal * small fixes * Update x/ccv/provider/client/proposal_handler.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * removed trailing comma * Update x/ccv/provider/types/proposal.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * Update x/ccv/provider/types/proposal.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * took into account comment --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix!: apply audit suggestions (#1925) * init commit * added CHANGELOG entries * added nit simplification change * addressed comment by Hypha * took into account err returned by ComputeMinPowerToOptIn * fixed test failing * build(deps): bump github.com/cosmos/ibc-go/v7 from 7.5.0 to 7.5.1 (#1924) * build(deps): bump github.com/cosmos/ibc-go/v7 from 7.5.0 to 7.5.1 Bumps [github.com/cosmos/ibc-go/v7](https://github.com/cosmos/ibc-go) from 7.5.0 to 7.5.1. - [Release notes](https://github.com/cosmos/ibc-go/releases) - [Changelog](https://github.com/cosmos/ibc-go/blob/v7.5.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/ibc-go/compare/v7.5.0...v7.5.1) --- updated-dependencies: - dependency-name: github.com/cosmos/ibc-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * update changelog entry --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mpoke <marius.poke@posteo.de> * build(deps): bump bufbuild/buf-setup-action from 1.32.0 to 1.32.1 (#1923) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.32.0 to 1.32.1. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.32.0...v1.32.1) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump bufbuild/buf-setup-action from 1.32.1 to 1.32.2 (#1934) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.32.1 to 1.32.2. - [Release notes](https://github.com/bufbuild/buf-setup-action/releases) - [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.32.1...v1.32.2) --- updated-dependencies: - dependency-name: bufbuild/buf-setup-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/spf13/viper from 1.18.2 to 1.19.0 (#1936) Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.18.2 to 1.19.0. - [Release notes](https://github.com/spf13/viper/releases) - [Commits](https://github.com/spf13/viper/compare/v1.18.2...v1.19.0) --- updated-dependencies: - dependency-name: github.com/spf13/viper dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump docker/login-action from 3.1.0 to 3.2.0 (#1935) Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/e92390c5fb421da1463c202d546fed0ec5c39f20...0d4c9c5ea7693da7b068278f7b52bda2a190a446) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * took into account comments --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mpoke <marius.poke@posteo.de> * nits * update gosec alerts --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: xiaoxiangirl <fliter@tom.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mpoke <marius.poke@posteo.de> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: Jehan <jehan.tremback@gmail.com> Co-authored-by: xiaoxiangirl <fliter@tom.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * chore!: backport #1946 (GetAllConsumerChains fix) to `feat/pss-upgrade-v50` branch (#1950) fix!: Replace GetAllConsumerChains with lightweight version (#1946) * add GetAllConsumerChainIDs * replace GetAllConsumerChains with GetAllRegisteredConsumerChainIDs * add changelog entry * move HasToValidate to grpc_query.go as it's used only there * apply review suggestions Co-authored-by: Marius Poke <marius.poke@posteo.de> * fix: backport #1949 + fix handler entry (#1960) * feat!: added E2E test and docs for ConsumerModificationProposal (#1949) * added E2E test for the ConsumerModificationProposal * added docs * add to nightly tests * fix markdown links * Update docs/docs/features/proposals.md Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * fix e2e test 'ConsumerModificationProposal' * app: added missing ConsumerModificationProposalHandle * Apply suggestions from code review Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> --------- Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> * chore: backport regression mem tests for Hub halt (#1945) (#1965) * test: Add integration test reproducing the LastValidators exceeding MaxValidators bug (#1945) * Add test reproducing the LastValidators exceeding MaxValidators * formatting * Update tests/integration/unbonding.go Co-authored-by: insumity <karolos@informal.systems> * Update tests/integration/unbonding.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * document --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * update mocks --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * test: backport #1942 (#1963) * test: Add an e2e test that reproduces the chain halt (#1942) * Start writing e2e test with unjailing * Add e2e steps for too many validators bug * Fix test config and setup * Change test to use top N chain * Add comment for panic * Start cleaning up active/inactive vals e2e test * Revert change to StartChains * Revert changes to partial-set-security tests * Rename test case * Rename CLI flag for test case * Address comments * Add active set changes test to nightly runs * Fix merge in main.go * adapt e2e to v0.50 --------- Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * chore: use `IterateLastValidatorPowers` instead of `GetLastValidators` (backport #1953) (#1966) * test: Add integration test reproducing the LastValidators exceeding MaxValidators bug (#1945) * Add test reproducing the LastValidators exceeding MaxValidators * formatting * Update tests/integration/unbonding.go Co-authored-by: insumity <karolos@informal.systems> * Update tests/integration/unbonding.go Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * document --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * refactor: use IterateLastValidatorPowers instead of GetLastValidators (#1953) * Add skeleton for GetLastValidators wrapper * Fix unit tests * Correct comment * Log error messages if validators are not found * Change AnyTimes to more specific Times(1) * Instantiate slices with their max length and truncate * Remove GetLastValidators from expectation * Remove GetLastValidators call in consumer * Move GetLastBondedValidators to validator_set_updates * Add comment on iteration loop --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * feat!: store the minimal power to be in the top N on EndBlock (#1977) feat!: store the minimal power to be in the top N on EndBlock, instead of computing on-the-fly (#1952) * Store the minimal power among the top N in EndBlock * Finish merge * Fix unit tests * Fix store method for the min power * Fix migration * Revert migration changes * Change comment to proper name for key * Add staking keeper to migration * Revert "Add staking keeper to migration" This reverts commit 575cfd3ccec7732e0d1488d80bda7f6172110cf7. * Rename migration * Update x/ccv/provider/keeper/grpc_query.go * Clean up minimal power in top N on StopConsumerChain * Set min power in consumer modification proposal * Address comments * Use GetLastBondedValidators instead of GetLastValidators * Add migration * Add comment for migration * Improve comment in migration * Handle case where topN is not found * Add test for updating minimum power in top N * Merged tests * Rename updatedMinPower->newUpdatedMinPower * Address comments Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * chore: align to LSM hook signature to SDK v0.50.0 (#1984) fix LSM hook * fix!: update PSS reward distribution to work with SDK v0.50.0 changes (#1982) * fix commented distribution test * doc * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * add godoc * fix renaming issue * address comments * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> * make naming more consistent with godoc * Update tests/integration/distribution.go Co-authored-by: insumity <karolos@informal.systems> --------- Co-authored-by: insumity <karolos@informal.systems> * chore!: only distribute rewards to validators that have been validating a consumer chain for some backport #1929 (#1983) * fix commented distribution test * feat!: only distribute rewards to validators that have been validating a consumer chain for some time (#1929) * init commit * added a warning * took into account comments * init commit * added a warning * took into account comments * added a comment * Update .changelog/unreleased/improvements/provider/1929-distribute-rewards-to-long-term-validating-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * Update .changelog/unreleased/state-breaking/provider/1929-distribute-rewards-to-long-term-validating-validators.md Co-authored-by: Marius Poke <marius.poke@posteo.de> * took into account comments * doc * update consensus version to 7 * Update x/ccv/provider/migrations/v6/migration_test.go Co-authored-by: insumity <karolos@informal.systems> * nit --------- Co-authored-by: insumity <karolos@informal.systems> * Update proto/interchain_security/ccv/provider/v1/tx.proto Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> * address coments * --amend * nits --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: xiaoxiangirl <fliter@tom.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marius Poke <marius.poke@posteo.de> Co-authored-by: MSalopek <matija.salopek994@gmail.com> Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com> Co-authored-by: Cosmos SDK <113218068+github-prbot@users.noreply.github.com> Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> Co-authored-by: Philip Offtermatt <57488781+p-offtermatt@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: insumity <insumity@users.noreply.github.com> Co-authored-by: insumity <karolos@informal.systems> Co-authored-by: bernd-m <43466467+bermuell@users.noreply.github.com> Co-authored-by: Jehan <jehan.tremback@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Sergey <83376337+freak12techno@users.noreply.github.com> Co-authored-by: Chris Ricketts <6156768+chris-ricketts@users.noreply.github.com> Co-authored-by: Philip Offtermatt <p.offtermatt@gmail.com> Co-authored-by: xiaoxiangirl <fliter@tom.com>
Description
Adds E2E test for the
ConsumerModificationProposal
, as well as docs on how to use this new type of proposal.Note that the E2E test was introduced in the
steps_partial_set_security.go
file instead of in a newsteps_modify_chain.go
file because the modification changes are partial-set security related.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...
!
to the type prefix if the change is state-machine breakingCHANGELOG.md
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...
!
the type prefix if the change is state-machine breakingSummary by CodeRabbit
New Features
ConsumerModificationProposal
type, allowing users to modify power shaping parameters and switch between Top N and Opt-In chain types for running consumer chains.Documentation
ConsumerModificationProposal
, its parameters, and its impact on consumer chains.