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
{{ message }}
Repository navigation
Commit b60bcdb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: packages/rs-drive-abci/src/execution/platform_events/state_transition_processing/process_validation_result/mod.rs
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,27 @@ where
28
28
/// across the bump — only this helper's behavior is — so only this helper is versioned; the loop
29
29
/// calls this dispatcher exactly like `execute_event_v0` calls the dispatching
30
30
/// `record_added_balance_outputs`.
31
+
///
32
+
/// # Parameters
33
+
///
34
+
/// * `raw_state_transition`: The raw transition bytes, used to hash it for logs and to tag
35
+
/// errors.
36
+
/// * `state_transition_name`: The transition's name, used in logs and errors.
37
+
/// * `validation_result`: The validation outcome: the execution event (if any) and the
38
+
/// consensus errors.
39
+
/// * `block_info`: The block being executed.
40
+
/// * `transaction`: The GroveDB transaction.
41
+
/// * `block_credit_mints`: Accumulates the credits the applied operations mint into Platform.
42
+
/// * `platform_version`: The platform version.
43
+
/// * `previous_fee_versions`: The fee versions of earlier epochs, used to price the fees.
Copy file name to clipboardExpand all lines: packages/rs-drive-abci/src/execution/platform_events/state_transition_processing/record_added_balance_outputs/mod.rs
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,20 @@ where
44
44
/// OWN version field (`process_raw_state_transitions`), not this one — but both bump to v1
45
45
/// together in the v13 method set, so the expansion activates atomically. Neither site carries a
46
46
/// version conditional inside a _v0 function; the version is chosen by dispatch.
47
+
///
48
+
/// # Parameters
49
+
///
50
+
/// * `address_balances_in_update`: The block's address-balance update map the credits are
51
+
/// merged into, or `None` when the caller does not track them (then nothing is recorded).
52
+
/// * `added_to_balance_outputs`: The credits the event added to each address, if any.
53
+
/// * `origin`: Which event family produced the credits; v0 drops `ShieldedSpend` credits.
54
+
/// * `platform_version`: The platform version.
55
+
///
56
+
/// # Returns
57
+
///
58
+
/// * `Ok(())` once the credits the version records are merged into the map (an existing
59
+
/// `SetCredits` or `AddToCredits` entry grows by the amount, saturating).
60
+
/// * `Err(Error)` when the method version is unknown.
Copy file name to clipboardExpand all lines: packages/rs-drive-abci/src/execution/platform_events/withdrawals/record_credit_inflows_for_withdrawals/mod.rs
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,20 @@ where
21
21
///
22
22
/// Runs as a system event once per block, so nobody pays fees for the write; a block that
23
23
/// minted nothing writes nothing.
24
+
///
25
+
/// # Parameters
26
+
///
27
+
/// * `credit_mints`: The credits the block minted into Platform.
28
+
/// * `block_info`: The block being executed; its time sets when the inflow expires.
29
+
/// * `transaction`: The GroveDB transaction.
30
+
/// * `platform_version`: The platform version.
31
+
///
32
+
/// # Returns
33
+
///
34
+
/// * `Ok(())` once the inflow is recorded, or at once when `credit_mints` is zero or the
35
+
/// protocol version has no credit inflows (the method version is `None`).
36
+
/// * `Err(Error)` when the method version (or the Drive method it calls) is unknown or not
Copy file name to clipboardExpand all lines: packages/rs-drive-abci/src/execution/platform_events/withdrawals/record_total_credits_history_for_withdrawals/mod.rs
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,20 @@ where
21
21
/// move the total in a block) and before the app hash is taken; blocks that leave the total
22
22
/// untouched cost one read and no write. Until an entry is a day old the limit applies its
23
23
/// bootstrap rule, so pooling never depends on this block's entry.
24
+
///
25
+
/// # Parameters
26
+
///
27
+
/// * `block_info`: The block being executed; its time keys the new entry.
28
+
/// * `transaction`: The GroveDB transaction.
29
+
/// * `platform_version`: The platform version; its withdrawal constants bound the prune.
30
+
///
31
+
/// # Returns
32
+
///
33
+
/// * `Ok(())` once the history holds this block's total (unchanged when the total equals the
34
+
/// latest entry), or at once when the protocol version has no history (the method version
35
+
/// is `None`).
36
+
/// * `Err(Error)` when the method version (or the Drive method it calls) is unknown or not
37
+
/// active, the total credits are missing from state, or a read or write fails.
Copy file name to clipboardExpand all lines: packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/data_contract_common/data_contract_reference_validation/mod.rs
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,22 @@ use crate::execution::types::state_transition_execution_context::StateTransition
19
19
/// named) must contain the referenced document type, and that type must forbid
20
20
/// deletion. Identity, contract and token targets declare nothing beyond their
21
21
/// kind, so they have nothing to validate here.
22
+
///
23
+
/// # Parameters
24
+
///
25
+
/// * `contract`: The contract being created or updated, whose declarations are checked.
26
+
/// * `drive`: The Drive that foreign referenced contracts are fetched from.
27
+
/// * `block_info`: The block being executed; its epoch prices the contract fetches.
28
+
/// * `execution_context`: The execution context the contract fetch fees are billed to.
29
+
/// * `transaction`: The GroveDB transaction.
30
+
/// * `platform_version`: The platform version.
31
+
///
32
+
/// # Returns
33
+
///
34
+
/// * `Ok(SimpleConsensusValidationResult)`: valid when every declaration holds, otherwise
35
+
/// carrying the consensus error of the first invalid declaration.
36
+
/// * `Err(Error)` when the method version is unknown, a contract fetch fails or returns no
37
+
/// fee, or checking whether a document type records creator ids fails.
0 commit comments