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

transaction fee #6

Open
hyangl opened this issue Jun 21, 2019 · 0 comments
Open

transaction fee #6

hyangl opened this issue Jun 21, 2019 · 0 comments

Comments

@hyangl
Copy link
Contributor

hyangl commented Jun 21, 2019

Abstract

This draft TIP describes the usage of "fee" field in transaction

Motivation

Facilitating the flow of asset and values in TrueChain Networks

Specification

when the "fee" filed in transaction is not null, subtract amount of fee from sender account and add this amount to payment account.

Here is the new form transaction:

- AccountNonce: Number of transactions sent by the sender.
- GasPrice: Number of Wei to be paid per unit of gas for this transaction.
- GasLimit: Maximum amount of gas should be used for this transaction.
- Recipient: Address of the beneficiary for this transaction.
- Value: Amount of token to be transacted.
- Fee: Assert service charged.
- Data: Virtual machine code for smart contract deployment or miscellaneous use.
- Payer: The payer sender wants the transaction to be paid by.
- V,R,S: Cryptographic values corresponding to the signature of the transaction, and used to determine the sender of the transaction.
- PV,PR,PS: Cryptographic values corresponding to the signature of the payment, used to determine the payer of the transaction.

When EVM executes a transaction and Detected that Fee and Payer address is not empty,
will perform evm.StateDB.SubBalance(Sender, Fee) and evm.StateDB.AddBalance(Payer, Fee).

Implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant