Commit 15d42c5
committed
security: close all findings from security audit v5
C2: Remove dead PLACEHOLDER Dilithium key and is_valid_system_signature from genesis_constants.rs
C1: Replace silent fallback with hard exit(1) when QNET_BURN_TX_HASH/QNET_BURN_AMOUNT are missing in quantum_crypto.rs
C3: Add automatic rollback in cross-shard transaction on notify failure (production_sharding.rs)
H1: Remove all activation-related code from browser extension background.js (burnOneDevTokens, burnAndActivateNode, activateNode, spendQNCToPool3, startActivationSync, BURN_1DEV_TOKENS handler)
H3: Make QNET_ADMIN_SECRET mandatory for shutdown endpoint - blocked entirely if not configured (rpc.rs + docker-compose.production.yml all 3 services)
H4: Replace SkipServerVerification with SelfSignedCertVerifier + post-handshake verify_peer_cert_node_id() binding TLS cert SAN to claimed node_id on both client and server sides (quic_transport.rs)
M3: Move blocking reqwest IP detection to dedicated OS thread via std::thread::spawn, update all logs to two-level format [DBG][IP]/[INFO][IP]/[WARN][IP] (qnet-node.rs)
N1: Upgrade VRF domain separation to v4 with pk-bound hash_input_keyed() for formal uniqueness guarantee (vrf.rs)
N2: Add block hash integrity check in load_block_by_height - recomputes and verifies against stored hash (storage.rs)
Made-with: Cursor1 parent c868720 commit 15d42c5
18 files changed
Lines changed: 414 additions & 1219 deletions
File tree
- applications
- qnet-mobile
- android/app/src/main/cpp/dilithium3
- patches
- src
- components
- screens
- services
- qnet-wallet/dist
- core/qnet-sharding/src
- development/qnet-integration/src
- bin
- crypto
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
477 | 479 | | |
478 | | - | |
| 480 | + | |
479 | 481 | | |
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
483 | 485 | | |
484 | 486 | | |
485 | | - | |
| 487 | + | |
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
Lines changed: 24 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
143 | | - | |
| 147 | + | |
144 | 148 | | |
145 | 149 | | |
146 | 150 | | |
| |||
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
257 | | - | |
| 261 | + | |
258 | 262 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
265 | 273 | | |
266 | 274 | | |
267 | | - | |
| 275 | + | |
268 | 276 | | |
269 | 277 | | |
270 | 278 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
Lines changed: 16 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3543 | 3543 | | |
3544 | 3544 | | |
3545 | 3545 | | |
3546 | | - | |
3547 | | - | |
| 3546 | + | |
| 3547 | + | |
3548 | 3548 | | |
3549 | 3549 | | |
3550 | 3550 | | |
3551 | 3551 | | |
3552 | 3552 | | |
3553 | | - | |
| 3553 | + | |
3554 | 3554 | | |
3555 | 3555 | | |
3556 | 3556 | | |
3557 | | - | |
| 3557 | + | |
3558 | 3558 | | |
3559 | 3559 | | |
3560 | 3560 | | |
| |||
3617 | 3617 | | |
3618 | 3618 | | |
3619 | 3619 | | |
3620 | | - | |
3621 | 3620 | | |
3622 | | - | |
| 3621 | + | |
3623 | 3622 | | |
3624 | 3623 | | |
3625 | 3624 | | |
3626 | 3625 | | |
3627 | 3626 | | |
3628 | 3627 | | |
3629 | | - | |
3630 | | - | |
3631 | | - | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
3632 | 3631 | | |
3633 | 3632 | | |
3634 | 3633 | | |
| |||
5289 | 5288 | | |
5290 | 5289 | | |
5291 | 5290 | | |
5292 | | - | |
| 5291 | + | |
5293 | 5292 | | |
5294 | 5293 | | |
5295 | 5294 | | |
| |||
5498 | 5497 | | |
5499 | 5498 | | |
5500 | 5499 | | |
5501 | | - | |
5502 | | - | |
| 5500 | + | |
5503 | 5501 | | |
5504 | 5502 | | |
5505 | 5503 | | |
| |||
5528 | 5526 | | |
5529 | 5527 | | |
5530 | 5528 | | |
5531 | | - | |
| 5529 | + | |
5532 | 5530 | | |
5533 | 5531 | | |
5534 | 5532 | | |
| |||
5648 | 5646 | | |
5649 | 5647 | | |
5650 | 5648 | | |
5651 | | - | |
| 5649 | + | |
5652 | 5650 | | |
5653 | 5651 | | |
5654 | 5652 | | |
| |||
5784 | 5782 | | |
5785 | 5783 | | |
5786 | 5784 | | |
5787 | | - | |
| 5785 | + | |
5788 | 5786 | | |
5789 | 5787 | | |
5790 | 5788 | | |
| |||
5846 | 5844 | | |
5847 | 5845 | | |
5848 | 5846 | | |
| 5847 | + | |
5849 | 5848 | | |
5850 | 5849 | | |
5851 | 5850 | | |
| |||
6114 | 6113 | | |
6115 | 6114 | | |
6116 | 6115 | | |
6117 | | - | |
| 6116 | + | |
6118 | 6117 | | |
6119 | 6118 | | |
6120 | 6119 | | |
| |||
6311 | 6310 | | |
6312 | 6311 | | |
6313 | 6312 | | |
6314 | | - | |
| 6313 | + | |
6315 | 6314 | | |
6316 | 6315 | | |
6317 | 6316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1843 | 1843 | | |
1844 | 1844 | | |
1845 | 1845 | | |
| 1846 | + | |
1846 | 1847 | | |
1847 | 1848 | | |
1848 | | - | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
1849 | 1852 | | |
1850 | 1853 | | |
1851 | 1854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| |||
0 commit comments