Merge 6bfcea551524505494b55169e498862ec63e130e into 4c1014b26c1404b5b5bf53548cb986a1ff9650b1
f09baf1a
pull/1151/merge
2/137 ++ 10 --
Commits and releases over time
No repositories match that filter.
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.8 to 3.1.9. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](https://github.com/fastify/fast-uri/compare/v3.1.8...v3.1.9) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.9 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
An online key registration transaction with voteFirst=0 (a legitimate round value) failed to encode: the field was dropped during msgpack serialization because OptionalSchema treats the wrapped schema's default (0 for Uint64Schema) as an omit-empty default. On decode the field was restored as undefined, so reconstructing the Transaction threw "Online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution". The same error occurred when decoding a block containing such a transaction. Introduce SparseOptionalSchema, which treats only `undefined` (not the wrapped schema's zero default) as omittable, and use it for the votefst, votelst and votekd fields. These fields remain omittable so they stay absent on non-keyreg transactions, leaving other transaction types' wire format unchanged. Fixes #925