-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.StringIndexOutOfBoundsException when getting validators from ValidatorContract for QBFT #7091
Comments
@matthew1001 are you able to take a look at this one? |
Yes sure, I'll assign it to myself and take a look |
Hey @matthew1001 , were you able to check this issue? |
I should be able to take a look today |
Could you include your config file and/or CLI args please @v0dev ? |
I'm not seeing the same I've tried deploying the Besu sample contract https://github.com/Consensys/validator-smart-contracts/blob/main/contracts/allowlist/ValidatorSmartContractAllowList.sol which seems to work fine. If I do a test invocation of
which is the validator list However, invoking
Your contract itself, if manually deployed and invoked, does appear to work as expected. I'm wondering if it's something specific to do with the way Besu deploys a contract from the genesis file. Regarding the |
I've made a bit more progress, in as much as if I use Hardhat to compile your contract into bytecode and use that in the If I use remix to compile your contract and put the bytecode into the I've tried several combinations of compiler version and EVM version in remix and cannot make your contract, or the sample contract https://github.com/Consensys/validator-smart-contracts/blob/main/contracts/allowlist/ValidatorSmartContractAllowList.sol work. Remix does have several places where it outputs bytecode. Perhaps they differ slightly? Could you try compiling with Hardhat and see if it works for you? If it does, I think the issue may be around pulling the bytecode out of remix. |
Hey @matthew1001 , I will using hardhat instead of Remix , and let you know! |
I am trying to create a QBFT network with a smart contract validator set, the smart contract is simple:
Solidity Version Used: 0.8.25+commit.b61c2a91
EVM Version: Paris
Tool Used: Remix IDE
Optimizations: False
I am using the bytecode from Remix to add into the Genesis.json file:
If i try to use Bytecode generated from EVM version as Shanghai or Cancun, i get the following error:
Failed validator smart contract call: ValidationResult{invalidReason=Optional[EXECUTION_HALTED], errorMessage=Optional[INVALID_OPERATION]}
If i try to use Bytecode generated from Paris (in the current genesis file) or London/Berlin etc i get the following error:
I have tried different EVM versions, tried changing solidity versions etc but each time I get the StringIndexOutOfBoundsException
The text was updated successfully, but these errors were encountered: