Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding pre-balance descriptions and transaction chapter #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions merge_sections.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions sections/NeoContract.md
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions sections/Transaction.md
Original file line number Diff line number Diff line change
@@ -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.