quorum icon indicating copy to clipboard operation
quorum copied to clipboard

making public transaction but got an error "Returned error: ether value is not supported for private transactions".

Open Mameta29 opened this issue 1 year ago • 1 comments

I just deployed validator nodes and rpc node as referencing tutorial (https://docs.goquorum.consensys.net/tutorials/kubernetes).

I just want to check if it's working properly and wrote the script above to make simple PUBLIC transaction. But I got error Returned error: ether value is not supported for private transactions. even though I haven't implement private network.

The script I excuted :

async sendTransaction() {
    try {
      const web3 = new Web3(
        'http://randomrandomrandomrandomrandom-1111111111111.ap-southeast-2.elb.amazonaws.com/rpc-1'
      );

      const privateKeyA =
'0x12dc58ffa9dc71c09b090dc74309dd8415e9358df2c7eccdf201c94e8fec087f';
      const accountA = web3.eth.accounts.privateKeyToAccount(privateKeyA);

      const accountB = web3.eth.accounts.create();
      console.log('createAddress : ', accountB.address);

      const rawTxOptions = {
        nonce: web3.utils.numberToHex(
          await web3.eth.getTransactionCount(accountA.address)
        ),
        from: accountA.address,
        to: accountB.address,
        value: '0x0',
        gasPrice: '0x0',
        gasLimit: '0x24A22',
      };

      console.log('Creating transaction...');
      const tx = new EthereumTx(rawTxOptions);
      console.log('Signing transaction...');
      tx.sign(Buffer.from(accountA.privateKey.substring(2), 'hex'));
      console.log('Sending transaction...');
      const serializedTx = tx.serialize();
      console.log('serializedTx : ', serializedTx.toString('hex'));

      const pTx = await web3.eth.sendSignedTransaction(
        '0x' + serializedTx.toString('hex')
      );
      console.log('pTx: ', pTx);
      console.log('tx transactionHash: ' + pTx.transactionHash);
      const receipt = pTx.transactionHash;

      return receipt;
    } catch (error) {
      console.error(error);
      return error;
    }
  }

Mameta29 avatar May 30 '23 23:05 Mameta29

Can you check the v value of the signed transaction, if it is 37 or 38, it is assumed private. Also please give me the version of quorum you are using.

baptiste-b-pegasys avatar Jun 06 '23 08:06 baptiste-b-pegasys