Skip to content

Commit 92b9bdd

Browse files
committed
oddities
1 parent 7b8756f commit 92b9bdd

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed

books/architecture/src/SUMMARY.md

+3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@
165165
---
166166

167167
- [🟢 Monero oddities](oddities/intro.md)
168+
- [🟡 Epee empty containers](oddities/epee-empty-containers.md)
169+
- [🟡 Invalid blocks](oddities/invalid-blocks.md)
168170
- [🟡 Little-endian IPv4 addresses](oddities/le-ipv4.md)
171+
- [🟡 2 variable integer formats](oddities/varint.md)
169172

170173
---
171174

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Epee empty containers
2+
3+
## What
4+
Monero's serialization in the `epee` library, responsible for both JSON and binary encoding, will not serialize containers that are empty.
5+
6+
This causes some issues for the binary format:
7+
- <https://github.com/monero-rs/monero-epee-bin-serde/issues/49>
8+
- <https://github.com/monero-project/monero/pull/8940>
9+
10+
For JSON, fields with empty containers will cause the field itself to not be present in the JSON output.
11+
12+
## Expected
13+
Serialization of the key and an empty field, for example, this is expected:
14+
```json
15+
{
16+
"empty": [],
17+
"non_empty": [1]
18+
}
19+
```
20+
21+
However `monerod` will write:
22+
```json
23+
{
24+
"non_empty": [1]
25+
}
26+
```
27+
28+
## Why
29+
TODO
30+
31+
## Affects
32+
TODO
33+
34+
## Source
35+
- TODO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Invalid blocks
2+
3+
## What
4+
TODO
5+
6+
- Block 202612
7+
- Block 685498
8+
9+
## Expected
10+
TODO
11+
12+
## Why
13+
TODO
14+
15+
## Affects
16+
TODO
17+
18+
## Source
19+
- <https://github.com/monero-project/monero/pull/121>
20+
- <https://github.com/monero-project/monero/blob/893916ad091a92e765ce3241b94e706ad012b62a/src/crypto/tree-hash.c#L63-L74>
21+
- <https://github.com/monero-project/monero/blob/893916ad091a92e765ce3241b94e706ad012b62a/src/blockchain_db/blockchain_db.cpp#L450-L456>
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 2 variable integer formats
2+
3+
## What
4+
Monero has 2 variant integer formats that are used in different contexts.
5+
6+
## Expected
7+
TODO
8+
9+
## Why
10+
TODO
11+
12+
- <https://github.com/monero-project/monero/issues/3826>
13+
- <https://github.com/monero-project/monero/pull/5544>
14+
15+
## Affects
16+
TODO
17+
18+
## Source
19+
- TODO

0 commit comments

Comments
 (0)