Skip to content

feat(satp-hermes): update satp to 0.0.1-beta #3922

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

Open
wants to merge 98 commits into
base: main
Choose a base branch
from
Open

feat(satp-hermes): update satp to 0.0.1-beta #3922

wants to merge 98 commits into from

Conversation

RafaelAPB
Copy link
Contributor

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@RafaelAPB RafaelAPB force-pushed the satp-stg branch 6 times, most recently from 527f5f2 to 1e43ea3 Compare May 23, 2025 16:09
@RafaelAPB RafaelAPB marked this pull request as draft May 23, 2025 16:41
RafaelAPB and others added 2 commits May 27, 2025 18:32
Signed-off-by: Rafael Belchior <[email protected]>

feat(bungee): add skeleton for bungee

Signed-off-by: André Augusto <[email protected]>

refactor(plugin-satp-hermes): update messages formats SATP core version 2.0.0 OpenAPI

* created new messages in openAPI definition

feat(bungee): fix bungee dependencies

Signed-off-by: André Augusto <[email protected]>

feat(SATP-Hermes): gateway coordinator

feat(SATP-Hermes): gateway coordinator

feat(SATP-Hermes): gateway coordinator WIP

Signed-off-by: Rafael Belchior <[email protected]>

test(SATP-Hermes): enable decorators needed for gateway coordinator checks

Signed-off-by: Rafael Belchior <[email protected]>

docs(SATP-Hermes): update package.json

Signed-off-by: Rafael Belchior <[email protected]>

refactor(SATP-Hermes): re-estructure project

Signed-off-by: Rafael Belchior <[email protected]>

refactor(SATP-Hermes): re-estructure project

Signed-off-by: Rafael Belchior <[email protected]>

refactor(SATP-Hermes): re-estructure project

Signed-off-by: Rafael Belchior <[email protected]>

refactor(SATP-Hermes): remove kotlin sdk, add protobuffer

Signed-off-by: Rafael Belchior <[email protected]>

feat(SATP-Hermes): protobuf structure

Signed-off-by: Rafael Belchior <[email protected]>

feat(SATP-Hermes): protobuf structure

Signed-off-by: Rafael Belchior <[email protected]>

refactor(SATP-Hermes): refactor naming

Signed-off-by: Rafael Belchior <[email protected]>

feat(SATP-Hermes): protobuf structure improvements

Signed-off-by: Rafael Belchior <[email protected]>

feat(SATP-Hermes): update yarn.lock and clean up

Signed-off-by: André Augusto <[email protected]>

refactor(test-tooling): fix types of streams: use NodeJS.ReadableStream

1. The container management library that we use in the test infrastructure
(called dockerode) is expecting streams that are defined in the global
namespace of the `@types/node` library, e.g. the standard library of NodeJS
itself.
2. Previously we were using the "streams" package to provide type information
to the streams that we were passing around to dockerode and it was working
fine, but after some changes that seem unrelated this has broken the
compilation process.
3. The mentioned changes are not yet on the main branch, but we expect
them to be there soon and so this change is laying the groundwork for that
by pre-emptively fixing the broken build's root cause which is that the
test-tooling package does not declare it's typings related dependencies
correctly: It implicitly uses the NodeJS standard library's types but
so far had not declared them on the package level.
4. This change is therefore to rectify the issue of the `@types/node`
dependency missing from the test-tooling package and also the refactoring
of some of the test ledger classes which were relying on the `streams`
builtin package instead of correctly using the NodeJS.ReadableStream global.
5. Earlier the reasoning for this was that we try to avoid pulling in
types from the global scope because we try to avoid any sort of dependency
on the global scope in general. Once we have proof though that this is
causing issues with the build, then we must give up the principle for
practical reasons (and only in the minimum viable scope, e.g. this does
not change the fact that everywhere else in the codebase we should still
do our best to avoid using the global scoped classes, types, functions,
etc..).

Thank you to @AndreAugusto11 and @RafaelAPB for pointing out this issue
through the pull request of his that is currently being worked on at the
time of this writing:
RafaelAPB#72

Related to but does not address #2811

Signed-off-by: Peter Somogyvari <[email protected]>

refactor(SATP-Hermes): remove unused packages

* updated openapi version
* updated bungee plugin version to 2.0.0-alpha.2

Co-authored-by: Peter Somogyvari <[email protected]>

