bigchaindb / bigchaindb/bigchaindb-driver

Provide a transaction/fulfillment/condition validation utility

Open
#110 3 comments 0 reactions 0 assignees View on GitHub
topic: UX docs cmd api driver
Dominant language
Python
Stars
106
Forks
99
PR merge metrics
No merged PRs in 30d

Description

To support cases similar to:

``` python
>>> # Create another transfer transaction with the same input
>>> tx_transfer2 = b.create_transaction(testuser1_pub, testuser2_pub, tx_retrieved_id, 'TRANSFER')
>>>
>>> # Sign the transaction
>>> tx_transfer_signed2 = b.sign_transaction(tx_transfer2, testuser1_priv)
>>>
>>> # Check if the transaction is valid
>>> b.validate_transaction(tx_transfer_signed2)
DoubleSpend: input `{'cid': 0, 'txid': '933cd83a419d2735822a2154c84176a2f419cbd449a74b94e592ab807af23861'}` was already spent
```

see https://github.com/bigchaindb/bigchaindb/blob/master/docs/source/drivers-clients/python-server-api-examples.md#double-spends

Contributor guide

Open the contributing guide

Research direction

Start with the double-spends example in docs/source/drivers-clients/python-server-api-examples.md and review the existing transaction creation, signing, and validation APIs used there. The work is done when a signed transaction can be checked for transaction, fulfillment, and condition validity, including reporting an already-spent input like the shown DoubleSpend error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.