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

build_coinbase api fix and cleanup #505

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Aug 7, 2020

Resolves: #499.
Related: mimblewimble/grin#3416.

V4 cleanup introduced a breaking change to the CbData response.

Old -

"output": {
    "commit": "08fe198e525a5937d0c5d01fa354394d2679be6df5d42064a0f7550c332fce3d9d",
    "features": "Coinbase",
    "proof": "9d8488fc..."
}

New -

"output": {
    "com": "08fe198e525a5937d0c5d01fa354394d2679be6df5d42064a0f7550c332fce3d9d",
    "features": 1,
    "prf": "9d8488fc..."
}

This PR ensures we now produce the expected json when node requests CbData via build_coinbase.

We actually no longer need TransactionV4 and the various related data structures.
This PR cleans this up, allowing the use of a simplified CoinbaseV4 with nested CbOutputV4 and CbKernelV4.


I was initially going to add an alternative "compat" ser/deser for output features along the same lines as the exsiting "compat" kernel features. But we do not actually need this as CbData and the version specific CoinbaseV4 is the only place this would be required.

@antiochp antiochp marked this pull request as ready for review August 7, 2020 17:29
@yeastplume
Copy link
Member

All looks good, thanks for cleaning that up. Test failures look like CI's problem, so just triggering them again

@yeastplume yeastplume merged commit b447dd1 into mimblewimble:master Aug 10, 2020
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.

Regression: build_coinbase returns invalid output features
2 participants