From e46dd33c8ca8b28b895e2fcb9996292f133caf4a Mon Sep 17 00:00:00 2001 From: Alexandre Esteves <2335822+alexfmpe@users.noreply.github.com> Date: Mon, 9 Mar 2020 15:46:38 +0000 Subject: [PATCH] Fix typos (#226) --- .../nameservice/tutorial/Foundations/04-Storage.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hs-abci-docs/nameservice/tutorial/Foundations/04-Storage.md b/hs-abci-docs/nameservice/tutorial/Foundations/04-Storage.md index c50562fb..26f1321c 100644 --- a/hs-abci-docs/nameservice/tutorial/Foundations/04-Storage.md +++ b/hs-abci-docs/nameservice/tutorial/Foundations/04-Storage.md @@ -4,15 +4,15 @@ title: Foundations - Storage # Database -ABCI application depend on some kind of merkelized storage in order the achieve consensus on valid a application state. The SDK has two database options to interpret `StoreEffs`, an in-memory [avl-auth](https://github.com/oscoin/avl-auth) option as well as a persisted [iavl](https://github.com/tendermint/iavl) option. +ABCI applications depend on some kind of merkelized storage in order to achieve consensus on a valid application state. The SDK has two database options to interpret `StoreEffs`, an in-memory [avl-auth](https://github.com/oscoin/avl-auth) option as well as a persisted [iavl](https://github.com/tendermint/iavl) option. # Stores The most convenient way to partition a key-value store is by heavy use of prefixes -- for example, if you want to separate each module's keyspace, you can use prefix all of the keys that it manages by the module's unique name. If you want to partition storage within a module, say for a list or mapping, you can again use prefixes to create a unique keyspace. -The definition of a `Store` is a unique keyspace. Implementation wise, it is effectively a list of prefixes to concatonate when creating keys. There are currently 6 ways of creating Stores: +The definition of a `Store` is a unique keyspace. Implementation wise, it is effectively a list of prefixes to concatenate when creating keys. There are currently 6 ways of creating Stores: -1. From a `KeyRoot`, which is basically defines a top level Store. +1. From a `KeyRoot`, which basically defines a top level Store. 2. Using the `nestStore` function to mount one Store in another. 3. By creating a `Var`, which creates a keyspace with exactly one key. 4. By creating an `Array`, which creates a keyspace whose keys are type `Word64`. @@ -74,4 +74,4 @@ This both creates the mapping and mounts it inside of our module level store. Th encodeUtf8 "auth" <> encodeUtf8 "accounts" <> bytesFromHex "0xdeafbeef" ~~~ -While writing apps inside the SDK you do not need to worry about the explicit prefixing since everything is taken care of for you. However, if you are querying for state via an ABCI `query` message, the `key` field that is returned in the response will contain this full path. In the above example, if you wanted to recover the address from the key, you would need to know the prefixes that were applied. \ No newline at end of file +While writing apps inside the SDK you do not need to worry about the explicit prefixing since everything is taken care of for you. However, if you are querying for state via an ABCI `query` message, the `key` field that is returned in the response will contain this full path. In the above example, if you wanted to recover the address from the key, you would need to know the prefixes that were applied.