| Secret Recovery Key | PROTECT | Used to access an identity on the Blockstack blockchain. A 24-word sequence of words for example: <br/>`applied binge crisp pictorial fiery dancing agreeable frogs light finish ping apple`<br/>The early Blockstack recovery keys were 12-word sequences. |
| Secret Recovery Key | PROTECT | Used to access an identity on the Blockstack blockchain. A 24-word sequence of words for example: <br/>`applied binge crisp pictorial fiery dancing agreeable frogs light finish ping apple`<br/>The early Blockstack recovery keys were 12-word sequences. |
export { convertFaqAnswersToMDX as getStaticProps } from '@common/mdx'
import { FAQs } from '@components/faq'
# DApp Developer FAQs
# DApp Developer FAQs
This document lists frequently-asked questions developers about Blockstack application development. If you are new to Blockstack, you should read the [general questions](/faqs/allFAQs) first.
This document lists frequently-asked questions developers about Blockstack application development. If you are new to Blockstack, you should read the [general questions](/faqs/allFAQs) first.
@ -12,20 +15,6 @@ If you have a technical question that gets frequently asked on the
[forum](https://forum.blockstack.org) or [Slack](https://blockstack.slack.com),
[forum](https://forum.blockstack.org) or [Slack](https://blockstack.slack.com),
feel free to send a pull-request with the question and answer.
feel free to send a pull-request with the question and answer.
export { convertFaqAnswersToMDX as getStaticProps } from '@common/mdx'
import { FAQs } from '@components/faq'
# Technical FAQ
# Technical FAQ
This document lists frequently-asked questions by developers interested in working with Blockstack application and core components. If you are new to Blockstack, you should read the [general questions](/faqs/allFAQs) first.
This document lists frequently-asked questions by developers interested in working with Blockstack application and core components. If you are new to Blockstack, you should read the [general questions](/faqs/allFAQs) first.
@ -8,44 +11,16 @@ feel free to send a pull-request with the question and answer.
@ -73,7 +73,7 @@ You will see that the program and each statement is enclosed in `()` (parenthese
On the first line, a new public function `say-hi` is declared. Public functions are callable from other smart contracts, enabling developers to break complex tasks into smaller, simpler smart contracts (an exercise in [separating concerns](https://en.wikipedia.org/wiki/Separation_of_concerns)).
On the first line, a new public function `say-hi` is declared. Public functions are callable from other smart contracts, enabling developers to break complex tasks into smaller, simpler smart contracts (an exercise in [separating concerns](https://en.wikipedia.org/wiki/Separation_of_concerns)).
-> To create private functions, you would use the `define-private` keyword. Private functions can only be executed by the current smart contract. Only public functions can be called from other contracts." %}
-> To create private functions, you would use the `define-private` keyword. Private functions can only be executed by the current smart contract. Only public functions can be called from other contracts.
The function doesn't take any parameters and simply returns "hello world" using the [`ok`](clarityRef.html#ok) response constructor.
The function doesn't take any parameters and simply returns "hello world" using the [`ok`](clarityRef.html#ok) response constructor.
The Blockstack Radiks feature enables Blockstack decentralized applications (DApps) to index and store across data belonging to multiple users. Radiks works with Blockstack's Gaia Storage System. Using Radiks, you can build multi-player DApps that:
The Blockstack Radiks feature enables Blockstack decentralized applications (DApps) to index and store across data
belonging to multiple users. Radiks works with Blockstack's Gaia Storage System. Using Radiks, you can build
Many applications serve data that users create to share publicly with others. Facebook, Twitter, and Instagram are examples of such applications. Decentralized applications that want to create comparable multi-user experiences must ensure that anything a user creates for public sharing is still under control of the creator in the user's Gaia storage.
Many applications serve data that users create to share publicly with others. Facebook, Twitter, and Instagram are
examples of such applications. Decentralized applications that want to create comparable multi-user experiences must
ensure that anything a user creates for public sharing is still under control of the creator in the user's Gaia storage.
For example, if Twitter wanted to be a decentralized application while still having many different users creating their own tweets, those tweets would be stored in each user's own Gaia storage. In such a situation, Twitter still needs a way to keep track of everyone's tweets, display those tweets in user timelines, and perform searches across the platform. Radiks exists to support these kinds of scenarios. It allows applications to query across multiple user data using complicated queries like text search, joins, and filters.
For example, if Twitter wanted to be a decentralized application while still having many different users creating their
own tweets, those tweets would be stored in each user's own Gaia storage. In such a situation, Twitter still needs a way
to keep track of everyone's tweets, display those tweets in user timelines, and perform searches across the platform.
Radiks exists to support these kinds of scenarios. It allows applications to query across multiple user data using
complicated queries like text search, joins, and filters.
Radiks allows applications to query data in a performant and flexible way. Each application that wishes to index and query in this way requires its own Radiks server.
Radiks allows applications to query data in a performant and flexible way. Each application that wishes to index and
query in this way requires its own Radiks server.
## How Radiks works with application data
## How Radiks works with application data
Radiks consists of a database, a pre-built server, and a client. A developer adds the Radiks library to their application. With this library, developers model their application data. The model defines an application data schema for the Radiks server. Then, you can use calls to write and query data that use that schema. Whenever an application saves or updates data on behalf of a user, Radiks follows this flow:
Radiks consists of a database, a pre-built server, and a client. A developer adds the Radiks library to their application.
With this library, developers model their application data. The model defines an application data schema for the Radiks
server. Then, you can use calls to write and query data that use that schema. Whenever an application saves or updates
data on behalf of a user, Radiks follows this flow:
1. Encrypts private user data on the client-side.
1. Encrypts private user data on the client-side.
2. Saves a raw JSON of this encrypted data in the user's Gaia storage.
2. Saves a raw JSON of this encrypted data in the user's Gaia storage.
3. Stores the encrypted data on the Radiks server.
3. Stores the encrypted data on the Radiks server.
Radiks can store both public and sensitive, non-public data since all data is encrypted by default before it leaves the client. Your application can query Radiks for public data and then decrypt the sensitive information on the client. Radiks servers can only return queries for unencrypted data.
Radiks can store both public and sensitive, non-public data since all data is encrypted by default before it leaves the
client. Your application can query Radiks for public data and then decrypt the sensitive information on the client.
Radiks servers can only return queries for unencrypted data.
## How Radiks authorizes writes
## How Radiks authorizes writes
Radiks must ensure that the user is writing to their own data. To ensure this, Radiks creates and manages _signing keys_. These keys sign all writes that a user performs. Radiks server-validates all signatures before performing a write. This guarantees that a user is not able to overwrite another user's data.
Radiks must ensure that the user is writing to their own data. To ensure this, Radiks creates and manages _signing keys_.
These keys sign all writes that a user performs. Radiks server-validates all signatures before performing a write. This
guarantees that a user is not able to overwrite another user's data.
A Radiks server is also built to support writes in a collaborative but private situation. For example, consider a collaborative document editing application, where users can create organizations and invite users to that organization. All users in that organization should have read and write privileges to the organization data. Thus, these organizations will have a single shared key that is used to sign and encrypt data.
A Radiks server is also built to support writes in a collaborative but private situation. For example, consider a
collaborative document editing application, where users can create organizations and invite users to that organization.
All users in that organization should have read and write privileges to the organization data. Thus, these organizations
will have a single shared key that is used to sign and encrypt data.
When an organization administrator needs to remove a user from the group, they are expected to revoke the previous key and create a new one. Radiks is aware of these relationships, and will only support writes that are signed with the currently active key related to an organization.
When an organization administrator needs to remove a user from the group, they are expected to revoke the previous key
and create a new one. Radiks is aware of these relationships, and will only support writes that are signed with the
currently active key related to an organization.
## Is Radiks decentralized
## Is Radiks decentralized
Although Radiks applications rely on a centrally-hosted database, an application using Radiks remains fundamentally decentralized. A DApp that uses Radiks has these characteristics.
Although Radiks applications rely on a centrally-hosted database, an application using Radiks remains fundamentally
decentralized. A DApp that uses Radiks has these characteristics.
<tableclass="uk-table">
<tr>
### Built on decentralized authentication
<td>Built on decentralized authentication</td>
<td>Radiks is deeply tied to Blockstack authentication, which uses a blockchain and Gaia to give you full control over your user data. </td>
Radiks is deeply tied to Blockstack authentication, which uses a blockchain and Gaia to give you full control over
</tr>
your user data.
<tr>
<td>No data lock-in</td>
### No data lock-in
<td><p>All user data is first stored in Gaia before encrypted with the user's keys and stored in Radiks. This process means the user still controls their data for as long as they need to. If the application's Radiks server shuts down, the user can still access their data. And, without the user's signing keys, an application cannot decrypt the user's data. Users may also backup or migrate their application data from Gaia.
</p></td>
All user data is first stored in Gaia before encrypted with the user's keys and stored in Radiks. This process means
</tr>
the user still controls their data for as long as they need to. If the application's Radiks server shuts down, the
<tr>
user can still access their data. And, without the user's signing keys, an application cannot decrypt the user's data.
<td>Censorship resistance</td>
Users may also backup or migrate their application data from Gaia.
<td><p>All data is also stored in Gaia; no third-party can revoke access to this data.
</p></td>
### Censorship resistance
</tr>
<tr>
All data is also stored in Gaia; no third-party can revoke access to this data.
<td>Maximum privacy</td>
<td><p>All data is encrypted on the client-side before being stored anywhere using Blockstack authorization. The application host cannot inspect, sell, or use user data in any way that a user doesn't explicitly authorize.
### Maximum privacy
</p></td>
</tr>
All data is encrypted on the client-side before being stored anywhere using Blockstack authorization. The application
</table>
host cannot inspect, sell, or use user data in any way that a user doesn't explicitly authorize.
If you are not familiar with Gaia, see
If you are not familiar with Gaia, see [read the Gaia documentation](/storage/overview).
[read the Gaia documentation]((/storage/overview).
@ -10,7 +10,7 @@ the Stacks token and deployment on the Blockstack network as well as the current
role of the Stacks token.
role of the Stacks token.
If you are a developer interested in the specific technical changes related to
If you are a developer interested in the specific technical changes related to
the 2018 launch, see the <ahref="https://forum.blockstack.org/t/blockstack-annual-hard-fork-2018/6518"target="\blank">announcment in the Blockstack forum</a>.
the 2018 launch, see the [announcement in the Blockstack forum](https://forum.blockstack.org/t/blockstack-annual-hard-fork-2018/6518).
## A brief history of the Stacks token
## A brief history of the Stacks token
@ -36,10 +36,7 @@ holders under a predetermined unlocking schedule. The events on the unlocking
schedule are the same for each investor, **the dates of these events** depend on the
schedule are the same for each investor, **the dates of these events** depend on the
holder's purchase date.
holder's purchase date.
<divclass="uk-alert-success"uk-alert><b>Note:</b> If you are a token holder
-> **Note:** If you are a token holder and would like to review your unlocking schedule, visit the [For current token holders](/org/tokenholders) page in this documentation.
and would like to review your unlocking schedule, visit the <a
href="tokenholders.html">For current token holders</a> page in this
documentation.</div>
The genesis block launch makes possible the following interactions:
The genesis block launch makes possible the following interactions:
@ -33,7 +33,7 @@ You can use any of these hardware wallets with the Stacks Wallet:
- Ledger Nano S
- Ledger Nano S
- Ledger Blue
- Ledger Blue
{% include note.html content="Blockstack only supports the hardware wallets listed above. Other wallets, for example, the Trezor Model T, <strong>are not supported</strong>. If you have questions about wallet support, please <ahref='emailto:support@blockstack.org'target='_blank'>contact Blockstack support</a>." %}
-> Blockstack only supports the hardware wallets listed above. Other wallets, for example, the Trezor Model T, <strong>are not supported</strong>. If you have questions about wallet support, please <ahref='emailto:support@blockstack.org'target='_blank'>contact Blockstack support</a>.
The private key on your hardware wallet is used by the Stacks Wallet software to sign send transactions. Receive transactions don't require a signature. Please consult the device's manufacturer for support in setting up and configuring your hardware device.
The private key on your hardware wallet is used by the Stacks Wallet software to sign send transactions. Receive transactions don't require a signature. Please consult the device's manufacturer for support in setting up and configuring your hardware device.
{"message":"Config updated -- you should reload your Gaia hub now."}
{"message":"Config updated -- you should reload your Gaia hub now."}
```
```
{% endraw %}
## View logs for the hub or admin service
## View logs for the hub or admin service
The logs for each Gaia service are maintained by their respective Docker containers. To view the log for a particular service, use the `docker logs` command. For example, to get the logs for the hub:
The logs for each Gaia service are maintained by their respective Docker containers. To view the log for a particular service, use the `docker logs` command. For example, to get the logs for the hub: