Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
d13c3e5
Add T5 treasury emissions with configurable parameters
heifner Apr 2, 2026
14d0cc5
Add setemitcfg to Python test harness bootstrap
heifner Apr 3, 2026
4fe6dfd
Use db.modify for kv_idx_update instead of remove+create
heifner Apr 3, 2026
f150e51
Merge remote-tracking branch 'origin/master' into feature/emissions-c…
heifner Apr 3, 2026
f3a5639
Merge origin/master into feature/emissions-configurable
heifner Apr 21, 2026
4268b1d
Migrate emissions to kv and integrate with sysio.opreg and sysio.epoch
heifner Apr 21, 2026
aaeb7e4
Guard sysio.roa inline addnodeowner call on emitcfg existence
heifner Apr 21, 2026
906f8c8
Port emissions tests to kv API and add opreg/epoch integration tests
heifner Apr 21, 2026
a071133
Regenerate sysio.system and sysio.roa WASM+ABI
heifner Apr 21, 2026
41dc051
Address PR review feedback
heifner Apr 22, 2026
27d7f44
Snapshot batch-op group per epoch; pay historical members on catch-up
heifner Apr 22, 2026
12cbd88
fc::variant: delete unused arithmetic operators
heifner Apr 25, 2026
553c243
fc::variant: add microbenchmark scaffold
heifner Apr 25, 2026
076d033
fc::variant: capture benchmark baseline
heifner Apr 25, 2026
9d00ce0
fc::variant: expand test coverage
heifner Apr 25, 2026
4252bc3
fc::variant: as_enum_value uses from_chars instead of stoll
heifner Apr 25, 2026
0ce12d3
fc::variant_object: lazy-allocate the entry vector
heifner Apr 25, 2026
73827fe
fc::variant_object: add non-throwing find_or helper
heifner Apr 25, 2026
32d5d9d
fc::variant: get_string() returns std::string_view, cascade through c…
heifner Apr 25, 2026
e069a67
fc::variant: add small-string-optimisation for short strings
heifner Apr 25, 2026
3e4e69a
fc::variant: same-type op=(const variant&) reuses existing heap object
heifner Apr 25, 2026
f82cdcb
fc::variant: re-baseline bench at Release (-O3)
heifner Apr 25, 2026
a4f1a71
chain_plugin: run read_table_rows inline when called from main thread
heifner Apr 27, 2026
1bf51df
# Achieved memory & on-chain storage stability (`>2400` epochs over `…
jglanz Apr 27, 2026
260fe64
fc::base64_decode: add std::string_view overload
heifner Apr 27, 2026
45882f6
Moved `file:line` to the end of `line-format` for readability in lnav.
jglanz Apr 28, 2026
7a32fe1
# Moved `protoc-gen-<solana|solidity>` plugins and protobuf-bundler i…
jglanz Apr 28, 2026
fc257b4
fc::variant: small follow-on tweaks (doc, lifetime, lazy alloc, tests)
heifner Apr 30, 2026
e6e198a
fc::variant: fix use-after-free in op=(const&) aliased different-type…
heifner Apr 30, 2026
fbdd627
fc::variant: clear() + copy ctor handle int128/uint128/int256/uint256…
heifner Apr 30, 2026
c696b55
fc::variant: extend int128/uint128 leak/copy-ctor tests to int256/uin…
heifner Apr 30, 2026
87e418c
Updated OPP generate bundles script
jglanz Apr 30, 2026
7b22e17
Updated OPP generate bundles script
jglanz Apr 30, 2026
bc58ab1
Updated OPP generate bundles script
jglanz Apr 30, 2026
b3a4bd3
Updated OPP generate bundles script
jglanz Apr 30, 2026
ae943f2
Merge remote-tracking branch 'origin/master' into feature/emissions-c…
heifner May 1, 2026
d743f96
Removed weird leftover dep `z`
jglanz May 4, 2026
63e9910
Removed weird leftover dep `z` - updated lockfile
jglanz May 4, 2026
2d9f053
emissions: trigger inline from sysio.epoch::advance via readiness gate
heifner May 5, 2026
ae1ed7f
Merge branch 'feature/opp-part2' into feature/emissions-configurable
heifner May 5, 2026
abdffcc
contracts: add explicit -I for magic_enum, refresh wasm and reference…
heifner May 5, 2026
b1786bf
Revert reference files as they should not have been committed
heifner May 5, 2026
5363460
Added chunking in order to support large envelopes on SOLANA
jglanz May 5, 2026
263d9ed
Merge branch 'feature/opp-part2' into feature/emissions-configurable
heifner May 6, 2026
0b3d178
emissions: make config epoch-frequency-agnostic
heifner May 7, 2026
d5cbb71
Merge branch 'master' into feature/emissions-configurable
heifner May 7, 2026
1146c38
Invalidate secondary iterator cached_id before kv_idx_update db.modify
heifner May 8, 2026
f09ce87
emissions: review follow-ups (round-to-zero guard, prune up to 2)
heifner May 8, 2026
2e4ab52
fc::variant: leave op=(const&) aliased self-assign as UB; add debug a…
heifner May 8, 2026
659cd5b
fc::variant: as_enum_value documents stricter parsing vs stoll
heifner May 8, 2026
947d036
emissions: review polish
heifner May 8, 2026
cd02d6d
Merge remote-tracking branch 'origin/master' into feature/chainbase-o…
heifner May 8, 2026
f5b8e9c
fc::variant: use std::less for aliasing-detector comparisons; expose …
heifner May 8, 2026
1b583d1
unittests/kv_tests: adapt new tests to table_id namespace isolation API
heifner May 8, 2026
39e8562
Merge pull request #282 from Wire-Network/feature/chainbase-optimizat…
heifner May 9, 2026
8703ebb
emissions: configurable pay_cadence_epochs
heifner May 9, 2026
7644293
tests: align nested_container_multi_index with Wire CDT pair/map fiel…
heifner Apr 21, 2026
401ae25
Merge pull request #329 from Wire-Network/cleanup/nested-container-te…
heifner May 11, 2026
62d22c8
kv: split iterator slot pool into independent primary and secondary p…
heifner May 11, 2026
c881e08
kv: address review -- static_assert handle layout, header helpers, mo…
heifner May 11, 2026
02c2401
chain: flip WIRE snapshot magic for hex-dump readability
heifner Apr 23, 2026
a335c0f
tests: regenerate snap_v1 fixtures for new WIRE magic
heifner May 11, 2026
3d100c1
tests: regenerate consensus_blockchain reference data
heifner May 12, 2026
2b25bba
Update block log reference files
heifner May 12, 2026
dbd75be
Merge feature/opp-part3-operator-management into feature/emissions-co…
heifner May 13, 2026
208105d
Regenerate WASM/ABI artifacts after opp-part3 merge
heifner May 13, 2026
4750450
Merge pull request #315 from Wire-Network/feature/fc-variant-perf
heifner May 13, 2026
e7a54bb
Merge pull request #309 from Wire-Network/feature/snapshot-magic-byte…
heifner May 13, 2026
4e6dfe5
Merge remote-tracking branch 'origin/master' into feature/emissions-c…
heifner May 13, 2026
238c91c
Merge pull request #330 from Wire-Network/refactor/kv-iterator-pool-s…
heifner May 13, 2026
59f3b71
Merge remote-tracking branch 'origin/master' into feature/emissions-c…
heifner May 13, 2026
734872d
tests: fix CI failures after master merge
heifner May 13, 2026
68933e4
tests: regenerate deep-mind + consensus_blockchain refs against curre…
heifner May 13, 2026
47625a4
Merge feature/opp-part3-token-chain-reserve-refactor into feature/emi…
heifner May 22, 2026
52e89af
contracts: drop magic_enum cmake hack, restructure sysio.token headers
heifner May 22, 2026
c151993
sysio.epoch: don't abort advance() on batch-operator shortage
heifner May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/sysio.authex/sysio.authex.abi
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,4 @@
]
}
]
}
}
Binary file modified contracts/sysio.authex/sysio.authex.wasm
Binary file not shown.
Binary file modified contracts/sysio.bios/sysio.bios.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion contracts/sysio.chains/sysio.chains.abi
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@
]
}
]
}
}
1 change: 1 addition & 0 deletions contracts/sysio.epoch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if(BUILD_SYSTEM_CONTRACTS)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../sysio.authex/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../sysio.chains/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../sysio.opp.common/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../sysio.token/include>
)

