Code Monkey home page Code Monkey logo

oasys-validator's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

oasys-validator's Issues

Docker build failed due to Environment.json not found

System information

Geth version: v1.0.5
OS & Version: Linux

Expected behaviour

docker build succeeds

Actual behaviour

build failed with the error message "consensus/oasys/contract.go:38:13: pattern oasys-genesis-contract/artifacts/contracts/Environment.sol/Environment.json: no matching files found".

Steps to reproduce the behaviour

build the docker image with the following Dockerfile

Backtrace

*Dockerfile

# Build Geth in a stock Go builder container
FROM golang:1.17-alpine as builder

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

RUN git clone https://github.com/oasysgames/oasys-validator /go-ethereum
RUN cd /go-ethereum && git checkout ${VERSION} && go run build/ci.go install ./cmd/geth

# Pull Geth into a second stage deploy alpine container
FROM alpine:latest

RUN apk add --no-cache ca-certificates
COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/
RUN wget https://github.com/oasysgames/oasys-validator/releases/download/${VERSION}/genesis.zip \
  && unzip genesis.zip \
  && mv genesis/${NETWORK}.json /home/geth/genesis.json
RUN geth init /home/geth/genesis.json
EXPOSE 8545 8546 30303 30303/udp
ENTRYPOINT ["geth"]
  • Build Log
Step 1/11 : FROM golang:1.17-alpine as builder
1.17-alpine: Pulling from library/golang
530afca65e2e: Pulling fs layer
d450d4da0343: Pulling fs layer
8162171ecb65: Pulling fs layer
ff63b82a42d3: Pulling fs layer
5b4b56e6b994: Pulling fs layer
ff63b82a42d3: Waiting
5b4b56e6b994: Waiting
d450d4da0343: Verifying Checksum
d450d4da0343: Download complete
530afca65e2e: Verifying Checksum
530afca65e2e: Download complete
8162171ecb65: Verifying Checksum
8162171ecb65: Download complete
5b4b56e6b994: Download complete
530afca65e2e: Pull complete
d450d4da0343: Pull complete
8162171ecb65: Pull complete
ff63b82a42d3: Verifying Checksum
ff63b82a42d3: Download complete
ff63b82a42d3: Pull complete
5b4b56e6b994: Pull complete
Digest: sha256:99ddec1bbfd6d6bca3f9804c02363daee8c8524dae50df7942e8e60788fd17c9
Status: Downloaded newer image for golang:1.17-alpine
 ---> 270c4f58750f
Step 2/11 : RUN apk add --no-cache gcc musl-dev linux-headers git
 ---> Running in c1ec01290843
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/19) Upgrading musl (1.2.3-r0 -> 1.2.3-r2)
(2/19) Installing libgcc (11.2.1_git20220219-r2)
(3/19) Installing libstdc++ (11.2.1_git20220219-r2)
(4/19) Installing binutils (2.38-r3)
(5/19) Installing libgomp (11.2.1_git20220219-r2)
(6/19) Installing libatomic (11.2.1_git20220219-r2)
(7/19) Installing gmp (6.2.1-r2)
(8/19) Installing isl22 (0.22-r0)
(9/19) Installing mpfr4 (4.1.0-r0)
(10/19) Installing mpc1 (1.2.1-r0)
(11/19) Installing gcc (11.2.1_git20220219-r2)
(12/19) Installing brotli-libs (1.0.9-r6)
(13/19) Installing nghttp2-libs (1.47.0-r0)
(14/19) Installing libcurl (7.83.1-r6)
(15/19) Installing expat (2.5.0-r0)
(16/19) Installing pcre2 (10.40-r0)
(17/19) Installing git (2.36.5-r0)
(18/19) Installing linux-headers (5.16.7-r1)
(19/19) Installing musl-dev (1.2.3-r2)
Executing busybox-1.35.0-r15.trigger
OK: 140 MiB in 33 packages
Removing intermediate container c1ec01290843
 ---> f6145c558897
Step 3/11 : RUN git clone https://github.com/oasysgames/oasys-validator /go-ethereum
 ---> Running in 6c8c319a2a28
Cloning into '/go-ethereum'...
Removing intermediate container 6c8c319a2a28
 ---> 54cdb1817bb9
