mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Docs section on tx validity checklist now refers to blog post
This commit is contained in:
parent
cb5e9fefa6
commit
a20dbffa38
@ -56,30 +56,6 @@ of the outgoing paperclips (100).
|
||||
## Transaction Validity
|
||||
|
||||
When a node is asked to check if a transaction is valid, it checks several
|
||||
things. Some things it checks are:
|
||||
things. We documented those things in a post on the BigchainDB Blog.
|
||||
|
||||
* Are all the fulfillments valid? (Do they correctly satisfy the conditions
|
||||
they claim to satisfy?)
|
||||
* If it's a creation transaction, is the asset valid?
|
||||
* If it's a transfer transaction:
|
||||
* Is it trying to fulfill a condition in a nonexistent transaction?
|
||||
* Is it trying to fulfill a condition that's not in a valid transaction?
|
||||
(It's okay if the condition is in a transaction in an invalid block; those
|
||||
transactions are ignored. Transactions in the backlog or undecided blocks
|
||||
are not ignored.)
|
||||
* Is it trying to fulfill a condition that has already been fulfilled, or
|
||||
that some other pending transaction (in the backlog or an undecided block)
|
||||
also aims to fulfill?
|
||||
* Is the asset ID in the transaction the same as the asset ID in all
|
||||
transactions whose conditions are being fulfilled?
|
||||
* Is the sum of the amounts in the fulfillments equal
|
||||
to the sum of the amounts in the new conditions?
|
||||
|
||||
If you're curious about the details of transaction validation, the code is in
|
||||
the `validate` method of the `Transaction` class, in `bigchaindb/models.py` (at
|
||||
the time of writing).
|
||||
|
||||
Note: The check to see if the transaction ID is equal to the hash of the
|
||||
transaction body is actually done whenever the transaction is converted from a
|
||||
Python dict to a Transaction object, which must be done before the `validate`
|
||||
method can be called (since it's called on a Transaction object).
|
||||
TODO (Troy): Hyperlink to the actual post, once it's published.
|
||||
|
Loading…
x
Reference in New Issue
Block a user