Skip to content

Commit

Permalink
new EVM Upgrade
Browse files Browse the repository at this point in the history
- Solidity Upgraded up to v0.8.0
-  Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
  • Loading branch information
olumuyiwadad committed Sep 21, 2021
1 parent 8daf35f commit b5abbfe
Show file tree
Hide file tree
Showing 2,125 changed files with 63,876 additions and 717,087 deletions.
110 changes: 110 additions & 0 deletions .travis.yml
@@ -0,0 +1,110 @@
sudo: required
language: go
go_import_path: github.com/XinFinOrg/XDPoSChain

env:
global:
- GOPROXY=https://proxy.golang.org
- GO111MODULE=on


jobs:
include:

- stage: Lint
sudo: false
go: '1.12.x'
git:
submodules: false
script:
- go run build/ci.go lint

- stage: Build and test
go: '1.12.x'
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- while sleep 540; do echo "[ still running ]"; done &
- go run build/ci.go test -coverage
- kill %1
after_success:
- bash <(curl -s https://codecov.io/bash)

- go: '1.11.x'
script:
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
- go run build/ci.go install
- while sleep 540; do echo "[ still running ]"; done &
- go run build/ci.go test -coverage
- kill %1

- stage: Github release
go: '1.12.x'
script:
- GOARCH=amd64 GOOS=linux go build -o ./build/bin/XDC-linux-amd64 -v ./cmd/XDC
deploy:
provider: releases
api_key: $GITHUB_TOKEN
overwrite: true
file_glob: true
file: build/bin/XDC-*
skip_cleanup: true
on:
tags: true

- stage: Build and push image
services:
- docker
install: skip
before_script:
- docker build -t XDPoSChain/XDPoSChain .
- docker build -t XDPoSChain/node -f Dockerfile.node .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:latest
- docker push XDPoSChain/XDPoSChain:latest
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:$TRAVIS_BUILD_ID
- docker push XDPoSChain/XDPoSChain:$TRAVIS_BUILD_ID
- docker tag XDPoSChain/node XDPoSChain/node:latest
- docker push XDPoSChain/node:latest
- docker tag XDPoSChain/node XDPoSChain/node:$TRAVIS_BUILD_ID
- docker push XDPoSChain/node:$TRAVIS_BUILD_ID

- stage: Build and push image (tagged)
services:
- docker
install: skip
before_script:
- docker build -t XDPoSChain/XDPoSChain .
- docker build -t XDPoSChain/XDPoSChain -f Dockerfile.node .
script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:latest
- docker push XDPoSChain/XDPoSChain:latest
- docker tag XDPoSChain/XDPoSChain XDPoSChain/XDPoSChain:$TRAVIS_TAG
- docker push XDPoSChain/XDPoSChain:$TRAVIS_TAG
- docker tag XDPoSChain/XDPoSChain XDPoSChain/node:latest
- docker push XDPoSChain/node:latest
- docker tag XDPoSChain/node XDPoSChain/node:$TRAVIS_TAG
- docker push XDPoSChain/node:$TRAVIS_TAG

stages:
- name: Lint
- name: Build and test
- name: Github release
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = XDPoSChain/XDPoSChain
- name: Build and push image
if: type != pull_request AND branch = master AND tag IS blank AND repo = XDPoSChain/XDPoSChain
- name: Build and push image (tagged)
if: type != pull_request AND branch =~ ^v AND tag IS present AND repo = XDPoSChain/XDPoSChain

notifications:
slack:
rooms:
secure:
on_success: change
on_failure: always
14 changes: 6 additions & 8 deletions Dockerfile
@@ -1,17 +1,15 @@
FROM golang:1.10-alpine as builder
FROM golang:1.12-alpine as builder

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

ADD . /XDCchain
RUN cd /XDCchain && make XDC
ADD . /XDPoSChain
RUN cd /XDPoSChain && make XDC

FROM alpine:latest

LABEL maintainer="anil@xinfin.org"
WORKDIR /XDPoSChain

WORKDIR /XDCchain

COPY --from=builder /XDCchain/build/bin/XDC /usr/local/bin/XDC
COPY --from=builder /XDPoSChain/build/bin/XDC /usr/local/bin/XDC

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

Expand Down
14 changes: 7 additions & 7 deletions Dockerfile.bootnode
@@ -1,19 +1,19 @@
FROM golang:1.10-alpine as builder
FROM golang:1.11-alpine as builder

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

ADD . /XDCchain
RUN cd /XDCchain && make bootnode
ADD . /XDPoSChain
RUN cd /XDPoSChain && make bootnode

RUN chmod +x /XDCchain/build/bin/bootnode
RUN chmod +x /XDPoSChain/build/bin/bootnode

FROM alpine:latest

LABEL maintainer="anil@xinfin.org"
LABEL maintainer="etienne@XDPoSChain.com"

WORKDIR /XDCchain
WORKDIR /XDPoSChain

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

COPY docker/bootnode ./

Expand Down
20 changes: 9 additions & 11 deletions Dockerfile.node
@@ -1,20 +1,18 @@
FROM golang:1.10-alpine as builder
FROM golang:1.12-alpine as builder

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

ADD . /XDCchain
ADD . /XDPoSChain

RUN cd /XDCchain \
RUN cd /XDPoSChain \
&& make XDC \
&& chmod +x /XDCchain/build/bin/XDC
&& chmod +x /XDPoSChain/build/bin/XDC

FROM alpine:latest

LABEL maintainer="anil@xinfin.org"
WORKDIR /XDPoSChain

WORKDIR /XDCchain

COPY --from=builder /XDCchain/build/bin/XDC /usr/local/bin/XDC
COPY --from=builder /XDPoSChain/build/bin/XDC /usr/local/bin/XDC

ENV IDENTITY ''
ENV PASSWORD ''
Expand All @@ -23,15 +21,15 @@ ENV BOOTNODES ''
ENV EXTIP ''
ENV VERBOSITY 3
ENV SYNC_MODE 'full'
ENV NETWORK_ID '89'
ENV NETWORK_ID '88'
ENV WS_SECRET ''
ENV NETSTATS_HOST 'netstats-server'
ENV NETSTATS_PORT '3000'
ENV ANNOUNCE_TXS ''

RUN apk add --no-cache ca-certificates

COPY docker/XDCchain ./
COPY docker/XDPoSChain ./
COPY genesis/ ./

EXPOSE 8545 8546 30303 30303/udp
Expand Down
34 changes: 17 additions & 17 deletions Makefile
Expand Up @@ -4,37 +4,37 @@

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

GIT = git

XDC:
build/env.sh go run build/ci.go install ./cmd/XDC
go run build/ci.go install ./cmd/XDC
@echo "Done building."
@echo "Run \"$(GOBIN)/XDC\" to launch XDC."

gc:
build/env.sh go run build/ci.go install ./cmd/gc
go run build/ci.go install ./cmd/gc
@echo "Done building."
@echo "Run \"$(GOBIN)/gc\" to launch gc."

bootnode:
build/env.sh go run build/ci.go install ./cmd/bootnode
go run build/ci.go install ./cmd/bootnode
@echo "Done building."
@echo "Run \"$(GOBIN)/bootnode\" to launch a bootnode."

puppeth:
build/env.sh go run build/ci.go install ./cmd/puppeth
go run build/ci.go install ./cmd/puppeth
@echo "Done building."
@echo "Run \"$(GOBIN)/puppeth\" to launch puppeth."

all:
build/env.sh go run build/ci.go install
go run build/ci.go install

test: all
build/env.sh go run build/ci.go test
go run build/ci.go test

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

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

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

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

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

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

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

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

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

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

XDC-windows-amd64:
build/env.sh go run build/ci.go xgo -- --go=$(GO) --targets=windows/amd64 -v ./cmd/XDC
@echo "Darwin amd64 cross compilation done:"
go run build/ci.go xgo -- --go=$(GO) -buildmode=mode -x --targets=windows/amd64 -v ./cmd/XDC
@echo "Windows amd64 cross compilation done:"
@ls -ld $(GOBIN)/XDC-windows-* | grep amd64
gofmt:
$(GOFMT) -s -w $(GO_FILES)
Expand Down
10 changes: 1 addition & 9 deletions README.md
@@ -1,9 +1 @@
## XinFin

Blockchain for decentralized applications, token issuance and integration

Website Resource : https://xinFin.org

XinFin Mainet URL: http://XinFin.network/

XinFin TestNet/Apothem URL: http://apothem.network/
# XDPoSChain

0 comments on commit b5abbfe

Please sign in to comment.