Skip to content
Merged
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
23 changes: 23 additions & 0 deletions crates/node-types/src/action.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//! # Action
//!
//! Actions use predicates to generate solutions.

use essential_types::{PredicateAddress, Value};

/// Actions represent are used as the input to solve a predicate
/// and generate a [`Solution`](essential_types::Solution).
pub struct Action {
/// The predicate that will be solved by this action.
pub predicate_to_solve: PredicateAddress,
/// The inputs to the predicate.
pub inputs: Vec<Value>,
}
Comment thread
nfurfaro marked this conversation as resolved.

/// An atomic unordered set of actions.
/// These all occur at the same time.
/// It is invalid for the solutions generated
/// by these actions to mutate the same keys.
pub struct ActionSet {
/// An unordered set of actions.
pub actions: Vec<Action>,
}
1 change: 1 addition & 0 deletions crates/node-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use essential_types::{
};
use serde::{Deserialize, Serialize};

pub mod action;
pub mod block;

/// Wrappers around tokio's `watch` channel for notifying of new blocks.
Expand Down
Loading