Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 9 additions & 15 deletions docs/explanations/dapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,15 @@ Historically, nodes in most cryptocurrency networks communicated with each other

To overcome these obstacles, the Dash decentralized API (DAPI) uses Dash's robust masternode infrastructure to provide an API for accessing the network. DAPI supports both layer 1 (Core blockchain) and layer 2 (Dash Platform) functionality so all developers can interact with Dash via a single interface.

[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/e011783-Decentralized_API_DAPI.svg",
"Decentralized API (DAPI).svg",
613
],
"align": "center",
"caption": "DAPI Overview"
}
]
}
[/block]
```{eval-rst}
.. figure:: ../../img/dapi.svg
:class: no-scaled-link
:align: center
:width: 90%
:alt: DAPI Overview

DAPI Overview
```

## Security

Expand Down
27 changes: 10 additions & 17 deletions docs/explanations/dashpay.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,16 @@ The contract defines three document types: `contactRequest`, `profile` and `cont
5. Carol accepts the request by sending a contact request containing an encrypted extended public key back to Bob. This establishes a one way relationship from Carol to Bob.
6. Bob and Carol are now contacts of one another and can make payments to each other by decrypting the extended public key received from the other party and deriving payment addresses from it. Since both have established one way relationships with each other, they now have a two way relationship. If Bob gets a new device, he can use his recovery phrase from step one and restore his wallet, contacts (including Carol) and payments to and from his contacts.

[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/158594c-Frame-78-2.png",
"Frame-78-2.png",
866,
750,
"#98afbd"
],
"sizing": "80",
"caption": "Contact-based Wallet"
}
]
}
[/block]
```{eval-rst}
.. figure:: ./img/dashpay.png
:class: no-scaled-link
:align: center
:height: 350
:alt: Contact-based Wallet

Contact-based Wallet
```

### Implementation

DashPay has many constraints as defined in the [DashPay data contract](https://github.com/dashevo/platform/blob/master/packages/dashpay-contract/schema/dashpay.schema.json). Additionally, the DashPay data triggers defined in [js-dpp](https://github.com/dashevo/platform/tree/master/packages/js-dpp/lib/dataTrigger/dashpayDataTriggers) enforce additional validation rules related to the `contactRequest` document.
Expand Down
29 changes: 12 additions & 17 deletions docs/explanations/dpns.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,15 @@ For more implementation details, please reference the open-source JavaScript DPN
### Contract Diagram

This is a visualization of the JSON data contract as UML class diagram for better understanding of the structure. The left side shows the `domain` document and the right side shows the `preorder` document:
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/5d2ad91-dpns-plantuml.png",
"dpns-plantuml.png",
2585,
871,
"#f8f6ee"
],
"caption": "DPNS Contract Diagram"
}
]
}
[/block]
Click [here](https://files.readme.io/5d2ad91-dpns-plantuml.png) to download a copy of this diagram.

```{eval-rst}
.. figure:: ./img/dpns-uml.png
:class: no-scaled-link
:align: center
:width: 90%
:alt: DPNS Contract Diagram

DPNS Contract Diagram
```

View [a full-size copy of this diagram](./img/dpns-uml.png).
26 changes: 10 additions & 16 deletions docs/explanations/drive-platform-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@
Platform state represents the current state of all the data stored on the platform. You can think about this as one large database, where each application has its own database (Application State) defined by the Data Contract associated with the application. Therefore, the platform state can be thought of as a global view of all Dash Platform data, whereas the application state is a local view of one application's data.

The Platform Chain is processed by a state machine to reach consensus on how to build the state and what it should look like. The last block of the Platform Chain contains the root of the tree structure built from all documents in the platform state. By checking the root of the state tree stored in the block, the node can confirm that it has the correct state.
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/c4cdfb5-Platform_State.svg",
"Platform State.svg",
612,
517,
"#fafafc"
],
"caption": "Platform State Propagation"
}
]
}
[/block]

```{eval-rst}
.. figure:: ../../img/platform-state.svg
:class: no-scaled-link
:align: center
:width: 80%
:alt: Platform State Propagation

Platform State Propagation
```
26 changes: 10 additions & 16 deletions docs/explanations/drive.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ The process of adding or updating data in Drive consists of several steps to ens
3. Valid state transitions are applied to the platform state
4. The platform chain propagates a block containing the state transitions
5. Receiving nodes update Drive data based on the valid state transitions in the block
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/5e35fd4-Drive.svg",
"Drive.svg",
612,
492,
"#fafafc"
],
"caption": "Storing data in Drive"
}
]
}
[/block]

```{eval-rst}
.. figure:: ../../img/drive.svg
:class: no-scaled-link
:align: center
:width: 80%
:alt: Storing data in Drive

