Skip to content

Latest commit

 

History

History
83 lines (66 loc) · 1.81 KB

README.md

File metadata and controls

83 lines (66 loc) · 1.81 KB

Top level triggers

  1. New message on messaging layer
    1. Comms
    2. Incoming blocks
    3. metadata service
  2. New RPC messages
  3. Timed triggers
    1. state machine
  4. Start up triggers
  5. New GRPC messages
  6. New CLI messages

Schema/Diagram key/legend Notation

Commit link and diagram version

flowchart TD
 N1[version: v0.x</br>commit: xxxxxx]
 N1:::meta
 classDef meta fill:#b11,stroke:#ccc

Loading

Data access is denoted like this,

flowchart TD
  A[(database method call)]
Loading

Source code link

flowchart TD
 A -.- N1>file_name : line 460]
 N1:::note
 classDef note fill:#eee,stroke:#ccc

Loading

Calling a method vs next method in flow

In a flow diagram it's not always clear if an arrow leading to another method or process is called (as in step into) or if it is the next method called in sequence. We suggest using the following notation to make it clear.

For example, consider this code:

fn attempt_sync() {
    let sync_method = determine_sync_method();
    if sync_method {
        do_something();
        do_next_thing();
    }
}

fn determine_sync_method() -> bool {
    let sync_method = some_logic();
    if sync_method {
        some_other_logic();
    }
    sync_method
}
flowchart TD
 A[attempt_sync] --> B[[determine_sync_method]] --"(calls)"--> B1["s = some_logic()"]
 
Loading
flowchart TD
 C[attempt_sync] --> D["sync_method = determine_sync_method"]
 D--> E{"sync_method"}
 E --"true"--> F["do_something()"]
 F-->F1["do_next_thing()"]
 E --"false"--> G["return"]
 F1 --> G
Loading

A subgraph can also be used, but sometimes it might be easier to use the "(calls)" notation to show that a process is inside of a method call, and not the next one in sequence.