Skip to content

Commit 0e508e4

Browse files
Merge pull request #1715 from 0xPolygon/v2.2.10-candidate
v2.2.10
2 parents 3c7256e + 9bf2719 commit 0e508e4

File tree

105 files changed

+1250
-2468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1250
-2468
lines changed

.github/matic-cli-config.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/amoy_deb_profiles.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,4 @@ jobs:
390390
packaging/deb/bor-pbss-amoy-**.deb
391391
packaging/deb/bor-amoy-**.deb.checksum
392392
packaging/deb/bor-pbss-amoy-**.deb.checksum
393+
builder/files/genesis-amoy.json

.github/workflows/ci.yml

Lines changed: 1 addition & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
56
- 'master'
6-
- 'qa'
77
- 'develop'
88
pull_request:
99
branches:
@@ -180,119 +180,3 @@ jobs:
180180
uses: actions/download-artifact@v4.1.8
181181
- name: Upload coverage to Codecov
182182
uses: codecov/codecov-action@v3
183-
184-
e2e-tests:
185-
if: (github.event.action != 'closed' || github.event.pull_request.merged == true)
186-
strategy:
187-
matrix:
188-
os: [ubuntu-22.04] # List of OS: https://github.com/actions/virtual-environments
189-
runs-on: ${{ matrix.os }}
190-
steps:
191-
- uses: actions/checkout@v4
192-
with:
193-
path: bor
194-
- name: Checkout submodules
195-
run: |
196-
cd bor
197-
git submodule update --init --recursive --force
198-
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
199-
200-
- uses: actions/setup-go@v5
201-
with:
202-
go-version: 1.24.3
203-
204-
- name: Checkout matic-cli
205-
uses: actions/checkout@v4
206-
with:
207-
repository: maticnetwork/matic-cli
208-
ref: heimdall-v2
209-
path: matic-cli
210-
211-
- name: Install dependencies on Linux
212-
if: runner.os == 'Linux'
213-
run: |
214-
sudo apt update
215-
sudo apt install build-essential
216-
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
217-
sudo apt install jq curl
218-
219-
- uses: actions/setup-node@v3
220-
with:
221-
node-version: '18.19.0'
222-
cache: 'npm'
223-
cache-dependency-path: |
224-
matic-cli/package-lock.json
225-
matic-cli/devnet/code/contracts/package-lock.json
226-
matic-cli/devnet/code/genesis-contracts/package-lock.json
227-
matic-cli/devnet/code/genesis-contracts/matic-contracts/package-lock.json
228-
229-
- name: Install solc-select
230-
run: |
231-
sudo apt update
232-
sudo apt install python3 python3-pip -y
233-
sudo ln -sf /usr/bin/python3 /usr/bin/python
234-
pip install solc-select
235-
236-
- name: Install Solidity Version
237-
run: |
238-
solc-select install 0.5.17
239-
solc-select install 0.6.12
240-
solc-select use 0.5.17
241-
solc --version
242-
243-
- name: Install Foundry
244-
uses: foundry-rs/foundry-toolchain@v1
245-
246-
- name: Bootstrap devnet
247-
run: |
248-
cd matic-cli
249-
npm install --prefer-offline --no-audit --progress=false
250-
mkdir devnet
251-
cd devnet
252-
../bin/matic-cli.js setup devnet -c ../../bor/.github/matic-cli-config.yml
253-
254-
- name: Launch devnet
255-
run: |
256-
cd matic-cli/devnet
257-
bash ../util-scripts/docker/devnet_setup.sh
258-
cd -
259-
timeout 2m bash bor/integration-tests/bor_health.sh
260-
261-
- name: Run smoke tests
262-
run: |
263-
timeout 20m bash bor/integration-tests/smoke_test.sh
264-
265-
- name: Run RPC Tests
266-
run: |
267-
echo "Starting RPC Tests..."
268-
timeout 5m bash bor/integration-tests/rpc_test.sh
269-
270-
- name: Resolve absolute path for logs
271-
id: pathfix
272-
run: |
273-
echo "ABS_LOG_PATH=$(realpath matic-cli/devnet/logs)" >> $GITHUB_ENV
274-
275-
- name: Upload logs
276-
if: always()
277-
uses: PaloAltoNetworks/upload-secure-artifact@main
278-
with:
279-
name: logs_${{ github.run_id }}
280-
path: ${{ env.ABS_LOG_PATH }}
281-
282-
- name: Package code and chain data
283-
if: always()
284-
run: |
285-
cd matic-cli/devnet
286-
docker compose down --remove-orphans
287-
cd -
288-
mkdir -p ${{ github.run_id }}/matic-cli
289-
sudo mv bor ${{ github.run_id }}
290-
sudo mv matic-cli/devnet ${{ github.run_id }}/matic-cli
291-
sudo tar --warning=no-file-changed --exclude='.git' -czf code.tar.gz ${{ github.run_id }}
292-
293-
- name: Upload code and chain data
294-
if: always()
295-
uses: PaloAltoNetworks/upload-secure-artifact@main
296-
with:
297-
name: code_${{ github.run_id }}
298-
path: code.tar.gz

.github/workflows/kurtosis-e2e.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Kurtosis E2E Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'develop'
8+
pull_request:
9+
branches:
10+
- 'master'
11+
- 'develop'
12+
types: [opened, synchronize]
13+
14+
concurrency:
15+
group: kurtosis-e2e-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
env:
19+
ENCLAVE_NAME: kurtosis-e2e
20+
21+
jobs:
22+
e2e-tests:
23+
name: E2E Tests
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 30
26+
27+
steps:
28+
- name: Install dependencies on Linux
29+
if: runner.os == 'Linux'
30+
run: sudo apt update && sudo apt install build-essential
31+
32+
- name: Checkout bor
33+
uses: actions/checkout@v5
34+
with:
35+
path: bor
36+
37+
- name: Checkout heimdall-v2
38+
uses: actions/checkout@v5
39+
with:
40+
repository: 0xPolygon/heimdall-v2
41+
ref: develop
42+
path: heimdall-v2
43+
44+
- name: Checkout pos-workflows
45+
uses: actions/checkout@v5
46+
with:
47+
repository: 0xPolygon/pos-workflows
48+
ref: main
49+
path: pos-workflows
50+
51+
- name: Checkout kurtosis-pos
52+
uses: actions/checkout@v5
53+
with:
54+
repository: 0xPolygon/kurtosis-pos
55+
ref: v1.1.4
56+
path: kurtosis-pos
57+
58+
- name: Pre kurtosis run
59+
uses: ./pos-workflows/.github/actions/kurtosis-pre-run
60+
with:
61+
docker_username: ${{ secrets.DOCKERHUB }}
62+
docker_token: ${{ secrets.DOCKERHUB_KEY }}
63+
64+
- name: Build bor docker image
65+
run: |
66+
cd bor
67+
docker build -t bor:local --file Dockerfile .
68+
69+
- name: Build heimdall-v2 docker image
70+
run: |
71+
cd heimdall-v2
72+
docker build -t heimdall-v2:local --file Dockerfile .
73+
74+
- name: Copy kurtosis config
75+
run: cp ./pos-workflows/.github/configs/kurtosis-e2e.yml ./kurtosis-pos/kurtosis-e2e.yml
76+
77+
- name: Kurtosis run
78+
run: |
79+
cd kurtosis-pos
80+
kurtosis run --args-file=kurtosis-e2e.yml --enclave=${{ env.ENCLAVE_NAME }} .
81+
82+
- name: Inspect enclave
83+
run: kurtosis enclave inspect ${{ env.ENCLAVE_NAME }}
84+
85+
- name: Test state syncs
86+
run: kurtosis service exec ${{ env.ENCLAVE_NAME }} test-runner "bats --filter-tags pos,bridge,l1,l2 --recursive tests/"
87+
88+
- name: Run smoke tests (Checkpoints and Milestones)
89+
run: bash ./pos-workflows/tests/kurtosis_smoke_test.sh
90+
91+
- name: Post kurtosis run
92+
if: always()
93+
uses: ./pos-workflows/.github/actions/kurtosis-post-run
94+
with:
95+
enclave_name: ${{ env.ENCLAVE_NAME }}

.github/workflows/mainnet_deb_profiles.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,4 @@ jobs:
400400
packaging/deb/bor-pbss-mainnet-**.deb
401401
packaging/deb/bor-mainnet-**.deb.checksum
402402
packaging/deb/bor-pbss-mainnet-**.deb.checksum
403+
builder/files/genesis-mainnet-v1.json

Dockerfile

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
1-
FROM golang:latest
1+
# ─── BUILDER STAGE ───────────────────────────────────────────────────────────────
2+
FROM golang:1.24-alpine AS builder
23

3-
ARG BOR_DIR=/var/lib/bor
4+
ARG BOR_DIR=/var/lib/bor/
45
ENV BOR_DIR=$BOR_DIR
56

6-
RUN apt-get update -y && apt-get upgrade -y \
7-
&& apt install build-essential git -y \
8-
&& mkdir -p ${BOR_DIR}
7+
RUN apk add --no-cache build-base git linux-headers
98

109
WORKDIR ${BOR_DIR}
1110

12-
# Copy go.mod and go.sum first to leverage Docker's cache
1311
COPY go.mod go.sum ./
1412

15-
# Download dependencies separately (this layer can be cached)
16-
RUN --mount=type=ssh go mod download
13+
RUN --mount=type=ssh \
14+
--mount=type=cache,target=/go/pkg/mod \
15+
go mod download
1716

18-
# Copy the rest of the application code
1917
COPY . .
2018

21-
# Build the application
22-
RUN --mount=type=ssh make bor
19+
RUN --mount=type=ssh \
20+
--mount=type=cache,target=/go/pkg/mod \
21+
--mount=type=cache,target=/root/.cache/go-build \
22+
make bor
2323

