diff --git a/src/pages/storage-hubs/amazon-ec2-deploy.md b/src/pages/storage-hubs/amazon-ec2-deploy.md index 07b25ec3..65b654e3 100644 --- a/src/pages/storage-hubs/amazon-ec2-deploy.md +++ b/src/pages/storage-hubs/amazon-ec2-deploy.md @@ -400,7 +400,7 @@ Each service plays a particular role in running your Gaia hub. nginx - Runs an Nginx proxy in front of the Gaia Hub. This service does things like rate-limiting, SSL termination, and redirects to HTTPS. Your nginx service relies on your hub's readURL to make requests. Changes to a hub's readURL must be reflected in the nginx service configuration in /gaia/nginx/conf.d/default.conf + Runs an Nginx proxy in front of the Gaia Hub. This service does things like rate-limiting, SSL termination, and redirects to HTTPS. Your nginx service relies on your hub's readURL to make requests. Changes to a hub's readURL must be reflected in the nginx service configuration in /gaia/nginx/conf.d/default.conf gaia-admin @@ -409,7 +409,7 @@ Each service plays a particular role in running your Gaia hub. gaia-reader The Gaia read side-car services get file requests on URLs that start with - your Gaia hub's readURL. You can determine your Gaia hub's read URL by either + your Gaia hub's readURL. You can determine your Gaia hub's read URL by either looking for the readURL key in your Gaia hub's config file. This value is or by looking for the read_url_prefix field in the data returned by a HUB_URL/hub_info page on your Gaia hub. diff --git a/src/pages/storage-hubs/digital-ocean-deploy.md b/src/pages/storage-hubs/digital-ocean-deploy.md index 5f53af23..a7d90ea6 100644 --- a/src/pages/storage-hubs/digital-ocean-deploy.md +++ b/src/pages/storage-hubs/digital-ocean-deploy.md @@ -7,7 +7,7 @@ description: Learn how to run a Gaia hub on DigitalOcean This teaches you how to run a Gaia storage hub on DigitalOcean (DO). DigitalOcean is an affordable and convenient cloud computing provider. This example uses DigitalOcean Spaces for file storage. A space is equivalent to AWS's S3 file storage solution. -DigitalOcean provides you with a compute machines known as a **Droplets** and storage called a **Spaces**. You need both to run a Gaia hub. The Gaia hub setup you create here, requires get a Digital Droplet with Docker pre-installed and a 250 GB Space. Droplets and storage each run for $5/month or a total of $10/month. +DigitalOcean provides you with a compute machines known as a **Droplets** and storage called a **Spaces**. You need both to run a Gaia hub. The Gaia hub setup you create here, requires get a Digital Droplet with Docker pre-installed and a 250 GB Space. Droplets and storage each run for \$5/month or a total of \$10/month.
Is this tutorial for you?
@@ -103,8 +103,8 @@ On your local workstation, create a bucket policy to grant read permission on yo For example, if your space is named `meepers`, after editing the line you would have: - ``` - "Resource": "arn:aws:s3:::meepers/*" + ```yaml + 'Resource': 'arn:aws:s3:::meepers/*' ``` Be sure not to change any of the other fields, especially `Version`. @@ -112,13 +112,13 @@ On your local workstation, create a bucket policy to grant read permission on yo 7. Save and close the file. 8. Use `s3cmd` to enact the policy. - ``` + ```bash s3cmd setpolicy gaiahub-policy s3:// ``` Be sure to `SPACE_NAME` with the name of your space, for example: - ``` + ```bash s3cmd setpolicy gaiahub-policy s3://meepers ``` @@ -140,7 +140,7 @@ On your local workstation, create a bucket policy to grant read permission on yo 2. Use `s3cmd` to enact the configuration. - ``` + ```bash s3cmd setcors gaiahub-cors.xml s3:// ``` @@ -177,7 +177,7 @@ In this task, you add a droplet to your account. The droplet is a droplet is a c 9. Scroll down to the **Finalize and create** section. -10. **Choose a hostname** for your droplet such as `moxie-gaiahub`. +10. **Choose a hostname** for your droplet such as `moxie-gaiahub.` 11. Review your choices then click **Create** to start your droplet running. @@ -224,7 +224,7 @@ A droplet console emulates the access you would have if you were sitting down wi The system logins you in and gives you a welcome message. At the conclusion of the message, you are at the console prompt. - ``` + ```bash Welcome to DigitalOcean's One-Click Docker Droplet. To keep this Droplet secure, the UFW firewall is enabled. All ports are BLOCKED except 22 (SSH), 2375 (Docker) and 2376 (Docker). @@ -253,7 +253,7 @@ A droplet console emulates the access you would have if you were sitting down wi 4. Enter a name for the key. - It is helpful to choose descriptive name like `gai-hub-key`. + It is helpful to choose a descriptive name, like `gai-hub-key`. 5. Press the check mark. @@ -273,13 +273,13 @@ You should have the console open as `root` on your Droplet. In this section, you 1. Copy the Gaia code into your droplet using the `git clone` command. - ``` + ```bash root@meepers:~# git clone https://github.com/blockstack/gaia.git ``` Successful output from this command looks like the following. - ``` + ```bash Cloning into 'gaia'... remote: Enumerating objects: 63, done. remote: Counting objects: 100% (63/63), done. @@ -294,48 +294,48 @@ You should have the console open as `root` on your Droplet. In this section, you 2. Change to `hub` directory in the `gaia` code. - ``` + ```bash cd gaia/hub ``` 3. Copy the configuration sample to a new `config.json` file. - ``` + ```bash cp config.do.sample.json config.json ``` 4. Edit your new `config.json` file with `vi` or `vim`. - ``` + ```bash vi config.json ``` You now need to edit this JSON file to have it store files on your DigitalOcean space. - ``` + ```json { - "serverName": "DROPLET_NAME", - "port": 4000, - "driver": "aws", - "readURL": "SPACE_URL", - "proofsConfig": { - "proofsRequired": 0 - }, - "pageSize": 20, - "bucket": "SPACE_NAME", - "awsCredentials": { + "serverName": "DROPLET_NAME", + "port": 4000, + "driver": "aws", + "readURL": "SPACE_URL", + "proofsConfig": { + "proofsRequired": 0 + }, + "pageSize": 20, + "bucket": "SPACE_NAME", + "awsCredentials": { "endpoint": "SPACE_LOCATION", "accessKeyId": "YOUR_ACCESS_KEY", "secretAccessKey": "" - }, - "argsTransport": { - "level": "debug", - "handleExceptions": true, - "stringify": true, - "timestamp": true, - "colorize": false, - "json": true - } + }, + "argsTransport": { + "level": "debug", + "handleExceptions": true, + "stringify": true, + "timestamp": true, + "colorize": false, + "json": true + } } ``` @@ -344,12 +344,12 @@ You'll find that the `driver` is set to `aws`. The DigitalOcean space API exactl 5. Set the `serverName` to the droplet you just created. 6. Set the `readURL` to the URL of the DigitalOcean space you just created. -If your space URL called `https://meepers-hub-space.sfo2.digitaloceanspaces.com`, the `readURL` name is `https://meepers-hub-space.sfo2.digitaloceanspaces.com`. 7. Set the `bucket` to the name of the DigitalOcean space you just created. +If your space URL called `https://meepers-hub-space.sfo2.digitaloceanspaces.com,` the `readURL` name is `https://meepers-hub-space.sfo2.digitaloceanspaces.com.` 7. Set the `bucket` to the name of the DigitalOcean space you just created. -If your space is called `meepers-hub-space`, the `bucket` value is `meepers-hub-space`. +If your space is called `meepers-hub-space,` the `bucket` value is `meepers-hub-space`. -8. Go back to your DigitalOcean dashboard open to your space key. -9. Copy the **Key** and paste it into the `accessKeyId` value in the `config.json` file. +8. Go back to your DigitalOcean dashboard open to your space key. +9. Copy the **Key** and paste it into the `accessKeyId` value in the `config.json` file. 10. Copy the **Secret** and paste it into the `secretAccessKey` value in the `config.json` file. 11. In the DigitalOcean dashboard, choose the Spaces page. 12. Copy the section of your space URL that follows the name. @@ -364,7 +364,7 @@ In this example, you would copy the `sfo2.digitaloceanspaces.com` section. This will allow Stacks user to write to your Gaia hub, without any social proofs required. You can change this later on, and do other things to lock-down this Gaia hub to just yourself, but that is outside the scope of this document. -At this point, the `json.config` file should be completed and appear similar to the following &—; but with your values. +At this point, the `json.config` file should be completed and appear similar to the following, but with your values. ```json { @@ -393,7 +393,7 @@ At this point, the `json.config` file should be completed and appear similar to } ``` -15. Save your config file and close the `vim` editor. +1. Save your config file and close the `vim` editor. The system returns you back to the prompt. @@ -403,16 +403,13 @@ While your console is still in the the `gaia/hub` folder, build the `gaia.hub` i 1. Enter the following `docker` command at the console command line. -``` - +```bash docker build -t gaia.hub . - ``` This build users the `Dockerfile` already in the `gaia/hub` folder. The output of the command is similar to the following: -``` - +```bash .... npm WARN gaia-hub@2.3.4 No license field. @@ -430,7 +427,6 @@ Removing intermediate container ae459cc0865b ---> b1ced6c39784 Successfully built b1ced6c39784 Successfully tagged gaia.hub:latest - ``` 2. Run your Gaia hub image. @@ -450,7 +446,7 @@ This runs your Gaia hub on port `3000`. If everything runs successfully, the las 4. Run the the image again with this new command. - ``` + ```bash docker run --restart=always -v ~/gaia/hub/config.json:/src/hub/config.json -p 3000:3000 -e CONFIG_PATH=/src/hub/config.json -d gaia.hub ``` @@ -470,14 +466,14 @@ In this task, you set up a simple Nginx reverse proxy to serve your Docker conta 1. Install nginx into the droplet. - ``` + ```bash sudo apt-get install nginx ``` 2. Enter `y` to confirm the installation. 3. Edit the nginx default configuration file. - ``` + ```bash vi /etc/nginx/sites-available/default ``` @@ -510,7 +506,7 @@ In this task, you set up a simple Nginx reverse proxy to serve your Docker conta 5. Save and close the file. 6. Run `nginx -t` to make sure you have no syntax errors. - ``` + ```bash root@meepers:~/gaia/hub# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful @@ -518,13 +514,13 @@ In this task, you set up a simple Nginx reverse proxy to serve your Docker conta 7. Restart `nginx` with your new configuration. - ``` + ```bash systemctl restart nginx ``` 8. Allow access to your Gaia hub by exposing port 80 to the public. - ``` + ```bash ufw allow 80 ``` @@ -546,7 +542,7 @@ Now, you are ready to test your Gaia server and make sure it is up and running. The `read_url_prefix` should be combine from the bucket and endpoint create in your `config.json` file, for example, - `https://meepers-hub-space.s3.amazonaws.com/`. + `https://meepers-hub-space.s3.amazonaws.com/.` ## Task 11: Configure a domain name diff --git a/src/pages/storage-hubs/overview.md b/src/pages/storage-hubs/overview.md index c1410667..b563152a 100644 --- a/src/pages/storage-hubs/overview.md +++ b/src/pages/storage-hubs/overview.md @@ -30,7 +30,7 @@ You should store a JSON configuration file either in the top-level directory of ``` You can specify the logging level, the backend driver, the credentials -for that backend driver, and the `readURL` of the hub. Typically, this is the URL for the compute resource on the cloud computing provider — where the hub service is running. +for that backend driver, and the `readURL` of the hub. Typically, this is the URL for the compute resource on the cloud computing provider, where the hub service is running. ### Require the correct hub URL @@ -80,7 +80,7 @@ different users. ### Private-user hub A private-user hub receives requests for a single user. Requests are controlled -via _whitelisting_ the addresses allowed to write files. Recall that each application uses a different app- and user-specific address. It follows, to +via _whitelisting_ the addresses allowed to write files. Recall that each application uses a different app and user-specific address. It follows, to support application storage, your configuration must add to the whitelist each application you wish to use. Alternatively, the user's client can use the authentication scheme and generate diff --git a/src/pages/technology/naming-system.md b/src/pages/technology/naming-system.md index 35610a97..f9c4215d 100644 --- a/src/pages/technology/naming-system.md +++ b/src/pages/technology/naming-system.md @@ -16,7 +16,7 @@ Names in BNS have three properties: - **Names are globally unique.** The protocol does not allow name collisions, and all well-behaved nodes resolve a given name to the same state. - **Names are human-meaningful.** Each name is chosen by its creator. -- **Names are strongly-owned.** Only the name's owner can change the state it +- **Names are strongly owned.** Only the name's owner can change the state it resolves to. Specifically, a name is owned by one or more ECDSA private keys. The Stacks blockchain insures that each node's BNS view is @@ -45,12 +45,12 @@ When you look up someone's PGP key on a keyserver, you are resolving their key ID to their public key. What kinds of things do we want to be true about names? In BNS, names are -globally unique, names are human-meaningful, and names are strongly-owned. +globally unique, names are human-meaningful, and names are strongly owned. However, if you look at these examples, you'll see that each of them only guarantees _two_ of these properties. This limits how useful they can be. - In DNS and social media, names are globally unique and human-readable, but not - strongly-owned. The system operator has the + strongly owned. The system operator has the final say as to what each names resolves to. - **Problem**: Clients must trust the system to make the right @@ -58,7 +58,7 @@ guarantees _two_ of these properties. This limits how useful they can be. no one but the system administrators can make these changes. - In Git, branch names are human-meaningful - and strongly-owned, but not globally unique. Two different Git nodes may resolve the same + and strongly owned, but not globally unique. Two different Git nodes may resolve the same branch name to different unrelated repository states. - **Problem**: Since names can refer to conflicting state, developers @@ -158,7 +158,7 @@ characters `a-z`, `0-9`, `-`, and `_`. ## Subdomains -BNS names are strongly-owned because the owner of its private key can generate +BNS names are strongly owned because the owner of its private key can generate valid transactions that update its zone file hash and owner. However, this comes at the cost of requiring a name owner to pay for the underlying transaction in the blockchain. Moreover, this approach limits the rate of BNS name registrations @@ -168,7 +168,7 @@ BNS overcomes this with subdomains. A **BNS subdomain** is a type of BNS name whose state and owner are stored outside of the blockchain, but whose existence and operation history are anchored to the blockchain. Like their on-chain counterparts, subdomains are globally -unique, strongly-owned, and human-readable. BNS gives them their own +unique, strongly owned, and human-readable. BNS gives them their own name state and public keys. Unlike on-chain names, subdomains can be created and managed cheaply, because they are broadcast to the BNS network in batches. A single blockchain transaction can send up to 120 @@ -251,9 +251,9 @@ The lifecycle of a subdomain and its operations is shown in Figure 2. block block block -Figure 2: Subdomain lifetime with respect to on-chain name operations. A new +Figure 2: Subdomain lifetime with respect to on-chain name operations .A new subdomain operation will only be accepted if it has a later "sequence=" number, -and a valid signature in "sig=" over the transaction body. The "sig=" field +and a valid signature in "sig=" over the transaction body .The "sig=" field includes both the public key and signature, and the public key must hash to the previous subdomain operation's "addr=" field. @@ -271,7 +271,7 @@ subdomain operation must include: - A signature from the corresponding private key over the entire subdomain operation. -If two correctly-signed but conflicting subdomain operations are discovered +If two correctly signed but conflicting subdomain operations are discovered (that is, they have the same sequence number), the one that occurs earlier in the blockchain's history is accepted. Invalid subdomain operations are ignored. diff --git a/src/pages/understand-stacks/atlas-how-it-works.md b/src/pages/understand-stacks/atlas-how-it-works.md index 46bdc3a4..352fe41a 100644 --- a/src/pages/understand-stacks/atlas-how-it-works.md +++ b/src/pages/understand-stacks/atlas-how-it-works.md @@ -150,9 +150,9 @@ chunks that are currently most at-risk for disappearing due to node failure. Figure 2: Relationship between Atlas node chunk inventory and BNS name state. Some name operations announce name state in the blockchain, which Atlas -interprets as a chunk hash. The Atlas node builds up a vector of which chunks +interprets as a chunk hash. The Atlas node builds up a vector of which chunks it has and which ones it does not, and announces it to other Atlas peers so -they can fetch chunks they are missing. In this example, the node's +they can fetch chunks they are missing. In this example, the node's inventory vector is [1, 0, 1], since the 0th and 2nd chunks are present but the 1st chunk is missing. ``` diff --git a/src/pages/understand-stacks/atlas-overview.md b/src/pages/understand-stacks/atlas-overview.md index c2ee1a57..7371991f 100644 --- a/src/pages/understand-stacks/atlas-overview.md +++ b/src/pages/understand-stacks/atlas-overview.md @@ -64,13 +64,13 @@ Blockchain | Blockchain Peer Network | +---------------------------------------------------------------+ -Figure 1: Location of Atlas in the Stacks architecture. Each BNS node -implements an Atlas peer. An Atlas peer treats a name state value in BNS as -the hash of a DNS zone file. Atlas peers exchange zone files with one another -until they each have a full replica of all known zone files. Clients can look -up zone files for names using the name's stat value as a zone file hash. Clients -can broadcast zone files to the network if they match a previously-announced -hash. In practice, zone files store URLs to a name owner's Gaia hubs, thereby +Figure 1: Location of Atlas in the Stacks architecture Each BNS node +implements an Atlas peer An Atlas peer treats a name state value in BNS as +the hash of a DNS zone file Atlas peers exchange zone files with one another +until they each have a full replica of all known zone files Clients can look +up zone files for names using the name's stat value as a zone file hash Clients +can broadcast zone files to the network if they match a previously announced +hash In practice, zone files store URLs to a name owner's Gaia hubs, thereby allowing Stacks apps to read and write data in Gaia. ``` diff --git a/src/pages/understand-stacks/atlas-usage.md b/src/pages/understand-stacks/atlas-usage.md index d3fb903a..e847404a 100644 --- a/src/pages/understand-stacks/atlas-usage.md +++ b/src/pages/understand-stacks/atlas-usage.md @@ -108,7 +108,7 @@ For example, this code will replicate the chunk to not only 13.65.207.163:6264, 52.225.128.191:6264, node.blockstack.org:6264, 23.102.162.7:6264, 52.167.230.235:6264, 23.102.162.124:6264, 52.151.59.26:6264, 13.92.134.106:6264 >>> >>> for neighbor in neighbors: -... result = blockstack.lib.client.put_zonefiles(neighbor, [data_b64]) +.. result = blockstack.lib.client.put_zonefiles(neighbor, [data_b64]) ... assert result['saved'][0] == 1 ... >>> diff --git a/src/pages/understand-stacks/transactions.md b/src/pages/understand-stacks/transactions.md index d6168aba..7c0447b0 100644 --- a/src/pages/understand-stacks/transactions.md +++ b/src/pages/understand-stacks/transactions.md @@ -229,7 +229,7 @@ const tupCV = tupleCV({ const l = listCV([trueCV(), falseCV()]); ``` -If you develop in TypeScript, the type checker can help prevent you from creating wrongly-typed Clarity values. For example, the following code won't compile since in Clarity lists are homogeneous, meaning they can only contain values of a single type. It is important to include the type variable `BooleanCV` in this example, otherwise the typescript type checker won't know which type the list is of and won't enforce homogeneity. +If you develop in Typescript, the type checker can help prevent you from creating wrongly typed Clarity values. For example, the following code won't compile since in Clarity lists are homogeneous, meaning they can only contain values of a single type. It is important to include the type variable `BooleanCV` in this example, otherwise the typescript type checker won't know which type the list is of and won't enforce homogeneity. ```js const l = listCV < BooleanCV > [trueCV(), intCV(1)]; diff --git a/src/pages/understand-stacks/wire-format.md b/src/pages/understand-stacks/wire-format.md index 8598696f..392513b6 100644 --- a/src/pages/understand-stacks/wire-format.md +++ b/src/pages/understand-stacks/wire-format.md @@ -43,7 +43,7 @@ Op: `?` Description: This transaction commits to the _hash_ of a name. It is the first transaction of two transactions that must be sent to register a name in BNS. -Example: [6730ae09574d5935ffabe3dd63a9341ea54fafae62fde36c27738e9ee9c4e889](https://www.blocktrail.com/BTC/tx/6730ae09574d5935ffabe3dd63a9341ea54fafae62fde36c27738e9ee9c4e889) +Example: [`6730ae09574d5935ffabe3dd63a9341ea54fafae62fde36c27738e9ee9c4e889`](https://www.blocktrail.com/BTC/tx/6730ae09574d5935ffabe3dd63a9341ea54fafae62fde36c27738e9ee9c4e889) `OP_RETURN` wire format: @@ -76,7 +76,7 @@ Description: This transaction reveals the name whose hash was announced by a previous `NAME_PREORDER`. It is the second of two transactions that must be sent to register a name in BNS. -Example: [55b8b42fc3e3d23cbc0f07d38edae6a451dfc512b770fd7903725f9e465b2925](https://www.blocktrail.com/BTC/tx/55b8b42fc3e3d23cbc0f07d38edae6a451dfc512b770fd7903725f9e465b2925) +Example: [`55b8b42fc3e3d23cbc0f07d38edae6a451dfc512b770fd7903725f9e465b2925`](https://www.blocktrail.com/BTC/tx/55b8b42fc3e3d23cbc0f07d38edae6a451dfc512b770fd7903725f9e465b2925) `OP_RETURN` wire format (2 variations allowed): @@ -121,7 +121,7 @@ Op: `:` Description: This transaction renews a name in BNS. The name must still be registered and not expired, and owned by the transaction sender. -Example: [e543211b18e5d29fd3de7c0242cb017115f6a22ad5c6d51cf39e2b87447b7e65](https://www.blocktrail.com/BTC/tx/e543211b18e5d29fd3de7c0242cb017115f6a22ad5c6d51cf39e2b87447b7e65) +Example: [`e543211b18e5d29fd3de7c0242cb017115f6a22ad5c6d51cf39e2b87447b7e65`](https://www.blocktrail.com/BTC/tx/e543211b18e5d29fd3de7c0242cb017115f6a22ad5c6d51cf39e2b87447b7e65) `OP_RETURN` wire format (2 variations allowed): @@ -172,7 +172,7 @@ Description: This transaction sets the name state for a name to the given `value`. In practice, this is used to announce new DNS zone file hashes to the [Atlas network](/understand-stacks/atlas-overview). -Example: [e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7](https://www.blocktrail.com/BTC/tx/e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7) +Example: [`e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7`](https://www.blocktrail.com/BTC/tx/e2029990fa75e9fc642f149dad196ac6b64b9c4a6db254f23a580b7508fc34d7) `OP_RETURN` wire format: @@ -207,7 +207,7 @@ Op: `>` Description: This transaction changes the public key hash that owns the name in BNS. -Example: [7a0a3bb7d39b89c3638abc369c85b5c028d0a55d7804ba1953ff19b0125f3c24](https://www.blocktrail.com/BTC/tx/7a0a3bb7d39b89c3638abc369c85b5c028d0a55d7804ba1953ff19b0125f3c24) +Example: [`7a0a3bb7d39b89c3638abc369c85b5c028d0a55d7804ba1953ff19b0125f3c24`](https://www.blocktrail.com/BTC/tx/7a0a3bb7d39b89c3638abc369c85b5c028d0a55d7804ba1953ff19b0125f3c24) `OP_RETURN` wire format: @@ -242,7 +242,7 @@ Description: This transaction destroys a registered name. Its name state value in BNS will be cleared, and no further transactions will be able to affect the name until it expires (if its namespace allows it to expire at all). -Example: [eb2e84a45cf411e528185a98cd5fb45ed349843a83d39fd4dff2de47adad8c8f](https://www.blocktrail.com/BTC/tx/eb2e84a45cf411e528185a98cd5fb45ed349843a83d39fd4dff2de47adad8c8f) +Example: [`eb2e84a45cf411e528185a98cd5fb45ed349843a83d39fd4dff2de47adad8c8f`](https://www.blocktrail.com/BTC/tx/eb2e84a45cf411e528185a98cd5fb45ed349843a83d39fd4dff2de47adad8c8f) `OP_RETURN` wire format: @@ -305,7 +305,7 @@ Op: `*` Description: This transaction announces the _hash_ of a new namespace. It is the first of three transactions that must be sent to create a namespace. -Example: [5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28](https://www.blocktrail.com/BTC/tx/5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28) +Example: [`5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28`](https://www.blocktrail.com/BTC/tx/5f00b8e609821edd6f3369ee4ee86e03ea34b890e242236cdb66ef6c9c6a1b28) `OP_RETURN` wire format: @@ -334,9 +334,9 @@ Notes: Op: `&` Description: This transaction reveals the namespace ID and namespace rules -for a previously-anounced namespace hash (sent by a previous `NAMESPACE_PREORDER`). +for a previously anounced namespace hash (sent by a previous `NAMESPACE_PREORDER`). -Example: [ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32](https://www.blocktrail.com/BTC/tx/ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32) +Example: [`ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32`](https://www.blocktrail.com/BTC/tx/ab54b1c1dd5332dc86b24ca2f88b8ca0068485edf0c322416d104c5b84133a32) `OP_RETURN` wire format: @@ -385,10 +385,10 @@ Example: With the above example configuration, the following are true: -- The price of "john" would be 2 \* 10^8, since "john" falls into bucket 4 and has no punctuation or numerics. -- The price of "john1" would be 2 \* 10^6, since "john1" falls into bucket 5 but has a number (and thus receives a 10x discount) -- The price of "john_1" would be 2 \* 10^6, since "john_1" falls into bucket 6 but has a number and punctuation (and thus receives a 10x discount) -- The price of "j0hn_1" would be 2 \* 10^5, since "j0hn_1" falls into bucket 6 but has a number and punctuation and lacks vowels (and thus receives a 100x discount) +- The price of `john` would be 2 \* 10^8, since `john` falls into bucket 4 and has no punctuation or numerics. +- The price of `john1` would be 2 \* 10^6, since `john1` falls into bucket 5 but has a number (and thus receives a 10x discount) +- The price of `john_1` would be 2 \* 10^6, since `john_1` falls into bucket 6 but has a number and punctuation (and thus receives a 10x discount) +- The price of `j0hn_1` would be 2 \* 10^5, since `j0hn_1` falls into bucket 6 but has a number and punctuation and lacks vowels (and thus receives a 100x discount) ### NAME_IMPORT @@ -398,7 +398,7 @@ Description: This transaction registers a name and some name state into a namespace that has been revealed, but not been launched. Only the namespace creator can import names. See the [namespace creation section](/technology/naming-system) for details. -Example: [c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312](https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312) +Example: [`c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312`](https://www.blocktrail.com/BTC/tx/c698ac4b4a61c90b2c93dababde867dea359f971e2efcf415c37c9a4d9c4f312) `OP_RETURN` wire format: @@ -434,7 +434,7 @@ Description: This transaction launches a namesapce. Only the namespace creator can send this transaction. Once sent, anyone can register names in the namespace. -Example: [2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032](https://www.blocktrail.com/BTC/tx/2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032) +Example: [`2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032`](https://www.blocktrail.com/BTC/tx/2bf9a97e3081886f96c4def36d99a677059fafdbd6bdb6d626c0608a1e286032) `OP_RETURN` wire format: @@ -464,7 +464,7 @@ Op: `$` Description: This transaction transfers tokens from one account to another. Only `STACKS` tokens can be transferred at this time. The transaction encodes the number of _micro-Stacks_ to send. -Example: [093983ca71a6a9dd041c0bdb8b3012824d726ee26fe51da8335a06e8a08c2798](https://www.blocktrail.com/BTC/tx/093983ca71a6a9dd041c0bdb8b3012824d726ee26fe51da8335a06e8a08c2798) +Example: [`093983ca71a6a9dd041c0bdb8b3012824d726ee26fe51da8335a06e8a08c2798`](https://www.blocktrail.com/BTC/tx/093983ca71a6a9dd041c0bdb8b3012824d726ee26fe51da8335a06e8a08c2798) `OP_RETURN` wire format: diff --git a/src/pages/write-smart-contracts/counter-tutorial.md b/src/pages/write-smart-contracts/counter-tutorial.md index 446c7ceb..0e921982 100644 --- a/src/pages/write-smart-contracts/counter-tutorial.md +++ b/src/pages/write-smart-contracts/counter-tutorial.md @@ -75,7 +75,7 @@ counter contract test suite ... # error details -npm ERR. Test failed. See above for more details. +npm ERR. Test failed. See above for more details. ``` It looks like we see some failed tests. That is on purpose - we will implement the new smart contract in the next steps. After every step in this tutorial, we will rerun the tests to ensure we're on the right track. diff --git a/src/pages/write-smart-contracts/overview.md b/src/pages/write-smart-contracts/overview.md index d84a9520..58bacc88 100644 --- a/src/pages/write-smart-contracts/overview.md +++ b/src/pages/write-smart-contracts/overview.md @@ -45,7 +45,7 @@ Clarity differs from most other smart contract languages in two essential ways: Using an interpreted language ensures that the executed code is human-readable and auditable. A decidable language like Clarity makes it possible to determine precisely which code is going to be executed, for any function. -A Clarity smart contract is composed of two parts — a data space and a set of functions. Only the associated +A Clarity smart contract is composed of two parts, a data space and a set of functions. Only the associated smart contract may modify its corresponding data space on the blockchain. Functions may be private and thus callable only from within the smart contract, or public and thus callable from other contracts. Users call smart contracts' public functions by broadcasting a transaction on the blockchain which invokes the public function. Contracts