Storing data in Drive
```

```{toctree}
:maxdepth: 2
Expand Down
38 changes: 12 additions & 26 deletions docs/explanations/fees.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,18 @@ Storage fees cover the costs to store the various types of data throughout the n
## Costs

The current cost schedule is outlined in the table below:
[block:parameters]
{
"data": {
"0-0": "Permanent storage",
"0-1": "40000 / byte",
"h-0": "Operation",
"h-1": "Cost (credits)",
"1-0": "Base processing fee",
"2-0": "Write to storage",
"3-0": "Load from storage",
"4-0": "Seek storage",
"5-0": "Query",
"6-0": "Load from memory",
"7-0": "Blake3 hash function",
"1-1": "100000",
"2-1": "750 / byte",
"3-1": "3500 / byte",
"4-1": "2000",
"5-1": "75 / byte",
"6-1": "20 / byte",
"7-1": "400 + 64 / 64-byte block"
},
"cols": 2,
"rows": 8
}
[/block]

| Operation | Cost (credits) |
| - | - |
| Permanent storage | 40000 / byte |
| Base processing fee | 100000 |
| Write to storage | 750 / byte |
| Load from storage | 3500 / byte |
| Seek storage | 2000 |
| Query | 75 / byte |
| Load from memory | 20 / byte |
| Blake3 hash function | 400 + 64 / 64-byte block |

> 📘 Credits
>
> Refer to the [Identity explanation](../explanations/identity.md) section for information regarding how credits are created.
Expand Down
Binary file added docs/explanations/img/dashpay-uml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/explanations/img/dashpay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/explanations/img/dpns-uml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 23 additions & 33 deletions docs/explanations/platform-protocol-data-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,17 @@ In the [example contract](#example-contract) shown below, a `contact` document a
Once a [Dash Platform Protocol](../explanations/platform-protocol.md) compliant data contract has been defined, it may be registered on the platform. Registration is completed by submitting a state transition containing the data contract to [DAPI](../explanations/dapi.md).

The drawing below illustrates the steps an application developer follows to complete registration.
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/b372cf0-Data_Contract.svg",
"Data Contract.svg",
673,
531,
"#d9ead3"
],
"caption": "Data Contract Registration"
}
]
}
[/block]

```{eval-rst}
.. figure:: ../../img/data-contract.svg
:class: no-scaled-link
:align: center
:width: 80%
:alt: Data Contract Registration

Data Contract Registration
```

### Updates

Since Dash Platform v0.22, it is possible to update existing data contracts in certain backwards-compatible ways. This includes adding new documents, adding new optional properties to existing documents, and adding non-unique indices for properties added in the update.
Expand Down Expand Up @@ -276,23 +271,18 @@ An example contract for [DashPay](https://github.com/dashevo/platform/blob/maste
"additionalProperties": false
}
}
```
```

This is a visualization of the JSON data contract as UML class diagram for better understanding of the structure:

[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/964c219-dashpay-plantuml.png",
"dashpay-plantuml.png",
962,
755,
"#f5f1e8"
],
"caption": "Dashpay Contract Diagram"
}
]
}
[/block]
```{eval-rst}
.. figure:: ./img/dashpay-uml.png
:class: no-scaled-link
:align: center
:width: 90%
:alt: Dashpay Contract Diagram

Dashpay Contract Diagram
```

View [a full-size copy of this diagram](./img/dashpay-uml.png).
26 changes: 10 additions & 16 deletions docs/explanations/platform-protocol-state-transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@
At any given point in time, the data stored by each application (and more broadly, the entire platform) is in a specific state. State transitions are the means for submitting data that creates, updates, or deletes platform data and results in a change to a new state.

For example, Alice may have already added Bob and Carol as friends in [DashPay](../explanations/dashpay.md) while also having a pending friend request to Dan. If Dan declines the friend request, the state will transition to a new one where Alice and Bob remain in Alice’s friend list while Dan moves to the declined list.
[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/48c666f-State_Transition.svg",
"State Transition.svg",
610,
262,
"#e9f0fd"
],
"caption": "State Transition Example"
}
]
}
[/block]

```{eval-rst}
.. figure:: ../../img/state-transition.svg
:class: no-scaled-link
:align: center
:width: 90%
:alt: State transition example

State Transition Example
```

## Implementation Overview

Expand Down
24 changes: 7 additions & 17 deletions docs/intro/what-is-dash-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,13 @@ Write code and integrate with Dash Platform using the languages that matter to y

Unlike many blockchain-based networks, data stored on the platform is instantly confirmed by the Dash consensus algorithm to ensure the best user experience for users. With Dash Platform, you can gain the advantages of a blockchain-based storage network without the usual UX compromises.

[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/2213390-join-community.svg",
"join-community.svg",
171
],
"align": "center",
"sizing": "60"
}
]
}
[/block]


```{eval-rst}
.. figure:: ../../img/join-community.svg
:class: no-scaled-link
:align: center
:width: 60%
:alt: Developer community image
```

## Key Components

Expand Down
23 changes: 1 addition & 22 deletions docs/intro/what-is-dash.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,7 @@

# What is Dash

[block:image]
{
"images": [
{
"image": [
"https://files.readme.io/92cc368-how-it-works-2.svg",
"how-it-works-2.svg",
132,
150,
"#e9f8ff"
]
}
]
}
[/block]

[block:html]
{
"html": "<div></div>\n\n<style>\n .markdown-body img {\n float: right;\n margin-left: 30px;\n /*width: 25%;*/\n max-width: 25%; /*400px;*/\n height: auto; \n}\n</style>"
}
[/block]
Dash is the world's first and longest-running [DAO](https://www.investopedia.com/tech/what-dao/), a cryptocurrency that has stood the test of time, a truly decentralized and open source project built without a premine, [ICO](https://www.investopedia.com/terms/i/initial-coin-offering-ico.asp), or venture capital investment. Dash is the only solution on the market today developing a decentralized API as an integral part of its [Web3](https://en.wikipedia.org/wiki/Web3) stack, making it the first choice for developers creating unstoppable apps.
Dash is the world's first and longest-running [DAO](https://www.investopedia.com/tech/what-dao/), a cryptocurrency that has stood the test of time, a truly decentralized and open source project built without a premine, [ICO](https://www.investopedia.com/terms/i/initial-coin-offering-ico.asp), or venture capital investment. Dash is the only solution on the market today developing a decentralized API as an integral part of its [Web3](https://en.wikipedia.org/wiki/Web3) stack, making it the first choice for developers creating unstoppable apps.

Dash is built on battle-tested technology including Bitcoin and Cosmos Tendermint, and implements cutting-edge threshold signing features on masternodes to guarantee transaction finality in little more than a second. Dash is fast, private, secure, decentralized, and open-source, your first choice for truly decentralized Web3 services and for earning yield in return for providing infrastructure services.

Expand Down
14 changes: 9 additions & 5 deletions docs/reference/dapi-endpoints-core-grpc-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,15 @@ grpcurl -proto protos/core/v0/core.proto \

::::

