Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adr-37 parameters for btc light client ranges #310

Merged

Conversation

KonradStaniec
Copy link
Collaborator

No description provided.


for _, p := range params {
// using set Params here makes sure the parameters in the upgrade string are consistent
err = k.SetParams(ctx, p)
Copy link
Contributor

Choose a reason for hiding this comment

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

this test checks that the params in the upgrade are consistent by passing through the AddNewPair
but during the upgrade it is overwritten the entire set of params
@KonradStaniec

"delegation_creation_base_gas_fee": 1000,
"allow_list_expiration_height": 0
}`
const BtcStakingParamsStr = `[
Copy link
Contributor

Choose a reason for hiding this comment

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

basically just copy&paste 3 times to check if all of those were inserted with a different btc_activation_height

@@ -1,7 +1,7 @@
package v1

type UpgradeDataString struct {
BtcStakingParamStr string
BtcStakingParamsStr string
Copy link
Contributor

Choose a reason for hiding this comment

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

@babylon-devops modified this to BtcStakingParamStr => BtcStakingParamsStr since now it is a slice of parameters

@RafilxTenfen RafilxTenfen marked this pull request as ready for review December 3, 2024 01:32
@RafilxTenfen RafilxTenfen requested a review from a team as a code owner December 3, 2024 01:32
@RafilxTenfen RafilxTenfen requested review from RafilxTenfen, samricotta, a team, gitferry and Lazar955 and removed request for a team December 3, 2024 01:32
Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

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

LGTM!

})
}

func (m *HeightToVersionMap) AddPair(newPair *HeightVersionPair) error {
Copy link
Member

Choose a reason for hiding this comment

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

Better to add a doc string here

// QueryParamsByBTCHeightResponse is response type for the Query/QueryParamsByBTCHeightResponse RPC method.
message QueryParamsByBTCHeightResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
Copy link
Member

Choose a reason for hiding this comment

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

would it be helpful to also have version number here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably 👍 good idea

Copy link
Member

@Lazar955 Lazar955 left a comment

Choose a reason for hiding this comment

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

great work! lgtm

@KonradStaniec KonradStaniec merged commit 4fb3741 into main Dec 3, 2024
19 checks passed
@KonradStaniec KonradStaniec deleted the konradstaniec/adr-37-parameters-for-btc-light-client-ranges branch December 3, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants