Commit 0db98d5
Complete Phase 9b, begin Phase 9c: consensus containers with math.isqrt
Add math.isqrt builtin (Newton's method integer square root) for
Slot.is_justifiable_after(). Implement Phase 9c consensus container
tests: Slot/ValidatorIndex with custom methods, nested Containers
(Checkpoint, Config, BlockHeader, BlockBody, Block), model_copy on
nested containers, default field values, SSZList with Container
elements composite hash_tree_root, and State.generate_genesis
classmethod factory. All hash_tree_root results verified byte-for-byte
against CPython.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1d4576a commit 0db98d5
5 files changed
Lines changed: 60 additions & 2 deletions
File tree
- LeanPythonTest
- LeanPython
- Interpreter
- Runtime
- Stdlib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2914 | 2914 | | |
2915 | 2915 | | |
2916 | 2916 | | |
| 2917 | + | |
2917 | 2918 | | |
2918 | 2919 | | |
2919 | 2920 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
835 | 835 | | |
836 | 836 | | |
837 | 837 | | |
| 838 | + | |
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
98 | 117 | | |
0 commit comments