Step 4/11 : RUN cd /go-ethereum && git checkout ${VERSION} && go run build/ci.go install ./cmd/geth
 ---> Running in aba248ea373e
Your branch is up to date with 'origin/main'.
go: downloading github.com/cespare/cp v0.1.0
go: downloading github.com/Azure/azure-storage-blob-go v0.7.0
go: downloading golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
go: downloading github.com/Azure/azure-pipeline-go v0.2.2
go: downloading github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d
>>> /usr/local/go/bin/go build -ldflags -X main.gitCommit=c91cd74bf73bada03067588899c1c725d7e7ce97 -X main.gitDate=20230310 -extldflags -Wl,-z,stack-size=0x800000 -trimpath -v -o /go-ethereum/build/bin/geth ./cmd/geth
go: downloading github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e
go: downloading github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading gopkg.in/urfave/cli.v1 v1.20.0
go: downloading github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff
go: downloading github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4
go: downloading golang.org/x/text v0.3.6
go: downloading github.com/golang/protobuf v1.4.3
go: downloading github.com/karalabe/usb v0.0.2
go: downloading github.com/deckarep/golang-set v1.8.0
go: downloading github.com/google/uuid v1.1.5
go: downloading github.com/rjeczalik/notify v0.9.1
go: downloading github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible
go: downloading golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912
go: downloading github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7
go: downloading github.com/edsrzf/mmap-go v1.0.0
go: downloading github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
go: downloading github.com/holiman/uint256 v1.2.0
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/prometheus/tsdb v0.7.1
go: downloading github.com/VictoriaMetrics/fastcache v1.6.0
go: downloading github.com/holiman/bloomfilter/v2 v2.0.3
go: downloading gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6
go: downloading github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5
go: downloading github.com/hashicorp/go-bexpr v0.1.10
go: downloading github.com/mattn/go-isatty v0.0.12
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef
go: downloading github.com/go-stack/stack v1.8.0
go: downloading github.com/rs/cors v1.7.0
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading github.com/mattn/go-runewidth v0.0.9
go: downloading github.com/naoina/go-stringutil v0.1.0
go: downloading google.golang.org/protobuf v1.23.0
go: downloading github.com/graph-gophers/graphql-go v1.3.0
go: downloading github.com/influxdata/influxdb-client-go/v2 v2.4.0
go: downloading github.com/influxdata/influxdb v1.8.3
go: downloading github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
go: downloading github.com/huin/goupnp v1.0.2
go: downloading github.com/jackpal/go-nat-pmp v1.0.2
go: downloading github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
go: downloading golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/mitchellh/pointerstructure v1.2.0
go: downloading github.com/tklauser/go-sysconf v0.3.5
go: downloading golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d
go: downloading github.com/go-sourcemap/sourcemap v2.1.3+incompatible
go: downloading github.com/mitchellh/mapstructure v1.4.1
go: downloading github.com/tklauser/numcpus v0.2.2
go: downloading github.com/opentracing/opentracing-go v1.1.0
go: downloading github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097
go: downloading github.com/deepmap/oapi-codegen v1.8.2
go: downloading gopkg.in/yaml.v2 v2.4.0
consensus/oasys/contract.go:38:13: pattern oasys-genesis-contract/artifacts/contracts/Environment.sol/Environment.json: no matching files found
util.go:46: exit status 1
exit status 1
The command '/bin/sh -c cd /go-ethereum && git checkout ${VERSION} && go run build/ci.go install ./cmd/geth' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1

v1.2.0 cannot sync from scratch

System information

Geth
Version: 1.2.0
Git Commit: e955016a2f750c874f5052f83a18ccc676f69355
Architecture: amd64
Go Version: go1.17.8
Operating System: linux

Expected behaviour

can sync from scratch

Actual behaviour

init from 1.2.0 genesis and sync from scratch

########## BAD BLOCK #########
Chain config: {ChainID: 248 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Berlin: 0, London: 0, Arrow Glacier: <nil>, Mer
geFork: <nil>, OasysPublication: 1529980, Engine: oasys}

Number: 1895213
Hash: 0x7c386a86eff1277dea1643ba8b40aec1687879b0c4584a57f432f10e492e4653


