You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/f02-design.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ Pos Field Change
22
22
9 total_minted_reward Renamed from total_storage_power_reward, position kept.
23
23
Accrues the full block reward, all streams (was
24
24
miners-only in FIP). FilMined reads it unchanged.
25
-
10,11 simple_total, Deleted, retired to code constants (code comment
26
-
baseline_total suggests this "in a subsequent upgrade").
25
+
10simple_total Deleted; use SIMPLE_TOTAL = 330,000,000 FIL.
26
+
11 baseline_total Deleted; use canonical BASELINE_TOTAL below.
27
27
28
28
new total_burn_minted Cumulative burn (w0 residual + fold dust).
29
29
new total_service_minted Cumulative service accrual, all explicit streams.
@@ -36,6 +36,8 @@ new swa_timelock_epochs Per-network hold (7 days mainnet, short on calibne
36
36
new streams_root (CID) Everything below.
37
37
```
38
38
39
+
Reward calculation uses `SIMPLE_TOTAL = TokenAmount::from_whole(330_000_000)` and `BASELINE_TOTAL = TokenAmount::from_atto(768335872210768889362796814u128)`. The latter is the exact mainnet value fixed by the actors-v2 baseline migration; that migration made the value history-dependent, and Solstice deliberately canonicalises mainnet's value across networks rather than carrying either field forward.
40
+
39
41
Net roughly +63B on the 165B current f02 state root block (+91B added, -28B from the two deleted totals).
40
42
41
43
Serialisation is the Filecoin norm of only tuple representation, so "keyed by `(stream_id, wallet)`" is logical only: lookups scan the streams array matching on the stored `id`, and each explicit stream owns its own recipient arrays, so streams can't collide on a shared wallet and a claim rewrites only its own stream's rows. `id`s are SWA-supplied at `RegisterStream` and opaque to f02, which enforces uniqueness across `streams[]`, `tombstones[]`, and pending `RegisterStream` writes, checked at queue time. The SWA keeps the `id`-to-purpose mapping, where `id`s have meaning. Migration pins consensus = 1 and service = 2, matching the w1/w2 subscripts; 0 is reserved (in case we make burn an identified stream later).
The slopes cancel over Q1 so nothing burns during bootstrap, and w2 hits its cap exactly at the Q1 boundary, auto-exiting the bootstrap ramp with no scheduled write needed. The service stream starts with the single-orchestrator share map (one wallet, share = 1) and the SRA as designated writer. `swa_timelock_epochs` is set per network here (the only place it's ever written).
215
+
216
+
## Testing
217
+
218
+
***Reward constants after upgrade:** query f02 at two consecutive non-null tipsets whose stored `epoch` increases by one. Compute reward theta for each state from `effective_network_time`, `effective_baseline_power`, `cumsum_realized`, and `cumsum_baseline`; then require `compute_reward(post.epoch, pre_theta, post_theta, SIMPLE_TOTAL, BASELINE_TOTAL)` to equal the post-state `this_epoch_reward` exactly.
0 commit comments