From d55b7ef766c085273857657baa1b9656688bf7db Mon Sep 17 00:00:00 2001 From: Vitor Date: Tue, 11 Jun 2019 14:07:57 -0300 Subject: [PATCH] Adding pre-balance descriptions and transaction chapter --- merge_sections.sh | 5 +++++ sections/NeoContract.md | 32 ++++++++++++++++++++++++++++++++ sections/Transaction.md | 14 ++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 sections/Transaction.md diff --git a/merge_sections.sh b/merge_sections.sh index 51a1011..de50235 100755 --- a/merge_sections.sh +++ b/merge_sections.sh @@ -27,6 +27,11 @@ cat NeoVM.md >> ../specification.md echo "" >> ../specification.md echo "  \newpage" >> ../specification.md +echo "" >> ../specification.md +cat Transaction.md >> ../specification.md +echo "" >> ../specification.md +echo "  \newpage" >> ../specification.md + echo "" >> ../specification.md cat NeoContract.md >> ../specification.md echo "" >> ../specification.md diff --git a/sections/NeoContract.md b/sections/NeoContract.md index 1efaacb..84918c9 100644 --- a/sections/NeoContract.md +++ b/sections/NeoContract.md @@ -1 +1,33 @@ # NeoContract + + +## Payable applications + +Payable applications are all applications that are `payable` or pays any `network_fee` or `sys_fee`; + +### Balances updates + +#### Pre-balances + +Pre-balances are updated when transactions enter in the `mempool`, throughout the `verification` process. +In this sense, `verification` updates pre-balances. + +In this sense, when a transaction is relayed, we are ensured that all network fees can be correctly payed. + +#### After blocks persists + +In the meanwhile, while transaction are being executed, pre-balances are again updated for all `payable transactions` given a parameter defined as `maximum_gas_payable`. + +In this sense, Invocation transaction should declare the intention to spend an amount of `X` GAS; + +## Appendices + +### Native Contracts + +#### NEO Native + +#### GAS Native + +#### SimplePolicy + +#### Voting diff --git a/sections/Transaction.md b/sections/Transaction.md new file mode 100644 index 0000000..a64f8b9 --- /dev/null +++ b/sections/Transaction.md @@ -0,0 +1,14 @@ +# Transactions + +## How it works + +## Signer and co-signers + +## Attaching network and system fees + +The fields of the transaction in which this values are attached are: + +* system fee is attached as GAS (To be updated) +* network fee is attached as Sender (To be updated) + +As soon as transaction enters in the mempool, these values are updated in the pre-balance.