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

test(connector-go-ethereum-socketio): add functional test, bug fix #2053

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

outSH
Copy link
Contributor

@outSH outSH commented May 31, 2022

  • Add functional test of all functions from go-ethereum-socketio validator.
  • Refactor go-ethereum validator to allow importing as a module, to simplify the functional test.
  • Fix sendRawTransaction to work with Verifier protocol.
    It couldn't be reached by any client library until now, so I consider this as "private" interface.
  • Add common web3 client object in openethereum test ledger helper class.
  • Add few new functions to ethereum test ledger helper class:
    newEthPersonalAccount, transferAssetFromCoinbase, deployContract.

Depends on #2051
Depends on #2047

Closes: #2052

Signed-off-by: Michal Bajer michal.bajer@fujitsu.com


Please consider only the last commit - test(connector-go-ethereum-socketio): add functional test, bug fix. The rest are the dependencies that should be merged by separate PRs.

@gitguardian
Copy link

gitguardian bot commented May 31, 2022

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

outSH added a commit to outSH/cactus that referenced this pull request Jun 21, 2022
- Upgrade web3 package used by go-ethereum-socketio connector from "0.20.7" to "1.7.3"
- Major cleanup and refactor of go-ethereum-socketio logic,
  without affecting the current functionalities.
- Add safety checking of method called in web3Eth and contract functions.
  Add tests to check if it works.
- Add websocket eth RPC support and some helper functions in openethereum-test-ledger.
- Expose WS RPC in geth-testnet, use this port in sample apps
  (required to monitor new blocks in updated web3.js)
- Change raw use of sendRawTransaction to sendSignedTransaction in sample apps
  in order to conform to new web3.js version.
- Add safeStringifyException to cactus-common that can be used by validators
  to sanitize response errors.
- Refactor socketio-based validators to use safeStringifyException.
- Adjust connector README files.

Closes hyperledger-cacti#2088

Depends on hyperledger-cacti#2053

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

takeutak commented Jun 23, 2022

@petermetz @jagpreetsinghsasan @izuru0
Could you review this PR?

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

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

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.

Apologies for the slow reviews once again.

@github-actions
Copy link

@outSH outSH force-pushed the go_ethereum_validator_test branch from 4b53da6 to 9a62d4a Compare November 21, 2022 09:48
@outSH
Copy link
Contributor Author

outSH commented Nov 21, 2022

@petermetz Rebased with main and tested - ready to merge

@outSH outSH requested review from petermetz and removed request for sandeepnRES and takeutak November 21, 2022 10:24
@outSH outSH force-pushed the go_ethereum_validator_test branch from 9a62d4a to b5b4274 Compare November 22, 2022 14:12
@outSH outSH requested a review from petermetz November 22, 2022 16:03
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 LGTM

- Add functional test of all functions from go-ethereum-socketio validator.
- Refactor go-ethereum validator to allow importing as a module, to simplify the functional test.
- Fix sendRawTransaction to work with Verifier protocol.
  It couldn't be reached by any client library until now, so I consider this as "private" interface.
- Add common web3 client object in openethereum test ledger helper class.
- Add few new functions to ethereum test ledger helper class:
  newEthPersonalAccount, transferAssetFromCoinbase, deployContract.

Depends on hyperledger-cacti#2051
Depends on hyperledger-cacti#2047

Closes: hyperledger-cacti#2052

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
@petermetz petermetz force-pushed the go_ethereum_validator_test branch from b5b4274 to c1d5cd0 Compare November 22, 2022 18:06
@petermetz petermetz merged commit 3aa3d61 into hyperledger-cacti:main Nov 22, 2022
outSH added a commit to outSH/cactus that referenced this pull request Nov 23, 2022
- Upgrade web3 package used by go-ethereum-socketio connector from "0.20.7" to "1.8.1"
- Major cleanup and refactor of go-ethereum-socketio logic,
  without affecting the current functionalities.
