I have installed a private node using geth (1.9.11-stable). I have created a number of accounts, deployed some contract accounts and sent transactions from the accounts to the contract accounts. By checking the balance on the contract accounts I can see these transactions are successful.

I am now trying to trace the transactions however I keep getting the structLogs entry as an empty array.

  failed: false,
  gas: 21272,
  returnValue: "",
  structLogs: []

I have read on other posts that for traceTransaction to work the geth node must be started in archival mode. I have done this but I still get the same result (empty structLogs).

At the moment I start the geth node using the following command;

geth --mine --minerthreads=1 --datadir ~/gethDataDir --networkid 15 --gcmode archive --syncmode full

Would anyone know what I am doing wrong and why I am getting structLogs as an empty array?

Edit 1:

It would seem the issue is related with the smart contract used for testing. When I use a smart contract which only accepts ether and does nothing else the structLogs come empty.

contract HelloWorld {
    function hello() public payable {}

When I actually put some logic into the smart contract (using exact same approach to deploy and send transaction to the contract account) the structLogs are populated.

contract HelloWorld {
    function hello(uint i) public payable returns (uint) { 
        return i * 2; 

Wouldn't the EVM still be executing instructions in the first case even though just an ether transfer is occurring?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.