-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor(node): remove legacy BE files #832
Conversation
Signed-off-by: Shota Jolbordi <[email protected]>
🦙 MegaLinter status:
|
Descriptor | Linter | Files | Fixed | Errors |
---|---|---|---|---|
✅ ACTION | actionlint | 1 | 0 | |
markdownlint | 5 | 90 | ||
markdown-link-check | 5 | 10 | ||
✅ MARKDOWN | markdown-table-formatter | 5 | 0 | |
✅ REPOSITORY | dustilock | yes | no | |
✅ REPOSITORY | git_diff | yes | no | |
✅ REPOSITORY | grype | yes | no | |
kics | yes | 51 | ||
✅ REPOSITORY | syft | yes | no | |
✅ REPOSITORY | trivy-sbom | yes | no | |
trufflehog | yes | 1 | ||
✅ SQL | sql-lint | 2 | 0 | |
prettier | 2 | 1 | ||
✅ YAML | v8r | 2 | 0 | |
✅ YAML | yamllint | 2 | 0 |
See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true
in mega-linter.yml to validate all sources, not only the diff
Signed-off-by: Shota Jolbordi <[email protected]>
Signed-off-by: Shota Jolbordi <[email protected]>
Signed-off-by: Shota Jolbordi <[email protected]>
docs/cardano/metadata-schema.md
Outdated
@@ -29,31 +29,10 @@ where: | |||
time the schema evolves. | |||
- `CONTENT`: The array of bytes to store. There are no limits on the size of | |||
arrays, so it gets restricted only by the maximum transaction size. Such bytes | |||
represent an `AtalaObject` (see | |||
[proto](https://github.com/input-output-hk/atala/blob/91f36aa93986fb2df23618b62b9281a55a3ea3c0/prism-sdk/protos/node_internal.proto#L19). | |||
represent an `AtalaObject` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is actually describing an old schema that is not used. I would simply delete the file given that the metadata encoding is defined in the spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I thought it was relevant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -1,234 +0,0 @@ | |||
# Running Cardano |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if the instructions still work, but this was a very nice file (along with the docker compose file)
Today the community has knowledge to do this on its own, so I am not against deleting this, just wanted to remark the old times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if it still works either but we would have to test it and if necessary change it if we want to include it. I did not do it, mainly because of lack of time but also since we have this guide, which has a link to official Cardano wallet backend repo, and that guide explains how to start a node with the wallet in full node mode, which also they are maintaining do we won't have to keep updating the guide as Cardano evolves.
@@ -75,47 +75,6 @@ nodeExplorer { | |||
whitelistDids += ${?NODE_EXPLORER_WHITELIST_DID} | |||
} | |||
|
|||
api { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are also whitelistDids above this, are those used only by the node explorer? And. btw, what is this explorer for? I vaguely remember Alexis talking about an explorer idea, but this likely was built in my absence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just looking at node explorer API in Protobuff, it appears that it is just an API to get information about current node state, a.k wallet balance, operations. Not sure why this could not be part of just node API but anyway, If it works don't see a reason to get rid of it, even tho it is not strictly necessery to comply to the spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the server checking that requests are signed by that DID? We don't need to remove this, but I am surprised that we took the time to implement that
@@ -257,7 +256,6 @@ class NodeApp(executionContext: ExecutionContext) { self => | |||
private def startServer( | |||
nodeService: NodeGrpcServiceImpl, | |||
nodeExplorerService: NodeExplorerGrpcServiceImpl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I was referring to this explorer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, node service and node explorer service are separate for some reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from these tests it looks like a tool to check the wallet balance and some data about the node db
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am missing what actually changed, was this moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just moved it from the prism_backend folder (it was a folder where we had connector, management console, node) to a node folder, this allowed me to get rid of the prism_backend folder entirely because it was the only thing in there. I did discuss this with the DevOps and they are aware that I'm moving this file. They do use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is interesting that now, after deleting the VC related operations, the issue described in this doc is gone. This is, there is no implicit dependency between operations, all operations point to an explicit previous hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about protocol update operation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that special case should not be problematic, it would be fixable be re-submitting the protocol update with a new signature. It is unlikely that one would rotate the key and send an update in the same operation, but what you raise is correct, technically that operations could suffer this issue
Signed-off-by: Shota Jolbordi <[email protected]>
Signed-off-by: Shota Jolbordi <[email protected]>
Signed-off-by: Shota Jolbordi <[email protected]>
Signed-off-by: Shota Jolbordi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @shotexa , great work, lets merge it and continue with the clean up in other branches
* refactor: clean up migrations (#830) * Add everything Signed-off-by: Shota Jolbordi <[email protected]> * Remove migration tests Signed-off-by: Shota Jolbordi <[email protected]> * add ingnore invalid create option for postres mega linter Signed-off-by: Shota Jolbordi <[email protected]> * Try mega linter 7 Signed-off-by: Shota Jolbordi <[email protected]> * edit megalinter.yaml Signed-off-by: Shota Jolbordi <[email protected]> * Disable some linters Signed-off-by: Shota Jolbordi <[email protected]> --------- Signed-off-by: Shota Jolbordi <[email protected]> * refactor(node): remove legacy BE files (#832) * Start cleaning up docs Signed-off-by: Shota Jolbordi <[email protected]> * Remove more files Signed-off-by: Shota Jolbordi <[email protected]> * Fix compilation issue Signed-off-by: Shota Jolbordi <[email protected]> * Trim docs Signed-off-by: Shota Jolbordi <[email protected]> * Fix compilation errors Signed-off-by: Shota Jolbordi <[email protected]> * Remove some bitcoin test resources and old docs Signed-off-by: Shota Jolbordi <[email protected]> * Lint Signed-off-by: Shota Jolbordi <[email protected]> * Fix tests Signed-off-by: Shota Jolbordi <[email protected]> --------- Signed-off-by: Shota Jolbordi <[email protected]> * refactor: Delete legacy operation related to credentials (#831) * ATL-6668: Delete legacy operation related to credentials This commit deletes the IssueCredentialBatchOperation and RevokeCredentialsOperation. It does not delete node API, daos nor repositories related to credentials * ATL-6668: Delete more files related to VCs This commit deletes even more files related to VC operations. It also removes some dependencies on the old SDK * ATL-6668: Delete unused tables This commit deletes tables and indexes from VC legacy operations * ATL-6668: Fix formatting * ATL-6668: Address review comments This commit deletes references to legacy VC code in protobuf and sql definitions * refactor(ATL-6924): add support for other keys (#834) * ATL-6924: Replace users of ECPublicKey This commit replaces the used of ECPublicKey * ATL-6924: Simplify models This commit simplifies models by deleting classes not needed at parsing time * ATL-6924: Simplify types This commit replaces some uses of Array and uses Vector instead to allow more transparent equality checks * ATL-6924: Add support for encoding functions This commit adds support to decode hex strings into Sha256Hash bytes * ATL-6924: Refactor CryptoUtils and remove SHA256Digest This commit improves the organization of CryptoUtils methods It also delete the used of SDK methods related to Sha256 hashing * refactor(ATL-6926): remove crypto sdk (#838) * ATL-6926: Remove uses of EC classes This commit removes most uses of the legacy crypto SDK * ATL-6926: Fix missing implementations This commit adds missing implementations for key encoding algorithms * ATL-6926: Fix tests * ATL-6926: Clean up code and tests * ATL-6926: Correct typo and add tests This commit adds the final tests to validate the cryptography implementation that replaces the SDK * refactor(node): Remove prism identity (#840) * clean up source files, replace DID usages Signed-off-by: Shota Jolbordi <[email protected]> * Fix some tests Signed-off-by: Shota Jolbordi <[email protected]> * Linting Signed-off-by: Shota Jolbordi <[email protected]> * Fix test Signed-off-by: Shota Jolbordi <[email protected]> * Fix fromString on DID Signed-off-by: Shota Jolbordi <[email protected]> * formatting Signed-off-by: Shota Jolbordi <[email protected]> * Address some PR comments Signed-off-by: Shota Jolbordi <[email protected]> --------- Signed-off-by: Shota Jolbordi <[email protected]> * refactor: crypto utils and tests (#841) * Remove uses of the old SDK This commit removes the uses of the old SDK and update tests * Refactor CryptoUtils class This commit re-organizes and renames methods for better use * Remove last dependency on old SDK This commit removes the last dependencies on the old SDK * docs(ATL-6669): update readme (#833) * ATL-6669: Update README This commits updates the README to focus oly on the PRISM node. * ATL-6669: Add IDE notes in README This commit adds instructions to load the project in different IDEs. The commit also removes incorrect sentences * ATL-6669: Delete old README and complete new one * ATL-6669: Add pre-commit configuration This commit adds a pre-commit hook that runs scalafmt and instructions to configure it * ATL-6669: Refer to identus configuration This commit updates the README and refers users to read identus documentation in order to configure the node. * ATL-7040: Delete DID based authentication (#843) This commit deletes the legacy DID based authentication * refactor(node): build files and add default port for gRPC server (#844) * Change some build files Signed-off-by: Shota Jolbordi <[email protected]> * Rmove unused files Signed-off-by: Shota Jolbordi <[email protected]> * Remove unused files Signed-off-by: Shota Jolbordi <[email protected]> * Remove outer node folder Signed-off-by: Shota Jolbordi <[email protected]> * Revert version name Signed-off-by: Shota Jolbordi <[email protected]> * Remove unneeded resolver from the build Signed-off-by: Shota Jolbordi <[email protected]> * Update fs2 Signed-off-by: Shota Jolbordi <[email protected]> * Start adding tests Signed-off-by: Shota Jolbordi <[email protected]> * Add more tests Signed-off-by: Shota Jolbordi <[email protected]> * Fix 1 failing test Signed-off-by: Shota Jolbordi <[email protected]> * Minor adjustment in docs Signed-off-by: Shota Jolbordi <[email protected]> * Remove test report aggregation step Signed-off-by: Shota Jolbordi <[email protected]> --------- Signed-off-by: Shota Jolbordi <[email protected]> * fix: Add http scheme support and removed the constraint from public keys table (#848) * Add http scheme support and removed the contraint from publickeys table Signed-off-by: mineme0110 <[email protected]> * ran scalafmt Signed-off-by: mineme0110 <[email protected]> --------- Signed-off-by: mineme0110 <[email protected]> --------- Signed-off-by: Shota Jolbordi <[email protected]> Signed-off-by: mineme0110 <[email protected]> Co-authored-by: shotexa <[email protected]> Co-authored-by: Ezequiel Postan <[email protected]> Co-authored-by: Shailesh Patil <[email protected]>
Overview
Screenshots
Checklists
Pre-submit checklist:
Pre-merge checklist: