This HIPE describes the implementation of the did:indy concerning indy-node and indy-vdr according to the did:indy specification.
For motivation and more information please refer to the did:indy specification.
https://github.com/hyperledger/indy-node/blob/master/docs/source/transactions.md#common-structure
{
"ver": <...>,
"txn": {
...
},
"txnMetadata": {
"txnTime": <...>,
"seqNo": <...>,
"txnId": <...>
},
"reqSignature": {
...
}
}
We need to adapt the schema of a write nym operation to include the optional diddoccontent
attribut. The schema definition is part of Plenum
Should we adapt the existing class
class ClientNYMOperation(MessageValidator):
schema = (
(TXN_TYPE, ConstantField(NYM)),
(ALIAS, LimitedLengthStringField(max_length=ALIAS_FIELD_LIMIT, optional=True)),
(VERKEY, VerkeyField(optional=True, nullable=True)),
(TARGET_NYM, DestNymField()),
(ROLE, RoleField(optional=True)),
(DIDDOC_CONTENT, JsonField(max_length=JSON_FIELD_LIMIT(optional=True)),
)
or add another class?
class ClientNYMOperationV2(MessageValidator):
I don't see a reason currently to add another class.
JSON_FIELD_LIMIT
is used for the raw content of an ATTRIB tx and is set here to 5*1024
It seems that we don't need to adapt the update_state
function
An open question would be if store the diddoccontent directly or use dedicated store as is done in the attrib case.
No changes required?
Do we need new type/schemas of new version?
We can roughly follow the process outlined in RevocRegEntry
(TIMESTAMP, IntegerField(optional=True))
and enhanced logic to do the followingNymHandler.make_state_path_for_nym(nym)
as defined hereget_nym_by_timestamp(timestamp, path_to_nym_entry)
similar to _get_reg_entry_by_timestamp(self, timestamp, path_to_reg_entry). More about timestamp storage can be found hereThere seems to be no direct mapping between seqNo and state. Hence, I see the following options:
seqNo -> state
and add an optional seqNo attribute to the get nym request.GET_TXN(seqId)
internally, use state_root_hash
which is part of the state_proof
block to get_value_from_state
. (Not sure if this the correct state root (More info))GET_TXN(seqId)
internally, get the timestamp from this TX and use get_nym_by_timestamp
NYM tx is defined in Plenum not indy node
There's a cache implementation to get verkey/role of a given nym https://github.com/hyperledger/indy-node/blob/master/indy_node/persistence/idr_cache.py
There's a dedicated attribute (key-value) store. Only hashes are stored in the ledger. See https://github.com/hyperledger/indy-node/blob/78bb325121be212f4dc729998d713dbbcde78bee/indy_node/server/node.py#L252 However, this seems not to be used ?!
There is already observer related code in Plenum
-[ ] Update Transactions documentation
-[x] How is get revocation registry state implemented?
/indy_common/constants.py Line 104 allOpKeys add diddoccontent ?
indy_node/test/nym_txn/test_nym_resend.py::test_nym_send_twice FAILED [ 98%]
indy_node/test/nym_txn/test_nym_resend.py::test_nym_resend FAILED [ 98%]
indy_node/test/nym_txn/test_send_nym_validation.py::testSendNymSucceedsForUuidIdentifierAnsdk_pool_handlemittedVerkey FAILED [ 98%]