Signed-off-by: André Augusto <[email protected]>
Signed-off-by: Peter Somogyvari <[email protected]>
Co-authored-by: André Augusto <[email protected]>
Co-authored-by: Peter Somogyvari <[email protected]>
Co-authored-by: Rafael Belchior <[email protected]>

Signed-off-by: Rafael Belchior <[email protected]>

test(satp-hermes): fix hanging tests

Signed-off-by: Rafael Belchior <[email protected]>

refactor(SATP-Hermes): fix cspell and lint

Signed-off-by: André Augusto <[email protected]>
@RafaelAPB RafaelAPB force-pushed the satp-stg branch 5 times, most recently from 9f53ea4 to 6511ed4 Compare May 27, 2025 18:12
@RafaelAPB RafaelAPB marked this pull request as ready for review May 27, 2025 18:16
@RafaelAPB RafaelAPB requested a review from LordKubaya as a code owner May 27, 2025 18:16
@RafaelAPB RafaelAPB force-pushed the satp-stg branch 2 times, most recently from 1a8d568 to 82d18d4 Compare May 27, 2025 18:26
Co-authored-by: Peter Somogyvari <[email protected]>
Co-authored-by: André Augusto <[email protected]>
Authored-by: Rafael Belchior <[email protected]>

Signed-off-by: Rafael Belchior <[email protected]>
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"engines": {
"node": ">=12",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need to support Node versions as far back as v12? Node v18 reached EOL recently, and other Cacti packages are pegged to at least v18, so I'd suggest a change to that version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will fix this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is a typo/copy paste from old fabric samples code.

"@types/uuid": "10.0.0",
"customize-cra": "1.0.0",
"react-app-rewired": "2.2.1",
"ts-loader": "9.5.1"
},
"engines": {
"node": ">=18",
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you have the minimum version set to 18. Can you have this constraint be consistent across all the packages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will fix this

fi

if [ "$git_user_id" = "" ]; then
git_user_id="hyperledger"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be hyperledger-cacti, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to call this .placeholder as you've done elsewhere? Alternatively, if you want to check in a blank folder, the standard Git convention (as far as I am aware) is to create a blank file named .gitkeep.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will use .gitkeep

* Smart Contract Interface to define the methods needed by SATP Wrapper Contract.
*/

interface SATPContractInterface {
Copy link
Contributor

Choose a reason for hiding this comment

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

With reference to my earlier comment on this PR, this file seems to be a replica of a file in one of the examples. Ideally, you'd want such an interface to be exported from a common package, so IMO this is the right place for it. And you also ideally don't want to replicate code, which makes maintenance and managing inconsistencies harder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ideally the examples should import this file, as long as it is a replica. @AndreAugusto11 @LordKubaya

Copy link
Contributor

Choose a reason for hiding this comment

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

This interface was removed.

"main": "dist/index.js",
"typings": "dist/index.d.ts",
"engines": {
"node": ">=12",
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, I'd prefer this be >=18.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed

Copy link
Contributor

@VRamakrishna VRamakrishna left a comment

Choose a reason for hiding this comment

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

Overall, this looks fine, though I haven't (obviously) gone through each file.

Left some minor questions and suggestions. I'd prefer you address the ones around versioning and naming. Replicated code we can live with as long as eliminating redundancies is in your roadmap and is tracked via issues. Same with moving common code from examples to packages.

Can you also add a small description of the changes made in this PR, perhaps a few high-level bullet points, in the opening comment?

General question: I see several instances of generated code (both in JS and Go) being checked in. Are you sure you want to do this? I don't have a strong view on this and will defer to your decision, but just wanted to inquire.

@RafaelAPB
Copy link
Contributor Author

Thank you for your feedback, dear @VRamakrishna - we will incorporate those changes and come back to you.

AndreAugusto11 and others added 6 commits June 13, 2025 19:20
Signed-off-by: Andre Augusto <[email protected]>
Signed-off-by: Carlos Amaro <[email protected]>
Co-authored-by: Carlos Amaro <[email protected]>
Co-authored-by:  Rodolfo Carapau <[email protected]>
ci(satp-hermes): cdbc

Signed-off-by: Rodolfo Carapau <[email protected]>
@RafaelAPB
Copy link
Contributor Author

@VRamakrishna we incorporated your feedback. Could you please re-review?

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.