Skip to content

Commit b5abbfe

Browse files
committed
new EVM Upgrade
- Solidity Upgraded up to v0.8.0 - Fixed and Added eth_chainId - Fix error in TransactionRecipet - Reward halving issue fixed
1 parent 8daf35f commit b5abbfe

File tree

2,125 files changed

+63876
-717087
lines changed

Some content is hidden

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

2,125 files changed

+63876
-717087
lines changed

.travis.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
sudo: required
2+
language: go
3+
go_import_path: github.com/XinFinOrg/XDPoSChain
4+
5+
env:
6+
global:
7+
- GOPROXY=https://proxy.golang.org
8+
- GO111MODULE=on
9+
10+
11+
jobs:
12+
include:
13+
14+
- stage: Lint
15+
sudo: false
16+
go: '1.12.x'
17+
git:
18+
submodules: false
19+
script:
20+
- go run build/ci.go lint
21+
22+
- stage: Build and test
23+
go: '1.12.x'
24+
script:
25+
- sudo modprobe fuse
26+
- sudo chmod 666 /dev/fuse
27+
- sudo chown root:$USER /etc/fuse.conf
28+
- go run build/ci.go install
29+
- while sleep 540; do echo "[ still running ]"; done &
30+
- go run build/ci.go test -coverage
31+
- kill %1
32+
after_success:
33+
- bash <(curl -s https://codecov.io/bash)
34+
35+
- go: '1.11.x'
36+
script:
37+
- sudo modprobe fuse
38+
- sudo chmod 666 /dev/fuse
39+
- sudo chown root:$USER /etc/fuse.conf
40+
- go run build/ci.go install
41+
- while sleep 540; do echo "[ still running ]"; done &
42+
- go run build/ci.go test -coverage
43+
- kill %1
44+
45+
- stage: Github release
46+
go: '1.12.x'
47+
script:
48+
- GOARCH=amd64 GOOS=linux go build -o ./build/bin/XDC-linux-amd64 -v ./cmd/XDC
49+
deploy:
50+
provider: releases
51+
api_key: $GITHUB_TOKEN
52+
overwrite: true
53+
file_glob: true
54+
file: build/bin/XDC-*
55+
skip_cleanup: true
56+
on:
57+
tags: true
58+
59+
- stage: Build and push image
60+
services:
61+
- docker
62+
install: skip
63+
before_script:
64+
- docker build -t XDPoSChain/XDPoSChain .
65+
- docker build -t XDPoSChain/node -f Dockerfile.node .
66+
script:
67+
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
68+
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:latest
69+
- docker push XDPoSChain/XDPoSChain:latest
70+
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:$TRAVIS_BUILD_ID
71+
- docker push XDPoSChain/XDPoSChain:$TRAVIS_BUILD_ID
72+
- docker tag XDPoSChain/node XDPoSChain/node:latest
73+
- docker push XDPoSChain/node:latest
74+
- docker tag XDPoSChain/node XDPoSChain/node:$TRAVIS_BUILD_ID
75+
- docker push XDPoSChain/node:$TRAVIS_BUILD_ID
76+
77+
- stage: Build and push image (tagged)
78+
services:
79+
- docker
80+
install: skip
81+
before_script:
82+
- docker build -t XDPoSChain/XDPoSChain .
83+
- docker build -t XDPoSChain/XDPoSChain -f Dockerfile.node .
84+
script:
85+
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
86+
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:latest
87+
- docker push XDPoSChain/XDPoSChain:latest
88+
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:$TRAVIS_TAG
89+
- docker push XDPoSChain/XDPoSChain:$TRAVIS_TAG
90+
- docker tag XDPoSChain/XDPoSChain XDPoSChain/node:latest
91+
- docker push XDPoSChain/node:latest
92+
- docker tag XDPoSChain/node XDPoSChain/node:$TRAVIS_TAG
93+
- docker push XDPoSChain/node:$TRAVIS_TAG
94+
95+
stages:
96+
- name: Lint
97+
- name: Build and test
98+
- name: Github release
99+
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = XDPoSChain/XDPoSChain
100+
- name: Build and push image
101+
if: type != pull_request AND branch = master AND tag IS blank AND repo = XDPoSChain/XDPoSChain
102+
- name: Build and push image (tagged)
103+
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = XDPoSChain/XDPoSChain
104+
105+
notifications:
106+
slack:
107+
rooms:
108+
secure:
109+
on_success: change
110+
on_failure: always

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1-
FROM golang:1.10-alpine as builder
1+
FROM golang:1.12-alpine as builder
22

3-
RUN apk add --no-cache make gcc musl-dev linux-headers
3+
RUN apk add --no-cache make gcc musl-dev linux-headers git
44

5-
ADD . /XDCchain
6-
RUN cd /XDCchain && make XDC
5+
ADD . /XDPoSChain
6+
RUN cd /XDPoSChain && make XDC
77

88
FROM alpine:latest
99

10-
LABEL maintainer="[email protected]"
10+
WORKDIR /XDPoSChain
1111

12-
WORKDIR /XDCchain
13-
14-
COPY --from=builder /XDCchain/build/bin/XDC /usr/local/bin/XDC
12+
COPY --from=builder /XDPoSChain/build/bin/XDC /usr/local/bin/XDC
1513

1614
RUN chmod +x /usr/local/bin/XDC
1715

Dockerfile.bootnode

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
FROM golang:1.10-alpine as builder
1+
FROM golang:1.11-alpine as builder
22

33
RUN apk add --no-cache make gcc musl-dev linux-headers
44

5-
ADD . /XDCchain
6-
RUN cd /XDCchain && make bootnode
5+
ADD . /XDPoSChain
6+
RUN cd /XDPoSChain && make bootnode
77

8-
RUN chmod +x /XDCchain/build/bin/bootnode
8+
RUN chmod +x /XDPoSChain/build/bin/bootnode
99

1010
FROM alpine:latest
1111

12-
LABEL maintainer="[email protected]"
12+
LABEL maintainer="[email protected]"
1313

14-
WORKDIR /XDCchain
14+
WORKDIR /XDPoSChain
1515

16-
COPY --from=builder /XDCchain/build/bin/bootnode /usr/local/bin/bootnode
16+
COPY --from=builder /XDPoSChain/build/bin/bootnode /usr/local/bin/bootnode
1717

1818
COPY docker/bootnode ./
1919

Dockerfile.node

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
FROM golang:1.10-alpine as builder
1+
FROM golang:1.12-alpine as builder
22

3-
RUN apk add --no-cache make gcc musl-dev linux-headers
3+
RUN apk add --no-cache make gcc musl-dev linux-headers git
44

5-
ADD . /XDCchain
5+
ADD . /XDPoSChain
66

7-
RUN cd /XDCchain \
7+
RUN cd /XDPoSChain \
88
&& make XDC \
9-
&& chmod +x /XDCchain/build/bin/XDC
9+
&& chmod +x /XDPoSChain/build/bin/XDC
1010

1111
FROM alpine:latest
1212

13-
LABEL maintainer="[email protected]"
13+
WORKDIR /XDPoSChain
1414

15-
WORKDIR /XDCchain
16-
17-
COPY --from=builder /XDCchain/build/bin/XDC /usr/local/bin/XDC
15+
COPY --from=builder /XDPoSChain/build/bin/XDC /usr/local/bin/XDC
1816

1917
ENV IDENTITY ''
2018
ENV PASSWORD ''
@@ -23,15 +21,15 @@ ENV BOOTNODES ''
2321
ENV EXTIP ''
2422
ENV VERBOSITY 3
2523
ENV SYNC_MODE 'full'
26-
ENV NETWORK_ID '89'
24+
ENV NETWORK_ID '88'
2725
ENV WS_SECRET ''
2826
ENV NETSTATS_HOST 'netstats-server'
2927
ENV NETSTATS_PORT '3000'
3028
ENV ANNOUNCE_TXS ''
3129

3230
RUN apk add --no-cache ca-certificates
3331

34-
COPY docker/XDCchain ./
32+
COPY docker/XDPoSChain ./
3533
COPY genesis/ ./
3634

3735
EXPOSE 8545 8546 30303 30303/udp

Makefile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@
44

55
GOBIN = $(shell pwd)/build/bin
66
GOFMT = gofmt
7-
GO ?= latest
7+
GO ?= 1.13.1
88
GO_PACKAGES = .
99
GO_FILES := $(shell find $(shell go list -f '{{.Dir}}' $(GO_PACKAGES)) -name \*.go)
1010

1111
GIT = git
1212

1313
XDC:
14-
build/env.sh go run build/ci.go install ./cmd/XDC
14+
go run build/ci.go install ./cmd/XDC
1515
@echo "Done building."
1616
@echo "Run \"$(GOBIN)/XDC\" to launch XDC."
1717

1818
gc:
19-
build/env.sh go run build/ci.go install ./cmd/gc
19+
go run build/ci.go install ./cmd/gc
2020
@echo "Done building."
2121
@echo "Run \"$(GOBIN)/gc\" to launch gc."
2222

2323
bootnode:
24-
build/env.sh go run build/ci.go install ./cmd/bootnode
24+
go run build/ci.go install ./cmd/bootnode
2525
@echo "Done building."
2626
@echo "Run \"$(GOBIN)/bootnode\" to launch a bootnode."
2727

2828
puppeth:
29-
build/env.sh go run build/ci.go install ./cmd/puppeth
29+
go run build/ci.go install ./cmd/puppeth
3030
@echo "Done building."
3131
@echo "Run \"$(GOBIN)/puppeth\" to launch puppeth."
3232

3333
all:
34-
build/env.sh go run build/ci.go install
34+
go run build/ci.go install
3535

3636
test: all
37-
build/env.sh go run build/ci.go test
37+
go run build/ci.go test
3838

3939
clean:
4040
rm -fr build/_workspace/pkg/ $(GOBIN)/*
@@ -50,32 +50,32 @@ XDC-linux: XDC-linux-386 XDC-linux-amd64 XDC-linux-mips64 XDC-linux-mips64le
5050
@ls -ld $(GOBIN)/XDC-linux-*
5151

5252
XDC-linux-386:
53-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/XDC
53+
go run build/ci.go xgo -- --go=$(GO) --targets=linux/386 -v ./cmd/XDC
5454
@echo "Linux 386 cross compilation done:"
5555
@ls -ld $(GOBIN)/XDC-linux-* | grep 386
5656

5757
XDC-linux-amd64:
58-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/XDC
58+
go run build/ci.go xgo -- --go=$(GO) --targets=linux/amd64 -v ./cmd/XDC
5959
@echo "Linux amd64 cross compilation done:"
6060
@ls -ld $(GOBIN)/XDC-linux-* | grep amd64
6161

6262
XDC-linux-mips:
63-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/XDC
63+
go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips --ldflags '-extldflags "-static"' -v ./cmd/XDC
6464
@echo "Linux MIPS cross compilation done:"
6565
@ls -ld $(GOBIN)/XDC-linux-* | grep mips
6666

6767
XDC-linux-mipsle:
68-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/XDC
68+
go run build/ci.go xgo -- --go=$(GO) --targets=linux/mipsle --ldflags '-extldflags "-static"' -v ./cmd/XDC
6969
@echo "Linux MIPSle cross compilation done:"
7070
@ls -ld $(GOBIN)/XDC-linux-* | grep mipsle
7171

7272
XDC-linux-mips64:
73-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/XDC
73+
go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64 --ldflags '-extldflags "-static"' -v ./cmd/XDC
7474
@echo "Linux MIPS64 cross compilation done:"
7575
@ls -ld $(GOBIN)/XDC-linux-* | grep mips64
7676

7777
XDC-linux-mips64le:
78-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/XDC
78+
go run build/ci.go xgo -- --go=$(GO) --targets=linux/mips64le --ldflags '-extldflags "-static"' -v ./cmd/XDC
7979
@echo "Linux MIPS64le cross compilation done:"
8080
@ls -ld $(GOBIN)/XDC-linux-* | grep mips64le
8181

@@ -84,18 +84,18 @@ XDC-darwin: XDC-darwin-386 XDC-darwin-amd64
8484
@ls -ld $(GOBIN)/XDC-darwin-*
8585

8686
XDC-darwin-386:
87-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/XDC
87+
go run build/ci.go xgo -- --go=$(GO) --targets=darwin/386 -v ./cmd/XDC
8888
@echo "Darwin 386 cross compilation done:"
8989
@ls -ld $(GOBIN)/XDC-darwin-* | grep 386
9090

9191
XDC-darwin-amd64:
92-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/XDC
92+
go run build/ci.go xgo -- --go=$(GO) --targets=darwin/amd64 -v ./cmd/XDC
9393
@echo "Darwin amd64 cross compilation done:"
9494
@ls -ld $(GOBIN)/XDC-darwin-* | grep amd64
9595

9696
XDC-windows-amd64:
97-
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/XDC
98-
@echo "Darwin amd64 cross compilation done:"
97+
go run build/ci.go xgo -- --go=$(GO) -buildmode=mode -x --targets=windows/amd64 -v ./cmd/XDC
98+
@echo "Windows amd64 cross compilation done:"
9999
@ls -ld $(GOBIN)/XDC-windows-* | grep amd64
100100
gofmt:
101101
$(GOFMT) -s -w $(GO_FILES)

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1 @@
1-
## XinFin
2-
3-
Blockchain for decentralized applications, token issuance and integration
4-
5-
Website Resource : https://xinFin.org
6-
7-
XinFin Mainet URL: http://XinFin.network/
8-
9-
XinFin TestNet/Apothem URL: http://apothem.network/
1+
# XDPoSChain

0 commit comments

Comments
 (0)