24-
RUN cp build/bin/bor /usr/bin/
24+
# ─── RUNTIME STAGE ────────────────────────────────────────────────────────────────
25+
FROM alpine:latest
26+
27+
ARG BOR_DIR=/var/lib/bor/
28+
ENV BOR_DIR=$BOR_DIR
29+
30+
RUN apk add --no-cache bash ca-certificates && \
31+
mkdir -p ${BOR_DIR}
32+
33+
WORKDIR ${BOR_DIR}
34+
35+
COPY --from=builder ${BOR_DIR}/build/bin/bor /usr/bin/
2536

26-
ENV SHELL /bin/bash
2737
EXPOSE 8545 8546 8547 30303 30303/udp
2838

29-
ENTRYPOINT ["bor"]
39+
ENTRYPOINT ["bor"]

Dockerfile.release

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
FROM alpine:3.14
1+
FROM alpine:latest
22

3-
ARG BOR_DIR=/var/lib/bor
3+
ARG BOR_DIR=/var/lib/bor/
44
ENV BOR_DIR=$BOR_DIR
55

6-
RUN apk add --no-cache ca-certificates && \
7-
mkdir -p ${BOR_DIR}
6+
RUN apk add --no-cache ca-certificates && mkdir -p ${BOR_DIR}
87

98
WORKDIR ${BOR_DIR}
109
COPY bor /usr/bin/
10+
COPY builder/files/genesis-amoy.json ${BOR_DIR}
1111
COPY builder/files/genesis-mainnet-v1.json ${BOR_DIR}
1212
COPY builder/files/genesis-testnet-v4.json ${BOR_DIR}
13-
COPY builder/files/genesis-amoy.json ${BOR_DIR}
1413

1514
EXPOSE 8545 8546 8547 30303 30303/udp
15+
1616
ENTRYPOINT ["bor"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ geth-windows-amd64:
214214
@echo "Windows amd64 cross compilation done:"
215215
@ls -ld $(GOBIN)/geth-windows-* | grep amd64
216216

217-
PACKAGE_NAME := github.com/maticnetwork/bor
217+
PACKAGE_NAME := github.com/0xPolygon/bor
218218
GOLANG_CROSS_VERSION ?= v1.22.1
219219

220220
.PHONY: release-dry-run

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Bor Overview
22
Bor is the official Golang implementation of the Polygon PoS blockchain. It is a fork of [geth](https://github.com/ethereum/go-ethereum) and is EVM compatible (upto London fork).
33

4-
[![API Reference](https://pkg.go.dev/badge/github.com/maticnetwork/bor)](https://pkg.go.dev/github.com/maticnetwork/bor)
5-
[![Go Report Card](https://goreportcard.com/badge/github.com/maticnetwork/bor)](https://goreportcard.com/report/github.com/maticnetwork/bor)
6-
![MIT License](https://img.shields.io/github/license/maticnetwork/bor)
4+
[![API Reference](https://pkg.go.dev/badge/github.com/0xPolygon/bor)](https://pkg.go.dev/github.com/0xPolygon/bor)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/0xPolygon/bor)](https://goreportcard.com/report/github.com/0xPolygon/bor)
6+
![MIT License](https://img.shields.io/github/license/0xPolygon/bor)
77
[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.com/invite/0xpolygonrnd)
88
[![Twitter Follow](https://img.shields.io/twitter/follow/0xPolygon.svg?style=social)](https://twitter.com/0xPolygon)
99

1010
### Installing bor using packaging
1111

12-
The easiest way to get started with bor is to install the packages using the command below. Please take a look at the [releases](https://github.com/maticnetwork/bor/releases) section to find the latest stable version of bor.
12+
The easiest way to get started with bor is to install the packages using the command below. Please take a look at the [releases](https://github.com/0xPolygon/bor/releases) section to find the latest stable version of bor.
1313

14-
curl -L https://raw.githubusercontent.com/maticnetwork/install/main/bor.sh | bash -s -- v2.0.0 <network> <node_type>
14+
curl -L https://raw.githubusercontent.com/0xPolygon/install/main/bor.sh | bash -s -- v2.0.0 <network> <node_type>
1515

1616
The network accepts `mainnet`, or `amoy` and the node type accepts `validator` or `sentry` or `archive`. The installation script does the following things:
1717
- Create a new user named `bor`.

RETESTBOR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Modify the RUN git clone line in the Dockerfile for repo “retesteth” to chan
3939
Modify the Dockerfile so that the eth client points to bor
4040
e.g. : `https://github.com/ethereum/retesteth/blob/master/Dockerfile#L41`
4141
from `RUN git clone --depth 1 -b master https://github.com/ethereum/go-ethereum.git /geth`
42-
to: `RUN git clone --depth 1 -b master https://github.com/maticnetwork/bor.git /geth`
42+
to: `RUN git clone --depth 1 -b master https://github.com/0xPolygon/bor.git /geth`
4343

4444
- build docker image
4545
`sudo ./dretesteth.sh build`

0 commit comments

Comments
 (0)