Skip to content

Commit

Permalink
Merge branch 'main' into issues/543/cache/memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk authored Feb 12, 2025
2 parents 0414e9a + 2011ab6 commit d1c024e
Show file tree
Hide file tree
Showing 353 changed files with 60,767 additions and 2,679 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GROVE_PORTAL_STAGING_ETH_MAINNET=https://eth-mainnet.rpc.grove.town
# The "protocol" field here instructs the Grove gateway which network to use
JSON_RPC_DATA_ETH_BLOCK_HEIGHT='{"protocol": "shannon-testnet","jsonrpc":"2.0","id":"0","method":"eth_blockNumber", "params": []}'

# On-chain module account addresses. Search for `func TestModuleAddress` in the
# Onchain module account addresses. Search for `func TestModuleAddress` in the
# codebase to get an understanding of how we got these values.
APPLICATION_MODULE_ADDRESS=pokt1rl3gjgzexmplmds3tq3r3yk84zlwdl6djzgsvm
SUPPLIER_MODULE_ADDRESS=pokt1j40dzzmn6cn9kxku7a5tjnud6hv37vesr5ccaa
Expand Down
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
6 changes: 3 additions & 3 deletions .github/workflows-helpers/run-e2e-test-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
ls -l /root/.poktroll/keyring-test/ && \
poktrolld q gateway list-gateway --node=$POCKET_NODE && \
poktrolld q application list-application --node=$POCKET_NODE && \
poktrolld q supplier list-supplier --node=$POCKET_NODE && \
poktrolld q supplier list-suppliers --node=$POCKET_NODE && \
make acc_initialize_pubkeys && \
go test -v ./e2e/tests/... -tags=e2e
env:
Expand All @@ -50,13 +50,13 @@ spec:
- name: POKTROLLD_HOME
value: /root/.poktroll
- name: PATH_URL
value: http://${NAMESPACE}-path:3000/v1
value: http://${NAMESPACE}-path:3069/v1
# PATH relies on subdomains to get the requested service but our DevNet infra is not
# built to expose arbitrary subdomains and supporting it would be a significant effort.
# As a workaround, PATH_HOST_OVERRIDE is used as the host:port to connect to PATH while
# the subdomain is passed as a Host header in the request.
- name: PATH_HOST_OVERRIDE
value: ${NAMESPACE}-path:3000
value: ${NAMESPACE}-path:3069
volumeMounts:
- mountPath: /root/.poktroll/keyring-test/
name: writable-keys-volume
Expand Down
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
12 changes: 6 additions & 6 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ 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

- name: install ignite
run: |
make ignite_install
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23.0"

- name: install ignite
run: |
make ignite_install
- name: Install CI dependencies
run: make install_ci_deps

Expand Down Expand Up @@ -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/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
# Ensure that we are using polylog (via logger.) instead of the golang's stdlib
# log package.
check_stdlog_in_off_chain_package:
name: Check stdlog in off-chain source code
name: Check stdlog in offchain source code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
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
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GROVE_PORTAL_STAGING_ETH_MAINNET = https://eth-mainnet.rpc.grove.town
# JSON RPC data for a test relay request
JSON_RPC_DATA_ETH_BLOCK_HEIGHT = '{"jsonrpc":"2.0","id":"0","method":"eth_blockNumber", "params": []}'

# On-chain module account addresses. Search for `func TestModuleAddress` in the
# Onchain module account addresses. Search for `func TestModuleAddress` in the
# codebase to get an understanding of how we got these values.
APPLICATION_MODULE_ADDRESS = pokt1rl3gjgzexmplmds3tq3r3yk84zlwdl6djzgsvm
SUPPLIER_MODULE_ADDRESS = pokt1j40dzzmn6cn9kxku7a5tjnud6hv37vesr5ccaa
Expand Down Expand Up @@ -283,8 +283,23 @@ ignite_poktrolld_build: check_go_version check_ignite_version ## Build the poktr
ignite chain build --skip-proto --debug -v -o $(shell go env GOPATH)/bin

.PHONY: ignite_openapi_gen
ignite_openapi_gen: ## Generate the OpenAPI spec for the Ignite API
ignite_openapi_gen: ## Generate the OpenAPI spec natively and process the output
ignite generate openapi --yes
$(MAKE) process_openapi

.PHONY: ignite_openapi_gen_docker
ignite_openapi_gen_docker: ## Generate the OpenAPI spec using Docker and process the output; workaround due to https://github.com/ignite/cli/issues/4495
docker build -f ./proto/Dockerfile.ignite -t ignite-openapi .
docker run --rm -v "$(PWD):/workspace" ignite-openapi
$(MAKE) process_openapi

