Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding refactored packager, adding pbss configs, removal of mumbai ( … #1311

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
387 changes: 387 additions & 0 deletions .github/workflows/amoy_deb_profiles.yml

Large diffs are not rendered by default.

405 changes: 405 additions & 0 deletions .github/workflows/mainnet_deb_profiles.yml

Large diffs are not rendered by default.

1,372 changes: 0 additions & 1,372 deletions .github/workflows/packager.yml

This file was deleted.

126 changes: 126 additions & 0 deletions .github/workflows/packager_deb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: packager_deb

on:
push:
branches:
- 'main'
paths:
- '**'
tags:
- 'v*.*.*'
- 'v*.*.*-*'

jobs:
build:
permissions:
id-token: write
contents: write
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.1
# Variables
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
- name: adding version
run: |
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV

- name: Cleaning repo
run: make clean
- name: Building for amd64
run: make bor

- name: Making directory structure
run: mkdir -p packaging/deb/bor/usr/bin
- name: Copying necessary files
run: cp -rp build/bin/bor packaging/deb/bor/usr/bin/
- name: Delete control file
run: rm -rf packaging/deb/bor/DEBIAN/control

# Control file creation
- name: create control file
run: |
touch packaging/deb/bor/DEBIAN/control
echo "Package: bor" >> packaging/deb/bor/DEBIAN/control
echo "Version: ${{ env.VERSION }}" >> packaging/deb/bor/DEBIAN/control
echo "Section: base" >> packaging/deb/bor/DEBIAN/control
echo "Priority: optional" >> packaging/deb/bor/DEBIAN/control
echo "Architecture: amd64" >> packaging/deb/bor/DEBIAN/control
echo "Maintainer: devops@polygon.technology" >> packaging/deb/bor/DEBIAN/control
echo "Description: bor binary package" >> packaging/deb/bor/DEBIAN/control

- name: Creating package for binary for bor ${{ env.ARCH }}
run: cp -rp packaging/deb/bor packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: amd64

- name: Running package build
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: amd64

- name: Cleaning build directory for arm64 build
run: make clean

- name: Updating the apt-get
run: sudo apt-get update -y

- name: Adding requirements for cross compile
run: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu

- name: delete amd64 control file
run: rm -rf packaging/deb/bor/DEBIAN/control

- name: Building bor for arm64
run: GOARCH=arm64 GOOS=linux CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ CGO_ENABLED=1 go build -o build/bin/bor ./cmd/cli/main.go

# Control file for arm64 creation
- name: create control file
run: |
touch packaging/deb/bor/DEBIAN/control
echo "Package: bor" >> packaging/deb/bor/DEBIAN/control
echo "Version: ${{ env.VERSION }}" >> packaging/deb/bor/DEBIAN/control
echo "Section: base" >> packaging/deb/bor/DEBIAN/control
echo "Priority: optional" >> packaging/deb/bor/DEBIAN/control
echo "Architecture: arm64" >> packaging/deb/bor/DEBIAN/control
echo "Maintainer: devops@polygon.technology" >> packaging/deb/bor/DEBIAN/control
echo "Description: bor binary package" >> packaging/deb/bor/DEBIAN/control


- name: Creating package for binary for bor ${{ env.ARCH }}
run: cp -rp packaging/deb/bor packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: arm64

- name: Running package build
run: dpkg-deb --build --root-owner-group packaging/deb/bor-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: arm64

# Shasum
- name: shasum the bor debian package
run: cd packaging/deb/ && sha256sum bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum
env:
ARCH: amd64

- name: shasum the bor debian package
run: cd packaging/deb/ && sha256sum bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > bor-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum
env:
ARCH: arm64

- name: Release bor Packages
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.GIT_TAG }}
prerelease: true
files: |
packaging/deb/bor**.deb
packaging/deb/bor**.deb.checksum
4 changes: 2 additions & 2 deletions packaging/templates/mainnet-v1/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gcmode = "archive"
# enable-block-tracking = false

[p2p]
maxpeers = 50
maxpeers = 200
port = 30303
# maxpendpeers = 50
# bind = "0.0.0.0"
Expand Down Expand Up @@ -145,7 +145,7 @@ gcmode = "archive"
gc = 0
snapshot = 20
# database = 50
trie = 30
# trie = 30
# noprefetch = false
# preimages = false
# txlookuplimit = 2350000
Expand Down
4 changes: 2 additions & 2 deletions packaging/templates/mainnet-v1/sentry/sentry/bor/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ chain = "mainnet"
# vmdebug = false
datadir = "/var/lib/bor/data"
# ancient = ""
# "db.engine" = "leveldb"
# db.engine = "leveldb"
djpolygon marked this conversation as resolved.
Show resolved Hide resolved
# keystore = ""
# "rpc.batchlimit" = 100
# "rpc.returndatalimit" = 100000
Expand All @@ -24,7 +24,7 @@ syncmode = "full"
# enable-block-tracking = false

