Skip to content
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

feat(cactus-plugin-ledger-connector-ethereum): add new connector plugin #2535

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

outSH
Copy link
Contributor

@outSH outSH commented Jul 4, 2023

Add new plugin for connecting with Ethereum ledgers. New connector is based on already existing quorum connector. The main reason for introducing yet another plugin is a need for web3js upgrade (to 4.X) which is imposible in current quorum / besu connectors due to dependency to web3js-quorum which requires web3js 1.X.

We have plans to make web3js library pluggable and reduce code duplication among other connectors in the future, but it will be delivered later on in a separate PR.

Changes:

  • Add new plugin based on quorum connector.
  • Removed private transaction and other quorum related functionalities.
  • Update web3js to 1.10 - will be updated to 4.X in a separate commit.
  • Add missing web3-eth-contract dependencies to besu and xdai connectors.
  • Add new connector to cactus-verifier-client
  • Add integration tests in cactus-test-plugin-ledger-connector-ethereum (based on similar ones for quorum connector.)
  • Add new connector to CI.
  • Add web3* 1.5.2 dependencies to root package.json because they are already required in a root level (by typings/web3js-quorum). Ideally this could be put into another package (quorum connector?) and have the dependencies there, but for now I think it's important to be explicit about it since it's easy to mess up if wrong web3js library is hoisted up from any monorepo package.
  • Sort main package.json
  • Remove tap test scripts from the root package.json - they don't use .taprc and cause bunch of errors when they try to execute jest tests. This is confusing for the users because of all false negative errors printed.
  • Reorganize jest config and taprc to keep tests from quorum and ethereum conenctors grouped.

Closes: #2534

const methodRef = contractInstance.methods[req.methodName];
Checks.truthy(methodRef, `${fnTag} YourContract.${req.methodName}`);

const method: ContractSendMethod = methodRef(...req.params);

Check failure

Code scanning / CodeQL

Unvalidated dynamic method call

Invocation of method with [user-controlled](1) name may dispatch to unexpected target and cause an exception. Invocation of method with [user-controlled](2) name may dispatch to unexpected target and cause an exception.
}

const web3MethodArgs = args.params || [];
return looseWeb3Eth[args.methodName](...web3MethodArgs);

Check failure

Code scanning / CodeQL

Unvalidated dynamic method call

Invocation of method with [user-controlled](1) name may dispatch to unexpected target and cause an exception.
);
}

