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

feat(tariscript): adds ToRistrettoPoint op-code #4749

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Sep 28, 2022

Description

  • Adds ToRistrettoPoint opcodes
  • Added scalar stack item

Motivation and Context

As per RFC-202
Ref tari-project/rfcs#15
Ref #4742

How Has This Been Tested?

Additional unit tests + tests updated

@@ -116,6 +116,7 @@ pub const OP_CHECK_MULTI_SIG_VERIFY: u8 = 0xaf;
pub const OP_HASH_BLAKE256: u8 = 0xb0;
pub const OP_HASH_SHA256: u8 = 0xb1;
pub const OP_HASH_SHA3: u8 = 0xb2;
pub const OP_TO_RISTRETTO_POINT: u8 = 0xb3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks 👀

@sdbondi sdbondi force-pushed the tariscript-add-to-ristretto-point branch from 5c1c0f8 to 432446d Compare September 28, 2022 10:41
hansieodendaal
hansieodendaal previously approved these changes Sep 28, 2022
Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

Nice, just noted today this is missing.

LGTM

infrastructure/tari_script/src/script.rs Outdated Show resolved Hide resolved
infrastructure/tari_script/src/stack.rs Outdated Show resolved Hide resolved
@willyrgf
Copy link
Contributor

What do you think about this kind of approach to StackItem values and similar cases? willyrgf@8e67de1

@sdbondi
Copy link
Member Author

sdbondi commented Sep 30, 2022

What do you think about this kind of approach to StackItem values and similar cases? willyrgf@8e67de1

Yeah that is a little nicer, however I'd favour the current approach over introducing another dependency.

@sdbondi sdbondi force-pushed the tariscript-add-to-ristretto-point branch from dcb5287 to cd56a4f Compare September 30, 2022 05:49
@willyrgf
Copy link
Contributor

What do you think about this kind of approach to StackItem values and similar cases? willyrgf@8e67de1

Yeah that is a little nicer, however I'd favour the current approach over introducing another dependency.

Yes, it's make sense. Maybe in the future with core::mem::variant_count.

@stringhandler
Copy link
Collaborator

In future we will need to hard fork these in, but since this will not be used immediately, there should be enough time for nodes to upgrade

@stringhandler stringhandler merged commit 8f872a1 into tari-project:development Oct 3, 2022
@sdbondi sdbondi deleted the tariscript-add-to-ristretto-point branch October 3, 2022 11:40
sdbondi added a commit to sdbondi/tari that referenced this pull request Oct 3, 2022
* development:
  v0.38.5
  feat: different default grpc ports for different networks (tari-project#4755)
  fix(core): broken doctests (tari-project#4763)
  ci: fix coverage job
  ci: run coverage on prs (tari-project#4738)
  fix(comms): fixes edge case where online status event does not get published (tari-project#4756)
  fix(dht/encryption): greatly reduce heap allocations for encrypted messaging (tari-project#4753)
  docs: explain the emission curve parameters (tari-project#4750)
  fix(comms/peer_manager): add migration to remove onionv2 addresses (tari-project#4748)
  fix(ci): add cargo cache, reduce Ubuntu dependencies and action on pull_request (tari-project#4757)
  feat(tariscript): adds ToRistrettoPoint op-code (tari-project#4749)
  fix: cli wallet cucumber (tari-project#4739)
  fix(clients): fix tari nodejs client proto paths (tari-project#4743)
  chore: disallow onion v2 (tari-project#4745)
  feat: change priority in mempool to take into account age (tari-project#4737)
  feat: trigger mempool sync on lag (tari-project#4730)
  fix(core): use compact inputs for block propagation (tari-project#4714)
  ci: deny dbg macro (tari-project#4740)
stringhandler pushed a commit that referenced this pull request Nov 7, 2022
Description
---
- removes bugfix migration that no longer applies

Motivation and Context
---
Bug introduced in #4749 and fixed in #4791 can now be removed since enough nodes have upgraded.

How Has This Been Tested?
---
Just checked lints
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.

5 participants