hyperledger-archives / aries-framework-go-ext Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://wiki.hyperledger.org/display/aries
License: Apache License 2.0
Home Page: https://wiki.hyperledger.org/display/aries
License: Apache License 2.0
did:jwk is a deterministic transformation of a JWK into a DID Document. Spec: https://github.com/quartzjer/did-jwk/blob/main/spec.md
Implement Read, Update (not supported) and Deactivate (not supported). Create will be handled in subsequent issue.
Some of the SQL queries involve inserting text. If it's something a user can define then there may be a vulnerability here.
Currently sidetree client adds anchorOrigin even when it is empty. Only add anchor origin to create/recover requests if anchor origin is not empty.
Update sidetree-core
See this comment chain for more info: #259 (comment)
The current PostgreSQL storage implementation is incomplete.
In no particular order:
Update sidetree-core and orb (rename also-known-as patches)
The tagMap
mechanism of the mysql
storage implementation should be optimized. It is being stored as a composite value of a single record in the data table. Instead, the tags should be maintained in a separate 'tags' table. Queries, updates, and deletions involving the tagMap
should not require SELECT prior to UPDATE/DELETE. Furthermore, it should be possible to do bulk updates/deletions to the tag map (see Batch()
).
CouchDB has something called "attachments" that could be used to store binary data in a more efficient form. We should make it so that if the binary data is greater than some size, then it gets stored as an attachment. When retrieving documents from CouchDB, we must then check to see if they have an attachment. If they do, then we return the attachment data. Otherwise, we look at the usual "value" field.
The current storage interface makes it hard to specify compound indexes cleanly. Investigate how compound indexes may benefit performance, and how they can be supported by the storage interface in a clean way.
If len(didDoc.VerificationMethod) = 0
, the function will return (nil, nil)
.
The current code has an explicit check to ensure that no tag names are "payload", because that's a keyword reserved for the stored value (of the key-value pair). This is because tags are stored at the same level as "payload" - instead they could be nested one level deep.
Some store implementations don't require it at all (EDV in non-ext repo), some store implementations don't require it but will benefit from a performance improvement thanks to indexing (CouchDB) and some store implementations require it and will throw an error if it's not done (probably MySQL?)
Should all store implementations enforce the store config? Even if it's not required or optional?
Edit: the EDV storage implementation will soon make use of the store config to create indexes, so it'll be in the "benefits from from indexing but not requiring it" category
The following structure is based on known proposed contributions.
Common Actions:
Open Questions
Structure:
Longform VDR method should not include did prefix
The Put method already does this, but the SetStoreConfig method should as well, since those names conflict with the query syntax. Currently SetStoreConfig only checks for ":" characters.
Add AlsoKnownAs support to Sidetree VDR
Hello, could you add to README information how this repository differ from https://github.com/hyperledger/aries-framework-go?
It took me some time digging to understood that it's probably containing extensions for aries-framework-go.
Add AlsoKnownAs support to Orb VDR
Due to a bug in the underlying Kivik library (appears to be an issue with the URL encoding, if keys containing special URL characters are used, then the document won't be retrievable later. We'll either need to wait until the Kivik library is fixed, or we'll have to come up with a workaround.
MongoDB allows a BulkWrite call to be ordered or unordered. Right now all calls to BulkWrite are always ordered. For callers that don't need this, allowing them to specify that the call can be unordered can allow MongoDB to process the operations faster.
Update Orb revision (fix for deactivated doc verification)
Currently, the couchdb store can't operate with a non-admin account.
I found the following issues that hold back the couchdb store:
_users
database is queried. This feature has been disabled in version 3.1.0 apache/couchdb#3084The Batch method just returns a regular error. It would be better to examine the BulkResults object returned from the BulkDocs method from the Kivik library (currently that return value is ignored) to see if we can return a MultiError which will contain errors for each operation (if any occurred)
Aries interface was changed. We need to update the storage extensions due to this change. See hyperledger-archives/aries-framework-go@b51ab9a#diff-5b2df4e72b7663d31d113c48920f911f24be00c599ce90bee6a16253d425e937R63
make unit-test
command runs all unit tests. Currently, MongoDB tests are not working properly.
MongoDB depends on the docker image. But Image isn’t created anywhere. Theoretically, tests should fail but they are not.
The problem is with os.Exit(0)
. Even if an error happens we exit with a successful code (0
).
See https://github.com/hyperledger/aries-framework-go-ext/blob/main/component/storage/mongodb/mongodb_test.go#L47
What needs to be done?
0
dockertest
is preferable)In the case of a batch call where some of the operations are redundant (like a put, and then a put that overrides the previous one), those redundant operations will be stripped out. This is necessary to allow the CouchDB batch call to work correctly. CouchDB will not have any revision history of these stripped out operations, however. We may want to consider adding an option to preserve revision history (at the expense of speed most likely)
Currently context is always context.Background(). Allow this to be customizable.
The MongoDB implementation needs to be updated to support new functionality in order to be used as an aries-framework-go storage provider. At a minimum, the SetStoreConfig and Query methods need to be implemented, as well as tag storage (currently the Put method throws an error if you try to store tags).
Use MySQL's built in indexing instead the "tag map" introduced in #74
Currently VDR makes decision on whether to accept or reject request based on method only.
Add options to VDR Accept function so VDR can make more complex decisions (for example
long-form VDR should reject request if number of parts in DID is not at least four)
Refactor sidetree client send operation request function so it can be passed as an option.
CouchDB implementation of https://github.com/hyperledger/aries-framework-go/blob/master/pkg/newstorage/newstorage.go
Update Orb VDR with latest sidetree-core, sidetree VDR and aries-framework go
Don't send service priority if not set
This might help performance for clients that always want to get total item counts. Maybe it'll reduce performance for clients that don't need it? We should investigate. The usage of aggregates/non-aggregates could be enabled by adding a new query option.
Try running make lint
on your local system, and you'll get the following error:
level=warning msg="[runner] Can't run linter goanalysis_metalinter: bodyclose: failed prerequisites: [[email protected]/hyperledger/aries-framework-go-ext/component/vdr/indy: analysis skipped: errors in package: [/opt/workspace/vdr.go:21:2: could not import github.com/hyperledger/indy-vdr/wrappers/golang/vdr (/go/pkg/mod/github.com/hyperledger/indy-vdr/wrappers/[email protected]/vdr/cb.go:32:8: could not import C (cgo preprocessing failed))]]"
level=warning msg="[runner] Can't run linter unused: buildir: failed to load package vdr: could not load export data: no export data for \"github.com/hyperledger/indy-vdr/wrappers/golang/vdr\""
level=error msg="Running error: buildir: failed to load package vdr: could not load export data: no export data for \"github.com/hyperledger/indy-vdr/wrappers/golang/vdr\""
Note that this doesn't happen in the CI.
There are additional methods that are not implemented that may be useful for someone extending aries-framework-go.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.