return contract.methods[args.contractMethod](...contractMethodArgs)[

Check failure

Code scanning / CodeQL

Unvalidated dynamic method call

Invocation of method with [user-controlled](1) name may dispatch to unexpected target and cause an exception.
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@outSH Looks legit, I just have some notes regarding 2 other PRs in parallel:

  1. Is upgrading web3 project-wide to a newer version than what you are using here so please be on guard about that getting merged first (if it does - I don't know for sure it will)
  2. There's another PR in parallel also, the one with the yarn v3 upgrade and so far it is looking like we'll have to move away from hoisting completely because of the way it makes a lot of hard to debug bugs very easy to create the way you are also explaining it in your PR description.

@outSH
Copy link
Contributor Author

outSH commented Jul 13, 2023

@petermetz Thanks!

ad1. You mean https://github.com/hyperledger/cacti/pull/2550? I'm updating to more recent one here (1.10 > 1.6.1). Either way, if I filled all missing web3 packages we should be good to go but I'll retest it when the PR you mentioned is merged :)
ad2. Sounds great!

Copy link
Contributor

@izuru0 izuru0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@outSH
Copy link
Contributor Author

outSH commented Jul 14, 2023

@petermetz @izuru0 Just a quick note - I plan on changing the connector API during the web3js update (that I'm currently working on), so please don't merge it until release 2.0 (if that would make my future PR problematic). Ideally, I'd like to mark this connector as "API unstable" in README and make API breaking changes until futher notice but not sure if you'd agree on that :)

@petermetz
Copy link
Contributor

ad1. You mean #2550? I'm updating to more recent one here (1.10 > 1.6.1).

@outSH Oh, my bad, I was looking at some other part of the diff and saw 1.5.2 [1] but I see now that you just did that because that was the version in those packages. Alright, we'll make it work one way or another, whoever merges second will need a little update on the versions to make sure it's all good. No action necessary, just raising awareness for now.

[1] https://github.com/hyperledger/cacti/pull/2535/files#diff-74173a496c0c85400952267e63584f4de82801399bb7ec3acdca99ede1c4d0e9

@petermetz
Copy link
Contributor

@petermetz @izuru0 Just a quick note - I plan on changing the connector API during the web3js update (that I'm currently working on), so please don't merge it until release 2.0 (if that would make my future PR problematic). Ideally, I'd like to mark this connector as "API unstable" in README and make API breaking changes until futher notice but not sure if you'd agree on that :)

The easiest way for me to handle that is to put this in draft state and then we can keep it open as long as you like.
The downside for that is that you'll have to keep rebasing and fixing the merge conflicts that come up while main is getting more changes in. If you are okay with that, then I'd just keep it open until it's stable enough or just wait until 2.0.

I'll put a 'change request' on this just to stop us from accidentally merging it because it's been already approved so I was about to merge it before you made that comment!

If you want to avoid keeping this one open for long and then spend time rebasing then there are a couple more options that I can think of:

  1. You version with v1 whichever endpoint & method name(s) you need to and then instead of making a breaking change on those with your later PR, instead you just create the v2 versions from scratch. There's code duplication this way but with re-using the common parts it can be kept low enough that it's worth it IMO and then this way there are no breaking changes.
  2. You set the package.json's publish config to private so that lerna ignores it when the batch publishing of all the packages is happening. Doing this might cause issues with the release scripts (it has in the past) so it's my least preferred option but still possible.

@petermetz petermetz self-requested a review July 15, 2023 17:20
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not an actual change request. I'm just blocking the merge for now. See the discussion above for details.

@outSH outSH force-pushed the ethereum_connector branch from a29b8b9 to 1a475cb Compare July 25, 2023 11:30
outSH added a commit to outSH/cactus that referenced this pull request Jul 25, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Future improvements:
- Support London fork gas fees (i.e. EIP-1559)
- Refactor API to allow future extensions.
- Fix several TODO items in this connector.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Jul 25, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Future improvements:
- Support London fork gas fees (i.e. EIP-1559)
- Refactor API to allow future extensions.
- Fix several TODO items in this connector.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Aug 1, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Future improvements:
- Support London fork gas fees (i.e. EIP-1559)
- Refactor API to allow future extensions.
- Fix several TODO items in this connector.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Copy link
Contributor

@jagpreetsinghsasan jagpreetsinghsasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not approving for the same reasons as @petermetz mentioned

outSH added a commit to outSH/cactus that referenced this pull request Aug 17, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Future improvements:
- Support London fork gas fees (i.e. EIP-1559)
- Refactor API to allow future extensions.
- Fix several TODO items in this connector.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Aug 21, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Future improvements:
- Support London fork gas fees (i.e. EIP-1559)
- Refactor API to allow future extensions.
- Fix several TODO items in this connector.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@outSH
Copy link
Contributor Author

outSH commented Aug 23, 2023

Just a quick note - I plan on changing the connector API during the web3js update

@petermetz
With https://github.com/hyperledger/cacti/pull/2631 I'm done with API changes, so all PRs in chain can be merged. Let me know if this can be done by the release of V2, I will start rebasing and clearing out the PRs in order then.

@outSH outSH requested a review from petermetz August 23, 2023 15:05
@petermetz
Copy link
Contributor

@petermetz
With https://github.com/hyperledger/cacti/pull/2631 I'm done with API changes, so all PRs in chain can be merged.

@outSH
Nice! Thank you very much for those contributions!

Let me know if this can be done by the release of V2, I will start rebasing and clearing out the PRs in order then.

Yes! They all can and should in my opinion because we opened up the main branch for breaking changes as of last week => meaning that there will be no more 1.x releases (from the main branch) issued anymore so we can start making all the breaking changes that we've been holding off until now.
So, now is the time to "be free" so please double check if there's any other breaking changes you wanted to make in the past because between now and the 2.0.0-GA we can actually make it happen, no problem. The next time we'll have this chance is the last few weeks for v3.0.0.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving now since we are ready to go! Thanks again @outSH !

@outSH outSH force-pushed the ethereum_connector branch from 1a475cb to cd3a9d8 Compare August 29, 2023 13:41
@petermetz
Copy link
Contributor

FYI: I dismissed the false-positive CodeQL alerts because we do have our own runtime checks in place to make sure that there are no invalid method names provided when calling contract methods.

@petermetz petermetz enabled auto-merge (rebase) August 31, 2023 16:58
Add new plugin for connecting with Ethereum ledgers. New connector is based on already existing
quorum connector. The main reason for introducing yet another plugin is a need
for web3js upgrade (to 4.X) which is imposible in current quorum / besu connectors due to
dependency to `web3js-quorum` which requires web3js 1.X.

We have plans to make web3js library pluggable and reduce code duplication among other connectors
in the future, but it will be delivered later on in a separate PR.

Changes:
- Add new plugin based on quorum connector.
- Removed private transaction and other quorum related functionalities.
- Update web3js to 1.10 - will be updated to 4.X in a separate commit.
- Add missing `web3-eth-contract` dependencies to besu and xdai connectors.
- Add new connector to cactus-verifier-client
- Add integration tests in `cactus-test-plugin-ledger-connector-ethereum`
    (based on similar ones for quorum connector.)
- Add new connector to CI.
- Add `web3*` 4.1.1 dependencies to root `package.json` because they are already
    required in a root level (by `typings/web3js-quorum`). Ideally this could be put into
    another package (quorum connector?) and have the dependencies there, but for now I think
    it's important to be explicit about it since it's easy to mess up
    if wrong web3js library is hoisted up from any monorepo package.
- Sort main `package.json`
- Remove tap test scripts from the root `package.json` - they don't use `.taprc` and
    cause bunch of errors when they try to execute jest tests.
    This is confusing for the users because of all false negative errors printed.
- Reorganize jest config and taprc to keep tests from quorum and ethereum conenctors grouped.

Peter's tweaks:
1. Switched the root's web3 dependencies from 1.5.2 to 4.1.1 because
in the meantime we've done a few upgrades (plus the old versions come
with CVEs)
2. There is no more hoisting, it's been completely disabled, so we should
not have any more issues regarding that. It is still true however, that
the root folder has our handwritten type definitions which do import
web3 packages and therefore the root should declare web3 as a dependency.
3. Once https://github.com/hyperledger/cacti/issues/2648 has been resolved
we can remove both the root dependency declarations of web3 and the
typings that necessitate them to begin with.

Closes: hyperledger-cacti#2534

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz petermetz merged commit f8a2131 into hyperledger-cacti:main Aug 31, 2023
outSH added a commit to outSH/cactus that referenced this pull request Sep 18, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Sep 19, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Sep 22, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit to outSH/cactus that referenced this pull request Sep 29, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz pushed a commit that referenced this pull request Sep 29, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Closes: #2580

Depends on #2535
Depends on #2578

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
sandeepnRES pushed a commit to sandeepnRES/cacti that referenced this pull request Dec 21, 2023
- Update web3js packages from 1.10 to 4.0.3 in `cactus-plugin-ledger-connector-ethereum` and
    `cactus-test-plugin-ledger-connector-ethereum`. This allows interacting
    with most recent geth nodes.
- Refactor all ethereum tests. Most of the test cases were duplicated multiple times
    (between different quorum ledger versions test and deployment methods). I've removed all this
    duplication while maintaining similar level of test coverage.
    New tests use Geth test ledger instead of Quorum one.
- Add web3js type conversions methods to minimize impact of poor dynamic typing
    in this early release of 4.X.
- Update API. In 4.X all numeric responses has been converted to BigNum.
    To keep up with this some fields has been changed to string instead of number when necessary.
    Add some missing fields as well.
- Add `estimateMaxFeePerGas` method for estimating current transaction cost.
- Fix invalid `runTransact` response type.
- Add test script for checking integration with Alchemy that must be executed manually
    (it's excluded from CI at the moment) - `geth-alchemy-integration-manual-check.test`.
    Instructions on how to run it has been added to package README.

Closes: hyperledger-cacti#2580

Depends on hyperledger-cacti#2535
Depends on hyperledger-cacti#2578

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cactus-plugin-ledger-connector-ethereum): add new connector plugin
4 participants