aboutsummaryrefslogtreecommitdiffstats
path: root/content/transaction_docs.md
diff options
context:
space:
mode:
authornecrashter2022-04-24 21:37:51 +0300
committerYigit Sever2022-04-24 22:26:05 +0300
commitfe72491dea7cc6c00e86e3f8dc9a6dde10658554 (patch)
tree28c818f7c7a7beb1239dd7cf9730dec112206a6d /content/transaction_docs.md
parent79b0d66ec091501b063d35976db2347fc10a39d1 (diff)
downloadgradecoin-site-fe72491dea7cc6c00e86e3f8dc9a6dde10658554.tar.gz
gradecoin-site-fe72491dea7cc6c00e86e3f8dc9a6dde10658554.tar.bz2
gradecoin-site-fe72491dea7cc6c00e86e3f8dc9a6dde10658554.zip
Clarifications on transactions and blocks
Diffstat (limited to 'content/transaction_docs.md')
-rw-r--r--content/transaction_docs.md18
1 files changed, 11 insertions, 7 deletions
diff --git a/content/transaction_docs.md b/content/transaction_docs.md
index 72c1ef7..a4617a6 100644
--- a/content/transaction_docs.md
+++ b/content/transaction_docs.md
@@ -24,19 +24,23 @@ timestamp: ISO 8601 <date>T<time>
24# Hash 24# Hash
25`tha` field in [jwt documentation](@/JWT.md) in fact stands for "The Hash". 25`tha` field in [jwt documentation](@/JWT.md) in fact stands for "The Hash".
26In the context of a transaction proposal, you need the [Md5](https://en.wikipedia.org/wiki/MD5) hash of the serialized JSON representation of transaction. 26In the context of a transaction proposal, you need the [Md5](https://en.wikipedia.org/wiki/MD5) hash of the serialized JSON representation of transaction.
27Serializing in this context is a simple JSON to string conversion with key, value pairs enclosed with quotation marks ("). 27Since there are many ways to convert an object to JSON, we enforce the following rules (alongside the regular rules of JSON syntax) for consistency:
28The resulting JSON string should look something like; 28- There shouldn't be any whitespace or newlines in the serialized string.
29- The order of fields should be exactly as shown above.
30- All keys and string values must be enclosed with quotation marks (`"`).
29 31
32Here's an example demostrating how your JSON string should look like:
30``` 33```
31{"source":"bar","target":"baz","amount":2,"timestamp":"2021-04-18T21:49:00"} 34{"source":"bar","target":"baz","amount":2,"timestamp":"2021-04-18T21:49:00"}
32``` 35```
33 36
34Or; without any whitespace, separated with `:` and `,`.
35
36# Transaction Rules 37# Transaction Rules
37- Transactions should be sent from your account (`source`) to any other account (`target`). 38- Transactions should be sent from your account (`source`) to any other account (`target`).
38- No two transaction with the same `source`/`target` pair can appear on the pending transaction list [/transactions](/transaction). 39- You cannot create multiple transactions with the same `source`/`target` pair.
39- Transactions generate traffic which is something we desperately need in Gradecoin, so for every transaction you send, some Gradecoin will be generated out of thin air and will appear on the target. 40- Transactions generate traffic which is something we desperately need in Gradecoin, so for every transaction you send, some Gradecoin will be generated out of thin air and will appear on your account.
41 - The amount of Gradecoin that will be generated is given by `tx_traffic_reward` field of [`/config`](/config).
42 - For example, if `tx_traffic_reward` is 1 and you send 2 coins, only 1 coin will be deduced from your account since you will be given 1 coin for generating traffic. The target will receive 2 coins.
40- Don't worry if your transaction goes unaccepted! Transactions do not disappear until they are committed into the ledger with a block. 43- Don't worry if your transaction goes unaccepted! Transactions do not disappear until they are committed into the ledger with a block.
41- Every transaction has a unique ID generated using the `source`, `target` and `timestamp` fields. 44- Every transaction has a unique ID generated using the `source`, `target` and `timestamp` fields.
42- Transactions have an upper amount limit. 45- Transactions have a lower and upper amount limit.
46 - These are given by `tx_lower_limit` and `tx_upper_limit` fields of [`/config`](/config). See [misc page](@/misc_docs.md) for more information about configuration.