.PHONY: process_openapi
process_openapi: ## Ensure OpenAPI JSON and YAML files are properly formatted
# The original command incorrectly outputs a JSON-formatted file with a .yml extension.
# This fixes the issue by properly converting the JSON to a valid YAML format.
mv docs/static/openapi.yml docs/static/openapi.json
yq -o=json '.' docs/static/openapi.json -I=4 > docs/static/openapi.json.tmp && mv docs/static/openapi.json.tmp docs/static/openapi.json
yq -P -o=yaml '.' docs/static/openapi.json > docs/static/openapi.yml

##################
### CI Helpers ###
Expand Down
54 changes: 9 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- markdownlint-disable MD033 -->
<!-- markdownlint-disable MD045 -->

<div align="center">
<a href="https://www.pokt.network">
<img src="https://user-images.githubusercontent.com/2219004/151564884-212c0e40-3bfa-412e-a341-edb54b5f1498.jpeg" alt="Pocket Network logo" width="340"/>
<img src="https://github.com/user-attachments/assets/5dbddd4a-d932-4c44-8396-270f140f086a" alt="Pocket Network logo" width="340"/>
</a>
</div>

Expand All @@ -22,52 +25,13 @@

# poktroll <!-- omit in toc -->

**poktroll** is built using the [Cosmos SDK](https://docs.cosmos.network) and
[CometBFT](https://cometbft.com/), created with [Ignite CLI](https://ignite.com/cli)
for the Shannon upgrade of the [Pocket Network](https://pokt.network) blockchain.

- [Learn about Pocket Network](#learn-about-pocket-network)
- [Developer Documentation](#developer-documentation)
- [Roadmap](#roadmap)
- [Quickstart](#quickstart)
- [Godoc](#godoc)
- [Have questions? Ask An PNYX](#have-questions-ask-an-pnyx)
- [License](#license)

## Learn about Pocket Network

User friendly documentation of the Shannon upgrade is still a WIP, but there are
a handful of (potentially outdated) resources you can reference in the meantime
to build a better understanding of Pocket Network:

- [Pocket Network official documentation](https://docs.pokt.network)
- [[Live] Pocket Network Morse; aka v0](https://github.com/pokt-network/pocket-core)
- [[Outdated] Pocket Network Protocol](https://github.com/pokt-network/pocket-network-protocol)
- [[Deprecated]Pocket Network V1](https://github.com/pokt-network/pocket)

## Developer Documentation

The developer documentation is available at [dev.poktroll.com](https://dev.poktroll.com).

## Roadmap

You can view the Shannon Roadmap on [Github](https://github.com/orgs/pokt-network/projects/144?query=is%3Aopen+sort%3Aupdated-desc)

## Quickstart

The best way to get involved is by following the [quickstart instructions](https://dev.poktroll.com/develop/developer_guide/quickstart).

## Godoc

The Godoc for the source code in this can be found at [pkg.go.dev/github.com/pokt-network/poktroll](https://pkg.go.dev/github.com/pokt-network/poktroll).

## Have questions? Ask An PNYX
**poktroll** is the source code for [Pocket Network's](https://pokt.network/)
[Shannon upgrade](https://docs.pokt.network/pokt-protocol/the-shannon-upgrade).

You can use [PNYX](https://migration.pnyxai.com/), an AI-powered search engine that has been
trained and indexed on the Pocket Network documentation, community calls, forums
and much more!
For technical documentation, visit [dev.poktroll.com](https://dev.poktroll.com).

---
Documentation is maintained in the [docusaurus repo](./docusaurus) and is
automatically deployed to the link above.

## License

Expand Down
7 changes: 6 additions & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ for x in range(localnet_config["path_gateways"]["count"]):
"--set=metrics.serviceMonitor.enabled=" + str(localnet_config["observability"]["enabled"]),
"--set=path.mountConfigMaps[0].name=path-config-" + str(actor_number),
"--set=path.mountConfigMaps[0].mountPath=/app/config/",
"--set=fullnameOverride=path" + str(actor_number),
"--set=nameOverride=path" + str(actor_number),
"--set=global.serviceAccount.name=path" + str(actor_number),
]

if localnet_config["path_local_repo"]["enabled"]:
Expand Down Expand Up @@ -360,7 +363,9 @@ for x in range(localnet_config["path_gateways"]["count"]):
# ],
# TODO_IMPROVE(@okdas): Add port forwards to grafana, pprof, like the other resources
port_forwards=[
str(2999 + actor_number) + ":3000"
# See PATH for the default port used by the gateway. As of PR #1026, it is :3069.
# https://github.com/buildwithgrove/path/blob/main/config/router.go
str(2999 + actor_number) + ":3069"
],
)

Expand Down
34 changes: 18 additions & 16 deletions api/poktroll/application/types.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d1c024e

Please sign in to comment.