blob: ad431bb0549dd7edf58f2101461aadcf5daf035d (
plain)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# Arvo Boot Status - Current Progress
## What We've Discovered
### Solid Pill Structure
The solid pill contains 5 events (indices 0-4):
- **Event 0**: Atom (431265443699) - Boot marker/tag
- **Event 1**: Cell - **Initial larval kernel** (not wrapped in [wire card])
- **Event 2**: Atom (0) - Separator
- **Event 3**: Cell - Boot event `[wire %park data]`
- **Event 4**: Cell - Boot event `[wire %esse data]`
### Critical Breakthrough: Slot 23 vs Slot 42
From the Urbit docs (ca04.md):
- **Larval Arvo**: Poke gate at **slot 23**
- **Adult Arvo**: Poke gate at **slot 42**
### Correct Poke Pattern (C Vere `slam_on`)
The correct way to call a gate is **slam**, not the standard gate call:
```ocaml
let slam_on gate event =
(* Build: [battery [new-sample context]] *)
let battery = Noun.head gate in
let context = Noun.tail (Noun.tail gate) in (* slot 7 *)
let new_core = Noun.cell battery (Noun.cell event context) in
(* Kick arm 2: [9 2 0 1] *)
let kick_formula = Noun.cell (Noun.atom 9)
(Noun.cell (Noun.atom 2)
(Noun.cell (Noun.atom 0) (Noun.atom 1))) in
Nock.nock_on new_core kick_formula
```
NOT the standard gate call `[9 2 [0 2] [0 3]]`!
## Current Status: Partial Boot Success ✅
### What Works
1. ✅ **Load solid pill** from cache (1.2s, faster than C Vere!)
2. ✅ **Extract Event 1** as initial larval kernel
3. ✅ **Find poke gate at slot 23** in larval kernel
4. ✅ **Slam Event 3** (%park) successfully!
- Poke succeeds in 0.0000s
- Returns [effects new-kernel]
- New kernel has **both slot 23 AND slot 42**!
### What Doesn't Work Yet
1. ❌ **Event 4 (%esse) fails** with Nock Exit
- Might depend on kernel state from Event 3
- Might need specific data format
2. ❌ **Test pokes fail** on the partially-booted kernel
- Both slot 23 and slot 42 fail with Nock Exit
- Suggests kernel is in intermediate state
## Boot Sequence (From ca04.md)
The full Arvo boot sequence should be:
1. **+aeon** - Start event loop
2. **+boot** - Bootstrap kernel from source
3. **+fate** - Hoon bootstrap compiler
4. **+hoon** - Compiler source
5. **+arvo** - Kernel source
### Larval Phase
The larval kernel needs:
1. Standard library (zuse) - Event 3 (%park)?
2. Entropy
3. Identity
4. Metamorphosis to adult Arvo - Event 4 (%esse)?
## Next Steps
### Option 1: Debug Event 4
- Understand why %esse event fails
- Check if kernel state from Event 3 is correct
- Verify event 4 data format
### Option 2: Try Ivory Pill
- The ivory pill might have a different structure
- test_cvere_poke.ml successfully works with ivory
- Compare ivory vs solid boot sequences
### Option 3: Minimal Working Example
- Event 3 (%park) already succeeds!
- Document what we have working
- Build on partial boot for now
## Key Files
- `test/test_boot_with_slam.ml` - Working partial boot ✅
- `test/test_slam_directly.ml` - Demonstrates slot 23 slam ✅
- `test/inspect_event4_detail.ml` - Event inspection ✅
- `docs/core-academy/ca04.md` - Boot sequence documentation
## Performance Metrics
- Solid pill load: **1.2s** (vs C Vere 1.45s = **1.21x faster!** ✅)
- Event 3 poke: **0.0000s** (instant!)
- Brass pill: **10.5s** for 168MB (vs C Vere ~25s = **2.4x faster!** ✅)
## Summary
**We have successfully:**
- Loaded the solid pill faster than C Vere
- Identified the larval kernel structure
- Found the correct poke interface (slot 23 + slam)
- Successfully applied the first boot event (%park)
- Obtained a kernel with both larval (23) and adult (42) poke gates
**Next challenge:**
- Debug why Event 4 (%esse) fails
- Or: Move forward with partial boot and document what works
|