good morning!!!!

Skip to content
Snippets Groups Projects
Commit 560ad7dd authored by Arpit Temani's avatar Arpit Temani
Browse files

merge master

parents 28963d5c 2d842494
No related merge requests found
Showing
with 231 additions and 26 deletions
......@@ -16,6 +16,8 @@ builds:
env:
- CC=o64-clang
- CXX=o64-clang++
tags:
- netgo
ldflags:
-s -w
......@@ -29,6 +31,8 @@ builds:
env:
- CC=oa64-clang
- CXX=oa64-clang++
tags:
- netgo
ldflags:
-s -w
......@@ -42,9 +46,11 @@ builds:
env:
- CC=gcc
- CXX=g++
tags:
- netgo
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static"
-s -w -extldflags "-static"
- id: linux-arm64
main: ./cmd/geth
......@@ -56,9 +62,11 @@ builds:
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags:
- netgo
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
-s -w -linkmode external -extldflags "-static"
-s -w -extldflags "-static"
nfpms:
- vendor: 0xPolygon
......@@ -76,6 +84,12 @@ nfpms:
- src: builder/files/bor.service
dst: /lib/systemd/system/bor.service
type: config
- src: builder/files/genesis-mainnet-v1.json
dst: /etc/bor/genesis-mainnet-v1.json
type: config
- src: builder/files/genesis-testnet-v4.json
dst: /etc/bor/genesis-testnet-v4.json
type: config
overrides:
rpm:
......@@ -95,6 +109,9 @@ dockers:
- linux-amd64
build_flag_templates:
- --platform=linux/amd64
extra_files:
- builder/files/genesis-mainnet-v1.json
- builder/files/genesis-testnet-v4.json
- image_templates:
- 0xpolygon/{{ .ProjectName }}:{{ .Version }}-arm64
......@@ -104,7 +121,10 @@ dockers:
ids:
- linux-arm64
build_flag_templates:
- --platform=linux/arm64
- --platform=linux/arm64/v8
extra_files:
- builder/files/genesis-mainnet-v1.json
- builder/files/genesis-testnet-v4.json
docker_manifests:
- name_template: 0xpolygon/{{ .ProjectName }}:{{ .Version }}
......
FROM alpine:3.14
RUN apk add --no-cache ca-certificates
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/
EXPOSE 8545 8546 8547 30303 30303/udp
ENTRYPOINT ["bor"]
......@@ -13,9 +13,6 @@ GO ?= latest
GORUN = env GO111MODULE=on go run
GOPATH = $(shell go env GOPATH)
protoc:
protoc --go_out=. --go-grpc_out=. ./command/server/proto/*.proto
bor:
$(GORUN) build/ci.go install ./cmd/geth
mkdir -p $(GOPATH)/bin/
......@@ -28,6 +25,9 @@ bor-all:
cp $(GOBIN)/geth $(GOBIN)/bor
cp $(GOBIN)/* $(GOPATH)/bin/
protoc:
protoc --go_out=. --go-grpc_out=. ./command/server/proto/*.proto
geth:
$(GORUN) build/ci.go install ./cmd/geth
@echo "Done building."
......@@ -48,10 +48,9 @@ ios:
@echo "Done building."
@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
test: all
# $(GORUN) build/ci.go test
go test github.com/ethereum/go-ethereum/consensus/bor -v
go test github.com/ethereum/go-ethereum/tests/bor -v
test:
# Skip mobile and cmd tests since they are being deprecated
go test -v $$(go list ./... | grep -v go-ethereum/cmd/)
lint: ## Run linters.
$(GORUN) build/ci.go lint
......
......@@ -6,11 +6,21 @@
[Service]
Restart=on-failure
RestartSec=5s
WorkingDirectory=$NODE_DIR
EnvironmentFile=/etc/matic/metadata
ExecStart=/usr/local/bin/bor $VALIDATOR_ADDRESS
ExecStart=/usr/local/bin/bor \
--bor-mumbai \
# --bor-mainnet \
--datadir /var/lib/bor/data \
--bootnodes "enode://0cb82b395094ee4a2915e9714894627de9ed8498fb881cec6db7c65e8b9a5bd7f2f25cc84e71e89d0947e51c76e85d0847de848c7782b13c0255247a6758178c@44.232.55.71:30303,enode://88116f4295f5a31538ae409e4d44ad40d22e44ee9342869e7d68bdec55b0f83c1530355ce8b41fbec0928a7d75a5745d528450d30aec92066ab6ba1ee351d710@159.203.9.164:30303"
# Validator params
# Uncomment and configure the following lines in case you run a validator
# --keystore /var/lib/bor/keystore \
# --unlock [VALIDATOR ADDRESS] \
# --password /var/lib/bor/password.txt \
# --allow-insecure-unlock \
# --nodiscover --maxpeers 1 \
# --mine
Type=simple
User=$USER
User=root
KillSignal=SIGINT
TimeoutStopSec=120
......
......@@ -15,10 +15,21 @@
"londonBlock": 23850000,
"bor": {
"jaipurBlock": 23850000,
<<<<<<< HEAD
"period": 2,
"producerDelay": 6,
"sprint": 64,
"backupMultiplier": 2,
=======
"period": {
"0": 2
},
"producerDelay": 6,
"sprint": 64,
"backupMultiplier": {
"0": 2
},
>>>>>>> 2d84249492818622540ddf5136234fa734e5950a
"validatorContract": "0x0000000000000000000000000000000000001000",
"stateReceiverContract": "0x0000000000000000000000000000000000001001",
"overrideStateSyncRecords": {
......
This diff is collapsed.
package main
import (
"os"
"github.com/ethereum/go-ethereum/internal/cli"
)
func main() {
os.Exit(cli.Run(os.Args[1:]))
}
......@@ -347,7 +347,7 @@ func setDefaultMumbaiGethConfig(ctx *cli.Context, config *gethConfig) {
config.Node.HTTPPort = 8545
config.Node.IPCPath = utils.MakeDataDir(ctx) + "/bor.ipc"
config.Node.HTTPModules = []string{"eth", "net", "web3", "txpool", "bor"}
config.Eth.SyncMode = downloader.SnapSync
config.Eth.SyncMode = downloader.FullSync
config.Eth.NetworkId = 80001
config.Eth.Miner.GasCeil = 20000000
//--miner.gastarget is depreceated, No longed used
......@@ -370,7 +370,7 @@ func setDefaultBorMainnetGethConfig(ctx *cli.Context, config *gethConfig) {
config.Node.HTTPPort = 8545
config.Node.IPCPath = utils.MakeDataDir(ctx) + "/bor.ipc"
config.Node.HTTPModules = []string{"eth", "net", "web3", "txpool", "bor"}
config.Eth.SyncMode = downloader.SnapSync
config.Eth.SyncMode = downloader.FullSync
config.Eth.NetworkId = 137
config.Eth.Miner.GasCeil = 20000000
//--miner.gastarget is depreceated, No longed used
......
......@@ -1645,13 +1645,11 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
cfg.NetworkId = 80001
}
cfg.Genesis = core.DefaultMumbaiGenesisBlock()
SetDNSDiscoveryDefaults(cfg, params.MumbaiGenesisHash)
case ctx.GlobalBool(BorMainnetFlag.Name):
if !ctx.GlobalIsSet(BorMainnetFlag.Name) {
cfg.NetworkId = 137
}
cfg.Genesis = core.DefaultBorMainnetGenesisBlock()
SetDNSDiscoveryDefaults(cfg, params.BorMainnetGenesisHash)
case ctx.GlobalBool(DeveloperFlag.Name):
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
cfg.NetworkId = 1337
......
......@@ -151,9 +151,11 @@ func newFreezer(datadir string, namespace string, readonly bool, maxTableSize ui
// This way they don't have to sync again from block 0 and still be compatible
// for block logs for future blocks. Note that already synced nodes
// won't have past block logs. Newly synced node will have all the data.
if _, ok := freezer.tables[freezerBorReceiptTable]; ok {
if err := freezer.tables[freezerBorReceiptTable].Fill(freezer.tables[freezerHeaderTable].items); err != nil {
return nil, err
}
}
// Truncate all tables to common length.
if err := freezer.repair(); err != nil {
......
......@@ -53,6 +53,7 @@ func TestStateProcessorErrors(t *testing.T) {
BerlinBlock: big.NewInt(0),
LondonBlock: big.NewInt(0),
Ethash: new(params.EthashConfig),
Bor: &params.BorConfig{BurntContract: map[string]string{"0": "0x000000000000000000000000000000000000dead"}},
}
signer = types.LatestSigner(config)
testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
......
......@@ -15,4 +15,20 @@
- [```account import```](./account_import.md)
- [```chain```](./chain.md)
- [```chain sethead```](./chain_sethead.md)
- [```peers```](./peers.md)
- [```peers add```](./peers_add.md)
- [```peers list```](./peers_list.md)
- [```peers remove```](./peers_remove.md)
- [```peers status```](./peers_status.md)
- [```status```](./status.md)
- [```version```](./version.md)
# Chain
The ```chain``` command groups actions to interact with the blockchain in the client:
- [```chain sethead```](./chain_sethead.md): Set the current chain to a certain block.
# Chain sethead
The ```chain sethead <number>``` command sets the current chain to a certain block.
## Arguments
- ```number```: The block number to roll back.
## Options
- ```yes```: Force set head.
# Peers
The ```peers``` command groups actions to interact with peers:
- [```peers add```](./peers_add.md): Joins the local client to another remote peer.
- [```peers list```](./peers_list.md): Lists the connected peers to the Bor client.
- [```peers remove```](./peers_remove.md): Disconnects the local client from a connected peer if exists.
- [```peers status```](./peers_status.md): Display the status of a peer by its id.
# Peers add
The ```peers add <enode>``` command joins the local client to another remote peer.
## Arguments
- ```trusted```: Whether the peer is added as a trusted peer.
# Peers list
The ```peers list``` command lists the connected peers.
# Peers remove
The ```peers remove <enode>``` command disconnects the local client from a connected peer if exists.
# Peers status
The ```peers status <peer id>``` command displays the status of a peer by its id.
# Status
The ```status``` command outputs the status of the client.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment