graphprotocol / erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
1 stars 12 forks source link

Replicate the delegate caller issue on battlefield #38

Closed dhyaniarun1993 closed 1 year ago

dhyaniarun1993 commented 1 year ago

Modify the contract and test the delegate caller situation on the battlefield. Check the block information for geth and Erigon

dhyaniarun1993 commented 1 year ago

The test was completed and result are as follows

To understand the block result, let's take the above example

For geth client geth_version=1.10.26-fh2 using battlefield testing

{
     "address": "abc",
     "callType": "CALL",
     "caller": "caller_addr",
     "index": 1
},
{
     "address": "pqr",
     "callType": "DELEGATE",
     "caller": "abc",
     "index": 2,
     "parentIndex": 1
},
{
     "address": "xyz",
     "callType": "DELEGATE",
     "caller": "abc",
     "index": 3,
     "parentIndex": 2
}

For Erigon (same)

{
     "address": "abc",
     "callType": "CALL",
     "caller": "caller_addr",
     "index": 1
},
{
     "address": "pqr",
     "callType": "DELEGATE",
     "caller": "abc",
     "index": 2,
     "parentIndex": 1
},
{
     "address": "xyz",
     "callType": "DELEGATE",
     "caller": "abc",
     "index": 3,
     "parentIndex": 2
}

For geth goerli merged block stored at gs://dfuseio-global-blocks-uscentral/eth-goerli/v3/ , the behaviour is different.

{
     "address": "abc",
     "callType": "CALL",
     "caller": "caller_addr",
     "index": 1
},
{
     "address": "pqr",
     "callType": "DELEGATE",
     "caller": "abc",
     "index": 2,
     "parentIndex": 1
},
{
     "address": "xyz",
     "callType": "DELEGATE",
     "caller": "pqr",
     "index": 3,
     "parentIndex": 2
}

For geth goerli merged block(provided by SF), the caller for the third call(DELEGATE) is different. I have following points for the geth goerli block provided by SF: