Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite authored Jan 24, 2025
2 parents f8eda1f + 7784a5b commit 6c9f71a
Show file tree
Hide file tree
Showing 16 changed files with 583 additions and 106 deletions.
54 changes: 13 additions & 41 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
<!-- READ & DELETE:
1. Add a descriptive title `[<Tag>] <DESCRIPTION>`
2. Update _Assignee(s)_
3. Add _Label(s)_
4. Set _Project(s)_
5. Specify _Epic_ and _Iteration_ under _Project_
6. Set _Milestone_
-->

## Summary

<!-- READ & DELETE:
- Providing a quick summary of the changes yourself
-->
< One line summary>

## Issue
Changes:
- < Change 1 >
- < Change 2 >

<!-- READ & DELETE:
- Explain the reasoning for the PR in 1-2 sentences. Adding a screenshot is fair game.
- If applicable: specify the ticket number below if there is a relevant issue; _keep the `-` so the full issue is referenced._
-->
## Issue

- #{ISSUE_NUMBER}
- Description: < Description >
- Issue: #{ISSUE_NUMBER}

## Type of change

Expand All @@ -33,28 +22,11 @@ Select one or more from the following:
- [ ] Documentation
- [ ] Other (specify)

## Testing

<!-- READ & DELETE:
- Documentation changes: only keep this if you're making documentation changes
- Unit Testing: Remove this if you didn't make code changes
- E2E Testing: Remove this if you didn't make code changes
- See the quickstart guide for instructions: https://dev.poktroll.com/developer_guide/quickstart
- DevNet E2E Testing: Remove this if you didn't make code changes
- THIS IS VERY EXPENSIVE: only do it after all the reviews are complete.
- Optionally run `make trigger_ci` if you want to re-trigger tests without any code changes
- If tests fail, try re-running failed tests only using the GitHub UI as shown [here](https://github.com/pokt-network/poktroll/assets/1892194/607984e9-0615-4569-9452-4c730190c1d2)
-->

- [ ] **Documentation**: `make docusaurus_start`; only needed if you make doc changes
- [ ] **Unit Tests**: `make go_develop_and_test`
- [ ] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [ ] I have tested my changes using the available tooling
- [ ] I have commented my code
- [ ] I have performed a self-review of my own code; both comments & source code
- [ ] I create and reference any new tickets, if applicable
- [ ] I have left TODOs throughout the codebase, if applicable
- [ ] I have updated the GitHub Issue `assignees`, `reviewers`, `labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [ ] For code, I have run `make go_develop_and_test` and `make test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable
2 changes: 1 addition & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build-push-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
release-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147

Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
type=sha,format=long,suffix=-prod
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -82,7 +82,7 @@ jobs:

# TODO_TECHDEBT(@okdas): use for releases (also change the "on" part at the top so it only tgirrered for tags/releases)
- name: Add release and publish binaries
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: |
release/*
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
go-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/upload-pages-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: "0" # Per https://github.com/ignite/cli/issues/1674#issuecomment-1144619147

Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
pages: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -83,15 +83,15 @@ jobs:
yarn build
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
with:
enablement: true

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: docusaurus/build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*


# Use `1025` G/UID so users can switch between this and `heighliner` image without a need to chown the files.
RUN groupadd -g 1025 pocket && useradd -u 1025 -g pocket -m -s /sbin/nologin pocket

Expand Down
10 changes: 10 additions & 0 deletions app/upgrades/historical.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"

cosmostypes "github.com/cosmos/cosmos-sdk/types"
"github.com/pokt-network/poktroll/app/keepers"
)

Expand All @@ -29,6 +30,8 @@ func defaultUpgradeHandler(
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
logger := cosmostypes.UnwrapSDKContext(ctx).Logger()
logger.Info("Starting the migration in defaultUpgradeHandler")
return mm.RunMigrations(ctx, configurator, vm)
}
}
Expand Down Expand Up @@ -87,3 +90,10 @@ var Upgrade_0_0_4 = Upgrade{
// No changes to the KVStore in this upgrade.
StoreUpgrades: storetypes.StoreUpgrades{},
}

// Upgrade_0_0_9 is a small upgrade on TestNet.
var Upgrade_0_0_9 = Upgrade{
PlanName: "v0.0.9",
CreateUpgradeHandler: defaultUpgradeHandler,
StoreUpgrades: storetypes.StoreUpgrades{},
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ title: Chain Halt Troubleshooting
- [Understanding Chain Halts](#understanding-chain-halts)
- [Definition and Causes](#definition-and-causes)
- [Impact on Network](#impact-on-network)
- [Troubleshooting Process](#troubleshooting-process)
- [Troubleshooting `wrong Block.Header.AppHash`](#troubleshooting-wrong-blockheaderapphash)
- [Step 1: Identifying the Issue](#step-1-identifying-the-issue)
- [Step 2: Collecting Node Data](#step-2-collecting-node-data)
- [Step 3: Analyzing Discrepancies](#step-3-analyzing-discrepancies)
- [Step 4: Decoding and Interpreting Data](#step-4-decoding-and-interpreting-data)
- [Step 5: Comparing Records](#step-5-comparing-records)
- [Step 6: Investigation and Resolution](#step-6-investigation-and-resolution)
- [Troubleshooting `wrong Block.Header.LastResultsHash`](#troubleshooting-wrong-blockheaderlastresultshash)
- [Syncing from genesis](#syncing-from-genesis)

## Understanding Chain Halts

Expand All @@ -40,7 +42,7 @@ Chain halts can have severe consequences for the network:

Given these impacts, swift and effective troubleshooting is crucial to maintain network health and user trust.

## Troubleshooting Process
## Troubleshooting `wrong Block.Header.AppHash`

### Step 1: Identifying the Issue

Expand Down Expand Up @@ -94,3 +96,20 @@ Based on the identified discrepancies:
2. Develop a fix or patch to address the issue.
3. If necessary, initiate discussions with the validator community to reach social consensus on how to proceed.
4. Implement the agreed-upon solution and monitor the network closely during and after the fix.

## Troubleshooting `wrong Block.Header.LastResultsHash`

Errors like the following can occur from using the incorrect binary version at a certain height.

```bash
reactor validation error: wrong Block.Header.LastResultsHash.
```

The solution is to use the correct binary version to sync the full node at the correct height.

Tools like [cosmosvisor](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) make it easier
to sync a node from genesis by automatically using the appropriate binary for each range of block heights.

## Syncing from genesis

If you're encountering any of the errors mentioned above while trying to sync the historical blocks - make sure you're running the correct version of the binary in accordance with this table [Upgrade List](../../protocol/upgrades/upgrade_list.md).
Loading

0 comments on commit 6c9f71a

Please sign in to comment.