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

Add tari script transaction data structures #2758

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Mar 16, 2021

Description

Added tari script transaction data structures as per RFC-0201 https://rfc.tari.com/RFC-0201_TariScript.html, used default tari script values everywhere:

  • pub struct TransactionOutput
  • pub struct TransactionInput
  • pub struct Transaction
  • pub struct BlockHeader
  • All PRC interfaces
  • All GRPC interfaces

Also updated comms wire mode to keep this network separate.

TODO:

  • Update faucet to include new fields.
  • Fix all unit tests.
  • Migrate tari script into all transaction protocols.
  • etc.

Motivation and Context

See above.

How Has This Been Tested?

Not tested, only compile without errors.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I ran cargo test successfully before submitting my PR.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@stringhandler stringhandler changed the base branch from development to tari-script March 16, 2021 15:18
@hansieodendaal hansieodendaal force-pushed the ho_tari_script_transaction_data_structures branch 5 times, most recently from 89fe2fc to 83edfdb Compare March 18, 2021 06:43
Copy link
Contributor

@philipr-za philipr-za left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine as it is but there will certainly be many changes once we start actually using this work so I think this should go in and any issues we will fix in subsequent PRs

@hansieodendaal hansieodendaal force-pushed the ho_tari_script_transaction_data_structures branch from 83edfdb to 06fd1bb Compare March 18, 2021 07:17
@hansieodendaal hansieodendaal changed the title WIP: Add tari script transaction data structures Add tari script transaction data structures Mar 18, 2021
@hansieodendaal hansieodendaal force-pushed the ho_tari_script_transaction_data_structures branch from 06fd1bb to 50ce0e9 Compare March 18, 2021 07:20
Added tari script transaction data structures as per RFC-0201
<https://rfc.tari.com/RFC-0201_TariScript.html>, used default
tari script values everywhere. Also updated comms wire mode
to keep this network seperate.
TODO:
- Fix all unit tests
- Migrate tari script into all transaction protocols

wip
@hansieodendaal hansieodendaal force-pushed the ho_tari_script_transaction_data_structures branch from 50ce0e9 to 7b1b3e5 Compare March 18, 2021 07:33
Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There are a number of places where the comment for the script_offset is incorrectly mentioning a kernel, but they can be updated in a future pr

base_layer/core/src/blocks/block_header.rs Outdated Show resolved Hide resolved
base_layer/core/src/blocks/new_blockheader_template.rs Outdated Show resolved Hide resolved
@stringhandler
Copy link
Collaborator

Looks like you still missed a few, but will merge

@stringhandler stringhandler merged commit 45c0fa1 into tari-project:tari-script Mar 18, 2021
@hansieodendaal hansieodendaal deleted the ho_tari_script_transaction_data_structures branch March 18, 2021 10:59
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

Successfully merging this pull request may close these issues.

3 participants