Error: missing trie node 2e96c554dd63a752b80120fbc8c5c41619fb276cbd2b4105ebe125b88196a1ee (path )
##############################

Steps to reproduce the behaviour

same as above

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

Testnet Produces Bad Block, Leading to Syncing Failures in Other Nodes

The Testnet is operated by a single validator node, unlike the Mainnet where multiple nodes exist to validate and correct blocks. Occasionally, this single node may produce an invalid block that is not acceptable to the full node due to its flawed nature. As a result, syncing with the Testnet comes to a halt whenever such a bad block is encountered.

System information

Geth version: 1.X
OS & Version: Linux

Expected behaviour

The single node should consistently produce valid blocks.

Actual behaviour

The single node occasionally produces invalid blocks.

Steps to reproduce the behaviour

The steps to reproduce this behavior have not yet been identified. The issue occurs approximately once every two weeks.

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

Testnet block 1084887 is determined as a bad block due to "invalid receipt root hash"

System information

Geth version: v1.0.6-testnet1
OS & Version: Linux
Commit hash : (if develop) 7943488

Expected behaviour

Passing the block validation.

Actual behaviour

A bad block error occurs.

########## BAD BLOCK #########
Chain config: {ChainID: 9372 Homestead: 0 DAO: <nil> DAOSupport: false EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Berlin: 0, London: 0, Arrow Glacier: <nil>, MergeFork: <nil>, Engine: oasys}

Number: 1084887
Hash: 0xacf1ca3ee60bb8c5f4b46ace368d98627e8fdabe2ee2ec5b093ed6270d333365
    0: cumulative: 101520 gas: 101520 contract: 0x0000000000000000000000000000000000000000 status: 1 tx: 0xf5c371a3385a9ee168fb905721ab9e7ebba72d47f4958e4e2ca8bd31f84e9707 logs: [0xc0127b6580 0xc0172bc000] bloom: 00000000000000000000000000000000000000002000000000000000040000000000000000000000000000004000000200000000000000000000000000000000000040000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000008000000010000000000000000000000000000000000000000008000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000004000000000000000000000000000000000000000000000000000000 state:


Error: invalid receipt root hash (remote: ed133c4fc3e26da8eb05c2c8ede09b927916c680528763b81b3f10fb37cc99ae local: 7f1d855b0b32c64873f5a4e781768ca1c54dcf70212d106764418f217850ceeb)
##############################

Steps to reproduce the behaviour

Running testnet node with v1.0.6-testnet1
Same error happens with v1.0.5-testnet

max fee per gas less than block base fee: address

System information

Geth version: 1.2.0
OS & Version: Linux

Expected behaviour

The following command succeeds with mainnet archive nodes.

% curl -X "POST" "https://[MainnetEndpointURL]" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "id": "1",
  "params": ["0x1DCC3E", {"tracer": "callTracer"}]
}'

Actual behaviour

The command fails with the following error.

% curl -X "POST" "https://[MainnetEndpointURL]" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "id": "1",
  "params": ["0x1DCC3E", {"tracer": "callTracer"}]
}'
{"jsonrpc":"2.0","id":"1","error":{"code":-32000,"message":"max fee per gas less than block base fee: address 0x9326839c5372E68e048732c3CD08bb0D2eFe1BB4, maxFeePerGas: 0 baseFee: 7"}}

Steps to reproduce the behaviour

Run the following command (got the same error from all nodes we're running. but not sure the same error occurs for other nodes)

% curl -X "POST" "https://[MainnetEndpointURL]" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "id": "1",
  "params": ["0x1DCC3E", {"tracer": "callTracer"}]
}'

Backtrace

[backtrace]

got an error when syncing block from scratch

System information

Geth version: v1.0.6
OS & Version: Windows/Linux/OSX
Commit hash : (if v1.0.6)

Expected behaviour

No error logs printed

Actual behaviour

Many error logs printed show as below:

ERROR[06-06|06:30:15.298] Failed to get validators                 in=Snapshot.apply hash=f4a1ce..a16ea7 number=1,013,760 err="header for hash not found"

Steps to reproduce the behaviour

Backtrace

[backtrace]

When submitting logs: please submit them as text and not screenshots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.