title: Ethereum transaction giving error 'invalid sender'
body: <p>This is how my contract looks like -</p>
  <pre><code>pragma solidity &gt;=0.4.25 &lt;0.8.0;
  
  
  contract Calculator {
      uint public result;
  
      event Added(address caller, uint a, uint b, uint res);
  
      constructor() public {
          result = 777;
      }
  
      function add(uint a, uint b) public returns (uint, address) {
          result = a + b;
          emit Added(msg.sender, a, b, result);
          return (result, msg.sender);
      }
  }
  </code></pre>
  <p>Above contract is deployed on Ropsten test net. And I am trying to invoke the <code>add(...)</code> function with a transaction. And my code looks like this -</p>
  <pre><code>const accountAddress = rtUtil.getAccountAddress();
  const accountPk = Buffer.from(rtUtil.getAccountAddressPk(), &quot;hex&quot;);
  const contract = await rtUtil.getCalculatorContract();
  const data = contract.methods.add(3, 74).encodeABI();
  
  const web3 = rtUtil.getWeb3();
  const taxCount = await web3.eth.getTransactionCount(accountAddress);
  
  const txObject = {
     nonce: web3.utils.toHex(taxCount),
     to: rtUtil.getCalculatorContractAddress(),
     value: web3.utils.toHex(web3.utils.toWei('0', 'ether')),
     gasLimit: web3.utils.toHex(2100000),
     gasPrice: web3.utils.toHex(web3.utils.toWei('6', 'gwei')),
     data: data
  };
  
  const commmon = new Common({chain: &quot;ropsten&quot;, hardfork: &quot;petersburg&quot;});
  const tx = Transaction.fromTxData(txObject, {commmon});
  tx.sign(accountPk);
  
  const serializedTx = tx.serialize();
  const raw = web3.utils.toHex(serializedTx);
  const transaction = await web3.eth.sendSignedTransaction(raw);
  </code></pre>
  <p>And when I run the code I get error -</p>
  <pre><code>Uncaught Error: Returned error: invalid sender
  Process exited with code 1
  </code></pre>
  <p>My Nodejs versions is <code>v15.1.0</code></p>
  <p>And my <code>package.json</code> dependencies are -</p>
  <pre><code>&quot;dependencies&quot;: {
    &quot;@ethereumjs/common&quot;: &quot;^2.0.0&quot;,
    &quot;@ethereumjs/tx&quot;: &quot;^3.0.0&quot;,
    &quot;@truffle/contract&quot;: &quot;^4.2.30&quot;,
    &quot;@truffle/hdwallet-provider&quot;: &quot;^1.2.0&quot;,
    &quot;web3&quot;: &quot;^1.3.0&quot;
  }
  </code></pre>
  <p>Can anyone tell me what I am doing wrong?</p>
  <p>Thanks in advance.</p>