- Add safety checking of method called in web3Eth and contract functions.
  Add tests to check if it works.
- Add websocket eth RPC support and some helper functions in openethereum-test-ledger.
- Expose WS RPC in geth-testnet, use this port in sample apps
  (required to monitor new blocks in updated web3.js)
- Change raw use of sendRawTransaction to sendSignedTransaction in sample apps
  in order to conform to new web3.js version.
- Add safeStringifyException to cactus-common that can be used by validators
  to sanitize response errors.
- Refactor socketio-based validators to use safeStringifyException.
- Adjust connector README files.
- Improve cleanup after running sample apps
- Fix discounted-cartrade sample ethereum transfer and checking

Closes hyperledger-cacti#2088

Depends on hyperledger-cacti#2053

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH added a commit to outSH/cactus that referenced this pull request Nov 25, 2022
- Upgrade web3 package used by go-ethereum-socketio connector from "0.20.7" to "1.8.1"
- Major cleanup and refactor of go-ethereum-socketio logic,
  without affecting the current functionalities.
- Add safety checking of method called in web3Eth and contract functions.
  Add tests to check if it works.
- Add websocket eth RPC support and some helper functions in openethereum-test-ledger.
- Expose WS RPC in geth-testnet, use this port in sample apps
  (required to monitor new blocks in updated web3.js)
- Change raw use of sendRawTransaction to sendSignedTransaction in sample apps
  in order to conform to new web3.js version.
- Add safeStringifyException to cactus-common that can be used by validators
  to sanitize response errors.
- Refactor socketio-based validators to use safeStringifyException.
- Adjust connector README files.
- Improve cleanup after running sample apps
- Fix discounted-cartrade sample ethereum transfer and checking

Closes hyperledger-cacti#2088

Depends on hyperledger-cacti#2053

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit to outSH/cactus that referenced this pull request Nov 26, 2022
- Upgrade web3 package used by go-ethereum-socketio connector from "0.20.7" to "1.8.1"
- Major cleanup and refactor of go-ethereum-socketio logic,
  without affecting the current functionalities.
- Add safety checking of method called in web3Eth and contract functions.
  Add tests to check if it works.
- Add websocket eth RPC support and some helper functions in openethereum-test-ledger.
- Expose WS RPC in geth-testnet, use this port in sample apps
  (required to monitor new blocks in updated web3.js)
- Change raw use of sendRawTransaction to sendSignedTransaction in sample apps
  in order to conform to new web3.js version.
- Add safeStringifyException to cactus-common that can be used by validators
  to sanitize response errors.
- Refactor socketio-based validators to use safeStringifyException.
- Adjust connector README files.
- Improve cleanup after running sample apps
- Fix discounted-cartrade sample ethereum transfer and checking

Closes hyperledger-cacti#2088

Depends on hyperledger-cacti#2053

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
petermetz pushed a commit that referenced this pull request Nov 26, 2022
- Upgrade web3 package used by go-ethereum-socketio connector from "0.20.7" to "1.8.1"
- Major cleanup and refactor of go-ethereum-socketio logic,
  without affecting the current functionalities.
- Add safety checking of method called in web3Eth and contract functions.
  Add tests to check if it works.
- Add websocket eth RPC support and some helper functions in openethereum-test-ledger.
- Expose WS RPC in geth-testnet, use this port in sample apps
  (required to monitor new blocks in updated web3.js)
- Change raw use of sendRawTransaction to sendSignedTransaction in sample apps
  in order to conform to new web3.js version.
- Add safeStringifyException to cactus-common that can be used by validators
  to sanitize response errors.
- Refactor socketio-based validators to use safeStringifyException.
- Adjust connector README files.
- Improve cleanup after running sample apps
- Fix discounted-cartrade sample ethereum transfer and checking

Closes #2088

Depends on #2053

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.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.

test(connector-go-ethereum-socketio): add functional test, bug fix
5 participants