Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parlia slice bounds out of range #1286

Closed
Davincible opened this issue Jan 29, 2023 · 7 comments
Closed

Parlia slice bounds out of range #1286

Davincible opened this issue Jan 29, 2023 · 7 comments

Comments

@Davincible
Copy link

nft-marketplace-bsc-miner-1  | panic: runtime error: slice bounds out of range [:-65]
nft-marketplace-bsc-miner-1  | 
nft-marketplace-bsc-miner-1  | goroutine 102 [running]:
nft-marketplace-bsc-miner-1  | github.com/ethereum/go-ethereum/consensus/parlia.(*Parlia).snapshot(0xc000976f00, {0x1ce6d20, 0xc000977400}, 0x8?, {0xa3, 0xfa, 0x5d, 0xc3, 0x93, 0xe4, ...}, ...)
nft-marketplace-bsc-miner-1  | 	github.com/ethereum/go-ethereum/consensus/parlia/parlia.go:464 +0xd0a
nft-marketplace-bsc-miner-1  | github.com/ethereum/go-ethereum/consensus/parlia.(*Parlia).Prepare(0xc000976f00, {0x1ce6d20, 0xc000977400}, 0xc000968480)
nft-marketplace-bsc-miner-1  | 	github.com/ethereum/go-ethereum/consensus/parlia/parlia.go:602 +0xf8
nft-marketplace-bsc-miner-1  | github.com/ethereum/go-ethereum/miner.(*worker).prepareWork(0xc00064a480, 0xc0022c9b70)
nft-marketplace-bsc-miner-1  | 	github.com/ethereum/go-ethereum/miner/worker.go:974 +0x9a5
nft-marketplace-bsc-miner-1  | github.com/ethereum/go-ethereum/miner.(*worker).commitWork(0xc00064a480, 0xc002039650, 0x63d6e8ab)
nft-marketplace-bsc-miner-1  | 	github.com/ethereum/go-ethereum/miner/worker.go:1101 +0x3a5
nft-marketplace-bsc-miner-1  | github.com/ethereum/go-ethereum/miner.(*worker).mainLoop(0xc00064a480)
nft-marketplace-bsc-miner-1  | 	github.com/ethereum/go-ethereum/miner/worker.go:479 +0x745
nft-marketplace-bsc-miner-1  | created by github.com/ethereum/go-ethereum/miner.newWorker
nft-marketplace-bsc-miner-1  | 	github.com/ethereum/go-ethereum/miner/worker.go:276 +0x7b6
@brilliant-lx
Copy link
Collaborator

investigating.

@Davincible
Copy link
Author

Davincible commented Jan 30, 2023

This happens when you don't send the 'extraData' field in the genesis json btw. Would probably be best to either print an error message saying its missing or ignore it, idk if its a required field

@brilliant-lx
Copy link
Collaborator

we can add a check for the length of extraData.
but why would you empty the extraData element, it should not be empty in BSC's block header.

@Davincible
Copy link
Author

At the time the issue occurred I hadn't purposefully emptied the extraData, I was trying to set up a local network, and only added the parlia consensus block, without the rest.

So arguably user fault, due to lack of documentation. But an error message hinting to what's wrong would be nice.

@brilliant-lx
Copy link
Collaborator

Yes, we will add an error message for it, it will make it clearer.
BTW,
"due to lack of documentation": I am not sure, but there may not have published document on how to setup local BSC dev net, right? If there is one, we can improve it.

@Davincible
Copy link
Author

I am not sure, but there may not have published document on how to setup local BSC dev net, right?

Yes, no docs available

@brilliant-lx
Copy link
Collaborator

The error message was added, it will dump error message once extraData is empty in genesis block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants