Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
feat: Pulling changes from main branch and upgrading rollkit to latest (
Browse files Browse the repository at this point in the history
#1251)

[Rollkit:
v0.50.0-rc.1-rollkit-v0.11.0-rc2-no-fraud-proofs](https://github.com/rollkit/cosmos-sdk/releases/tag/v0.50.0-rc.1-rollkit-v0.11.0-rc2-no-fraud-proofs)

---------

Signed-off-by: monem <[email protected]>
Signed-off-by: Devon Bear <[email protected]>
Signed-off-by: Josh Stein <[email protected]>
Co-authored-by: Devon Bear <[email protected]>
Co-authored-by: Cal Bera <[email protected]>
Co-authored-by: ocnc <[email protected]>
Co-authored-by: monem <[email protected]>
Co-authored-by: mmsqe <[email protected]>
Co-authored-by: Taeguk Kwon <[email protected]>
Co-authored-by: steve806 <[email protected]>
Co-authored-by: corduroy <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ocnc <[email protected]>
Co-authored-by: BrickBera <[email protected]>
Co-authored-by: shuoer86 <[email protected]>
Co-authored-by: Josh Stein <[email protected]>
Co-authored-by: Diego <[email protected]>
Co-authored-by: Ganesha Upadhyaya <[email protected]>
Co-authored-by: joshcs.eth ᵍᵐ <[email protected]>
  • Loading branch information
17 people authored Oct 26, 2023
1 parent 602ecc9 commit 2289cee
Show file tree
Hide file tree
Showing 546 changed files with 18,798 additions and 44,386 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# fail-fast: false
# matrix:
# language: ["go"]
# versions: [1.21.0]
# versions: [1.21.3]
# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# # Use only 'java' to analyze code written in Java, Kotlin or both
# # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
Expand Down Expand Up @@ -79,9 +79,6 @@
# key: ${{ runner.os }}-golang-codeql-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-golang-codeql-
# - name: Install Go Tools
# run: |
# go run magefiles/setup/setup.go ci

# - name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@v2
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: daily

on:
schedule:
- cron: '0 0 * * *' # This schedule runs the workflow daily at midnight UTC

jobs:
docs:
strategy:
matrix:
go-version: [1.21.3]
python-version: [3.11.5]
runs-on: ubuntu-latest
steps:
- name: Checkout polaris
uses: actions/checkout@v3
with:
path: polaris
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Forge doc
run: |
cd polaris
forge doc
- name: Checkout docs-monorepo
uses: actions/checkout@v3
with:
repository: berachain/docs-monorepo
token: ${{ secrets.DOCS_TOKEN }}
path: docs-monorepo
ref: main
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Generate docs
run: |
cd docs-monorepo
pip install -r apps/digest/requirements.txt
python apps/digest/main.py polaris
git status
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update docs with Polaris changes
repository: docs-monorepo
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

79 changes: 30 additions & 49 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,33 @@ jobs:
build-base:
strategy:
matrix:
namespace: [cosmos]
docker-version: [base]
docker-type: [base] # Changed docker-version to docker-type for consistency with the Makefile
os: [polaris-linux-latest]
go-version: [1.21.0]
go-arch: [amd64]
go-version: [1.21.3]
arch: [amd64] # Changed go-arch to arch for consistency with the Makefile
image-name: ["polard/base:v0.0.0"]
export-name: [base-image]
runs-on: polaris-linux-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Run ${{ matrix.namespace }}:docker ${{ matrix.docker-version }} ${{ matrix.go-arch }}
uses: magefile/mage-action@v2
with:
version: latest
args: ${{ matrix.namespace }}:docker ${{ matrix.docker-version }} ${{ matrix.go-arch }}

- name: Build Docker Image using Makefile
run: make docker-build DOCKER_TYPE=${{ matrix.docker-type }} ARCH=${{ matrix.arch }} GO_VERSION=${{ matrix.go-version }}
env:
GOPATH: /home/runner/go

- name: Save base image
run: docker save ${{ matrix.image-name }} -o ${{ matrix.export-name }}.tar

- name: Upload image artifact
uses: actions/upload-artifact@v2
with:
Expand All @@ -67,38 +68,42 @@ jobs:
strategy:
matrix:
namespace: [cosmos]
docker-version: [localnet]
docker-type: [localnet] # Changed docker-version to docker-type for consistency with the Makefile
os: [polaris-linux-latest]
go-version: [1.21.0]
go-arch: [amd64]
go-version: [1.21.3]
arch: [amd64] # Changed go-arch to arch for consistency with the Makefile
base-image: [base-image]
image-name: ["polard/localnet:v0.0.0"]
export-name: [localnet]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Download image artifact
uses: actions/download-artifact@v2
with:
name: ${{ matrix.base-image }}

- name: Load image
run: docker load -i ${{ matrix.base-image }}.tar
- name: Run ${{ matrix.namespace }}:docker ${{ matrix.docker-version }} ${{ matrix.go-arch }}
uses: magefile/mage-action@v2
with:
version: latest
args: ${{ matrix.namespace }}:docker ${{ matrix.docker-version }} ${{ matrix.go-arch }}

- name: Build Docker Image using Makefile
run: make docker-build DOCKER_TYPE=${{ matrix.docker-type }} ARCH=${{ matrix.arch }} GO_VERSION=${{ matrix.go-version }}
env:
GOPATH: /home/runner/go

- name: Save base image
run: docker save ${{ matrix.image-name }} -o ${{ matrix.export-name }}.tar

- name: Upload image artifact
uses: actions/upload-artifact@v2
with:
Expand All @@ -109,10 +114,8 @@ jobs:
needs: build-base
strategy:
matrix:
simulator: [polaris/rpc, polaris/graphql]
namespace: [cosmos]
os: [polaris-linux-latest]
go-version: [1.21.0]
go-version: [1.21.3]
base-image: [base-image]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -122,8 +125,6 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Download image artifact
uses: actions/download-artifact@v2
with:
Expand All @@ -139,21 +140,18 @@ jobs:
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Run ${{ matrix.namespace }}:testhive ${{ matrix.simulator }}
uses: magefile/mage-action@v2
with:
version: latest
args: ${{ matrix.namespace }}:testhive ${{ matrix.simulator }}
- name: Run `make test-hive`
run: make hive-setup test-hive
env:
GOPATH: /home/runner/go

ci:
needs: build-localnet
strategy:
matrix:
namespace: ["", "localnet"]
namespace: ["e2e", "localnet"]
os: [polaris-linux-latest]
go-version: [1.21.0]
go-version: [1.21.3]
base-image: [localnet]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -163,8 +161,6 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Download image artifact
uses: actions/download-artifact@v2
with:
Expand All @@ -180,22 +176,7 @@ jobs:
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Install Go Tools
run: |
go run magefiles/setup/setup.go ci
- name: Run ${{ matrix.namespace }}:test
uses: magefile/mage-action@v2
with:
version: latest
args: ${{ matrix.namespace }}:test
env:
GOPATH: /home/runner/go
if: ${{ matrix.namespace == 'localnet' }}
- name: Run teste2e
uses: magefile/mage-action@v2
with:
version: latest
args: teste2e
- name: Run ${{ matrix.namespace }}
run: make test-${{ matrix.namespace }}
env:
GOPATH: /home/runner/go
if: ${{ matrix.namespace == '' }}
15 changes: 5 additions & 10 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
ci:
strategy:
matrix:
args: ["build", "lint", "testunitrace", "testunitcover"]
args: ["build", "lint", "test-unit-race", "test-unit-cover"]
os: [polaris-linux-latest]
go-version: [1.21.0]
go-version: [1.21.3]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
Expand All @@ -52,14 +52,9 @@ jobs:
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Install Go Tools
run: |
go run magefiles/setup/setup.go ci
- name: Run ${{ matrix.args }}
uses: magefile/mage-action@v2
with:
version: latest
args: ${{ matrix.args }}
run: |
make ${{ matrix.args }}
env:
GOPATH: /home/runner/go
- name: Archive code coverage results
Expand All @@ -68,7 +63,7 @@ jobs:
name: code-coverage-report
path: coverage-${{ matrix.args }}.txt
retention-days: 1
if: ${{ matrix.args == 'testunitcover' }}
if: ${{ matrix.args == 'test-unit-cover' }}

codecov:
name: codecov(uploader, polaris-linux-latest)
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,4 @@ artifacts
**/cache/

# integration testing coverage
coverage-testunitcover.txt
coverage-teste2ecover.txt
coverage-test-unit-cover.txt
15 changes: 9 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,14 @@ linters-settings:
# Default: false
strict: true

# max line length, lines longer will be reported. Default is 120.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
line-length: 99
# tab width in spaces. Default to 1.
tab-width: 1
lll:
# Max line length, lines longer will be reported.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option.
# Default: 120.
line-length: 99
# Tab width in spaces.
# Default: 1
tab-width: 1

nakedret:
# Make an issue if func has more lines of code than this setting, and it has naked returns.
Expand Down Expand Up @@ -320,7 +323,7 @@ issues:
max-same-issues: 50

exclude-rules:
- path: "magefiles/.*\\.go"
- path: "tools/.*\\.go"
linters: [forbidigo]
- path: "mock/.*\\.go"
linters: [funlen]
Expand Down
21 changes: 21 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
dir: "{{.InterfaceDir}}/mocks"
mockname: "{{.InterfaceNameCamel}}"
filename: "{{.InterfaceNameSnake}}.go"
outpkg: "mocks"
packages:
pkg.berachain.dev/polaris/cosmos/config:
config:
recursive: True
with-expecter: true
all: True
pkg.berachain.dev/polaris/cosmos/txpool:
config:
recursive: True
with-expecter: true
all: True
pkg.berachain.dev/polaris/eth/core/state:
config:
recursive: True
with-expecter: true
all: True

Loading

0 comments on commit 2289cee

Please sign in to comment.