Skip to content

Commit

Permalink
Merge branch 'issues/141/refactor/claim-proof' into issues/141/refact…
Browse files Browse the repository at this point in the history
…or/supplier-keys

* issues/141/refactor/claim-proof:
  chore: review feedback improvements
  chore: review feedback improvements
  Fix bug introduced by #252 where genesis file was no longer being copied to the right location
  [Docs] Introduce Docusaurus documentation (#252)
  [Cleanup] Centralzie websocket url -> endpoint changes (#272)
  refactor: `NewMinedRelay` to shared testutil (#262)
  fix: PR template typo 2 (#269)
  [Testing] Unit tests, E2E tests, logging and other Fixes / "Touchups" (#253)
  [SDK] feat: Have distinct JSON-RPC and gRPC urls (#261)
  • Loading branch information
bryanchriswhite committed Dec 22, 2023
2 parents f509fbf + 7994ca2 commit 6a5b3e6
Show file tree
Hide file tree
Showing 89 changed files with 17,746 additions and 311 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Select one or more:

- [ ] **Run all unit tests**: `make go_develop_and_test`
- [ ] **Run E2E tests locally**: `make test_e2e`
- [ ] **Run E2E tests on DevNet**: Add the `devnet-test-e2e` label to the PR. This is VERY expensive, o only do it after all the reviews are complete.
- [ ] **Run E2E tests on DevNet**: Add the `devnet-test-e2e` label to the PR. This is VERY expensive, only do it after all the reviews are complete.

## Sanity Checklist

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows-helpers/run-e2e-test-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ spec:
name: celestia-secret
- name: POCKET_NODE
value: tcp://${NAMESPACE}-sequencer:36657
- name: SEQUENCER_RPC_ENDPOINT
value: ${NAMESPACE}-sequencer:36657
- name: E2E_DEBUG_OUTPUT
value: "false" # Flip to true to see the command and result of the execution
- name: POKTROLLD_HOME
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/upload-pages-artifact.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Based off of https://github.com/LayZeeDK/github-pages-docusaurus
name: Deploy docusaurus docs to GitHub pages

on:
push:
branches: ["main"]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
deploy:
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

# 👇 Build steps
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: docusaurus/package-lock.json

- name: Install dependencies
run: |
cd docusaurus
npm ci
- name: Build
run: |
cd docusaurus
npm run build
# 👆 Build steps

- name: Setup Pages
uses: actions/configure-pages@v4
with:
enablement: true

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# 👇 Specify build output path relative to the subdirectory
path: docusaurus/build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ go.work.sum

# TODO_TECHDEBT: It seems that .dot files come and go so we need to figure out the root cause: https://github.com/pokt-network/poktroll/pull/177/files#r1392521547
# **/*.dot

# Quickstart helpers
shannon_appgate_config.yaml
shannon_app_config.yaml
1 change: 0 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ RUN ignite chain init --skip-proto
EXPOSE 8545
EXPOSE 8546
EXPOSE 8547
EXPOSE 8548

ENTRYPOINT ["ignite"]
42 changes: 32 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,26 @@ check_godoc:
fi; \
}

.PHONY: check_npm
# Internal helper target - check if npm is installed
check_npm:
{ \
if ( ! ( command -v npm >/dev/null )); then \
echo "Seems like you don't have npm installed. Make sure you install it before continuing"; \
exit 1; \
fi; \
}

.PHONY: check_node
# Internal helper target - check if node is installed
check_node:
{ \
if ( ! ( command -v node >/dev/null )); then \
echo "Seems like you don't have node installed. Make sure you install it before continuing"; \
exit 1; \
fi; \
}


.PHONY: warn_destructive
warn_destructive: ## Print WARNING to the user
Expand Down Expand Up @@ -119,6 +139,11 @@ localnet_regenesis: ## Regenerate the localnet genesis file
cp ${HOME}/.poktroll/config/*_key.json $(POKTROLLD_HOME)/config/
cp ${HOME}/.poktroll/config/genesis.json $(POKTROLLD_HOME)/config/

# TODO_BLOCKER(@okdas): Figure out how to copy these over w/ a functional state.
# cp ${HOME}/.poktroll/config/app.toml $(POKTROLLD_HOME)/config/app.toml
# cp ${HOME}/.poktroll/config/config.toml $(POKTROLLD_HOME)/config/config.toml
# cp ${HOME}/.poktroll/config/client.toml $(POKTROLLD_HOME)/config/client.toml

###############
### Linting ###
###############
Expand Down Expand Up @@ -226,25 +251,18 @@ go_develop_and_test: go_develop go_test ## Generate protos, mocks and run all te
# TODO_NB - An important note to reference later
# TODO_DISCUSS_IN_THIS_COMMIT - SHOULD NEVER BE COMMITTED TO MASTER. It is a way for the reviewer of a PR to start / reply to a discussion.
# TODO_IN_THIS_COMMIT - SHOULD NEVER BE COMMITTED TO MASTER. It is a way to start the review process while non-critical changes are still in progress
TODO_KEYWORDS = -e "TODO" -e "TODO_COMMUNITY" -e "TODO_DECIDE" -e "TODO_TECHDEBT" -e "TODO_IMPROVE" -e "TODO_OPTIMIZE" -e "TODO_DISCUSS" -e "TODO_INCOMPLETE" -e "TODO_INVESTIGATE" -e "TODO_CLEANUP" -e "TODO_HACK" -e "TODO_REFACTOR" -e "TODO_CONSIDERATION" -e "TODO_IN_THIS_COMMIT" -e "TODO_DISCUSS_IN_THIS_COMMIT" -e "TODO_CONSOLIDATE" -e "TODO_DEPRECATE" -e "TODO_ADDTEST" -e "TODO_RESEARCH" -e "TODO_BUG" -e "TODO_NB"

.PHONY: todo_list
todo_list: ## List all the TODOs in the project (excludes vendor and prototype directories)
grep --exclude-dir={.git,vendor,prototype} -r ${TODO_KEYWORDS} .

TODO_SEARCH ?= $(shell pwd)

.PHONY: todo_search
todo_search: ## List all the TODOs in a specific directory specific by `TODO_SEARCH`
grep --exclude-dir={.git,vendor,prototype} -r ${TODO_KEYWORDS} ${TODO_SEARCH}
grep --exclude-dir={.git,vendor,./docusaurus} -r TODO .

.PHONY: todo_count
todo_count: ## Print a count of all the TODOs in the project
grep --exclude-dir={.git,vendor,prototype} -r ${TODO_KEYWORDS} . | wc -l
grep --exclude-dir={.git,vendor,./docusaurus} -r TODO . | wc -l

.PHONY: todo_this_commit
todo_this_commit: ## List all the TODOs needed to be done in this commit
grep --exclude-dir={.git,vendor,prototype,.vscode} --exclude=Makefile -r -e "TODO_IN_THIS_COMMIT" -e "TODO_DISCUSS_IN_THIS_COMMIT"
grep --exclude-dir={.git,vendor,.vscode} --exclude=Makefile -r -e "TODO_IN_THIS_"

####################
### Gateways ###
Expand Down Expand Up @@ -527,6 +545,10 @@ go_docs: check_godoc ## Generate documentation for the project
openapi_gen: ## Generate the OpenAPI spec for the Ignite API
ignite generate openapi --yes

.PHONY: docusaurus_start
docusaurus_start: check_npm check_node ## Start the Docusaurus server
(cd docusaurus && npm i && npm run start)

######################
### Ignite Helpers ###
######################
Expand Down
52 changes: 0 additions & 52 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
5 changes: 3 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if localnet_config["helm_chart_local_repo"]["enabled"]:
print("Using local helm chart repo " + helm_chart_local_repo)
chart_prefix = helm_chart_local_repo + "/charts/"


# Import files into Kubernetes ConfigMap
def read_files_from_directory(directory):
files = listdir(directory)
Expand Down Expand Up @@ -152,13 +153,13 @@ k8s_resource(
"sequencer",
labels=["blockchains"],
resource_deps=["celestia-rollkit"],
port_forwards=["36657", "40004"],
port_forwards=["36657", "36658", "40004"],
)
k8s_resource(
"relayminers",
labels=["blockchains"],
resource_deps=["sequencer"],
port_forwards=["8548", "40005"],
port_forwards=["8545", "40005"],
)
k8s_resource(
"appgateservers",
Expand Down
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ import (
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
solomachine "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine"
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
"github.com/spf13/cast"

appparams "github.com/pokt-network/poktroll/app/params"
"github.com/pokt-network/poktroll/docs"
applicationmodule "github.com/pokt-network/poktroll/x/application"
Expand All @@ -133,7 +135,6 @@ import (
tokenomicsmodule "github.com/pokt-network/poktroll/x/tokenomics"
tokenomicsmodulekeeper "github.com/pokt-network/poktroll/x/tokenomics/keeper"
tokenomicsmoduletypes "github.com/pokt-network/poktroll/x/tokenomics/types"
"github.com/spf13/cast"
)

const (
Expand Down
1 change: 1 addition & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ validators:
bonded: 900000000upokt
config:
moniker: "sequencer1"

# We can persist arbitrary genesis values via 1 to 1 mapping to genesis.json
genesis:
app_state:
Expand Down
20 changes: 20 additions & 0 deletions docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
51 changes: 51 additions & 0 deletions docusaurus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
sidebar_position: 4
title: Website
---

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

- [Installation](#installation)
- [Local Development](#local-development)
- [Build](#build)
- [Deployment](#deployment)

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

## Installation

```bash
yarn
```

## Local Development

```bash
yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

## Build

```bash
yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

## Deployment

Using SSH:

```bash
USE_SSH=true yarn deploy
```

Not using SSH:

```bash
GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docusaurus/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
Loading

0 comments on commit 6a5b3e6

Please sign in to comment.