1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Monzero Phase 0 integration tests
These tests use temporary regtest directories and must not connect to or modify
the live Monzero network.
Run the three-node smoke test from the repository root:
```bash
python3 tests/phase0/monzero_multinode.py --build-dir build
```
The test starts three `monzerod` processes and one `monzero-wallet-rpc`
process on localhost. It generates a temporary wallet, creates blocks, checks
that every node reaches the same tip, restarts one node, and verifies that the
restarted node catches up. It then matures a coinbase output, sends one XMZ to
a second temporary wallet, verifies transaction-pool relay through all three
nodes, mines the transaction on a different node, and verifies the receiver's
confirmed balance. Before the transfer, it isolates the two edge nodes, creates
competing three- and five-block forks, reconnects them, and verifies all nodes
adopt the longer fork and identical tip. Finally, it restores the receiving
wallet from its temporary mnemonic seed, rescans from height zero, and checks
the recovered address and balance.
Ports 26174-26205 must be available. All child processes are terminated on
normal completion and on test failure. Pass `--keep-data` to retain temporary
databases and logs for diagnosis.
This is a smoke test, not the complete consensus qualification suite.
Double-spend, deeper/adversarial reorg, and adversarial asset tests remain
required before activating a new protocol version.
## Fast unit gate
Run the ordinary unit tests with a validating resolver and keep the expensive
pruning-boundary concurrency scenario in the separate stress-test gate:
```bash
tests/phase0/run-fast-unit-tests.sh build
```
Override `DNS_PUBLIC` with another validating TCP resolver when required. The
excluded `cryptonote_protocol_handler.race_condition` test must still pass in
the scheduled stress gate; exclusion here is not a waiver.
## Stress gate
Run the pruning-boundary concurrency scenario separately:
```bash
tests/phase0/run-stress-tests.sh build
```
The default timeout is 1,800 seconds. Override it with
`MONZERO_STRESS_TIMEOUT=<seconds>` when running on slower hardware. A timeout
is a failed gate and must not be treated as a skipped test.
## Adversarial core gate
Build the native core-test executable and run the focused double-spend and
key-image suite:
```bash
cmake --build build --target core_tests -j2
tests/phase0/run-adversarial-core-tests.sh build
```
This covers conflicting key images in the transaction pool; double spends in
one transaction, one block, separate blocks, competing chains, and alternate
chains; and both kept-by-block modes. The default timeout is 1,800 seconds and
can be overridden with `MONZERO_ADVERSARIAL_TIMEOUT`.
|