-
Notifications
You must be signed in to change notification settings - Fork 404
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
Implementation of Issue #1497 - Allow the Ethereum connector to use an already deployed contract #1585
Implementation of Issue #1497 - Allow the Ethereum connector to use an already deployed contract #1585
Conversation
Signed-off-by: Rodrigo Arede <aredemiguel@gmail.com>
I believe the way to solve this in caliper would be to use the I can't say whether it would be considered or not at this time, but given there are no tests at present it simply cannot even be considered at the moment. If you want it to be considered as a possible alternative to the skip-install option then please add appropriate integration tests at least and ideally unit tests as well. |
Assuming you go with your proposal in #1586, the deployed contract address must still be provided to the ethereum connector. Regarding the validation of this proposal, I understand that it's hard to consider without unit and integration tests. But at this time there aren't even such tests for the ethereum connector, and I currently don't have the time to create them from scratch. Also, it has been 2 years since someone modified its implementation and it is still very incomplete and has a lot of TODO's in it. From what I see, the ethereum connector does not even work properly when using more than 1 worker... |
I believe the ethereum connector will work with already deployed contracts. I believe that is pretty much what people have been told in the past due to the lack of capability in caliper to deploy contracts, so have you tested using the |
I've added issue #1589 which should show how to work with an already deployed contract, so no code changes required. But just looking at the documentation it's clear to me the ethereum connector docs need an overhaul to really improve them. |
Ah, I see. I didn't know you could add the address in the network config and do it that way. This really needs to be documented. Thanks for opening issue #1589, I am closing this PR. But before that, would you happen to know anything about what I said previously on the ethereum connector not working with more than 1 worker? I know this is not your area but maybe I'm doing something wrong or this is intended for some reason. I just posted a question on the caliper discord channel with more details on the problem. I'm considering opening an issue on this. |
@rmarede I bet it's again something that should be in the documentation but isn't. If I look at https://github.com/hyperledger/caliper-benchmarks/blob/main/networks/besu/1node-clique/erc721networkconfig.json I see they use |
Using a different address for each worker should fix this issue. Thank you. |
Checklist
Issue/User story
Issue #1497 - Allow the Ethereum connector to use an already deployed contract
Existing issues
Design of the fix
To use a contract that is already deployed, an optional 'address' key may be specified on the Contract Definition file. The new connector reads the 'address' key from the Contract Definition File, and if it exists, it does not deploy a new contract.
Validation of the fix
Working on my local Besu network