Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Blocks and Block Headers, Transactions #24

Closed
DavidVorick opened this issue Oct 31, 2014 · 0 comments
Closed

Blocks and Block Headers, Transactions #24

DavidVorick opened this issue Oct 31, 2014 · 0 comments
Assignees

Comments

@DavidVorick
Copy link
Member

We're going to need to revamp blocks entirely once we implement merge mining, which is something I'm intentionally putting off for a while because I'll need a few days to actually learn everything that goes into merge mining.

For the beta, I think it's just best to have one struct, which is the block and nothing else. Since we won't be creating an actual header struct for a while (after beta release), we can just leave it at hashing the whole block.

Transactions be different tho. We can't sign the whole thing because that would include signing the signature you're creating. Plus we're supposed to be following the covered field stuff anyway. But I don't trust my implementation of covered fields, so we're going to leave that out completely for the beta.

So: leave blocks the way they are, but adjust transactions so you get back the encoded transaction minus the slice of signatures. Except, you need at the tail one of the signatures containing all the extra signature fields like InputID, PubKeyIndex, etc. Idk if that makes sense.

Example:

Transaction {
stuff
[]signatures
}

What gets signed:

stuff+signature[i].stuff

where i = whatever signature you are manipulating. The signature doesn't need to include the value of i, just the stuff inside the signature type (except for the signature itself of course).

In my PR I'll comment out all the covered field stuff b/c it's not going to be implemented for the time being.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants