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

Try Erigon (TurboGeth) as a Tracing Node #246

Closed
Uxio0 opened this issue Apr 28, 2021 · 11 comments
Closed

Try Erigon (TurboGeth) as a Tracing Node #246

Uxio0 opened this issue Apr 28, 2021 · 11 comments
Assignees

Comments

@Uxio0
Copy link
Member

Uxio0 commented Apr 28, 2021

Problem Statement:

Details:
I don't think we can trust TurboGeth (turbo-geth/v2021.04.3/linux-amd64/go1.16.3 ) for tracing...

In [12]: ethereum_client.parity.trace_transaction('0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63')
Out[12]: []

Block of that transaction is 7941777

In [13]: [internal_tx for internal_tx in ethereum_client.parity.trace_block(7941777) if internal_tx['transactionHash'] == '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63']
Out[13]: 
[{'action': {'from': '0xed2Fb810E69bf37802eC356e4D30f1C4A1A8d216',
   'gas': 380626,
   'value': 0,
   'callType': 'call',
   'input': HexBytes('0x1688f0b900000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000001772c39fa1b0000000000000000000000000000000000000000000000000000000000000164b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d216000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'),
   'to': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,
  'error': 'Reverted',
  'subtraces': 0,
  'traceAddress': [],
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,
  'type': 'call'}]

Transaction was not reverted at all: https://rinkeby.etherscan.io/tx/0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63

With regular not tracing rpc calls it returns the expected results:

In [4]: ethereum_client.get_transaction_receipt('0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63')
Out[4]:
AttributeDict({'blockHash': HexBytes('0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11'),
 'blockNumber': 7941777,
 'contractAddress': None,
 'cumulativeGasUsed': 837377,
 'from': '0xed2Fb810E69bf37802eC356e4D30f1C4A1A8d216',
 'gasUsed': 266231,
 'logs': [AttributeDict({'address': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B',
   'topics': [HexBytes('0xa38789425dbeee0239e16ff2d2567e31720127fbc6430758c1a4efc6aef29f80')],
   'data': '0x000000000000000000000000333367d9a5b1782270193ed1d0c7669d90aa560a',
   'blockNumber': 7941777,
   'transactionHash': HexBytes('0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63'),
   'transactionIndex': 3,
   'blockHash': HexBytes('0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11'),
   'logIndex': 3,
   'removed': False})],
 'logsBloom': HexBytes('0x00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000004000000000000000000000000000000000'),
 'status': 1,
 'to': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B',
 'transactionHash': HexBytes('0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63'),
 'transactionIndex': 3})

Using OpenEthereum:

In [2]: ethereum_client.parity.trace_transaction('0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63')                                                                
Out[2]:                              
[{'action': {'from': '0xed2Fb810E69bf37802eC356e4D30f1C4A1A8d216',
   'gas': 380626,                               
   'value': 0,                                                                             
   'callType': 'call',                       
   'input': HexBytes('0x1688f0b900000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000001772c39fa1b0000000000000000000000000000000000000000000000000000000000000164b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d216000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'),                                 
   'to': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,     
  'result': {'gasUsed': 242183,      
   'output': HexBytes('0x000000000000000000000000333367d9a5b1782270193ed1d0c7669d90aa560a')},                                                                                         
  'subtraces': 2,                       
  'traceAddress': [],                                      
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,                                             
  'type': 'call'},                               
 {'action': {'from': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B',
   'gas': 340263,                                                                          
   'value': 0,                               
   'init': HexBytes('0x608060405234801561001057600080fd5b506040516101e73803806101e78339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806101c36024913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060aa806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea265627a7a72315820d8a00dc4fe6bf675a9d7416fc2d00bb3433362aa8186b750f76c4027269667ff64736f6c634300050e0032496e76616c6964206d617374657220636f707920616464726573732070726f766964656400000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f')},                           
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,                                             
  'result': {'gasUsed': 55109,                                
   'code': HexBytes('0x608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea265627a7a72315820d8a00dc4fe6bf675a9d7416fc2d00bb3433362aa8186b750f76c4027269667ff64736f6c634300050e0032'),                                                                                    
   'address': '0x333367d9A5b1782270193Ed1D0C7669d90aA560A'},
  'subtraces': 0,                                      
  'traceAddress': [0],                     
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,
  'type': 'create'},                                                   
 {'action': {'from': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B',
   'gas': 285195,
   'value': 0,
   'callType': 'call',                                                    
   'input': HexBytes('0xb63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d2160000000000000000000000000000000000000000000000000000000000000000'),                                                       
   'to': '0x333367d9A5b1782270193Ed1D0C7669d90aA560A'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,                                            
  'result': {'gasUsed': 150098, 'output': HexBytes('0x')},
  'subtraces': 1,                                          
  'traceAddress': [1],                                       
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,                    
  'type': 'call'},                                                                         
 {'action': {'from': '0x333367d9A5b1782270193Ed1D0C7669d90aA560A',
   'gas': 279119,      
   'value': 0, 
   'callType': 'delegatecall',                                                             
   'input': HexBytes('0xb63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d2160000000000000000000000000000000000000000000000000000000000000000'),                                               
   'to': '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',       
  'blockNumber': 7941777,                         
  'result': {'gasUsed': 148410, 'output': HexBytes('0x')},
  'subtraces': 0,             
  'traceAddress': [1, 0],            
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,           
  'type': 'call'}]                                          
@rmeissner
Copy link
Member

Did you report this to the TurboGeth team?

@Uxio0
Copy link
Member Author

Uxio0 commented Apr 28, 2021

Did you report this to the TurboGeth team?

Yes, I was talking to them on TurboGeth discord 😉

@ziogaschr
Copy link

At core-geth we've also been working on Trace features with regard to achieving parity with the OpenEthereum API (no pun intended), and have learned a lot from talking with and referencing turbo-geth too.
We think we're getting close to a nearly complete congruence, and have added a few performance optimizations along the way.

Here, you can find a list of stuff that we decided to handle differently.

Turbo-geth will probably shine at the trace-filter performance.

@Uxio0
Copy link
Member Author

Uxio0 commented Apr 29, 2021

@ziogaschr Nice pun! 😉 That are really good news, we will be paying attention

Here, you can find a list of stuff that we decided to handle differently.

Thanks, that's very useful for that, but I think that we will not be affected for any of these changes for our use cases

@Uxio0
Copy link
Member Author

Uxio0 commented Apr 29, 2021

Looks like with the last commit everything is working as expected: erigontech/erigon@711f157

In [2]: ethereum_client.parity.trace_transaction('0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63')
Out[2]:
[{'action': {'from': '0xed2Fb810E69bf37802eC356e4D30f1C4A1A8d216',
   'gas': 380626,
   'value': 0,
   'callType': 'call',
   'input': HexBytes('0x1688f0b900000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000001772c39fa1b0000000000000000000000000000000000000000000000000000000000000164b63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d216000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'),
   'to': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,
  'result': {'gasUsed': 242183,
   'output': HexBytes('0x000000000000000000000000333367d9a5b1782270193ed1d0c7669d90aa560a')},
  'subtraces': 2,
  'traceAddress': [],
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,
  'type': 'call'},
 {'action': {'from': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B',
   'gas': 340263,
   'value': 0,
   'init': HexBytes('0x608060405234801561001057600080fd5b506040516101e73803806101e78339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806101c36024913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060aa806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea265627a7a72315820d8a00dc4fe6bf675a9d7416fc2d00bb3433362aa8186b750f76c4027269667ff64736f6c634300050e0032496e76616c6964206d617374657220636f707920616464726573732070726f766964656400000000000000000000000034cfac646f301356faa8b21e94227e3583fe3f5f')},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,
  'result': {'gasUsed': 55109,
   'code': HexBytes('0x608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea265627a7a72315820d8a00dc4fe6bf675a9d7416fc2d00bb3433362aa8186b750f76c4027269667ff64736f6c634300050e0032'),
   'address': '0x333367d9A5b1782270193Ed1D0C7669d90aA560A'},
  'subtraces': 0,
  'traceAddress': [0],
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,
  'type': 'create'},
 {'action': {'from': '0x76E2cFc1F5Fa8F6a5b3fC4c8F4788F0116861F9B',
   'gas': 285195,
   'value': 0,
   'callType': 'call',
   'input': HexBytes('0xb63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d2160000000000000000000000000000000000000000000000000000000000000000'),
   'to': '0x333367d9A5b1782270193Ed1D0C7669d90aA560A'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,
  'result': {'gasUsed': 150098, 'output': HexBytes('0x')},
  'subtraces': 1,
  'traceAddress': [1],
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,
  'type': 'call'},
 {'action': {'from': '0x333367d9A5b1782270193Ed1D0C7669d90aA560A',
   'gas': 279119,
   'value': 0,
   'callType': 'delegatecall',
   'input': HexBytes('0xb63e800d0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000d5d82b6addc9027b22dca772aa68d5d74cdbdf440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ed2fb810e69bf37802ec356e4d30f1c4a1a8d2160000000000000000000000000000000000000000000000000000000000000000'),
   'to': '0x34CfAC646f301356fAa8B21e94227e3583Fe3F5F'},
  'blockHash': '0x9f4f103d4d9214edbabddd3b44d94df6852f78f2b222b17370427ccd7efb6c11',
  'blockNumber': 7941777,
  'result': {'gasUsed': 148410, 'output': HexBytes('0x')},
  'subtraces': 0,
  'traceAddress': [1, 0],
  'transactionHash': '0xa9dc6069cdd0acd1033ad02257c380074fa6dd7d3a4e2c17dd676c5ffc40eb63',
  'transactionPosition': 3,
  'type': 'call'}]

@Uxio0
Copy link
Member Author

Uxio0 commented May 3, 2021

Issues with trace_filter: erigontech/erigon#1851

@Uxio0 Uxio0 changed the title Try TurboGeth as a Tracing Node Try Erigon (TurboGeth) as a Tracing Node May 19, 2021
@Uxio0
Copy link
Member Author

Uxio0 commented Jun 17, 2021

As of https://github.com/ledgerwatch/erigon/releases/tag/v2021.06.03 Erigon seems to be working pretty well. It looks like erigontech/erigon#2085 is not happening anymore

@tolbrino
Copy link

Just FYI, I've run the transaction service against the currently recent Erigon release and it works nicely.

@Uxio0
Copy link
Member Author

Uxio0 commented Sep 13, 2021

Thanks for your feedback @tolbrino! We are experiencing the same, last version of Erigon is working well for us too

@Uxio0
Copy link
Member Author

Uxio0 commented Oct 18, 2021

Thanks for your feedback @tolbrino! We are experiencing the same, last version of Erigon is working well for us too

Previous versions of Erigon were stuck at some point when indexing: erigontech/erigon#2682 (comment)

Everything looks good now with the last version https://github.com/ledgerwatch/erigon/releases/tag/v2021.10.03

@Uxio0
Copy link
Member Author

Uxio0 commented Jul 6, 2022

Erigon is currently working well on mainnet and goerli (currently using https://github.com/ledgerwatch/erigon/releases/tag/v2022.04.05 )

@Uxio0 Uxio0 self-assigned this Jul 14, 2022
@Uxio0 Uxio0 closed this as completed Jul 14, 2022
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

4 participants