erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.12k stars 1.11k forks source link

Error running make erigon #8304

Closed damianlluch closed 6 months ago

damianlluch commented 1 year ago

Hi, I have followed the steps in:

https://wiki.polygon.technology/docs/pos/operate/node/erigon-client/

And I got this error when executing the command make erigon.

I have installed Go, on a Mac, M1 with brew. Latest.

damians-macbook-pro% make erigon           

Building erigon
# github.com/quic-go/quic-go/internal/qtls
../../../../../go/pkg/mod/github.com/quic-go/quic-go@v0.33.0/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration
# github.com/anacrolix/go-libutp
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/callbacks.go:18:10: cannot define new methods on non-local type *C.utp_callback_arguments
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/callbacks.go:26:10: cannot define new methods on non-local type *C.utp_callback_arguments
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/callbacks.go:30:10: cannot define new methods on non-local type *C.utp_callback_arguments
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/callbacks.go:34:10: cannot define new methods on non-local type *C.utp_callback_arguments
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/callbacks.go:38:10: cannot define new methods on non-local type *C.utp_callback_arguments
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/utp.go:29:12: cannot define new methods on non-local type *C.utp_context
../../../../../go/pkg/mod/github.com/anacrolix/go-libutp@v1.3.0/utp.go:40:12: cannot define new methods on non-local type *C.utp_context
make: *** [erigon.cmd] Error 1
quickchase commented 1 year ago

The version of quic-go you're using can't be built on Go 1.21 yet

Use go 1.20.X for now

anacrolix commented 1 year ago

See also https://github.com/anacrolix/go-libutp/releases/tag/v1.3.1.

damianlluch commented 1 year ago

Thanks! The branch I have to be in is develop?

damianlluch commented 1 year ago

image

I have created an EC2 and it seems to have gone well, cleaning dependencies and installing the version I have been told to install.

To run on testnet I ran like this ./build/bin/erigon --chain=mumbai.

Now, in an AWS environment, what additional steps should I do to be able to connect my applications to my node?

thanks

damianlluch commented 1 year ago

Yesterday the node was running correctly, today it seems to be down. Can anyone tell me what's going on?

thanks

goroutine 10595 [runnable]:
runtime.gopark(0xc005717580?, 0xb?, 0x0?, 0x0?, 0xbd?)
        runtime/proc.go:381 +0xd6 fp=0xc0057174f8 sp=0xc0057174d8 pc=0x4656f6
runtime.netpollblock(0x4ef5e5?, 0x42d1ef?, 0x0?)
        runtime/netpoll.go:527 +0xf7 fp=0xc005717530 sp=0xc0057174f8 pc=0x45dd37
internal/poll.runtime_pollWait(0x7f9e1d6cf6f8, 0x72)
        runtime/netpoll.go:306 +0x89 fp=0xc005717550 sp=0xc005717530 pc=0x4938e9
internal/poll.(*pollDesc).wait(0xc008673f80?, 0xc008e6ce00?, 0x0)
        internal/poll/fd_poll_runtime.go:84 +0x32 fp=0xc005717578 sp=0xc005717550 pc=0x50cd12
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc008673f80, {0xc008e6ce00, 0x200, 0x200})
        internal/poll/fd_unix.go:167 +0x299 fp=0xc005717610 sp=0xc005717578 pc=0x50e0f9
net.(*netFD).Read(0xc008673f80, {0xc008e6ce00?, 0x4944db?, 0xc00db191e0?})
        net/fd_posix.go:55 +0x29 fp=0xc005717658 sp=0xc005717610 pc=0x611409
net.(*conn).Read(0xc00d672d60, {0xc008e6ce00?, 0xc0057176d8?, 0x47a972?})
        net/net.go:183 +0x45 fp=0xc0057176a0 sp=0xc005717658 pc=0x625785
net.(*TCPConn).Read(0x7f9e1da9d5b8?, {0xc008e6ce00?, 0xc00f844000?, 0x0?})
        <autogenerated>:1 +0x29 fp=0xc0057176d0 sp=0xc0057176a0 pc=0x63b2e9
github.com/ledgerwatch/erigon/p2p.(*meteredConn).Read(0xc005717738?, {0xc008e6ce00?, 0x1000000000041?, 0x7f9de4085fc0?})
        github.com/ledgerwatch/erigon/p2p/metrics.go:63 +0x26 fp=0xc005717718 sp=0xc0057176d0 pc=0x12ab806
io.ReadAtLeast({0x7f9de56e9938, 0xc0049aa140}, {0xc008e6ce00, 0x200, 0x200}, 0x2)
        io/io.go:332 +0x9a fp=0xc005717760 sp=0xc005717718 pc=0x4e765a
github.com/ledgerwatch/erigon/p2p/rlpx.(*readBuffer).read(0xc00c0fb370, {0x7f9de56e9938?, 0xc0049aa140?}, 0x2)
        github.com/ledgerwatch/erigon/p2p/rlpx/buffer.go:64 +0x1d2 fp=0xc0057177d0 sp=0xc005717760 pc=0x12a2d92
github.com/ledgerwatch/erigon/p2p/rlpx.(*handshakeState).readMsg(0xc00c0fb320, {0x2191a20, 0xc008de2100}, 0xc000a88690, {0x7f9de56e9938, 0xc0049aa140})
        github.com/ledgerwatch/erigon/p2p/rlpx/rlpx.go:602 +0x23c fp=0xc005717918 sp=0xc0057177d0 pc=0x12a6a5c
