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

Add docs for freeze transactions #1656

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions docs/source/requests-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* [NODE](#node)
* [POOL_UPGRADE](#pool_upgrade)
* [POOL_CONFIG](#pool_config)
* [LEDGERS_FREEZE](#ledgers_freeze)

* [Read Requests](#read-requests)

Expand All @@ -24,6 +25,7 @@
* [GET_SCHEMA](#get_schema)
* [GET_CLAIM_DEF](#get_claim_def)
* [GET_TXN](#get_txn)
* [GET_FROZEN_LEDGERS](#get_frozen_ledgers)

This doc is about supported client"s Request (both write and read ones).
If you are interested in transactions and their representation on the Ledger (that is internal one),
Expand Down Expand Up @@ -1386,6 +1388,62 @@ Command to change Pool's configuration
}
```

### LEDGERS_FREEZE

Disable specific legders. System completely ignore frozen ledgers. After freeze you can delete frozen ledger via [remove_ledger.py] (https://github.com/hyperledger/indy-node/blob/master/scripts/remove_ledger.py).
Toktar marked this conversation as resolved.
Show resolved Hide resolved

*Request Example*:
```
{
"operation": {
"type": "9",
"ledgers_ids": [1,2,3,4]
},
"identifier": "21BPzYYrFzbuECcBV3M1FH",
"reqId": 1514304094738044,
"protocolVersion": 2,
"signature": "3YVzDtSxxnowVwAXZmxCG2fz1A38j1qLrwKmGEG653GZw7KJRBX57Stc1oxQZqqu9mCqFLa7aBzt4MKXk4MeunVj",
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result": {
"ver":1,
"txn": {
"type":9,
"protocolVersion":2,
"ver": 1,

"data": {},
Toktar marked this conversation as resolved.
Show resolved Hide resolved

"metadata": {
"reqId":1514304094738044,
"from":"21BPzYYrFzbuECcBV3M1FH",
"digest":"6cee82226c6e276c983f46d03e3b3d10436d90b67bf33dc67ce9901b44dbc97c",
"payloadDigest": "21f0f5c158ed6ad49ff855baf09a2ef9b4ed1a8015ac24bccc2e0106cd905685",
},
},
"txnMetadata": {
"txnTime":1513945121,
"seqNo": 10,
},
"reqSignature": {
"type": "ED25519",
"values": [{
"from": "21BPzYYrFzbuECcBV3M1FH",
"value": "3YVzDtSxxnowVwAXZmxCG2fz1A38j1qLrwKmGEG653GZw7KJRBX57Stc1oxQZqqu9mCqFLa7aBzt4MKXk4MeunVj"
}]
},

"rootHash": "DvpkQ2aADvQawmrzvTTjF9eKQxjDkrCbQDszMRbgJ6zV",
"auditPath": ["6GdvJfqTekMvzwi9wuEpfqMLzuN1T91kvgRBQLUzjkt6"],
}
}
```

## Read Requests

### GET_NYM
Expand Down Expand Up @@ -1898,3 +1956,68 @@ A generic request to get a transaction from Ledger by its sequence number.
}
```


### GET_FROZEN_LEDGERS

Get whole list of frozen ledgers. Reply has follow format data: `<ledger_id>: {ledger: <ledger_root_hash>, state: <state_root_hash>, seq_no: <last_seq_no>}`.
Toktar marked this conversation as resolved.
Show resolved Hide resolved

*Request Example*:
```
{
Toktar marked this conversation as resolved.
Show resolved Hide resolved
"type": 10,
"ver": 1,
"protocolVersion": 1,

"data": {
"id":"L5AD5g65TDQr1PPHHRoiGf:Degree:1.0",
"did": "AH4RRiPR78DUrCWatnCW2w",
},
"metadata": {
"reqId": 1514215425836444,
"from": "DDAD5g65TDQr1PPHHRoiGf",
},
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result": {
"type": "10",
"identifier": "L5AD5g65TDQr1PPHHRoiGf",
"reqId": 1514308188474704,

"version": "1.0",
Toktar marked this conversation as resolved.
Show resolved Hide resolved

"seqNo": 10,
"txnTime": 1514214795,

"data": {
1: {
ledger: "4Y2DpBPSsgwd5CVE8Z2zZZKS4M6n9AbisT3jYvCYyC2y",
state: "81bGgr7FDSsf4ymdqaWzfnN86TETmkUKH4dj4AqnokrH",
seq_no: 10
}
},

"state_proof": {
"root_hash": "81bGgr7FDSsf4ymdqaWzfnN86TETmkUKH4dj4AqnokrH",
"proof_nodes": "+QHl+FGAgICg0he/hjc9t/tPFzmCrb2T+nHnN0cRwqPKqZEc3pw2iCaAoAsA80p3oFwfl4dDaKkNI8z8weRsSaS9Y8n3HoardRzxgICAgICAgICAgID4naAgwxDOAEoIq+wUHr5h9jjSAIPDjS7SEG1NvWJbToxVQbh6+Hi4dnsiaWRlbnRpZmllciI6Ikw1QUQ1ZzY1VERRcjFQUEhIUm9pR2YiLCJyb2xlIjpudWxsLCJzZXFObyI6MTAsInR4blRpbWUiOjE1MTQyMTQ3OTUsInZlcmtleSI6In42dWV3Um03MmRXN1pUWFdObUFkUjFtIn348YCAgKDKj6ZIi+Ob9HXBy/CULIerYmmnnK2A6hN1u4ofU2eihKBna5MOCHiaObMfghjsZ8KBSbC6EpTFruD02fuGKlF1q4CAgICgBk8Cpc14mIr78WguSeT7+/rLT8qykKxzI4IO5ZMQwSmAoLsEwI+BkQFBiPsN8F610IjAg3+MVMbBjzugJKDo4NhYoFJ0ln1wq3FTWO0iw1zoUcO3FPjSh5ytvf1jvSxxcmJxoF0Hy14HfsVll8qa9aQ8T740lPFLR431oSefGorqgM5ioK1TJOr6JuvtBNByVMRv+rjhklCp6nkleiyLIq8vZYRcgIA=",
"multi_signature": {
"value": {
"timestamp": 1514308168,
"ledger_id": 2,
"txn_root_hash": "4Y2DpBPSsgwd5CVE8Z2zZZKS4M6n9AbisT3jYvCYyC2y",
"pool_state_root_hash": "9fzzkqU25JbgxycNYwUqKmM3LT8KsvUFkSSowD4pHpoK",
"state_root_hash": "81bGgr7FDSsf4ymdqaWzfnN86TETmkUKH4dj4AqnokrH"
},
"signature": "REbtR8NvQy3dDRZLoTtzjHNx9ar65ttzk4jMqikwQiL1sPcHK4JAqrqVmhRLtw6Ed3iKuP4v8tgjA2BEvoyLTX6vB6vN4CqtFLqJaPJqMNZvr9tA5Lm6ZHBeEsH1QQLBYnWSAtXt658PotLUEp38sNxRh21t1zavbYcyV8AmxuVTg3",
"participants": ["Delta", "Gamma", "Alpha"]
}
},


}
}
```
117 changes: 117 additions & 0 deletions docs/source/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* [TRANSACTION_AUTHOR_AGREEMENT](#transaction_author_agreement)
* [TRANSACTION_AUTHOR_AGREEMENT_AML](#transaction_author_agreement_AML)
* [TRANSACTION_AUTHOR_AGREEMENT_DISABLE](#transaction_author_agreement_disable)
* [LEDGERS_FREEZE](#ledgers_freeze)


* [Read Requests](#read-requests)
Expand All @@ -43,6 +44,7 @@
* [GET_CONTEXT](#get_context)
* [GET_RICH_SCHEMA](#get_rich_schema)
* [GET_TXN](#get_txn)
* [GET_FROZEN_LEDGERS](#get_frozen_ledgers)

* [Action Requests](#action-requests)

Expand Down Expand Up @@ -2953,7 +2955,61 @@ A new Agreement needs to be sent instead.
}
```

### LEDGERS_FREEZE

Disable specific legders. System completely ignore frozen ledgers. After freeze you can delete frozen ledger via [remove_ledger.py] (https://github.com/hyperledger/indy-node/blob/master/scripts/remove_ledger.py).

*Request Example*:
```
{
"operation": {
"type": "9",
"ledgers_ids": [1,2,3,4]
},
"identifier": "21BPzYYrFzbuECcBV3M1FH",
"reqId": 1514304094738044,
"protocolVersion": 2,
"signature": "3YVzDtSxxnowVwAXZmxCG2fz1A38j1qLrwKmGEG653GZw7KJRBX57Stc1oxQZqqu9mCqFLa7aBzt4MKXk4MeunVj",
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result": {
"ver":1,
"txn": {
"type":9,
"protocolVersion":2,
"ver": 1,

"data": {},
Toktar marked this conversation as resolved.
Show resolved Hide resolved

"metadata": {
"reqId":1514304094738044,
"from":"21BPzYYrFzbuECcBV3M1FH",
"digest":"6cee82226c6e276c983f46d03e3b3d10436d90b67bf33dc67ce9901b44dbc97c",
"payloadDigest": "21f0f5c158ed6ad49ff855baf09a2ef9b4ed1a8015ac24bccc2e0106cd905685",
},
},
"txnMetadata": {
"txnTime":1513945121,
"seqNo": 10,
},
"reqSignature": {
"type": "ED25519",
"values": [{
"from": "21BPzYYrFzbuECcBV3M1FH",
"value": "3YVzDtSxxnowVwAXZmxCG2fz1A38j1qLrwKmGEG653GZw7KJRBX57Stc1oxQZqqu9mCqFLa7aBzt4MKXk4MeunVj"
}]
},

"rootHash": "DvpkQ2aADvQawmrzvTTjF9eKQxjDkrCbQDszMRbgJ6zV",
"auditPath": ["6GdvJfqTekMvzwi9wuEpfqMLzuN1T91kvgRBQLUzjkt6"],
}
}
```

## Read Requests

Expand Down Expand Up @@ -4184,6 +4240,67 @@ A generic request to get a transaction from Ledger by its sequence number.
}
```

### GET_FROZEN_LEDGERS
Toktar marked this conversation as resolved.
Show resolved Hide resolved

Get whole list of frozen ledgers. Reply has follow format data: `<ledger_id>: {ledger: <ledger_root_hash>, state: <state_root_hash>, seq_no: <last_seq_no>}`.

*Request Example*:
```
{
"operation": {
"type": "10"
"id": "did:sov:GGAD5g65TDQr1PPHHRoiGf",
},

"identifier": "L5AD5g65TDQr1PPHHRoiGf",
"reqId": 1514308188474704,
"protocolVersion": 2
}
```

*Reply Example*:
```
{
"op": "REPLY",
"result": {
"type": "10",
"identifier": "L5AD5g65TDQr1PPHHRoiGf",
"reqId": 1514308188474704,

"version": "1.0",

"seqNo": 10,
"txnTime": 1514214795,

"data": {
1: {
ledger: "4Y2DpBPSsgwd5CVE8Z2zZZKS4M6n9AbisT3jYvCYyC2y",
state: "81bGgr7FDSsf4ymdqaWzfnN86TETmkUKH4dj4AqnokrH",
seq_no: 10
}
},

"state_proof": {
"root_hash": "81bGgr7FDSsf4ymdqaWzfnN86TETmkUKH4dj4AqnokrH",
"proof_nodes": "+QHl+FGAgICg0he/hjc9t/tPFzmCrb2T+nHnN0cRwqPKqZEc3pw2iCaAoAsA80p3oFwfl4dDaKkNI8z8weRsSaS9Y8n3HoardRzxgICAgICAgICAgID4naAgwxDOAEoIq+wUHr5h9jjSAIPDjS7SEG1NvWJbToxVQbh6+Hi4dnsiaWRlbnRpZmllciI6Ikw1QUQ1ZzY1VERRcjFQUEhIUm9pR2YiLCJyb2xlIjpudWxsLCJzZXFObyI6MTAsInR4blRpbWUiOjE1MTQyMTQ3OTUsInZlcmtleSI6In42dWV3Um03MmRXN1pUWFdObUFkUjFtIn348YCAgKDKj6ZIi+Ob9HXBy/CULIerYmmnnK2A6hN1u4ofU2eihKBna5MOCHiaObMfghjsZ8KBSbC6EpTFruD02fuGKlF1q4CAgICgBk8Cpc14mIr78WguSeT7+/rLT8qykKxzI4IO5ZMQwSmAoLsEwI+BkQFBiPsN8F610IjAg3+MVMbBjzugJKDo4NhYoFJ0ln1wq3FTWO0iw1zoUcO3FPjSh5ytvf1jvSxxcmJxoF0Hy14HfsVll8qa9aQ8T740lPFLR431oSefGorqgM5ioK1TJOr6JuvtBNByVMRv+rjhklCp6nkleiyLIq8vZYRcgIA=",
"multi_signature": {
"value": {
"timestamp": 1514308168,
"ledger_id": 2,
"txn_root_hash": "4Y2DpBPSsgwd5CVE8Z2zZZKS4M6n9AbisT3jYvCYyC2y",
"pool_state_root_hash": "9fzzkqU25JbgxycNYwUqKmM3LT8KsvUFkSSowD4pHpoK",
"state_root_hash": "81bGgr7FDSsf4ymdqaWzfnN86TETmkUKH4dj4AqnokrH"
},
"signature": "REbtR8NvQy3dDRZLoTtzjHNx9ar65ttzk4jMqikwQiL1sPcHK4JAqrqVmhRLtw6Ed3iKuP4v8tgjA2BEvoyLTX6vB6vN4CqtFLqJaPJqMNZvr9tA5Lm6ZHBeEsH1QQLBYnWSAtXt658PotLUEp38sNxRh21t1zavbYcyV8AmxuVTg3",
"participants": ["Delta", "Gamma", "Alpha"]
}
},


}
}
```

## Action Requests

### POOL_RESTART
Expand Down
38 changes: 38 additions & 0 deletions docs/source/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* [TRANSACTION_AUTHOR_AGREEMENT](#transaction_author_agreement)
* [TRANSACTION_AUTHOR_AGREEMENT_AML](#transaction_author_agreement_AML)
* [TRANSACTION_AUTHOR_AGREEMENT_DISABLE](#transaction_author_agreement_disable)
* [LEDGERS_FREEZE](#ledgers_freeze)


## General Information
Expand Down Expand Up @@ -2093,3 +2094,40 @@ A new Agreement needs to be sent instead.
}
```

#### LEDGERS_FREEZE

Disable specific legders. System completely ignore frozen ledgers. After freeze you can delete frozen ledger via [remove_ledger.py] (https://github.com/hyperledger/indy-node/blob/master/scripts/remove_ledger.py).
Toktar marked this conversation as resolved.
Show resolved Hide resolved

**Example:**
```
{
"ver": 1,
"txn": {
"type":9,
"protocolVersion":2,

"data": {
"ver": 1,
"ledgers_ids": [1,2,3,4],
},

"metadata": {
"reqId":1513945121191691,
"from":"L5AD5g65TDQr1PPHHRoiGf",
"digest":"6cee82226c6e276c983f46d03e3b3d10436d90b67bf33dc67ce9901b44dbc97c",
"payloadDigest": "21f0f5c158ed6ad49ff855baf09a2ef9b4ed1a8015ac24bccc2e0106cd905685",
},
},
"txnMetadata": {
"txnTime":1577836799,
"seqNo": 10,
},
"reqSignature": {
"type": "ED25519",
"values": [{
"from": "L5AD5g65TDQr1PPHHRoiGf",
"value": "4X3skpoEK2DRgZxQ9PwuEvCJpL8JHdQ8X4HDDFyztgqE15DM2ZnkvrAh9bQY16egVinZTzwHqznmnkaFM4jjyDgd"
}]
}
}
```