-
Notifications
You must be signed in to change notification settings - Fork 828
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
Web3ValidatorError error when use sendSignedTransaction on HB blockchain #5812
Comments
@louloub The latest fork in your genesis file is I would recommend upgrading your genesis to london or later. |
Also, are you using the latest version of quickstart? Because the latest version should already have this config built in https://github.com/Consensys/quorum-dev-quickstart/blob/master/files/besu/config/besu/QBFTgenesis.json#L14-L17 |
Hi @siladu thanks for your answers ! I modified my genesis.json file like this and remove / run the blockchain, and i have the same error. genesis.json :
Just after i had a error about signature length, fixed with this udpated code :
|
Hello ! I thought I had solved the problem with this line of code, but I have a new problem after this modification. code line :
new issue :
Does i create new issue on github ? |
Hello @louloub Keep the thread here for now. I haven't quite figured out what's going on with web3, but have been ok deploying contracts with ethers.js Something like this below works fine on Besu on the quickstart, hopefully will unblock you
Cheers |
Hi @joshuafernandes ! Thanks for your time :) I followed your code and modify some code line for finally deploy correctly my contract with ethers.js and can use one function ! (now i have another issue for using call function, i will create new issue i think) This is my code :
EDIT : for this solution, i'm back to NO EIP1559 blockchain version, this is my genesis.json :
|
Hi @louloub Really good to hear :) I've added in some examples based on this specifically (EIP-1559) in the quickstart yesterday and got it to deploy & read + write https://github.com/Consensys/quorum-dev-quickstart/blob/master/files/besu/smart_contracts/scripts/public/hre_1559_public_tx.js Have also stuck to the ethers type of calls and contractfactory (I find this abstractions nicer to work with). Let me know if this works for your token as well and feel free to submit a PR if its lacking functionality Cheers |
Thanks for your answer ! I just updated my previous comment because i forgot to preciss that i'm back to NO EIP1559 blockchain version. Actualy i can use Ethers.js to deploy contract from .sol files and use "increment" function . But i have issue for simple "call" function. I'm working on it and i will create new issue for this :) |
Hi @louloub Sounds good! This one should work in the future if you need one that is EIP-1559 https://github.com/Consensys/quorum-dev-quickstart/blob/master/files/besu/smart_contracts/scripts/public/hre_1559_public_tx.js#L69 . For a normal one this should get you going https://github.com/Consensys/quorum-dev-quickstart/blob/master/files/besu/smart_contracts/scripts/public/hre_public_tx.js#L53 I have a get/set operation after deployment. Let me know if that works, else create a new issue Cheers |
Thanks @joshuafernandes and @louloub for your comments - I think this issue can be resolved now. If not, feel free to reopen. @louloub if the new issue is related to the quickstart scripts rather than Besu itself, then https://github.com/Consensys/quorum-dev-quickstart might be a better place for it |
Hi @joshuafernandes ! Back with new informations :) On my previous message i say that i can deploy and use increment function but can't use call function. But after lot of test i can say that my contract was not deployed correctly. I don't understand how it's possible that i can use increment function... When i add on this code the line after the contract factory line
This error was triggered :
We can see on the TransactionReceipt the status 0 for reverted transaction So now the question is why my contract can be deployed. Do you have any ideas ? Thanks for your time |
Description
As an blockchain developper, i'm actualy working on smart contract ERC-721 POC. I have a Hyperledger Besu blockchain working on my VM with 4 nodes, built with Qorum Quickstart (https://besu.hyperledger.org/stable/private-networks/tutorials/quickstart). This blockchain is configured for 0 fees.
I can develop, build, deploy, use my contract on Remix connected on my Hyperldeger Besu blockchain, but when i want to deploy the same smart contract from Visual Studio Code i have some mistakes with the signature of my transaction for deploy the contract.
Acceptance Criteria
Can build and sign my transaction for deploy the contract on my Hyperledger Besu blockchain.
Steps to Reproduce (Bug)
./resume.sh
from the blockchain folderContract code on Test.sol :
command to launch the script :
./compile.sh contract.sol
bash script :
This is the genesis file of it :
node public_tx.js
This is the content of the file :
result of console.log for dataBuild :
0x608060405234801561000f575f80fd5b506101468061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610034575f3560e01c806306661abd14610038578063d09de08a14610056575b5f80fd5b610040610060565b60405161004d9190610097565b60405180910390f35b61005e610065565b005b5f5481565b60015f8082825461007691906100dd565b92505081905550565b5f819050919050565b6100918161007f565b82525050565b5f6020820190506100aa5f830184610088565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6100e78261007f565b91506100f28361007f565b925082820190508082111561010a576101096100b0565b5b9291505056fea26469706673582212201c3c48dec99e9cf77132e4073590b6c55580f5c057b9a16678a26b3bd45b716c64736f6c63430008150033000000000000000000000000000000000000000000000000000000000000002F
result of console.log for account:
result of console.log for serializedTx:
Just after these console.log i have a error :
I maked some research on google but i don't find any topic with this error.
Expected behavior: can deploy my contract
Actual behavior: error displayed on console when sendSignedTransaction is used
Frequency: Every time i use this function
Logs (if a bug)
Please post relevant logs from Besu (and the consensus client, if running proof of stake) from before and after the issue.
Versions (Add all that apply)
besu --version
] : using dockerimage: hyperledger/besu:${BESU_VERSION:-latest}
java -version
]cat /etc/*release
] : Ubuntu 22.04.1 LTSuname -a
] : Linux blockchain 5.15.0-52-generic Add default SECURITY policy #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linuxvmware -v
]docker version
] : 20.10.12Smart contract information (If you're reporting an issue arising from deploying or calling a smart contract, please supply related information)
solc --version
] : Version: 0.8.21+commit.d9974bed.Linux.g++Additional Information (Add any of the following or anything else that may be relevant)
The text was updated successfully, but these errors were encountered: