From 92b9bdd989e5781bc425818857548da590fe9fbd Mon Sep 17 00:00:00 2001 From: "hinto.janai" Date: Wed, 11 Dec 2024 13:42:45 -0500 Subject: [PATCH] oddities --- books/architecture/src/SUMMARY.md | 3 ++ .../src/oddities/epee-empty-containers.md | 35 +++++++++++++++++++ .../src/oddities/invalid-blocks.md | 21 +++++++++++ books/architecture/src/oddities/varint.md | 19 ++++++++++ 4 files changed, 78 insertions(+) create mode 100644 books/architecture/src/oddities/epee-empty-containers.md create mode 100644 books/architecture/src/oddities/invalid-blocks.md create mode 100644 books/architecture/src/oddities/varint.md diff --git a/books/architecture/src/SUMMARY.md b/books/architecture/src/SUMMARY.md index a99d099f..a780b2c2 100644 --- a/books/architecture/src/SUMMARY.md +++ b/books/architecture/src/SUMMARY.md @@ -165,7 +165,10 @@ --- - [🟢 Monero oddities](oddities/intro.md) + - [🟡 Epee empty containers](oddities/epee-empty-containers.md) + - [🟡 Invalid blocks](oddities/invalid-blocks.md) - [🟡 Little-endian IPv4 addresses](oddities/le-ipv4.md) + - [🟡 2 variable integer formats](oddities/varint.md) --- diff --git a/books/architecture/src/oddities/epee-empty-containers.md b/books/architecture/src/oddities/epee-empty-containers.md new file mode 100644 index 00000000..6ffd6924 --- /dev/null +++ b/books/architecture/src/oddities/epee-empty-containers.md @@ -0,0 +1,35 @@ +# Epee empty containers + +## What +Monero's serialization in the `epee` library, responsible for both JSON and binary encoding, will not serialize containers that are empty. + +This causes some issues for the binary format: +- +- + +For JSON, fields with empty containers will cause the field itself to not be present in the JSON output. + +## Expected +Serialization of the key and an empty field, for example, this is expected: +```json +{ + "empty": [], + "non_empty": [1] +} +``` + +However `monerod` will write: +```json +{ + "non_empty": [1] +} +``` + +## Why +TODO + +## Affects +TODO + +## Source +- TODO \ No newline at end of file diff --git a/books/architecture/src/oddities/invalid-blocks.md b/books/architecture/src/oddities/invalid-blocks.md new file mode 100644 index 00000000..401fc570 --- /dev/null +++ b/books/architecture/src/oddities/invalid-blocks.md @@ -0,0 +1,21 @@ +# Invalid blocks + +## What +TODO + +- Block 202612 +- Block 685498 + +## Expected +TODO + +## Why +TODO + +## Affects +TODO + +## Source +- +- +- \ No newline at end of file diff --git a/books/architecture/src/oddities/varint.md b/books/architecture/src/oddities/varint.md new file mode 100644 index 00000000..239b3701 --- /dev/null +++ b/books/architecture/src/oddities/varint.md @@ -0,0 +1,19 @@ +# 2 variable integer formats + +## What +Monero has 2 variant integer formats that are used in different contexts. + +## Expected +TODO + +## Why +TODO + +- +- + +## Affects +TODO + +## Source +- TODO