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: parsing for NakamotoCoinbase tx type #15

Merged
merged 5 commits into from
Dec 8, 2023
Merged

Conversation

zone117x
Copy link
Member

Implementing parsing for the new NakamotoCoinbase tx type. This tx type is mentioned in passing in SIP-021, the actual wire format is sourced from code here:
https://github.com/stacks-network/stacks-core/blob/05274b6366a1e29ab363fe294745ff813d70985f/stackslib/src/chainstate/stacks/transaction.rs#L275-L292

Test vector generated from a mockamoto node.

@zone117x zone117x requested a review from janniks November 30, 2023 16:28
@janniks
Copy link
Contributor

janniks commented Dec 1, 2023

I'm not finding the length prefixed encoding for the VRF proof in the node code, where did you get this from? 🤔

@janniks
Copy link
Contributor

janniks commented Dec 1, 2023

Ok found it, I think the node meant to use different code, will open a PR

@janniks
Copy link
Contributor

janniks commented Dec 1, 2023

Looks good 👍 but I'll wait with approving until I know more on stacks-network/stacks-core#4115 If you need it sooner, lmk

@zone117x
Copy link
Member Author

zone117x commented Dec 1, 2023

@janniks I had the same thought. We'll wait to see if it's intended.

Copy link
Contributor

@janniks janniks left a comment

Choose a reason for hiding this comment

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

👏 looking good

tests/tx-decode-3.0.test.ts Outdated Show resolved Hide resolved
@zone117x zone117x merged commit ee78a5d into main Dec 8, 2023
16 checks passed
@janniks janniks deleted the feat/nakamoto-coinbase branch December 8, 2023 12:41
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