types: nest the block header and body in JSON - #21
Merged
mplatt8 merged 2 commits intoSep 21, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The BMM engine in BitWindow reads
block.header.prev_main_hashfromget_block_template. Truthcoin sends a flat block, so the engine reads an empty hash and refuses every bid with "sidechain builds on , not the current tip". Thunder, bitnames, bitassets and coinshift nest the header and the body, so only truthcoin fails, on every network.Blockcarries#[serde(flatten)]onheaderandbody, so the JSON ofget_block_template,get_blockandconnect_blockhas noheaderorbodykey. P2P sends the header and the body apart, and the archive keeps them in separate tables, so the serde attributes reach only the JSON RPCs.This PR removes the two
flattenattributes, and sets the version to 0.18.0, because #17 and #18 changed the network magic and the signatures after v0.17.0. It does not change consensus or the P2P messages.