target_link_libraries(${target}
Expand Down
37 changes: 37 additions & 0 deletions contracts/sysio.epoch/include/sysio.epoch/sysio.epoch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,35 @@ namespace sysio {

using epochstate_t = sysio::kv::global<"epochstate"_n, epoch_state>;

/// Emissions readiness gate block log. One row per epoch_index that
/// the gate has blocked from advancing. Inserted on the first gate
/// failure for a given epoch; same-reason retries update last_retry_at
/// and retry_count without re-broadcast. Pruned when the gate
/// eventually passes for that epoch (advance proceeds normally).
struct blocklog_key {
uint64_t epoch_index;
uint64_t primary_key() const { return epoch_index; }
SYSLIB_SERIALIZE(blocklog_key, (epoch_index))
};

struct [[sysio::table("blocklog")]] blocklog_entry {
uint32_t epoch_index = 0;
sysio::opp::types::EmissionsBlockReason reason =
sysio::opp::types::EMISSIONS_BLOCK_REASON_UNSPECIFIED;
int64_t attempted_emission = 0;
int64_t treasury_remaining = 0;
int64_t sysio_balance = 0;
uint32_t first_blocked_at = 0; // unix seconds
uint32_t last_retry_at = 0; // unix seconds
uint32_t retry_count = 0;

SYSLIB_SERIALIZE(blocklog_entry,
(epoch_index)(reason)(attempted_emission)(treasury_remaining)
(sysio_balance)(first_blocked_at)(last_retry_at)(retry_count))
};

using blocklog_t = sysio::kv::table<"blocklog"_n, blocklog_key, blocklog_entry>;
Comment on lines +97 to +119
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the table auto-pruned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. blocklog only holds rows for epochs currently failing the emissions gate: record_gate_block inserts on a block, clear_gate_block erases on the next successful gate pass. advance() only ever targets current_epoch_index + 1, so at most the single in-flight blocked epoch is recorded and the table is empty in steady state -- no separate sweep needed.


// Well-known accounts
static constexpr name CHALG_ACCOUNT = "sysio.chalg"_n;
static constexpr name MSGCH_ACCOUNT = "sysio.msgch"_n;
Expand All @@ -97,6 +126,14 @@ namespace sysio {
static constexpr name AUTHEX_ACCOUNT = "sysio.authex"_n;
static constexpr name CHAINS_ACCOUNT = "sysio.chains"_n;

/// Bounds on `epoch_duration_sec`. Floor is a typo-guard: well below this
/// value, `expected_rounds` in sysio.system::payepoch falls back to 1
/// for any non-trivial epoch, masking misconfig. Ceiling bounds the
/// `(epoch_duration_sec * 2) / TOTAL_BLOCKS_PER_ROUND` arithmetic and
/// prevents governance typo from setting a multi-year epoch.
static constexpr uint32_t MIN_EPOCH_DURATION_SEC = 60;
static constexpr uint32_t MAX_EPOCH_DURATION_SEC = 30u * 24u * 60u * 60u;

private:

// Namespace alias for OPP protobuf enum types
Expand Down
Loading