web3j icon indicating copy to clipboard operation
web3j copied to clipboard

Getting Error : Private Marker Transaction failed due to intrinsic gas exceeding the limit

Open jann2005 opened this issue 3 years ago • 1 comments

Description

I wanted to create a privacy group with two participants and do a private transaction between these two .

Steps to re-produce - a. I have created 3 Besu nodes with privacy enabled. b. Each node is running a tressera node inside. c. Using IBFT consensus d. Created Privacy group with 2 participants e . Sending Ether within 2 participants member

Getting Error : Private Marker Transaction failed due to intrinsic gas exceeding the limit

Code Snippet -

Getting Privacy Group ID -

         node1 = Besu.build(new HttpService("http://localhost:8545"));
        List<Base64String> participants = new ArrayList<Base64String>();
        participants.add(Base64String.wrap("KXJmOY+SyjGoPgZmA7itpSu4W6wxWFCWz+4HQGvZ600="));
        participants.add(Base64String.wrap("sOkbkOhXVBzhOzYX7qSy0AqIhvdBO1g5nG9ytFfrARI="));
        Base64String privacyGrpIdBase64 = node1
                .privCreatePrivacyGroup(participants, "network_1", "Network 1 privacy group")
                .send()
                .getPrivacyGroupId();
        privacyGrpId = privacyGrpIdBase64.toString();

Sending Ether -

     TransactionManager transactionManager = new BesuPrivateTransactionManager(besu,
            new BesuPrivacyGasProvider(DefaultGasProvider.GAS_PRICE, DefaultGasProvider.GAS_LIMIT), credentials, CHAIN_ID, privateForm, privacyGroupId);
    Transfer transfer = new Transfer(web3j, transactionManager);
    TransactionReceipt transactionReceipt = transfer.sendFunds(toAddress, value, Convert.Unit.ETHER).send();

Stacktrace

2022-02-25 14:47:51.247 ERROR 47917 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Error processing transaction request: Private Marker Transaction failed due to intrinsic gas exceeding the limit. Gas limit used from the Private Transaction.] with root cause

java.lang.RuntimeException: Error processing transaction request: Private Marker Transaction failed due to intrinsic gas exceeding the limit. Gas limit used from the Private Transaction. at org.web3j.tx.PrivateTransactionManager.processResponse(PrivateTransactionManager.java:250) ~[besu-5.0.0.jar:na] at org.web3j.tx.PrivateTransactionManager.executeTransaction(PrivateTransactionManager.java:109) ~[besu-5.0.0.jar:na] at org.web3j.tx.ManagedTransaction.send(ManagedTransaction.java:102) ~[core-5.0.0.jar:na] at org.web3j.tx.Transfer.send(Transfer.java:79) ~[core-5.0.0.jar:na] at org.web3j.tx.Transfer.send(Transfer.java:55) ~[core-5.0.0.jar:na] at org.web3j.tx.Transfer.lambda$sendFunds$1(Transfer.java:107) ~[core-5.0.0.jar:na] at org.web3j.protocol.core.RemoteCall.send(RemoteCall.java:42) ~[core-5.0.0.jar:na] .....

Versions

Besu Version - 22.1.0 web3j Lib - 5.0.0 Jopen JDK 11

jann2005 avatar Feb 26 '22 06:02 jann2005

@jann2005 Please use version 4.9.1 not 5

AlexandrouR avatar Apr 20 '22 13:04 AlexandrouR