From 6a6c9280f76e0c5a510d80aebcfef4e94b7043c0 Mon Sep 17 00:00:00 2001 From: Taariq Lewis Date: Thu, 19 Jan 2023 13:35:48 -0800 Subject: [PATCH] Merge Additional Logs into new v0.11.6 release of Paloma. (#663) * chore: release infra (#629) * updates * updates * updates (#647) * Update README for v0.11.5 (#651) * convert get current snapshot info log into debug log (#656) * convert get current snapshot info log into debug log * info to debug * add logs (#659) Co-authored-by: Aleksandr Bezobchuk Co-authored-by: webelf101 <60479748+webelf101@users.noreply.github.com> --- .mergify.yml | 26 ++++++++++++ CHANGELOG.md | 35 ++++++++++++++++ CONTRIBUTING.md | 49 +++++++++++++++++++---- README.md | 10 ++--- x/evm/keeper/attest.go | 1 + x/evm/keeper/attest_validator_balances.go | 1 + x/evm/keeper/keeper.go | 7 ++++ x/valset/keeper/keeper.go | 4 +- 8 files changed, 119 insertions(+), 14 deletions(-) create mode 100644 .mergify.yml create mode 100644 CHANGELOG.md diff --git a/.mergify.yml b/.mergify.yml new file mode 100644 index 00000000..df236944 --- /dev/null +++ b/.mergify.yml @@ -0,0 +1,26 @@ +queue_rules: + - name: default + conditions: + - "#approved-reviews-by>1" + +pull_request_rules: + - name: "Auto-merge to master branch with label 'A:automerge' and branch protection passing" + conditions: + - "#approved-reviews-by>1" + - base=master + - label=A:automerge + actions: + queue: + name: default + method: squash + commit_message_template: | + {{ title }} (#{{ number }}) + {{ body }} + - name: Backport patches to v0.11.x branch + conditions: + - base=master + - label=backport/0.11.x + actions: + backport: + branches: + - release/v0.11.x diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..669128e6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ + + +# Changelog + +## [Unreleased] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11ddcb30..2a804a63 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -Thank you for considering making contributions to Paloma. We welcome all messenger birds! +Thank you for considering making contributions to Paloma. We welcome all messenger birds! Contributing to this repo can mean many things such as participating in discussions or proposing new features, improvements or bug fixes. To ensure a @@ -41,7 +41,7 @@ contributing has been established: We follow the Cosmos SDK [Coding Guidelines](https://github.com/cosmos/cosmos-sdk/blob/main/CODING_GUIDELINES.md). Specifically: -- API & Design SHOULD be proposed and reviewed before the main implementaion. +- API & Design SHOULD be proposed and reviewed before the main implementation. - Minimize code duplication - Define [Acceptance tests](https://github.com/cosmos/cosmos-sdk/blob/main/CODING_GUIDELINES.md#acceptance-tests) or while implementing new features. - Prefer use of acceptance test framework, like [gocuke](https://github.com/regen-network/gocuke/) @@ -68,17 +68,16 @@ model and utilizes [semantic versioning](https://semver.org/). ### PR Targeting -Ensure that you base and target your PR against the `main` branch. +Ensure that you base and target your PR against the `master` branch. -All feature additions should be targeted against `main`. Bug fixes for an +All feature additions should be targeted against `master`. Bug fixes for an outstanding release candidate should be targeted against the release candidate branch. ### PR & Merge Procedure -- Ensure the PR branch is rebased on `main`. +- Ensure the PR branch is rebased on `master`. - Ensure you provided unit tests and integration tests. -- Run `make test-unit test-e2e` to ensure that all tests pass. - Merge the PR! ## Release procedure @@ -89,6 +88,42 @@ We follow semver (from v3.0.0): - minor version update (eg 2.1.x -> 2.2.0) has no API nor state machine breaking changes. It can provide new functionality or bug fixes. - patch version update (eg 2.1.0 -> 2.1.1) has no API nor state machine breaking changes nor new features. It only contains hot fixes. +Note, when the major version is 0, we adopt a 0-based versioning scheme: + +- major version update (eg 0.12.x -> 0.13.x) has API breaking changes or signals major feature update +- minor version update (eg 0.12.1 -> 0.12.2) has no API nor state machine breaking changes. It can provide new functionality or bug fixes. + ### Major Release Procedure -All major changes related to major version update are first released for testnet. We use `-betaX` (eg `2.0.0-beta1`, `2.0.0-beta2` ...) releases for testnet. Once the code is stabilized we create a release candidate (eg `2.0.0-rc1`). If no issues are found the latest release candidate become the major release. +All major changes related to major version update are first released for testnet. +We use `-betaX` (eg `2.0.0-beta1`, `2.0.0-beta2` ...) releases for testnet. +Once the code is stabilized we create a release candidate (eg `2.0.0-rc1`). +If no issues are found the latest release candidate become the major release. + +When a major release is ready to be made, perform the following: + +1. Create a `release/vX.*.*` release. +branch off of the desired commit on `master`, e.g. `release/v0.12.x` or `release/v1.x.x`. +2. Create a `RELEASE_NOTES.md` template. +3. Ensure correct branch protection rules are enabled. This can be done generally + using a regex such as `release/v*`. +4. Create a branch off of the release branch that prepares the `RELEASE_NOTES.md` + based on the changelog. +5. Review and merge the release notes PR. +6. Cut a release off of the release branch! Note, goreleaser should automatically + create the release artifacts once the tag is pushed. +7. Ensure changelog entries are updated on `master`, i.e. have the release date, + version, and link to the release. + +### Minor Release Procedure + +All changes should be merged into `master`, unless a change is needed against a +specific release only. + +When a change is needed in a current release, add the appropriate `backport/*` label +to the PR and Mergify will automatically create a backport PR against the release +branch. If a PR is already merged, you can comment on the PR for Mergify to create +the backport PR via `@Mergifyio backport release/vX.*.*` (use the relevant release branch name). + +When you are ready to cut a point release, perform steps 4-7 from the Major +Release Procedure. diff --git a/README.md b/README.md index b0c5bd89..c8500a69 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ See [Release procedure](CONTRIBUTING.md#release-procedure) for more information To get the latest `palomad` binary: ```shell -wget -O - https://github.com/palomachain/paloma/releases/download/v0.11.4/paloma_Linux_x86_64.tar.gz | \ +wget -O - https://github.com/palomachain/paloma/releases/download/v0.11.5/paloma_Linux_x86_64.tar.gz | \ sudo tar -C /usr/local/bin -xvzf - palomad sudo chmod +x /usr/local/bin/palomad # Required until we figure out cgo @@ -73,10 +73,10 @@ If you're upgrading to the most recent version, you will need to stop `palomad` **ALERT: You will need to update your pigeon config.yaml file to reference this new chain-ID!** -1. Stop your paloma version and get 0.11.3 +1. Stop your paloma version and get 0.11.5 ``` service palomad stop -wget -O - https://github.com/palomachain/paloma/releases/download/v0.11.4/paloma_Linux_x86_64.tar.gz | \ +wget -O - https://github.com/palomachain/paloma/releases/download/v0.11.5/paloma_Linux_x86_64.tar.gz | \ tar -C /usr/local/bin -xvzf - palomad ``` @@ -118,8 +118,8 @@ palomad init "$MONIKER" Copy the configs of the testnet we wish to connect to ```shell -wget -O ~/.paloma/config/genesis.json https://raw.githubusercontent.com/palomachain/testnet/master/paloma-testnet-12/genesis.json -wget -O ~/.paloma/config/addrbook.json https://raw.githubusercontent.com/palomachain/testnet/master/paloma-testnet-12/addrbook.json +wget -O ~/.paloma/config/genesis.json https://raw.githubusercontent.com/palomachain/testnet/master/paloma-testnet-13/genesis.json +wget -O ~/.paloma/config/addrbook.json https://raw.githubusercontent.com/palomachain/testnet/master/paloma-testnet-13/addrbook.json ``` Next you can generate a new set of keys to the new machine, or reuse an existing key. diff --git a/x/evm/keeper/attest.go b/x/evm/keeper/attest.go index 91ed6074..c3d146cd 100644 --- a/x/evm/keeper/attest.go +++ b/x/evm/keeper/attest.go @@ -59,6 +59,7 @@ func (c *consensusPower) consensus() bool { } func (k Keeper) attestRouter(ctx sdk.Context, q consensus.Queuer, msg consensustypes.QueuedSignedMessageI) (retErr error) { + k.Logger(ctx).Debug("attest-router", "msg-id", msg.GetId(), "msg-nonce", msg.Nonce()) if len(msg.GetEvidence()) == 0 { return nil } diff --git a/x/evm/keeper/attest_validator_balances.go b/x/evm/keeper/attest_validator_balances.go index 45ae4224..5277bc45 100644 --- a/x/evm/keeper/attest_validator_balances.go +++ b/x/evm/keeper/attest_validator_balances.go @@ -13,6 +13,7 @@ import ( ) func (k Keeper) attestValidatorBalances(ctx sdk.Context, q consensus.Queuer, msg consensustypes.QueuedSignedMessageI) (retErr error) { + k.Logger(ctx).Debug("attest-validator-balances", "msg-id", msg.GetId(), "msg-nonce", msg.Nonce()) if len(msg.GetEvidence()) == 0 { return nil } diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 73fa5155..e2660ef4 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -747,6 +747,13 @@ func (k Keeper) CheckExternalBalancesForChain(ctx sdk.Context, chainReferenceID if ext.GetChainReferenceID() == chainReferenceID && ext.GetChainType() == "evm" { msg.ValAddresses = append(msg.ValAddresses, val.GetAddress()) msg.HexAddresses = append(msg.HexAddresses, ext.GetAddress()) + k.Logger(ctx).Debug("check-external-balances-for-chain", + "chain-reference-id", chainReferenceID, + "msg-val-address", val.GetAddress(), + "msg-hex-address", ext.GetAddress(), + "val-share-count", val.ShareCount, + "ext-chain-balance", ext.Balance, + ) } } } diff --git a/x/valset/keeper/keeper.go b/x/valset/keeper/keeper.go index f9041ed7..f28b0cfa 100644 --- a/x/valset/keeper/keeper.go +++ b/x/valset/keeper/keeper.go @@ -365,7 +365,7 @@ func (k Keeper) GetCurrentSnapshot(ctx sdk.Context) (*types.Snapshot, error) { snapStore := k.snapshotStore(ctx) lastID := k.ider.GetLastID(ctx, snapshotIDKey) snapshot, err := keeperutil.Load[*types.Snapshot](snapStore, k.cdc, keeperutil.Uint64ToByte(lastID)) - k.Logger(ctx).Info("get current snapshot", "last-id", lastID, "snapshot-validator-size", len(snapshot.Validators)) + k.Logger(ctx).Debug("get current snapshot", "last-id", lastID, "snapshot-validator-size", len(snapshot.Validators)) if errors.Is(err, keeperutil.ErrNotFound) { return nil, nil } @@ -508,6 +508,6 @@ func (k Keeper) _externalChainInfoStore(ctx sdk.Context) sdk.KVStore { } func (k Keeper) snapshotStore(ctx sdk.Context) sdk.KVStore { - k.Logger(ctx).Info("snapshot store", "store-key-name", k.storeKey.Name(), "store-key-string", k.storeKey.String()) + k.Logger(ctx).Debug("snapshot store", "store-key-name", k.storeKey.Name(), "store-key-string", k.storeKey.String()) return prefix.NewStore(ctx.KVStore(k.storeKey), []byte("snapshot")) }