[p2p]
maxpeers = 50
maxpeers = 200
port = 30303
# maxpendpeers = 50
# bind = "0.0.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
chain = "mumbai"
chain = "mainnet"
# identity = "node_name"
# verbosity = 3
# vmdebug = false
datadir = "/var/lib/bor/data"
# ancient = ""
# "db.engine" = "leveldb"
"db.engine" = "pebble"
"state.scheme" = "path"
# keystore = ""
# "rpc.batchlimit" = 100
# "rpc.returndatalimit" = 100000
syncmode = "full"
gcmode = "archive"
# pbss does not support archive
# gcmode = "full"
# snapshot = true
djpolygon marked this conversation as resolved.
Show resolved Hide resolved
# ethstats = ""
# devfakeauthor = false
Expand All @@ -24,7 +26,7 @@ gcmode = "archive"
# enable-block-tracking = false

[p2p]
maxpeers = 50
maxpeers = 200
djpolygon marked this conversation as resolved.
Show resolved Hide resolved
port = 30303
# maxpendpeers = 50
# bind = "0.0.0.0"
Expand All @@ -41,7 +43,7 @@ gcmode = "archive"
# bootnodesv4 = []
# bootnodesv5 = []
# static-nodes = []
# trusted-nodes = []
# trusted-nodes = ["<validator-ip>:<validator-p2p-port>"] # Recommended setting with sentry <> validator architecture
# dns = []

# [heimdall]
Expand All @@ -51,20 +53,20 @@ gcmode = "archive"

[txpool]
nolocals = true
pricelimit = 25000000000
accountslots = 16
globalslots = 131072
accountqueue = 64
globalqueue = 131072
globalslots = 32768
accountqueue = 16
globalqueue = 32768
lifetime = "1h30m0s"
djpolygon marked this conversation as resolved.
Show resolved Hide resolved
# locals = []
# journal = ""
# rejournal = "1h0m0s"
# pricelimit = 25000000000
# pricebump = 10

[miner]
gaslimit = 30000000
# gasprice = "25000000000"
gasprice = "25000000000"
# mine = false
# etherbase = ""
# extradata = ""
Expand All @@ -82,20 +84,20 @@ gcmode = "archive"
[jsonrpc.http]
enabled = true
port = 8545
host = "0.0.0.0"
host = "127.0.0.1"
api = ["eth", "net", "web3", "txpool", "bor"]
vhosts = ["*"]
corsdomain = ["*"]
# prefix = ""
# ep-size = 40
# ep-requesttimeout = "0s"
[jsonrpc.ws]
enabled = true
port = 8546
# [jsonrpc.ws]
# enabled = false
# port = 8546
# prefix = ""
# host = "localhost"
# api = ["web3", "net"]
origins = ["*"]
# origins = ["*"]
# ep-size = 40
# ep-requesttimeout = "0s"
# [jsonrpc.graphql]
Expand All @@ -115,13 +117,13 @@ gcmode = "archive"
# write = "30s"
# idle = "2m0s"

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxheaderhistory = 1024
# maxblockhistory = 1024
# maxprice = "5000000000000"
# ignoreprice = "25000000000"
ignoreprice = "25000000000"

[telemetry]
metrics = true
Expand All @@ -141,11 +143,11 @@ gcmode = "archive"
# [telemetry.influx.tags]

[cache]
# cache = 1024
gc = 0
snapshot = 20
cache = 4096
# gc = 25
# snapshot = 10
# database = 50
trie = 30
# trie = 15
# noprefetch = false
djpolygon marked this conversation as resolved.
Show resolved Hide resolved
# preimages = false
# txlookuplimit = 2350000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ chain = "mainnet"
# vmdebug = false
datadir = "/var/lib/bor/data"
# ancient = ""
# "db.engine" = "leveldb"
# db.engine = "leveldb"
djpolygon marked this conversation as resolved.
Show resolved Hide resolved
# keystore = "$BOR_DIR/keystore"
# "rpc.batchlimit" = 100
# "rpc.returndatalimit" = 100000
Expand All @@ -26,7 +26,7 @@ syncmode = "full"
# enable-block-tracking = false

[p2p]
maxpeers = 20
maxpeers = 200
port = 30303
nodiscover = true
# maxpendpeers = 50
Expand Down
Loading
Loading