[block:html]
{
"html": "<div></div>\n<!--\n\ngrpcurl -proto protos/transactions_filter_stream.proto -plaintext -d '{\n \"from_block_height\": 30000,\n \"count\": 1,\n \"bloom_filter\": {\n \"n_hash_funcs\": 11,\n \"v_data\": \"\",\n \"n_tweak\": 0,\n \"n_flags\": 0\n }\n}' localhost:2510 org.dash.platform.dapi.v0.TransactionsFilterStream/subscribeToTransactionsWithProofs\n{\n \"rawTransactions\": {\n \"transactions\": [\n \"AwAFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAjB1AQj/////AkAjDkMAAAAAGXapFBa5OjuRaKIGBcw82mL2E1o7qlMaiKxAIw5DAAAAABl2qRQWuTo7kWiiBgXMPNpi9hNaO6pTGoisAAAAAEYCADB1AAAPwA0VGVVRQSZSW013DrT+TU+AhULKbLNg+/rtgnzE5lca9JYY2DC/1hyqelAuIkJqqcby0zIroYyfLzuhjNso\"\n ]\n }\n}\n{\n \"rawMerkleBlock\": \"AAAAIIGiClhX7zPY2s2DmwiDdlbUJSUpzBjclOIWcgggAwAAak7QtEqCigCc1+U3+R6ElSI/vQz4mXzn1bADpwg41MvxNjxeBaADHhuWAAACAAAAAi6VQ1ZA+oFPPtKYv7OuzUfdLqZ+ZwzAwpztIn0osooZAzrYFIkcfvpIDK6Mg9FgxH4eOkjvyMwXj6qwEqZCJPYBAw==\"\n}\n{\n \"rawTransactions\": {\n \"transactions\": [\n \"AwAFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAjF1AQH/////AkAjDkMAAAAAGXapFBa5OjuRaKIGBcw82mL2E1o7qlMaiKxAIw5DAAAAABl2qRQWuTo7kWiiBgXMPNpi9hNaO6pTGoisAAAAAEYCADF1AAAPwA0VGVVRQSZSW013DrT+TU+AhULKbLNg+/rtgnzE5lca9JYY2DC/1hyqelAuIkJqqcby0zIroYyfLzuhjNso\"\n ]\n }\n}\n{\n \"rawMerkleBlock\": \"AAAAIKnRSfNm6oA5kqly1SG3FJ0a/v3hAh9GrFtyApQ+AQAAx/bTc5j8Ctlx0exLl3Xn+GvymqZBllMPdX5f5TuPsFjkNzxepXsDHoBCAAABAAAAAcf203OY/ArZcdHsS5d15/hr8pqmQZZTD3V+X+U7j7BYAQE=\"\n}\n{\n \"rawTransactions\": {\n \"transactions\": [\n \"AwAFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAjJ1AQT/////AkAjDkMAAAAAGXapFBa5OjuRaKIGBcw82mL2E1o7qlMaiKxAIw5DAAAAABl2qRQWuTo7kWiiBgXMPNpi9hNaO6pTGoisAAAAAEYCADJ1AAAPwA0VGVVRQSZSW013DrT+TU+AhULKbLNg+/rtgnzE5lca9JYY2DC/1hyqelAuIkJqqcby0zIroYyfLzuhjNso\"\n ]\n }\n}\n\n\n-->\n\n<style></style>"
}
[/block]
```{eval-rst}
..
Commented out info
[block:html]
{
"html": "<div></div>\n<!--\n\ngrpcurl -proto protos/transactions_filter_stream.proto -plaintext -d '{\n \"from_block_height\": 30000,\n \"count\": 1,\n \"bloom_filter\": {\n \"n_hash_funcs\": 11,\n \"v_data\": \"\",\n \"n_tweak\": 0,\n \"n_flags\": 0\n }\n}' localhost:2510 org.dash.platform.dapi.v0.TransactionsFilterStream/subscribeToTransactionsWithProofs\n{\n \"rawTransactions\": {\n \"transactions\": [\n \"AwAFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAjB1AQj/////AkAjDkMAAAAAGXapFBa5OjuRaKIGBcw82mL2E1o7qlMaiKxAIw5DAAAAABl2qRQWuTo7kWiiBgXMPNpi9hNaO6pTGoisAAAAAEYCADB1AAAPwA0VGVVRQSZSW013DrT+TU+AhULKbLNg+/rtgnzE5lca9JYY2DC/1hyqelAuIkJqqcby0zIroYyfLzuhjNso\"\n ]\n }\n}\n{\n \"rawMerkleBlock\": \"AAAAIIGiClhX7zPY2s2DmwiDdlbUJSUpzBjclOIWcgggAwAAak7QtEqCigCc1+U3+R6ElSI/vQz4mXzn1bADpwg41MvxNjxeBaADHhuWAAACAAAAAi6VQ1ZA+oFPPtKYv7OuzUfdLqZ+ZwzAwpztIn0osooZAzrYFIkcfvpIDK6Mg9FgxH4eOkjvyMwXj6qwEqZCJPYBAw==\"\n}\n{\n \"rawTransactions\": {\n \"transactions\": [\n \"AwAFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAjF1AQH/////AkAjDkMAAAAAGXapFBa5OjuRaKIGBcw82mL2E1o7qlMaiKxAIw5DAAAAABl2qRQWuTo7kWiiBgXMPNpi9hNaO6pTGoisAAAAAEYCADF1AAAPwA0VGVVRQSZSW013DrT+TU+AhULKbLNg+/rtgnzE5lca9JYY2DC/1hyqelAuIkJqqcby0zIroYyfLzuhjNso\"\n ]\n }\n}\n{\n \"rawMerkleBlock\": \"AAAAIKnRSfNm6oA5kqly1SG3FJ0a/v3hAh9GrFtyApQ+AQAAx/bTc5j8Ctlx0exLl3Xn+GvymqZBllMPdX5f5TuPsFjkNzxepXsDHoBCAAABAAAAAcf203OY/ArZcdHsS5d15/hr8pqmQZZTD3V+X+U7j7BYAQE=\"\n}\n{\n \"rawTransactions\": {\n \"transactions\": [\n \"AwAFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8FAjJ1AQT/////AkAjDkMAAAAAGXapFBa5OjuRaKIGBcw82mL2E1o7qlMaiKxAIw5DAAAAABl2qRQWuTo7kWiiBgXMPNpi9hNaO6pTGoisAAAAAEYCADJ1AAAPwA0VGVVRQSZSW013DrT+TU+AhULKbLNg+/rtgnzE5lca9JYY2DC/1hyqelAuIkJqqcby0zIroYyfLzuhjNso\"\n ]\n }\n}\n\n\n-->\n\n<style></style>"
}
[/block]
```

## Deprecated Endpoints

Expand Down
Loading