Skip to content
Permalink
Browse files

Add diagram for applyTransaction flowchart

  • Loading branch information...
palas committed Apr 10, 2019
1 parent 5e416b7 commit cad1d9c2942d9ec090bdc96634d22276aad1fc00
Showing with 213 additions and 0 deletions.
  1. +213 −0 docs/tutorial-v2.0/pix/flowchart.svg
@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/PR-SVG-20010719/DTD/svg10.dtd">
<svg width="30cm" height="55cm" viewBox="58 48 583 1086" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g>
<rect style="fill: #ffffff" x="60" y="49.3889" width="580" height="1083.86"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="60" y="49.3889" width="580" height="1083.86"/>
<text font-size="19.7553" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="350" y="78.7389">
<tspan x="350" y="78.7389">Transaction processing</tspan>
<tspan x="350" y="103.433"></tspan>
<tspan x="350" y="128.128"></tspan>
<tspan x="350" y="152.822"></tspan>
<tspan x="350" y="177.517"></tspan>
<tspan x="350" y="202.211"></tspan>
<tspan x="350" y="226.906"></tspan>
<tspan x="350" y="251.6"></tspan>
<tspan x="350" y="276.294"></tspan>
<tspan x="350" y="300.989"></tspan>
<tspan x="350" y="325.683"></tspan>
<tspan x="350" y="350.378"></tspan>
<tspan x="350" y="375.072"></tspan>
<tspan x="350" y="399.767"></tspan>
<tspan x="350" y="424.461"></tspan>
<tspan x="350" y="449.156"></tspan>
<tspan x="350" y="473.85"></tspan>
<tspan x="350" y="498.544"></tspan>
<tspan x="350" y="523.239"></tspan>
<tspan x="350" y="547.933"></tspan>
<tspan x="350" y="572.628"></tspan>
<tspan x="350" y="597.322"></tspan>
<tspan x="350" y="622.017"></tspan>
<tspan x="350" y="646.711"></tspan>
<tspan x="350" y="671.406"></tspan>
<tspan x="350" y="696.1"></tspan>
<tspan x="350" y="720.794"></tspan>
<tspan x="350" y="745.489"></tspan>
<tspan x="350" y="770.183"></tspan>
<tspan x="350" y="794.878"></tspan>
<tspan x="350" y="819.572"></tspan>
<tspan x="350" y="844.267"></tspan>
<tspan x="350" y="868.961"></tspan>
<tspan x="350" y="893.656"></tspan>
<tspan x="350" y="918.35"></tspan>
<tspan x="350" y="943.044"></tspan>
<tspan x="350" y="967.739"></tspan>
<tspan x="350" y="992.433"></tspan>
<tspan x="350" y="1017.13"></tspan>
<tspan x="350" y="1041.82"></tspan>
<tspan x="350" y="1066.52"></tspan>
<tspan x="350" y="1091.21"></tspan>
<tspan x="350" y="1115.91"></tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="279.5" y="120" width="141" height="54"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="279.5" y="120" width="141" height="54"/>
<text font-size="12.8" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="350" y="150.9">
<tspan x="350" y="150.9">expireCommits</tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="80" y="300" width="540" height="640"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="80" y="300" width="540" height="640"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="350" y="623.9">
<tspan x="350" y="623.9"></tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="100" y="468.724" width="240" height="380"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="100" y="468.724" width="240" height="380"/>
</g>
<g>
<rect style="fill: #ffffff" x="340" y="468.724" width="260" height="380"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="340" y="468.724" width="260" height="380"/>
</g>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="100" y="320">
<tspan x="100" y="320">For each Input in the transaction:</tspan>
</text>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="350" y1="174" x2="350" y2="201.888"/>
<polygon style="fill: #000000" points="350,209.388 345,199.388 350,201.888 355,199.388 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="350,209.388 345,199.388 350,201.888 355,199.388 "/>
</g>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="100" y="440">
<tspan x="100" y="440"></tspan>
</text>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="120" y="488.724">
<tspan x="120" y="488.724">If input is an Action</tspan>
<tspan x="120" y="504.724">(Commit or Pay):</tspan>
</text>
<g>
<rect style="fill: #ffffff" x="130" y="528.724" width="180" height="49"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="130" y="528.724" width="180" height="49"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="220" y="557.124">
<tspan x="220" y="557.124">fetchPrimitive</tspan>
</text>
</g>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="320" y="368.724">
<tspan x="320" y="368.724"></tspan>
</text>
<g>
<rect style="fill: #ffffff" x="197.162" y="339.198" width="285.55" height="102"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="197.162" y="339.198" width="285.55" height="102"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="339.937" y="370.098">
<tspan x="339.937" y="370.098">addAnyInput</tspan>
<tspan x="339.937" y="386.098"></tspan>
<tspan x="339.937" y="402.098">(check input is not duplicated</tspan>
<tspan x="339.937" y="418.098">and add input to the state)</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="339.937" y1="441.198" x2="339.978" y2="458.988"/>
<polygon style="fill: #000000" points="339.995,466.488 334.972,456.499 339.978,458.988 344.972,456.477 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="339.995,466.488 334.972,456.499 339.978,458.988 344.972,456.477 "/>
</g>
<g>
<rect style="fill: #ffffff" x="130" y="608.724" width="180" height="49"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="130" y="608.724" width="180" height="49"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="220" y="637.124">
<tspan x="220" y="637.124">eval</tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="113.9" y="686.224" width="212.2" height="54"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="113.9" y="686.224" width="212.2" height="54"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="220" y="709.124">
<tspan x="220" y="709.124">assert:</tspan>
<tspan x="220" y="725.124">isTransactionNegative = false</tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="110.525" y="766.224" width="218.95" height="54"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="110.525" y="766.224" width="218.95" height="54"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="220" y="789.124">
<tspan x="220" y="789.124">assert:</tspan>
<tspan x="220" y="805.124">arePermissionsValid = true</tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="356.275" y="640" width="227.45" height="54"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="356.275" y="640" width="227.45" height="54"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="470" y="662.9">
<tspan x="470" y="662.9">assert:</tspan>
<tspan x="470" y="678.9">areInputPermissionsValid = true</tspan>
</text>
</g>
<text font-size="12.7998" style="fill: #000000;text-anchor:start;font-family:sans-serif;font-style:normal;font-weight:normal" x="360" y="488.724">
<tspan x="360" y="488.724">Otherwise</tspan>
<tspan x="360" y="504.724">(Choice or Oracle):</tspan>
</text>
<g>
<rect style="fill: #ffffff" x="239.937" y="874.832" width="200" height="49"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="239.937" y="874.832" width="200" height="49"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="339.937" y="903.232">
<tspan x="339.937" y="903.232">reduce</tspan>
</text>
</g>
<g>
<rect style="fill: #ffffff" x="280" y="211.625" width="140" height="49"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="280" y="211.625" width="140" height="49"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="350" y="240.025">
<tspan x="350" y="240.025">reduce</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="350" y1="260.625" x2="350" y2="290.264"/>
<polygon style="fill: #000000" points="350,297.764 345,287.764 350,290.264 355,287.764 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="350,297.764 345,287.764 350,290.264 355,287.764 "/>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="220" y1="578.712" x2="220" y2="598"/>
<polygon style="fill: #000000" points="220,605.5 215,595.5 220,598 225,595.5 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="220,605.5 215,595.5 220,598 225,595.5 "/>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="220" y1="658.712" x2="220" y2="675.5"/>
<polygon style="fill: #000000" points="220,683 215,673 220,675.5 225,673 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="220,683 215,673 220,675.5 225,673 "/>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="220" y1="741.212" x2="220" y2="755.5"/>
<polygon style="fill: #000000" points="220,763 215,753 220,755.5 225,753 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="220,763 215,753 220,755.5 225,753 "/>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="340" y1="848.724" x2="339.96" y2="865.096"/>
<polygon style="fill: #000000" points="339.942,872.596 334.967,862.584 339.96,865.096 344.967,862.608 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="339.942,872.596 334.967,862.584 339.96,865.096 344.967,862.608 "/>
</g>
<g>
<rect style="fill: #ffffff" x="250" y="960" width="200" height="54"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="250" y="960" width="200" height="54"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="350" y="990.9">
<tspan x="350" y="990.9">redeemMoney</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="350" y1="940" x2="350" y2="950.264"/>
<polygon style="fill: #000000" points="350,957.764 345,947.764 350,950.264 355,947.764 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="350,957.764 345,947.764 350,950.264 355,947.764 "/>
</g>
<g>
<rect style="fill: #ffffff" x="250" y="1040" width="200" height="54"/>
<rect style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x="250" y="1040" width="200" height="54"/>
<text font-size="12.7998" style="fill: #000000;text-anchor:middle;font-family:sans-serif;font-style:normal;font-weight:normal" x="350" y="1070.9">
<tspan x="350" y="1070.9">simplify</tspan>
</text>
</g>
<g>
<line style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" x1="350" y1="1014" x2="350" y2="1030.26"/>
<polygon style="fill: #000000" points="350,1037.76 345,1027.76 350,1030.26 355,1027.76 "/>
<polygon style="fill: none; fill-opacity:0; stroke-width: 2; stroke: #000000" points="350,1037.76 345,1027.76 350,1030.26 355,1027.76 "/>
</g>
</svg>

0 comments on commit cad1d9c

Please sign in to comment.
You can’t perform that action at this time.