Skip to content

Commit ff2421e

Browse files
authored
Merge pull request #63 from aws-samples/wax
Wax
2 parents 8d3b7f2 + a647692 commit ff2421e

File tree

4 files changed

+119
-0
lines changed

4 files changed

+119
-0
lines changed

lib/wax/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Sample CDK app for WAX Nodes
2+
3+
| Contributed by |
4+
|:--------------------:|
5+
| [worldwide-asset-exchange](https://github.com/worldwide-asset-exchange/)|
6+
7+
WAX is a blockchain-based system designed for gaming industry. It provides high transaction throughput and near-instant block finality. The WAX team has created a AWS Cloud Development Kit (CDK) application to deploy WAX nodes on AWS for development, testing, or Proof of Concept purposes. See the application along with deployment instructions at [WAX-AWS-CDK](https://github.com/worldwide-asset-exchange/wax-aws-cdk). You can see the deployment architecture blow and for a deep dive look at [Run a WAX Blockchain node using AWS CDK](https://aws.amazon.com/blogs/database/run-a-wax-blockchain-node-using-aws-cdk/)
8+
9+
## Overview of Deployment Architecture
10+
11+
![Single Nodes Deployment](./doc/assets/Architecture-SingleNode.drawio.png)
12+
13+
The [AWS CDK stack](https://github.com/worldwide-asset-exchange/wax-aws-cdk) has the following features:
14+
15+
1. Only peer-to-peer connections are allowed with the Internet to synchronize with other WAX nodes
16+
2. Multiple processes run on a single Amazon Elastic Compute Cloud (Amazon EC2) instance:
17+
- A [Docker container](https://www.docker.com/resources/what-container/) with the WAX node in one of two possible configurations (API or Ship node)
18+
- A [Telegraf agent](https://www.influxdata.com/time-series-platform/telegraf/) to collect CPU, disk, I/O, and networking metrics for internal monitoring tools
19+
- [Victoria Metrics](https://victoriametrics.com/), a time series database for storing the metrics from Telegraf and WAX nodes
20+
- A [Grafana dashboard](https://grafana.com/) to display key system and blockchain metrics from CPU and disc usage to synced blocks and sync difference
21+
3. By default, all API ports, including the one for the Grafana web user interface, are available only to IP addresses from within the same VPC.
22+
4. The logs of the WAX node are published to Amazon CloudWatch.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<mxfile host="Electron" modified="2024-02-21T23:23:52.377Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/23.0.2 Chrome/120.0.6099.109 Electron/28.1.0 Safari/537.36" etag="GqVFxIDaXcXJxeY3Cf-5" version="23.0.2" type="device">
2+
<diagram name="Single node" id="x4TNpdqoHl5asDUS4WaB">
3+
<mxGraphModel dx="1120" dy="854" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="OX_zlI_0chY2JoXTOn6b-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="OX_zlI_0chY2JoXTOn6b-1" target="OX_zlI_0chY2JoXTOn6b-6" edge="1">
8+
<mxGeometry relative="1" as="geometry" />
9+
</mxCell>
10+
<mxCell id="OX_zlI_0chY2JoXTOn6b-1" value="WAX&lt;br&gt;Blockchain&lt;br&gt;Network" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" parent="1" vertex="1">
11+
<mxGeometry x="160" y="420" width="120" height="80" as="geometry" />
12+
</mxCell>
13+
<mxCell id="OX_zlI_0chY2JoXTOn6b-2" value="AWS Account" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=1;pointerEvents=0;collapsible=0;recursiveResize=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_aws_cloud_alt;strokeColor=#232F3E;fillColor=none;verticalAlign=top;align=left;spacingLeft=30;fontColor=#232F3E;dashed=0;" parent="1" vertex="1">
14+
<mxGeometry x="330" y="310" width="940" height="420" as="geometry" />
15+
</mxCell>
16+
<mxCell id="OX_zlI_0chY2JoXTOn6b-7" value="Public subnet" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=1;pointerEvents=0;collapsible=0;recursiveResize=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_security_group;grStroke=0;strokeColor=#7AA116;fillColor=#F2F6E8;verticalAlign=top;align=left;spacingLeft=30;fontColor=#248814;dashed=0;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
17+
<mxGeometry x="200" y="70" width="380" height="270" as="geometry" />
18+
</mxCell>
19+
<mxCell id="OX_zlI_0chY2JoXTOn6b-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="OX_zlI_0chY2JoXTOn6b-2" source="OX_zlI_0chY2JoXTOn6b-6" edge="1">
20+
<mxGeometry relative="1" as="geometry">
21+
<mxPoint x="260" y="150" as="targetPoint" />
22+
</mxGeometry>
23+
</mxCell>
24+
<mxCell id="OX_zlI_0chY2JoXTOn6b-6" value="Internet Gateway" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#8C4FFF;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.internet_gateway;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
25+
<mxGeometry x="90" y="111" width="78" height="78" as="geometry" />
26+
</mxCell>
27+
<mxCell id="OX_zlI_0chY2JoXTOn6b-11" value="Self-built and run DApps" style="rounded=0;whiteSpace=wrap;html=1;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
28+
<mxGeometry x="640" y="160" width="120" height="60" as="geometry" />
29+
</mxCell>
30+
<mxCell id="OX_zlI_0chY2JoXTOn6b-21" value="&lt;font style=&quot;font-size: 14px;&quot; color=&quot;#ffffff&quot;&gt;1&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#FF8800;fillColor=#FF8800;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
31+
<mxGeometry x="114" y="76" width="30" height="30" as="geometry" />
32+
</mxCell>
33+
<mxCell id="IH9-5eQ_SOQHSwX34WHm-17" value="Default VPC" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=0;pointerEvents=0;collapsible=0;recursiveResize=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_vpc;strokeColor=#248814;fillColor=none;verticalAlign=top;align=left;spacingLeft=30;fontColor=#AAB7B8;dashed=0;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
34+
<mxGeometry x="50" y="35" width="750" height="365" as="geometry" />
35+
</mxCell>
36+
<mxCell id="OX_zlI_0chY2JoXTOn6b-16" value="Amazon CloudWatch&lt;br&gt;WAX Logs" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#E7157B;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.cloudwatch_2;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
37+
<mxGeometry x="830" y="189" width="78" height="78" as="geometry" />
38+
</mxCell>
39+
<mxCell id="u0Xdru4RK1r6j2e7EFXk-1" value="EC2 instance contents for WAX node" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=1;pointerEvents=0;collapsible=0;recursiveResize=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_ec2_instance_contents;strokeColor=#D86613;fillColor=none;verticalAlign=top;align=left;spacingLeft=30;fontColor=#D86613;dashed=0;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
40+
<mxGeometry x="260" y="120" width="300" height="200" as="geometry" />
41+
</mxCell>
42+
<mxCell id="OX_zlI_0chY2JoXTOn6b-22" value="&lt;font style=&quot;font-size: 14px;&quot; color=&quot;#ffffff&quot;&gt;2&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#FF8800;fillColor=#FF8800;" parent="u0Xdru4RK1r6j2e7EFXk-1" vertex="1">
43+
<mxGeometry x="-20" y="85" width="30" height="30" as="geometry" />
44+
</mxCell>
45+
<mxCell id="TfUQWKEs04p7YS6zo7lr-1" value="Telegraf Agent" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#ED7100;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.container_1;" vertex="1" parent="u0Xdru4RK1r6j2e7EFXk-1">
46+
<mxGeometry x="56" y="54.5" width="48" height="31" as="geometry" />
47+
</mxCell>
48+
<mxCell id="TfUQWKEs04p7YS6zo7lr-2" value="Victoria Metrics" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#ED7100;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.container_1;" vertex="1" parent="u0Xdru4RK1r6j2e7EFXk-1">
49+
<mxGeometry x="56" y="134.5" width="48" height="31" as="geometry" />
50+
</mxCell>
51+
<mxCell id="TfUQWKEs04p7YS6zo7lr-3" value="Grafana Dashboard" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#ED7100;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.container_1;" vertex="1" parent="u0Xdru4RK1r6j2e7EFXk-1">
52+
<mxGeometry x="190" y="134.5" width="48" height="31" as="geometry" />
53+
</mxCell>
54+
<mxCell id="TfUQWKEs04p7YS6zo7lr-4" value="WAX node &lt;br&gt;Docker Container" style="sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;fillColor=#ED7100;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.container_1;" vertex="1" parent="u0Xdru4RK1r6j2e7EFXk-1">
55+
<mxGeometry x="190" y="54.5" width="48" height="31" as="geometry" />
56+
</mxCell>
57+
<mxCell id="u0Xdru4RK1r6j2e7EFXk-6" value="Administration and Development tools" style="rounded=0;whiteSpace=wrap;html=1;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
58+
<mxGeometry x="640" y="240" width="120" height="60" as="geometry" />
59+
</mxCell>
60+
<mxCell id="u0Xdru4RK1r6j2e7EFXk-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="OX_zlI_0chY2JoXTOn6b-2" source="TfUQWKEs04p7YS6zo7lr-4" target="OX_zlI_0chY2JoXTOn6b-11" edge="1">
61+
<mxGeometry relative="1" as="geometry">
62+
<mxPoint x="540" y="190" as="sourcePoint" />
63+
</mxGeometry>
64+
</mxCell>
65+
<mxCell id="u0Xdru4RK1r6j2e7EFXk-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="OX_zlI_0chY2JoXTOn6b-2" source="TfUQWKEs04p7YS6zo7lr-3" target="u0Xdru4RK1r6j2e7EFXk-6" edge="1">
66+
<mxGeometry relative="1" as="geometry">
67+
<mxPoint x="540" y="270" as="sourcePoint" />
68+
</mxGeometry>
69+
</mxCell>
70+
<mxCell id="u0Xdru4RK1r6j2e7EFXk-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="OX_zlI_0chY2JoXTOn6b-2" source="u0Xdru4RK1r6j2e7EFXk-1" target="OX_zlI_0chY2JoXTOn6b-16" edge="1">
71+
<mxGeometry relative="1" as="geometry">
72+
<Array as="points">
73+
<mxPoint x="410" y="380" />
74+
<mxPoint x="780" y="380" />
75+
<mxPoint x="780" y="228" />
76+
</Array>
77+
</mxGeometry>
78+
</mxCell>
79+
<mxCell id="OX_zlI_0chY2JoXTOn6b-25" value="&lt;font color=&quot;#ffffff&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;3&lt;/span&gt;&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#FF8800;fillColor=#FF8800;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
80+
<mxGeometry x="590" y="150" width="30" height="30" as="geometry" />
81+
</mxCell>
82+
<mxCell id="OX_zlI_0chY2JoXTOn6b-24" value="&lt;font style=&quot;font-size: 14px;&quot; color=&quot;#ffffff&quot;&gt;4&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#FF8800;fillColor=#FF8800;" parent="OX_zlI_0chY2JoXTOn6b-2" vertex="1">
83+
<mxGeometry x="600" y="340" width="30" height="30" as="geometry" />
84+
</mxCell>
85+
</root>
86+
</mxGraphModel>
87+
</diagram>
88+
</mxfile>
82.1 KB
Loading

website/docs/Blueprints/Wax.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
sidebar_position: 6
3+
sidebar_label: WAX
4+
---
5+
#
6+
7+
import Readme from '../../../lib/wax/README.md';
8+
9+
<Readme />

0 commit comments

Comments
 (0)