mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-12-22 11:39:26 +00:00
oddities
This commit is contained in:
parent
7b8756fa80
commit
92b9bdd989
4 changed files with 78 additions and 0 deletions
|
@ -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)
|
||||
|
||||
---
|
||||
|
||||
|
|
35
books/architecture/src/oddities/epee-empty-containers.md
Normal file
35
books/architecture/src/oddities/epee-empty-containers.md
Normal file
|
@ -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:
|
||||
- <https://github.com/monero-rs/monero-epee-bin-serde/issues/49>
|
||||
- <https://github.com/monero-project/monero/pull/8940>
|
||||
|
||||
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
|
21
books/architecture/src/oddities/invalid-blocks.md
Normal file
21
books/architecture/src/oddities/invalid-blocks.md
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Invalid blocks
|
||||
|
||||
## What
|
||||
TODO
|
||||
|
||||
- Block 202612
|
||||
- Block 685498
|
||||
|
||||
## Expected
|
||||
TODO
|
||||
|
||||
## Why
|
||||
TODO
|
||||
|
||||
## Affects
|
||||
TODO
|
||||
|
||||
## Source
|
||||
- <https://github.com/monero-project/monero/pull/121>
|
||||
- <https://github.com/monero-project/monero/blob/893916ad091a92e765ce3241b94e706ad012b62a/src/crypto/tree-hash.c#L63-L74>
|
||||
- <https://github.com/monero-project/monero/blob/893916ad091a92e765ce3241b94e706ad012b62a/src/blockchain_db/blockchain_db.cpp#L450-L456>
|
19
books/architecture/src/oddities/varint.md
Normal file
19
books/architecture/src/oddities/varint.md
Normal file
|
@ -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
|
||||
|
||||
- <https://github.com/monero-project/monero/issues/3826>
|
||||
- <https://github.com/monero-project/monero/pull/5544>
|
||||
|
||||
## Affects
|
||||
TODO
|
||||
|
||||
## Source
|
||||
- TODO
|
Loading…
Reference in a new issue