1

I am facing the some issue with gas but i do not have any modifiers in my contract. Even a simple setter-getter contract shows the following Error

Error: gas required exceeds allowance or always failing transaction

  • The above error is displayed when i try to estimateGas for setting a value for the string variable using setter().

  • If i directly execute the transaction without estimateGas then i get a transaction Hash. when transaction is checked the transaction status is as follows

0x0 Transaction mined but execution failed

Contract:

pragma solidity ^0.5.0;

contract SampleContract{
    string public str;
    constructor()public{
        str="Hello World!"; 
    }
    function setter(string memory s)public{
        str=s;  
    }
}

enter image description here

Note: Contract Deployed directly in Geth-Console of locally created Node

  • Using Private Permissioned Node Quorum (v 2.4.0)

  • Solc to compile and generate abi and bytecode

Can anyone please solve my issue.

  • 2
    This seems to work on my instance of Quorum's 7node example. Can you provide your genesis and startup params for the node? – fixanoid Dec 17 '19 at 5:28
  • 1
    homesteadBlock": 0, "byzantiumBlock": 0, "chainId": 10, "eip150Block": 0, "eip155Block": 0, "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "eip158Block": 0, "isQuorum": true – Geethapriya G H Dec 17 '19 at 5:44
  • 1
    I am able to interact with the contracts deployed using Remix browser but i am not able to generate address if deployed by Geth console and if address is generated then shows gas issue when interacted. I always face either of these issues. – Geethapriya G H Dec 17 '19 at 5:46
  • 1
    I am getting this error when calling and storing string values, in case of uint, calling doesn't show error but storing shows the same error Error while calling a string value : BigNumber Error: new BigNumber() not a base 16 number: – Geethapriya G H Dec 17 '19 at 6:52
  • 1
    When in doubt, please use 7nodes genesis. Looks like you are missing constantinopleBlock. Please use this: github.com/jpmorganchase/quorum-examples/blob/master/examples/… – fixanoid Dec 17 '19 at 17:20
0
"homesteadBlock": 0,
"byzantiumBlock": 0,
"chainId": 10,
"eip150Block": 0,
"eip155Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip158Block": 0,
"isQuorum": true,
"maxCodeSize": 128,
"txnSizeLimit": 128

Using the above config values in genesis.json helped me deploy contracts of larger size.

|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.