#StackBounty: #go-ethereum #evm #golang How to get an evm reference inside go-ethereum GetBalance function?

Bounty: 50

In order to modify GetBalance function to fork go-ethereum, I find difficulties to get a reference of the running evm. The function has a reference for self *StateDB:

func (self *StateDB) GetBalance(addr common.Address) *big.Int

but I cannot get an evm of type *vm.EVM from StateDB. I need the evm to make a contract call inside the GetBalance function for this fork. Is it possible in some way to get the evm from StateDB, or should I use any other strategy?

Get this bounty!!!

#StackBounty: #go-ethereum #golang #genesis Genesis allocation and (address, balance) tuples

Bounty: 50

On go-ethereum souce code at coregenesis_alloc.go(19):

package core

// Constants containing the genesis allocation of built-in genesis blocks.
// Their content is an RLP-encoded list of (address, balance) tuples.
// Use mkalloc.go to create/update them.

// nolint: misspell
const mainnetAllocData = "xfax04]Xu0793r..."
const testnetAllocData = "xf9x03xa4u0080..."
const rinkebyAllocData = "xf9x03xb7u0080..."
const goerliAllocData = "xf9x04x06u0080..."

what are all these? pre-funded wallets? I thought pre-funded wallets were specified on genesis block like this:

"alloc": {"2sa2a321h8353vba12as8965r3340huk3s6a2h6e": { "balance": "10" }, ...

where can I find the code that implements the call to AddBalance() for genesis block allocation? Thx!

Get this bounty!!!

#StackBounty: #go-ethereum #nodes #proof-of-authority #poa #clique Unable to Add 3rd Proof-of-Authority Sealer Node

Bounty: 50

I have a geth POA private blockchain setup and running with 2 sealer nodes. Now I have setup a 3rd node as a sealer, and ran the following command on the both existing sealer nodes

clique.propose("0x555c9e3d738837d14ebda7cad9359f840f3c650c", true)
> null

and we confirm that the 3rd node has been voted because we see the address of the 3rd node when we run clique.getSigners() along with the other two sealer nodes’ address.

Problem: However after we start and restart the 3rd geth node that we are trying to add as a sealer node, we get the error

INFO [08-24|21:25:55.169] Commit new mining work number=1 sealhash=e935f6…e90182 uncles=0 txs=0 gas=0 fees=0 elapsed=256.472µs

WARN [08-24|21:25:55.170] Block sealing failed err=unauthorized

This error persists even when running clique.propose(...,true) on the 3rd node to for itself.

On Ethstats, we see that this 3rd node is stuck at block #0 and never tries to sync the blockchaibn.

Any help is greatly appreciated!

Get this bounty!!!