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

StoredBlock.serializeCompact() trims AuxPoW #31

Open
oscarguindzberg opened this issue Jan 23, 2018 · 4 comments
Open

StoredBlock.serializeCompact() trims AuxPoW #31

oscarguindzberg opened this issue Jan 23, 2018 · 4 comments
Assignees

Comments

@oscarguindzberg
Copy link
Contributor

See https://github.com/bitcoinj/bitcoinj/blob/v0.14.2/core/src/main/java/org/bitcoinj/core/StoredBlock.java#L131
This method is invoked by bitcoinj's blockstores (eg LevelDBBlockStore) before storing a block, so AuxPow is missing from blocks stored in blockstores.

@rnicoll rnicoll self-assigned this Jan 28, 2018
@rnicoll
Copy link
Collaborator

rnicoll commented Jan 28, 2018

I think this was vaguely intentional, in that you only need the 80 bytes to make the blockchain and it's therefore enough for SPV clients.

Do you have a specific use-case this needs changing for, or is this a documentation issue (possibly I need a parallel option for retaining AuxPoW?)

@oscarguindzberg
Copy link
Contributor Author

oscarguindzberg commented Jan 29, 2018

I see your point of SPV clients.

I have an use case. We have an agent that sends doge block headers to ethereum. That is part of the Doge-Eth bridge. We don't send doge headers as we receive them. We store them and send them later on. My agent should send the full header but is just sending the first 80 bytes.

@rnicoll
Copy link
Collaborator

rnicoll commented Jan 29, 2018

Okay, I'll work with bitcoinj to get some extension hooks in so it can handle non-80-byte headers. Meanwhile if you subclass StoredBlock could that let you make progress?

@oscarguindzberg
Copy link
Contributor Author

oscarguindzberg commented Jan 30, 2018 via email

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

No branches or pull requests

2 participants