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

Merge branch 'qa' and 'master' into develop #663

Merged
merged 66 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a0f754d
Adding in Mumbai/Mainnet precursor deb packaging for tests to use dur…
djpolygon Nov 22, 2022
5e92a7f
Added changes per discussion in PR, more changes may be necessary
djpolygon Nov 23, 2022
1f0e49b
Adding prerelease true
djpolygon Nov 23, 2022
ba56c98
Disabling goreleaser
djpolygon Nov 23, 2022
c1e84fd
Removing README swap file
djpolygon Nov 23, 2022
08ec50a
change bor_dir and add bor user for v0.3.0 release
rekibnikufesin Nov 23, 2022
e468e96
Merge pull request #592 from maticnetwork/wbutton/v0.3.0-docker-qa
rekibnikufesin Nov 23, 2022
3b6c9b0
Merge branch 'qa' of https://github.com/maticnetwork/bor into djpolyg…
manav2401 Nov 23, 2022
01e05cd
Merge pull request #590 from maticnetwork/djpolygon/v0.3.0packaging
djpolygon Nov 23, 2022
5fe83d3
rollback bor user and use root
rekibnikufesin Nov 23, 2022
58a6314
Merge pull request #594 from maticnetwork/wbutton/docker-user-rollback
rekibnikufesin Nov 23, 2022
137fb19
metrics: handle equal to separated config flag (#596)
manav2401 Nov 24, 2022
d69cb20
fixed static-nodes related buf (os independent) (#598)
pratikspatil024 Nov 25, 2022
095ce5e
Update default flags (#600)
manav2401 Nov 25, 2022
3e71609
metrics: handle nil telemetry config (#601)
manav2401 Nov 25, 2022
4b6115d
merge latest qa
temaniarpit27 Nov 29, 2022
59dccd3
resolve merge conflicts
temaniarpit27 Nov 29, 2022
d96662a
update go version in release.yml
temaniarpit27 Nov 29, 2022
742990c
update goversion in makefile
temaniarpit27 Nov 29, 2022
4d19cf5
update Docker login for goreleaser-cross v1.19
rekibnikufesin Nov 30, 2022
1cf78fd
Cleanup for the packager to use git tag in the package profile naming…
djpolygon Nov 30, 2022
3b4ff7d
Merge pull request #610 from maticnetwork/wbutton/goreleaser-docker-c…
rekibnikufesin Nov 30, 2022
4d06349
added a toml configuration file with comments describing each flag (#…
pratikspatil024 Dec 1, 2022
6cd5d15
Merge pull request #611 from maticnetwork/djpolygon/v030-cleanup
djpolygon Dec 1, 2022
dab3161
Adding of 0.3.0 package changes, control file updates, postinst chang…
djpolygon Dec 1, 2022
e330329
added ancient datadir flag and toml field, need to decide on default …
pratikspatil024 Dec 4, 2022
5d6ffa7
Merge pull request #613 from maticnetwork/djpolygon/v0.3.1-mumbai-update
djpolygon Dec 4, 2022
531d67a
updated toml files with ancient field
pratikspatil024 Dec 5, 2022
dd64fa1
Merge pull request #614 from maticnetwork/ancient-datadir
temaniarpit27 Dec 5, 2022
57075d0
Add support for new flags in new config.toml, which were present in o…
pratikspatil024 Dec 5, 2022
c807faa
merge current qa branch
temaniarpit27 Dec 5, 2022
adf8c5f
Merge branch 'arpit/v0.3.1-mumbai-candidate' of github.com:maticnetwo…
temaniarpit27 Dec 5, 2022
180d444
remove unwanted code
temaniarpit27 Dec 5, 2022
e68d2d1
Fix docker publish authentication issue
cffls Dec 5, 2022
9656c6c
Merge pull request #618 from cffls/master
cffls Dec 6, 2022
31da972
Revert "update Docker login for goreleaser-cross v1.19"
cffls Dec 6, 2022
43d894c
Bump version to stable
cffls Dec 6, 2022
d9e5e20
Merge pull request #620 from cffls/master
cffls Dec 6, 2022
b7f37c7
Merge pull request #603 from maticnetwork/arpit/v0.3.1-mumbai-candidate
temaniarpit27 Dec 13, 2022
6d11117
Revert "Merge pull request #435 from maticnetwork/POS-553"
manav2401 Dec 13, 2022
0b89983
merge latest master to qa
temaniarpit27 Dec 13, 2022
a8eb21f
Merge pull request #631 from maticnetwork/manav/revert-pos-533
temaniarpit27 Dec 13, 2022
7364f94
revert change for release for go1.19
temaniarpit27 Dec 13, 2022
b177669
Merge branch 'arpit/master-to-qa' of github.com:maticnetwork/bor into…
temaniarpit27 Dec 13, 2022
a37af35
Add default values to CLI helper and docs
cffls Dec 13, 2022
ddf1a4d
Add a summary of new CLI in docs
cffls Dec 14, 2022
5e14528
Merge pull request #632 from cffls/master
cffls Dec 14, 2022
2e45f3b
Updating packager as binutils changed version so that apt-get install…
djpolygon Dec 14, 2022
660677b
Merge branch 'master' of github.com:maticnetwork/bor into arpit/maste…
temaniarpit27 Dec 14, 2022
5eebbfa
Merge pull request #634 from maticnetwork/djpolygon/packagerDepUpdate
djpolygon Dec 14, 2022
b7ed9de
Add state pruning to new CLI
cffls Dec 14, 2022
9b2407a
Minor wording fix in prune state description
cffls Dec 15, 2022
7217f79
Merge pull request #630 from maticnetwork/arpit/master-to-qa
temaniarpit27 Dec 15, 2022
b7b1545
Bumping control file versions
djpolygon Dec 18, 2022
205930e
Merge pull request #639 from maticnetwork/djpolygon/3.2-beta_control
djpolygon Dec 19, 2022
59bdbef
Mainnet Delhi fork
cffls Jan 4, 2023
c12e8f2
Set version to stable
cffls Jan 4, 2023
db7eb29
change delhi hardfork block number
temaniarpit27 Jan 5, 2023
3eb234c
Merge pull request #647 from cffls/qa
temaniarpit27 Jan 5, 2023
b480db1
handle future chain import and skip peer drop (#650)
manav2401 Jan 7, 2023
dcdac12
Bump bor version in control files for v0.3.3 mainnet release
manav2401 Jan 9, 2023
56d3058
Merge pull request #655 from maticnetwork/manav/bump-control-files
cffls Jan 9, 2023
9987cd4
Merge branch 'qa' into shivam-develop
0xsharma Jan 12, 2023
c75c72b
Merge branch 'master' into shivam-develop
0xsharma Jan 12, 2023
66c23d1
Merge pull request #664 from maticnetwork/master
0xsharma Jan 13, 2023
950a9e6
Merge pull request #667 from maticnetwork/qa
0xsharma Jan 13, 2023
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
736 changes: 736 additions & 0 deletions .github/workflows/packager.yml

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,20 @@ jobs:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.17.x
go-version: 1.19.x

- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB }}
password: ${{ secrets.DOCKERHUB_KEY }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

Expand All @@ -39,5 +45,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project_name: bor

release:
disable: false
disable: true
draft: true
prerelease: auto

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM golang:latest

ARG BOR_DIR=/bor
ARG BOR_DIR=/var/lib/bor
ENV BOR_DIR=$BOR_DIR

RUN apt-get update -y && apt-get upgrade -y \
&& apt install build-essential git -y \
&& mkdir -p /bor
&& mkdir -p ${BOR_DIR}

WORKDIR ${BOR_DIR}
COPY . .
RUN make bor

RUN cp build/bin/bor /usr/local/bin/
RUN cp build/bin/bor /usr/bin/

ENV SHELL /bin/bash
EXPOSE 8545 8546 8547 30303 30303/udp
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alltools
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ RUN set -x \
&& apk add --update --no-cache \
ca-certificates \
&& rm -rf /var/cache/apk/*
COPY --from=builder /bor/build/bin/* /usr/local/bin/
COPY --from=builder /bor/build/bin/* /usr/bin/

EXPOSE 8545 8546 30303 30303/udp
13 changes: 9 additions & 4 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
FROM alpine:3.14

ARG BOR_DIR=/var/lib/bor
ENV BOR_DIR=$BOR_DIR

RUN apk add --no-cache ca-certificates && \
mkdir -p /etc/bor
COPY bor /usr/local/bin/
COPY builder/files/genesis-mainnet-v1.json /etc/bor/
COPY builder/files/genesis-testnet-v4.json /etc/bor/
mkdir -p ${BOR_DIR}

WORKDIR ${BOR_DIR}
COPY bor /usr/bin/
COPY builder/files/genesis-mainnet-v1.json ${BOR_DIR}
COPY builder/files/genesis-testnet-v4.json ${BOR_DIR}

EXPOSE 8545 8546 8547 30303 30303/udp
ENTRYPOINT ["bor"]
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protoc:
generate-mocks:
go generate mockgen -destination=./tests/bor/mocks/IHeimdallClient.go -package=mocks ./consensus/bor IHeimdallClient
go generate mockgen -destination=./eth/filters/IBackend.go -package=filters ./eth/filters Backend

geth:
$(GORUN) build/ci.go install ./cmd/geth
@echo "Done building."
Expand Down Expand Up @@ -199,7 +199,7 @@ geth-windows-amd64:
@ls -ld $(GOBIN)/geth-windows-* | grep amd64

PACKAGE_NAME := github.com/maticnetwork/bor
GOLANG_CROSS_VERSION ?= v1.18.1
GOLANG_CROSS_VERSION ?= v1.19.1

.PHONY: release-dry-run
release-dry-run:
Expand Down Expand Up @@ -227,6 +227,7 @@ release:
-e DOCKER_PASSWORD \
-e SLACK_WEBHOOK \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(HOME)/.docker/config.json:/root/.docker/config.json \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
Expand Down
2 changes: 1 addition & 1 deletion builder/files/bor.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[Service]
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/bin/bor server -config="/var/lib/bor/config.toml"
ExecStart=/usr/local/bin/bor server -config "/var/lib/bor/config.toml"
Type=simple
User=bor
KillSignal=SIGINT
Expand Down
64 changes: 35 additions & 29 deletions builder/files/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ chain = "mainnet"
# identity = "Pratiks-MacBook-Pro.local"
# log-level = "INFO"
datadir = "/var/lib/bor/data"
# ancient = ""
# keystore = "/var/lib/bor/keystore"
syncmode = "full"
# gcmode = "full"
Expand Down Expand Up @@ -52,46 +53,50 @@ syncmode = "full"
# pricebump = 10

[miner]
gaslimit = 20000000
gaslimit = 30000000
gasprice = "30000000000"
# mine = true
# etherbase = "VALIDATOR ADDRESS"
# extradata = ""


# [jsonrpc]
# ipcdisable = false
# ipcpath = ""
# gascap = 50000000
# txfeecap = 5.0
# [jsonrpc.http]
# enabled = false
# port = 8545
# prefix = ""
# host = "localhost"
# api = ["eth", "net", "web3", "txpool", "bor"]
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.ws]
# enabled = false
# port = 8546
# prefix = ""
# host = "localhost"
# api = ["web3", "net"]
# origins = ["*"]
# [jsonrpc.graphql]
# enabled = false
# port = 0
# prefix = ""
# host = ""
# vhosts = ["*"]
# corsdomain = ["*"]
# ipcdisable = false
# ipcpath = ""
# gascap = 50000000
# txfeecap = 5.0
# [jsonrpc.http]
# enabled = false
# port = 8545
# prefix = ""
# host = "localhost"
# api = ["eth", "net", "web3", "txpool", "bor"]
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.ws]
# enabled = false
# port = 8546
# prefix = ""
# host = "localhost"
# api = ["web3", "net"]
# origins = ["*"]
# [jsonrpc.graphql]
# enabled = false
# port = 0
# prefix = ""
# host = ""
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# write = "30s"
# idle = "2m0s"

# [gpo]
[gpo]
# blocks = 20
# percentile = 60
# maxprice = "5000000000000"
# ignoreprice = "2"
ignoreprice = "30000000000"

[telemetry]
metrics = true
Expand Down Expand Up @@ -122,6 +127,7 @@ syncmode = "full"
# preimages = false
# txlookuplimit = 2350000
# triesinmemory = 128
# timeout = "1h0m0s"

[accounts]
# allow-insecure-unlock = true
Expand Down
14 changes: 10 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

# Documentation

- [Command-line-interface](./cli)

- [Configuration file](./config.md)
[The new command line interface (CLI)](./cli) in this version of Bor aims to give users more control over the codebase when interacting with and starting a node. We have made every effort to keep most of the flags similar to the old CLI, except for a few notable changes. One major change is the use of the --config flag, which previously represented fields without available flags. It now represents all flags available to the user, and will overwrite any other flags if provided. As a node operator, you still have the flexibility to modify flags as needed. Please note that this change does not affect the internal functionality of the node, and it remains compatible with Geth and the Ethereum Virtual Machine (EVM).

## Additional notes

Expand All @@ -13,8 +11,16 @@
$ bor server <flags>
```

- Toml files used earlier just to configure static/trusted nodes are being deprecated. Instead, a toml file now can be used instead of flags and can contain all configuration for the node to run. The link to a sample config file is given above. To simply run bor with a configuration file, the following command can be used.
See [here](./cli/server.md) for more flag details.

- The `bor dumpconfig` sub-command prints the default configurations, in the TOML format, on the terminal. One can `pipe (>)` this to a file (say `config.toml`) and use it to start bor.

- A toml file now can be used instead of flags and can contain all configuration for the node to run. To simply run bor with a configuration file, the following command can be used.

```
$ bor server --config <path_to_config.toml>
```

- You can find an example config file [here](./cli/example_config.toml) to know more about what each flag is used for, what are the defaults and recommended values for different networks.

- Toml files used earlier (with `--config` flag) to configure additional fields (like static and trusted nodes) are being deprecated and have been converted to flags.
4 changes: 4 additions & 0 deletions docs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@

- [```server```](./server.md)

- [```snapshot```](./snapshot.md)

- [```snapshot prune-state```](./snapshot_prune-state.md)

- [```status```](./status.md)

- [```version```](./version.md)
2 changes: 1 addition & 1 deletion docs/cli/account_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The ```account import``` command imports an account in Json format to the Bor da

- ```datadir```: Path of the data directory to store information

- ```keystore```: Path of the data directory to store information
- ```keystore```: Path of the data directory to store keys
2 changes: 1 addition & 1 deletion docs/cli/account_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The `account list` command lists all the accounts in the Bor data directory.

- ```datadir```: Path of the data directory to store information

- ```keystore```: Path of the data directory to store information
- ```keystore```: Path of the data directory to store keys
2 changes: 1 addition & 1 deletion docs/cli/account_new.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ The `account new` command creates a new local account file on the Bor data direc

- ```datadir```: Path of the data directory to store information

- ```keystore```: Path of the data directory to store information
- ```keystore```: Path of the data directory to store keys
10 changes: 5 additions & 5 deletions docs/cli/bootnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

## Options

- ```listen-addr```: listening address of bootnode (<ip>:<port>)
- ```listen-addr```: listening address of bootnode (<ip>:<port>) (default: 0.0.0.0:30303)

- ```v5```: Enable UDP v5
- ```v5```: Enable UDP v5 (default: false)

- ```log-level```: Log level (trace|debug|info|warn|error|crit)
- ```log-level```: Log level (trace|debug|info|warn|error|crit) (default: info)

- ```nat```: port mapping mechanism (any|none|upnp|pmp|extip:<IP>)
- ```nat```: port mapping mechanism (any|none|upnp|pmp|extip:<IP>) (default: none)

- ```node-key```: file or hex node key

- ```save-key```: path to save the ecdsa private key

- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode
- ```dry-run```: validates parameters and prints bootnode configurations, but does not start bootnode (default: false)
4 changes: 2 additions & 2 deletions docs/cli/chain_sethead.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ The ```chain sethead <number>``` command sets the current chain to a certain blo

## Options

- ```address```: Address of the grpc endpoint
- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131)

- ```yes```: Force set head
- ```yes```: Force set head (default: false)
2 changes: 1 addition & 1 deletion docs/cli/debug_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ The ```bor debug block <number>``` command will create an archive containing tra

## Options

- ```address```: Address of the grpc endpoint
- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131)

- ```output```: Output directory
4 changes: 2 additions & 2 deletions docs/cli/debug_pprof.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ The ```debug pprof <enode>``` command will create an archive containing bor ppro

## Options

- ```address```: Address of the grpc endpoint
- ```address```: Address of the grpc endpoint (default: 127.0.0.1:3131)

- ```seconds```: seconds to trace
- ```seconds```: seconds to trace (default: 2)

- ```output```: Output directory
Loading