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

Plugin ubiquity #3

Merged
merged 17 commits into from
Jan 18, 2023
Merged

Plugin ubiquity #3

merged 17 commits into from
Jan 18, 2023

Conversation

RafaelAPB
Copy link
Owner

test

awadhana and others added 4 commits November 25, 2022 11:55
Migrated test from Tap to Jest.

File Path:
packages/cactus-test-cmd-api-server/src/test/typescript/
integration/plugin-import-with-npm-install.test.ts

This is a PARTIAL resolution to issue hyperledger-cacti#238

Signed-off-by: awadhana <awadhana0825@gmail.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Migrated test from Tap to Jest.

File Path:
packages/cactus-plugin-keychain-memory/src/
test/typescript/unit/plugin-keychain-memory.test.ts

This is a PARTIAL resolution to issue hyperledger#238

Signed-off-by: awadhana <awadhana2021@gmail.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- 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>
Migrated test from Tap to Jest

File Path:
packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/
typescript/integration/plugin-htlc-eth-besu-erc20/
get-single-status-endpoint-invalid.test.ts

This is a PARTIAL resolution to issue hyperledger-cacti#238

Signed-off-by: awadhana <awadhana2021@gmail.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@RafaelAPB RafaelAPB force-pushed the plugin-ubiquity branch 4 times, most recently from 3dd85e2 to 7be7f45 Compare November 28, 2022 18:57
ryjones and others added 5 commits November 28, 2022 11:52
Update Semantic PR to version 5

Signed-off-by: Ry Jones <ry@linux.com>
Signed-off-by: Alec Phong <alecphong@gmail.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
- Add support for starting Cactus CMD SocketIO server with multiple Bussiness Logic Plugins (BLP).
  All required TransactionManagement request should be routed to the correct BLP.
- Add optional onListening callback when starting the cactus cmd socketio server, to simplify tests.
- Fix some bugs and hard-coded BLP Ids in TransactionManagement.
- Add new unit tests to check newly added functionalities.

Closes hyperledger-cacti#2102

Depends on hyperledger-cacti#2030

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
File Path:
packages/cactus-test-
tooling/src/test/
typescript/integration/
common/
containers.test.ts

Edit from Peter: I updated the ci.yml file as well (this became a
requirement some time after this PR was opened & reviewed).

This is a PARTIAL resolution to issue hyperledger-cacti#238

Signed-off-by: Youngone Lee <youngone.lee@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](socketio/socket.io-parser@3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@RafaelAPB RafaelAPB force-pushed the plugin-ubiquity branch 3 times, most recently from 5c4a646 to 54d7314 Compare November 29, 2022 11:12
petermetz and others added 6 commits November 29, 2022 21:59
Docker expects environment variables passed to the container
to be strings.
The null coalescing code was making it so that if the test case
did not pass in a custom WS_PORT  env var, then it would default
to using a value for the port that was a number not a string.
This would crash the serialization logic within docker that was
trying to apply the environment variables to the container when
starting it.

Switching the type of 9944 default WS port to "9944" (string) fixes it.
Also specifying explicitly the `wsPort` variable's type to be
string so that the next time someone tries to make this mistake
the compiler will slap their hands right away.

Fixes hyperledger-cacti#2213

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Some of the fixes were updated by Peter after Alec's internship has
come to an end before he could finish the requested changes.

Signed-off-by: Alec Phong <alecphong@gmail.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Edited it after the fact to correct the bugs introduced in the catch
blocks where non-Error type exceptions were getting ignored which was
not the case before the linter fixes.

The original commit message from Alec:
=======================================================================
Primary Change

Fixed lint errors on utility-emissions-channel/enroll-admin-v1-endpoint.ts
(line 54, col 25), insert-bamboo-harvest-endpoint.ts (line 78, col 3),
 insert-bookshelf-endpoint.ts (line 59, col 3),
 insert-shipment-endpoint.ts (line 69, col 3),
 list-bamboo-harvest-endpoint.ts (line 38, col 3; line 58, col 3; ),
  list-bookshelf-endpoint.ts (line 56, col 3), and
  list-shipment-endpoint.ts (line 40, col 3)
In order to fix changes from any to unknown, had to change the
output path to directed types: (Changed OASPath return type from any
object to "typeof OAS.paths["/api/v1/plugins/@hyperledger/
cactus-example-carbon-accounting-backend/dao-token/get-allowance"]"
Removed import statements that were never used in the file (import e)
Partial Fix to hyperledger-cacti#1366
=======================================================================

Signed-off-by: Alec Phong <alecphong@gmail.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>

Co-authored-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: Ry Jones <ry@linux.com>
- Add new endpoint for monitoring new blocks. Response type is determined from input argument.
  Monitor endpoints are stored in connector.runningWatchBlocksMonitors.
- Add `FabricApiClient` which supports new socketio endpoint.
- Add functional test to check the new endpoint.
- Upgrade fabric-sdk-node to solve test hand issue.
- Loose up `ISocketApiClient` to allow interface monitor options.
- Update readme with WatchBlocks usage.

Regarding fabric-sdk-node upgrade: with sdk2.3, the test used to hang occasionally.
I've ensured that all resources are being cleaned-up, and investigated the problem. The issue was
infinite recurse dns resolution (of fabric peer address) in grpc-js `ResolvingLoadBalancer`.
Could not find exact cause of this strange behaviour, the code there is pretty complex
and didn't want to dig to deep, but I've noticed that recently there were some fixes
in the functions I suspected so I've updated the fabric-sdk, which uses newer grpc-js,
and the problem went away, so I assume this was in fact bug in gprc-js. Run this test on repeat for
hours and didn't notice any error.

Closes: hyperledger-cacti#2118

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
outSH and others added 2 commits December 23, 2022 09:53
- Add new Iroha V2 cactus connector.
- Add endpoints `transact` and `query`. Both endpoints support
  critical subset of instructions and queries supported by the upstream javascript iroha sdk.
  Transaction can be awaited or can return immediately.
- Add new endpoint `generate-transaction`, to create unsigned transactions
  that can be signed on the client side.
- Add a function to iroha2-connector package to help signing iroha transactions
  on the client (BLP) side.
- One SocketIO endpoint can be used to monitor new blocks from the ledger.
- Add new helper method for signing query payload on the client side.
- New connector can be used through a verifier-client interface.
- All added functions are tested in functional test suites and documented.
- Add test for complex scenario that involves creating new account and asset, and then transfering
  assets between two accounts.
- Add test for parsing retrieved block data to find specific transaction hashes.
- Added execution of Iroha2 tests to the CI.

Additional notes:
- Iroha V2 javascript packages are not available on official npm yet, had to include `.npmrc` with
  private npm address. I'm not sure if there's ETA of delivering these through NPM, so it might be
  necessary to commit it after all.

Closes hyperledger-cacti#2138
Depends on hyperledger-cacti#2140

Signed-off-by: Michal Bajer <michal.bajer@fujitsu.com>
This plugin defines interfaces for developers to use a wrapped version of the Ubiquity SDK.
Ubiquity is a high performance, multi-chain API for accessing blockchain data.
This API complements current connectors by allowing to connect to a public blockchains.

Signed-off-by: Rafael Belchior <rafael.belchior@tecnico.ulisboa.pt>
@RafaelAPB RafaelAPB merged commit 7c59790 into main Jan 18, 2023
@RafaelAPB RafaelAPB deleted the plugin-ubiquity branch November 15, 2024 15:39
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.

7 participants