Skip to content

refactor arknote as fake vtxo #556

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

Merged
merged 5 commits into from
May 14, 2025

Conversation

louisinger
Copy link
Collaborator

This PR is refactoring arknote. It also drops the "note" DB Table and repository.
breaking change.

Fake VTXO note

A note now looks like the following :

arknoteSkB92YpWm4Q2ijQHH34cqbKkCZWszsiQgHVjtNeFF2Cwp59D

the string embed a 32 byte preimage & the value of the note (4 BE bytes).

When creating a note via AdminService.CreateNotes, the server adds a domain.Vtxo to the database. This VTXO has an empty roundTxId field and is locked by a taproot pkscript with a unique tapscript:

SHA256
<preimageHash>
OP_EQUAL

The fake vtxo is identified by the preimageHash:0 outpoint.

Thus, a note can be registered as input of the BIP322 intent transaction.

API changes

  • remove notes from RegisterIntent RPC
  • remove notes from RegisterInputsForNextRound RPC
  • update TxRequestInfo message
  • the only way to redeem a note is to include it in Bip322Signature field.

@Kukks @altafan please review

@louisinger louisinger requested a review from altafan May 13, 2025 13:06
@louisinger louisinger requested a review from altafan May 14, 2025 07:21
@altafan altafan merged commit 8811e96 into arkade-os:next-version May 14, 2025
11 of 13 checks passed
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.

2 participants