celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
703 stars 370 forks source link

Node throws on celocli call #4387

Closed martinvol closed 2 years ago

martinvol commented 4 years ago

Expected Behavior

All celocli calls should work.

Current Behavior

Tried to do a transfer:

celocli transfer:gold --from=$FROM_ACC --to=$TO_ACC --value=1
Sending Transaction: transfer... !
Error: Returned error: authentication needed: password or unlock
    at Object.ErrorResponse (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/web3-core-helpers/src/errors.js:29:16)
    at ~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/web3-core-requestmanager/src/index.js:140:36
    at decoratedCallback (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/@celo/contractkit/lib/utils/rpc-caller.js:128:13)
    at XMLHttpRequest.request.onreadystatechange (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/web3-providers-http/src/index.js:102:13)
    at XMLHttpRequestEventTarget.dispatchEvent (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpResponseEnd (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14)
    at IncomingMessage.<anonymous> (~/.nvm/versions/node/v10.16.3/lib/node_modules/@celo/celocli/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61)

This is the log of the node:

RPC method eth_sendTransaction crashed: runtime error: invalid memory address or nil pointer dereference
goroutine 1516 [running]:
github.com/ethereum/go-ethereum/rpc.(*callback).call.func1(0xc0046f5580, 0x13, 0xc0004d9d50)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/service.go:200 +0xb5
panic(0x1454760, 0x211bc40)
    /usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/ethereum/go-ethereum/les.(*peerSet).getPeerWithEtherbase(0xc000079ec0, 0xc021eeee20, 0x0, 0x0, 0x0)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/les/peer.go:884 +0x137
github.com/ethereum/go-ethereum/les.(*lesTxRelay).send(0xc000035c80, 0xc0000115d8, 0x1, 0x1)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/les/txrelay.go:118 +0x163
github.com/ethereum/go-ethereum/les.(*lesTxRelay).Send(0xc000035c80, 0xc0000115d8, 0x1, 0x1)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/les/txrelay.go:165 +0x9c
github.com/ethereum/go-ethereum/light.(*TxPool).Add(0xc000202000, 0x188aa20, 0xc0003367c0, 0xc0000eda20, 0x0, 0x0)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/light/txpool.go:459 +0x196
github.com/ethereum/go-ethereum/les.(*LesApiBackend).SendTx(0xc00003cd60, 0x188aa20, 0xc0003367c0, 0xc0000eda20, 0x0, 0x0)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/les/api_backend.go:178 +0x54
github.com/ethereum/go-ethereum/internal/ethapi.SubmitTransaction(0x188aa20, 0xc0003367c0, 0x18a7360, 0xc00003cd60, 0xc0000eda20, 0x0, 0x0, 0x0, 0x0, 0xc00000e920, ...)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/internal/ethapi/api.go:1480 +0x89
github.com/ethereum/go-ethereum/internal/ethapi.(*PublicTransactionPoolAPI).SendTransaction(0xc0025aefe0, 0x188aa20, 0xc0003367c0, 0xb2b8e9c9f42b4783, 0x338e1e1df89326c6, 0xcef296b, 0xc0046f5600, 0xc01be4f4b0, 0xc00e11ea20, 0x0, ...)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/internal/ethapi/api.go:1526 +0x2f9
reflect.Value.call(0xc000241880, 0xc002fb1500, 0x13, 0x15c92a7, 0x4, 0xc00f227bd0, 0x3, 0x3, 0xc01b577bc8, 0x453b0c, ...)
    /usr/local/go/src/reflect/value.go:460 +0x5f6
reflect.Value.Call(0xc000241880, 0xc002fb1500, 0x13, 0xc00f227bd0, 0x3, 0x3, 0x1, 0x1, 0x1)
    /usr/local/go/src/reflect/value.go:321 +0xb4
github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc000478b40, 0x188aa20, 0xc0003367c0, 0xc0046f5580, 0x13, 0xc00e11e9a0, 0x1, 0x1, 0x0, 0x0, ...)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/service.go:206 +0x2b9
github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc003d2c1b0, 0x188aa20, 0xc0003367c0, 0xc0001f65b0, 0xc000478b40, 0xc00e11e9a0, 0x1, 0x1, 0x1)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/handler.go:369 +0x8a
github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc003d2c1b0, 0xc01d9e9b30, 0xc0001f65b0, 0xc000233bb0)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/handler.go:331 +0x22c
github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc003d2c1b0, 0xc01d9e9b30, 0xc0001f65b0, 0x1875601)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/handler.go:298 +0x1f3
github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1(0xc01d9e9b30)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/handler.go:139 +0x46
github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1(0xc003d2c1b0, 0xc00e11e960)
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/handler.go:226 +0x119
created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc
    /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/handler.go:222 +0x66

The node was started with this params: ocker run --name celo-ultralight-validator-account -it --restart unless-stopped -p 127.0.0.1:8545:8545 -v $PWD:/root/.celo $CELO_IMAGE --verbosity 3 --networkid $NETWORK_ID --syncmode lightest --rpc --rpcaddr 0.0.0.0 --rpcapi eth,net,web3,debug,admin,personal --etherbase $CELO_ACCOUNT_ADDRESS --bootnodes $BOOTNODE_ENODES --allow-insecure-unlock --unlock $CELO_ACCOUNT_ADDRESS --nousb --password /root/.celo/.password

Then tried to make another transfer and it worked just fine.

github-actions[bot] commented 2 years ago

This issue is stale and will be closed in 30 days without activity