Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file modified contracts/sysio.authex/sysio.authex.wasm
Binary file not shown.
Binary file modified contracts/sysio.chalg/sysio.chalg.wasm
Binary file not shown.
7 changes: 1 addition & 6 deletions contracts/sysio.msgch/src/sysio.msgch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ std::optional<size_t> estimate_svm_dynamic_accounts(AttestationType type,
return SVM_DYNAMIC_ACCOUNTS_RESERVE_EFFECT_WORST_CASE;

case AT::ATTESTATION_TYPE_UNSPECIFIED:
case AT::ATTESTATION_TYPE_STAKE:
case AT::ATTESTATION_TYPE_UNSTAKE:
case AT::ATTESTATION_TYPE_PRETOKEN_PURCHASE:
case AT::ATTESTATION_TYPE_PRETOKEN_YIELD:
case AT::ATTESTATION_TYPE_WIRE_TOKEN_PURCHASE:
Expand Down Expand Up @@ -801,8 +799,7 @@ void dispatch_node_owner_reg(const std::vector<char>& data, uint64_t chain_code)
/// in `evalcons` after a consensus envelope has been unpacked. Dispatch is
/// best-effort — silently no-ops on unknown / out-of-scope types so the
/// inbound stream can keep flowing even when the depot hasn't yet wired up
/// every handler (e.g. the deferred STAKE / UNSTAKE / STAKE_UPDATE staking
/// lifecycle types).
/// every handler (for example, STAKE_UPDATE from the separate staking track).
void dispatch_attestation(name self, uint64_t attestation_id,
AttestationType type,
const std::vector<char>& data,
Expand Down Expand Up @@ -927,8 +924,6 @@ void dispatch_attestation(name self, uint64_t attestation_id,
// opening a sysio.chalg dispute vote, not by inbound challenge attestations.
break;

case AttestationType::ATTESTATION_TYPE_STAKE:
case AttestationType::ATTESTATION_TYPE_UNSTAKE:
case AttestationType::ATTESTATION_TYPE_STAKE_UPDATE:
case AttestationType::ATTESTATION_TYPE_STAKE_RESULT:
// Validator-staking lifecycle; depot-side handlers land in a later
Expand Down
8 changes: 0 additions & 8 deletions contracts/sysio.msgch/sysio.msgch.abi
Original file line number Diff line number Diff line change
Expand Up @@ -582,14 +582,6 @@
"name": "ATTESTATION_TYPE_OPERATOR_ACTION",
"value": 2001
},
{
"name": "ATTESTATION_TYPE_STAKE",
"value": 3001
},
{
"name": "ATTESTATION_TYPE_UNSTAKE",
"value": 3002
},
{
"name": "ATTESTATION_TYPE_PRETOKEN_PURCHASE",
"value": 3004
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,16 +298,6 @@ DataStream& operator>>(DataStream& ds, ReserveBalanceSheet& t) {
return ds >> t.chain_code >> t.reserves;
}

// PretokenStakeChange (deprecated; pre-launch only)
template <typename DataStream>
DataStream& operator<<(DataStream& ds, const PretokenStakeChange& t) {
return ds << t.actor << t.amount << t.index_at_mint << t.index_at_burn;
}
template <typename DataStream>
DataStream& operator>>(DataStream& ds, PretokenStakeChange& t) {
return ds >> t.actor >> t.amount >> t.index_at_mint >> t.index_at_burn;
}

// PretokenPurchase (deprecated; pre-launch only)
template <typename DataStream>
DataStream& operator<<(DataStream& ds, const PretokenPurchase& t) {
Expand Down
Binary file modified contracts/sysio.roa/sysio.roa.wasm
Binary file not shown.
8 changes: 0 additions & 8 deletions contracts/sysio.uwrit/sysio.uwrit.abi
Original file line number Diff line number Diff line change
Expand Up @@ -628,14 +628,6 @@
"name": "ATTESTATION_TYPE_OPERATOR_ACTION",
"value": 2001
},
{
"name": "ATTESTATION_TYPE_STAKE",
"value": 3001
},
{
"name": "ATTESTATION_TYPE_UNSTAKE",
"value": 3002
},
{
"name": "ATTESTATION_TYPE_PRETOKEN_PURCHASE",
"value": 3004
Expand Down
12 changes: 7 additions & 5 deletions contracts/tests/sysio.dispatch_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,20 @@ std::vector<char> encode_envelope_with_attestations(
constexpr size_t MAX_ENVELOPE_BYTES = 65'536;

/// Encode a decodable envelope whose serialised size is EXACTLY `target_bytes`, padded with a
/// single out-of-scope STAKE attestation (dispatch drops it with no value-bearing effect). Probe
/// single out-of-scope challenge-response attestation (dispatch drops it with no value-bearing
/// effect). Probe
/// once with `target_bytes` of padding to measure the fixed protobuf overhead, then rebuild with
/// the pad shrunk by that overhead: at sizes near the 64 KiB envelope cap every nested length
/// prefix and the `data_size` varint sit in the same 3-byte width band (16 KiB .. 2 MiB), so the
/// second pass lands exactly on target — the final REQUIRE pins it.
std::vector<char> encode_envelope_padded_to(uint32_t epoch_index, size_t target_bytes) {
auto probe = encode_envelope_with_one_attestation(
epoch_index, sysio::opp::types::ATTESTATION_TYPE_STAKE, std::string(target_bytes, 'x'));
epoch_index, sysio::opp::types::ATTESTATION_TYPE_CHALLENGE_RESPONSE,
std::string(target_bytes, 'x'));
BOOST_REQUIRE_GT(probe.size(), target_bytes);
const size_t overhead = probe.size() - target_bytes;
auto padded = encode_envelope_with_one_attestation(
epoch_index, sysio::opp::types::ATTESTATION_TYPE_STAKE,
epoch_index, sysio::opp::types::ATTESTATION_TYPE_CHALLENGE_RESPONSE,
std::string(target_bytes - overhead, 'x'));
BOOST_REQUIRE_EQUAL(target_bytes, padded.size());
return padded;
Expand Down Expand Up @@ -1065,7 +1067,7 @@ BOOST_FIXTURE_TEST_CASE(dispatch_silently_drops_out_of_scope_types, sysio_dispat
const auto eth_code = fc::slug_name{"ETH"}.value;
auto envelope = encode_envelope_with_one_attestation(
current_epoch(),
sysio::opp::types::ATTESTATION_TYPE_STAKE,
sysio::opp::types::ATTESTATION_TYPE_CHALLENGE_RESPONSE,
std::string{});

BOOST_REQUIRE_EQUAL(success(), deliver(/*chain_code=*/eth_code, envelope));
Expand Down Expand Up @@ -1402,7 +1404,7 @@ BOOST_FIXTURE_TEST_CASE(deliver_duplicate_from_same_operator_reverts, sysio_disp
const auto eth_code = fc::slug_name{"ETH"}.value;
auto envelope = encode_envelope_with_one_attestation(
current_epoch(),
sysio::opp::types::ATTESTATION_TYPE_STAKE,
sysio::opp::types::ATTESTATION_TYPE_CHALLENGE_RESPONSE,
std::string{});

BOOST_REQUIRE_EQUAL(success(), deliver(/*chain_code=*/eth_code, envelope));
Expand Down
8 changes: 4 additions & 4 deletions contracts/tests/sysio.msgch_chain_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ class sysio_msgch_chain_tester : public tester {

// -- Inbound envelope builder --

/// Encode a deliverable envelope carrying one out-of-scope STAKE attestation (dispatch drops
/// the attestation silently; acceptance is still fully observable via `outpcons` and the
/// stored attestation row). The semantic header is derived per the spec — `apply_consensus`
/// Encode a deliverable envelope carrying one out-of-scope CHALLENGE_RESPONSE attestation
/// (dispatch drops the attestation silently; acceptance is still fully observable via
/// `outpcons` and the stored attestation row). The semantic header is derived per the spec — `apply_consensus`
/// drops envelopes whose header fields do not recompute or whose message does not continue the
/// per-outpost message chain. `prev` (previous_envelope_hash), `prev_message_id`, and
/// `env_hash` are raw 32-byte strings (or empty for stream genesis).
Expand All @@ -375,7 +375,7 @@ class sysio_msgch_chain_tester : public tester {
if (!prev.empty()) env.set_previous_envelope_hash(prev);
if (!env_hash.empty()) env.set_envelope_hash(env_hash);
auto* att = env.add_messages()->mutable_payload()->add_attestations();
att->set_type(sysio::opp::types::ATTESTATION_TYPE_STAKE);
att->set_type(sysio::opp::types::ATTESTATION_TYPE_CHALLENGE_RESPONSE);
att->set_data(att_data);
att->set_data_size(static_cast<uint32_t>(att_data.size()));
oracle::finalize_header(*env.mutable_messages(0), prev_message_id, 1'775'612'516'983ULL);
Expand Down
14 changes: 0 additions & 14 deletions etc/schema/opp_entity_diagram-gen.puml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ sysio.opp.MessagePayload -- sysio.opp.AttestationEntry



sysio.opp.attestations.PretokenStakeChange -- sysio.opp.types.ChainAddress
sysio.opp.attestations.PretokenStakeChange -- sysio.opp.types.TokenAmount



sysio.opp.types.ChainSignature -- sysio.opp.types.ChainAddress
sysio.opp.types.ChainSignature -- sysio.opp.types.ChainKeyType

Expand Down Expand Up @@ -109,13 +104,6 @@ package sysio.opp.attestations {
index_at_mint: Long
}

class PretokenStakeChange {
actor: sysio.opp.types.ChainAddress
amount: sysio.opp.types.TokenAmount
index_at_mint: Long
index_at_burn: Long
}

class PretokenYield {
actor: sysio.opp.types.ChainAddress
amount: sysio.opp.types.TokenAmount
Expand Down Expand Up @@ -156,8 +144,6 @@ package sysio.opp.attestations {
package sysio.opp.types {
enum AttestationType {
ATTESTATION_TYPE_UNSPECIFIED
ATTESTATION_TYPE_STAKE
ATTESTATION_TYPE_UNSTAKE
ATTESTATION_TYPE_PRETOKEN_PURCHASE
ATTESTATION_TYPE_PRETOKEN_YIELD
ATTESTATION_TYPE_RESERVE_BALANCE_SHEET
Expand Down
2 changes: 1 addition & 1 deletion etc/schema/opp_entity_diagram-gen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 0 additions & 19 deletions etc/schema/opp_entity_diagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ package opp.types #F5F5F5 {

enum attestation_type_t <<uint16>> {
reserve_balance_sheet = 0xAA00
stake = 0x0BB9
unstake = 0x0BBA
pretoken_purchase = 0x0BBB
pretoken_yield = 0x0BBE
--
Expand Down Expand Up @@ -149,21 +147,6 @@ package opp.attestations #FCE4EC {
* amounts : token_amount[]
}

entity stake {
* actor : chain_address
* amount : token_amount
* pretoken_count : uint256
* index_at_mint : uint256
}

entity unstake {
* unstaker : chain_address
* amount : token_amount
* pretoken_count : uint256
* index_at_burn : uint256

}

entity pretoken_purchase {
* actor : chain_address
* amount : token_amount
Expand Down Expand Up @@ -249,8 +232,6 @@ package opp.attestations #FCE4EC {

' -- Assertion entry resolves to concrete payloads --
opp.attestation_entry ..> opp.attestations.reserve_balance_sheet
opp.attestation_entry ..> opp.attestations.stake
opp.attestation_entry ..> opp.attestations.unstake
opp.attestation_entry ..> opp.attestations.pretoken_purchase
opp.attestation_entry ..> opp.attestations.pretoken_yield
opp.attestation_entry ..> opp.attestations.stake_update
Expand Down
2 changes: 0 additions & 2 deletions libraries/opp/include/sysio/opp/opp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ FC_REFLECT_ENUM(sysio::opp::types::ReserveStatus,
FC_REFLECT_ENUM(sysio::opp::types::AttestationType,
(ATTESTATION_TYPE_UNSPECIFIED)
(ATTESTATION_TYPE_OPERATOR_ACTION)
(ATTESTATION_TYPE_STAKE)
(ATTESTATION_TYPE_UNSTAKE)
(ATTESTATION_TYPE_PRETOKEN_PURCHASE)
(ATTESTATION_TYPE_PRETOKEN_YIELD)
(ATTESTATION_TYPE_RESERVE_BALANCE_SHEET)
Expand Down
7 changes: 0 additions & 7 deletions libraries/opp/proto/sysio/opp/attestations/attestations.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ message ReserveBalanceSheet {
// during the deprecation pass)
// ---------------------------------------------------------------------------

message PretokenStakeChange {
sysio.opp.types.ChainAddress actor = 1;
sysio.opp.types.TokenAmount amount = 2;
int64 index_at_mint = 10;
int64 index_at_burn = 11;
}

message PretokenPurchase {
sysio.opp.types.ChainAddress actor = 1;
sysio.opp.types.TokenAmount amount = 2;
Expand Down
2 changes: 0 additions & 2 deletions libraries/opp/proto/sysio/opp/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ message ReserveAmount {
enum AttestationType {
ATTESTATION_TYPE_UNSPECIFIED = 0;
ATTESTATION_TYPE_OPERATOR_ACTION = 2001; // 0x07D1
ATTESTATION_TYPE_STAKE = 3001;
ATTESTATION_TYPE_UNSTAKE = 3002;
// DEPRECATED — pre-launch only, do not use in new code.
ATTESTATION_TYPE_PRETOKEN_PURCHASE = 3004;
// DEPRECATED — pre-launch only, do not use in new code.
Expand Down
Loading