Skip to content

Instantly share code, notes, and snippets.

@yoshihiro503
Last active May 15, 2025 08:55
Show Gist options
  • Save yoshihiro503/83bf22b726bd5416f65edcffa268fb6a to your computer and use it in GitHub Desktop.
Save yoshihiro503/83bf22b726bd5416f65edcffa268fb6a to your computer and use it in GitHub Desktop.

Alt text

#CUT
digraph G {
    aize ="4,4";
    subgraph cluster_public {
        label="Public";
        Start [shape=box];
        RegisterTasks [shape=box, layer=cluster_public];
        Stop [shape=box];
    };
    startPollingForNoAck;
    Start -> startPollingForNoAck [color="black:white:black"];
    sendCheckpointToHeimdall;
    sendCheckpointToRootchain;
    RegisterTasks -> sendCheckpointToHeimdall, sendCheckpointToRootchain [style=dotted];
    handleCheckpointNoAck;
    startPollingForNoAck -> handleCheckpointNoAck [color="black:white:black",label=n];
    nextExpectedCheckpoint;
    sendCheckpointToHeimdall -> nextExpectedCheckpoint [color=red];
    createAndSendCheckpointToRootchain;
    sendCheckpointToRootchain -> createAndSendCheckpointToRootchain [color=red]; 

    getLatestCheckpointTime;
    handleCheckpointNoAck -> getLatestCheckpointTime [color=red];
    shouldSendCheckpoint;
    sendCheckpointToRootchain, createAndSendCheckpointToRootchain -> shouldSendCheckpoint [color=red];

    subgraph cluster_rootchain_contract {
        label="Rootchain Contract";
    
        node [shape=box,style=filled,color=".9 .3 1.0"];
        headerBlocks;
        currentHeaderBlock;
        getLastChildBlock;
        submitCheckpoint;
    }
    nextExpectedCheckpoint, getLatestCheckpointTime -> headerBlocks;
    nextExpectedCheckpoint, getLatestCheckpointTime -> currentHeaderBlock;
    shouldSendCheckpoint -> getLastChildBlock;
    createAndSendCheckpointToRootchain -> submitCheckpoint;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment