Skip to content

Core V24 follow-ups: diff writer checks, BLS encodings, IPv6/CJDNS strings #324

Open

Description

@PastaPastaPasta

Follow-ups from the Core V24 PRs (#319–#323), deferred from their reviews:

  • Diff writer input checks. SimplifiedMNListDiff.toBuffer() doesn't check that baseBlockHash, blockHash, deletedMNs entries and deleted quorum hashes are exactly 32 bytes. SimplifiedMNListEntry.toP2PBuffer() doesn't check that an evonode's platformNodeID is exactly 20 bytes. Data that comes from parsing is always correct; these checks matter only for diff objects that callers build themselves. (fix: read and write masternode list diffs in Core's P2P format #323 review)
  • BLS encodings when parsing. Quorum public keys and signatures are kept as opaque bytes on both the JSON and P2P paths. They're only checked when the quorum is verified (QuorumEntry.isValidQuorumSig() / isValidMemberSig()), through the async BLS module. Checking encodings while parsing would need the synchronous parsers to load BLS. (fix: read and write masternode list diffs in Core's P2P format #323 review)
  • IPv6 vs CJDNS in the address-string API. An fc00::/8 address stored as BIP155 IPv6 (network id 2) is printed the same way as CJDNS. That only happens on regtest and devnets, because mainnet and testnet require routable addresses. extNetInfoFromBuffer()/extNetInfoToBuffer() and the duplicate check can't tell the two apart. Parsed ProTx payloads and SML entries already keep their exact bytes. (feat: parse Core V24 version 3 ProTx transactions #320 review)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions