wealdtech / ethereal

Apache License 2.0
209 stars 41 forks source link

Beacon deposit failed #43

Closed secret3579 closed 1 year ago

secret3579 commented 1 year ago

I trying to make a deposit by running the command but got error:

Command: ethereal beacon deposit --data=xxxx --eth2network=prater --from=0xxxxx --connection=http://localhost:8545 --privatekey=xxxx

Error: `panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x5bd7c8]

goroutine 1 [running]: math/big.(Int).Mul(0xc000046940, 0xc000046940, 0x0) /opt/hostedtoolcache/go/1.19.5/x64/src/math/big/int.go:167 +0xa8 github.com/ethereum/go-ethereum/consensus/misc.CalcBaseFee(0xc00049b440?, 0xc00049b680) /home/runner/go/pkg/mod/github.com/ethereum/go-ethereum@v1.10.26/consensus/misc/eip1559.go:86 +0x409 github.com/wealdtech/ethereal/v2/conn.(Conn).CurrentBaseFee(0xc00007c0c0, {0x2377eb0, 0xc00003a090}) /home/runner/work/ethereal/ethereal/conn/currentbasefee.go:54 +0x290 github.com/wealdtech/ethereal/v2/cmd.calculateFees() /home/runner/work/ethereal/ethereal/cmd/root.go:462 +0x45 github.com/wealdtech/ethereal/v2/cmd.generateTxOpts({0xaf, 0x0, 0xba, 0x3b, 0xca, 0xb3, 0x1c, 0x3e, 0x97, 0x18, ...}) /home/runner/work/ethereal/ethereal/cmd/root.go:427 +0x2d8 github.com/wealdtech/ethereal/v2/cmd.sendOnline({0xc000014098, 0x1, 0x2a?}, 0x284f140, {0xaf, 0x0, 0xba, 0x3b, 0xca, 0xb3, ...}) /home/runner/work/ethereal/ethereal/cmd/beacondeposit.go:284 +0x1c5 github.com/wealdtech/ethereal/v2/cmd.glob..func5(0x285fb40?, {0xcf2c31?, 0x5?, 0x5?}) /home/runner/work/ethereal/ethereal/cmd/beacondeposit.go:171 +0x8b4 github.com/spf13/cobra.(Command).execute(0x285fb40, {0xc00011abe0, 0x5, 0x5}) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x847 github.com/spf13/cobra.(Command).ExecuteC(0x2852680) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968 github.com/wealdtech/ethereal/v2/cmd.Execute() /home/runner/work/ethereal/ethereal/cmd/root.go:294 +0x25 main.main() /home/runner/work/ethereal/ethereal/main.go:19 +0x17`

Sharath11 commented 1 year ago

@secret3579 I am also getting same error. Were you able to solve this issue?

I deployed the deposit contract and tried to deposit using ethereal and I get the same error as above.

@mcdee Can you please help to check this

mcdee commented 1 year ago

I'm unable to reproduce this issue locally. Please can you state if this is for a goerli or a mainnet deposit, and that your execution client is on the correct chain?

I will also update the dependencies for this project, and release a new version to see if that helps.

secret3579 commented 1 year ago

Hi @mcdee I got an error occurred while data synchronization was in progress. Then I wait for the data sync to finish and I call the command once again => Success. (I deposit on Goerli)

Sharath11 commented 1 year ago

Hello @mcdee I was testing with local network. I created a local network and deployed deposit contract. Then I tried to make deposit transaction to the contract which I deployed using ethereal. I got error while doing so. I figured out that I need to include some of the fork versions in the genesis.json file of EC. The issue is solved when I added those fork versions in the genesis.json Thank you :)

SyedMuhamadYasir commented 6 months ago

Hello @mcdee I was testing with local network. I created a local network and deployed deposit contract. Then I tried to make deposit transaction to the contract which I deployed using ethereal. I got error while doing so. I figured out that I need to include some of the fork versions in the genesis.json file of EC. The issue is solved when I added those fork versions in the genesis.json Thank you :)

Hi Sharath,

what command did you use for beacon deposit, for performing the beacon deposit in your local/custom testnet ?

was it like this :

$ ethereal beacon deposit --data=deposit.json --eth2network=?? --from=CONTRACT_ADDRESS

if so, what was the value for the parameter of the eth2network ??

if you used another command/technique to perform the beacon deposit, please feel free to communicate it to me!

thanks