github.com/ledgerwatch/erigon/p2p/rlpx.(*handshakeState).runInitiator(0xc00c0fb320, {0x7f9de56e98f0?, 0xc0049aa140}, 0x0?, 0xc008e4d220)
        github.com/ledgerwatch/erigon/p2p/rlpx/rlpx.go:532 +0x265 fp=0xc005717a70 sp=0xc005717918 pc=0x12a6085
github.com/ledgerwatch/erigon/p2p/rlpx.(*Conn).Handshake(0xc00ebd2fa0, 0xc093cd046?)
        github.com/ledgerwatch/erigon/p2p/rlpx/rlpx.go:307 +0x11a fp=0xc005717bd8 sp=0xc005717a70 pc=0x12a497a
github.com/ledgerwatch/erigon/p2p.(*rlpxTransport).doEncHandshake(0xc00df87240, 0x2f233a0?)
        github.com/ledgerwatch/erigon/p2p/transport.go:139 +0x90 fp=0xc005717c10 sp=0xc005717bd8 pc=0x12b8bb0
github.com/ledgerwatch/erigon/p2p.(*Server).setupConn(0xc000005200, 0xc008e48820, 0x8e4d220?, 0xc00bd8ab40)
        github.com/ledgerwatch/erigon/p2p/server.go:1008 +0x156 fp=0xc005717de8 sp=0xc005717c10 pc=0x12b6156
github.com/ledgerwatch/erigon/p2p.(*Server).SetupConn(0xc000005200, {0x2f47e18?, 0xc0049aa140}, 0x1, 0xc00bd8ab40)
        github.com/ledgerwatch/erigon/p2p/server.go:980 +0x1b3 fp=0xc005717e48 sp=0xc005717de8 pc=0x12b5f73
github.com/ledgerwatch/erigon/p2p.(*Server).SetupConn-fm({0x2f47e18?, 0xc0049aa140?}, 0x85540c8?, 0xc000066500?)
        <autogenerated>:1 +0x3e fp=0xc005717e80 sp=0xc005717e48 pc=0x12be75e
github.com/ledgerwatch/erigon/p2p.(*dialTask).dial(0xc00dd52e40, 0xc00a6dec60, 0xc00bd8ab40)
        github.com/ledgerwatch/erigon/p2p/dial.go:550 +0x479 fp=0xc005717f70 sp=0xc005717e80 pc=0x12aaa79
github.com/ledgerwatch/erigon/p2p.(*dialTask).run(0xc00dd52e40, 0xc00af56620?)
        github.com/ledgerwatch/erigon/p2p/dial.go:494 +0x6b fp=0xc005717fa0 sp=0xc005717f70 pc=0x12aa0cb
github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial.func1()
        github.com/ledgerwatch/erigon/p2p/dial.go:465 +0x51 fp=0xc005717fe0 sp=0xc005717fa0 pc=0x12aa011
runtime.goexit()
        runtime/asm_amd64.s:1598 +0x1 fp=0xc005717fe8 sp=0xc005717fe0 pc=0x499981
created by github.com/ledgerwatch/erigon/p2p.(*dialScheduler).startDial
        github.com/ledgerwatch/erigon/p2p/dial.go:463 +0x3ca

goroutine 10298 [select]:
runtime.gopark(0xc00ba74fb0?, 0x2?, 0xb0?, 0xd2?, 0xc00ba74f84?)
        runtime/proc.go:381 +0xd6 fp=0xc00ba74e08 sp=0xc00ba74de8 pc=0x4656f6
runtime.selectgo(0xc00ba74fb0, 0xc00ba74f80, 0xc00ba74fd0?, 0x0, 0x2f3a8f0?, 0x1)
        runtime/select.go:327 +0x7be fp=0xc00ba74f48 sp=0xc00ba74e08 pc=0x4759be
net.(*netFD).connect.func2()
        net/fd_unix.go:118 +0x86 fp=0xc00ba74fe0 sp=0xc00ba74f48 pc=0x613326
runtime.goexit()
        runtime/asm_amd64.s:1598 +0x1 fp=0xc00ba74fe8 sp=0xc00ba74fe0 pc=0x499981
created by net.(*netFD).connect
        net/fd_unix.go:117 +0x3bd
AskAlexSharov commented 1 year ago

Most useful info usually in first 100lines of stack trace.

damianlluch commented 1 year ago

I am starting the node like this

ubuntu@ip-172-31-47-135:~/erigon$ ./build/bin/erigon --chain=mumbai --bor.heimdall=https://heimdall-api-testnet.polygon.technology --bor.milestone=true --http=true --http.addr=0.0.0.0.0 --http.compression=true --http.vhosts=*

I have opened input 8545 and output 0.0.0.0.0 on my EC2

And from my Metamask, I am replacing the Mumbai RPC, with mine, without success, it doesn't connect. (I have hidden the IP for security reasons)

image

The node starts, apparently, correctly.

image

AskAlexSharov commented 1 year ago

try --http.vhosts=any --http.corsdomain=*

damianlluch commented 1 year ago

Can it be that it takes so long to synchronise so that I can connect from Metamask to my node? It takes hours and it is still going on. If you can tell me how long I have to wait to be able to connect to the node please.

I am connecting via Curl, and I get this answer.

ubuntu@ip-172-31-47-135:~$ curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params":[], "id":1}' http://3.125.40.244:8545

{"jsonrpc":"2.0","id":1,"result":"0x0"}

Any additional ways to test?

github-actions[bot] commented 11 months ago

This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.

yperbasis commented 6 months ago

Please re-open if this issue still happens with v2.59.2 or later.