Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base #65

Merged
merged 93 commits into from
Sep 4, 2024
Merged

Base #65

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
f120111
Initial commit for Base
vlasonfa Dec 22, 2023
402348a
[WIP]Improvements to Base blueprint passing smoke test
vlasonfa Jan 18, 2024
cdd6a87
Merge branch 'main' into base
vlasonfa Jan 18, 2024
241819a
Merge branch 'main' into base
vlasonfa Jan 23, 2024
d894761
Base code changes after e2e testing
vlasonfa Jan 25, 2024
e2a6a04
WIP Base node bug fixes
vlasonfa Jan 29, 2024
0db1d2e
Merge branch 'main' into base
vlasonfa Feb 1, 2024
a42d8ec
Base updates to README
vlasonfa Feb 2, 2024
4a5127c
Base updated documentation
vlasonfa Feb 2, 2024
d7c6b22
Base fixed sync checker L2 blocks behind metric bug
vlasonfa Feb 7, 2024
6207ccd
Base Removed AMB node stack for now
vlasonfa Feb 8, 2024
17608ed
Merge branch 'main' into base
vlasonfa Feb 12, 2024
d8801d5
Remove Goerli / update docs
danyalprout Feb 14, 2024
9add276
Merge pull request #46 from danyalprout/tweaks
frbrkoala Feb 14, 2024
7c7b688
Merge branch 'main' into base
vlasonfa Feb 29, 2024
6eb8489
Merge branch 'main' into base
vlasonfa Mar 4, 2024
7898072
Base. Added newly required param for L1 Consensus URL
vlasonfa Mar 4, 2024
e7543cc
Base. Corrected unite tests after adding new configuration prams
vlasonfa Mar 5, 2024
e1ee12a
Base. WIP. Modifications after testing
vlasonfa Mar 25, 2024
c5fc421
Merge branch 'main' into base
vlasonfa Mar 25, 2024
974900c
Merge branch 'main' into base
vlasonfa Mar 27, 2024
a3462d9
Base Bug fixes in mainnet configuration after testing
vlasonfa Mar 28, 2024
206ee3a
Base. Updates after e2e test
vlasonfa Apr 8, 2024
93b9115
Base. Fixed tests after security group changes
vlasonfa Apr 8, 2024
e2ef039
Base. Added README to the website
vlasonfa Apr 8, 2024
14ee007
Base. Updates after running code scanning tools
vlasonfa Apr 8, 2024
7218d57
Merge branch 'main' into base
vlasonfa Apr 15, 2024
11706ae
Base. Fixed the website
vlasonfa Apr 15, 2024
d92a21b
Merge branch 'main' into base
vlasonfa Apr 24, 2024
0ea2ea5
Base. Debugging deployments and snapshot download
vlasonfa May 6, 2024
75d6ecd
Ethereum. Added S3 buckets for Amazon Linux 2023 repos
vlasonfa May 6, 2024
c800879
Base. Moving to different download method
vlasonfa May 14, 2024
05bcdd6
Base. Refactoring snapshot download.
vlasonfa May 16, 2024
3f73d1b
Base. Debugging snapshot download
vlasonfa May 20, 2024
8bd99d9
Base. Removed ulimit from service startup script
vlasonfa May 21, 2024
7cc335f
Base. Added Instance Store volume option for storage
vlasonfa May 24, 2024
5f0b09f
Base. Added alternative snapshot downloads from S3 URL.
vlasonfa May 27, 2024
4ee8009
Merge branch 'main' into base
vlasonfa May 27, 2024
974315e
Base. Refactoring service start stop configuration
vlasonfa May 28, 2024
34889d1
Base. Refactoring restoration of Archive nodes from snapshots
vlasonfa May 29, 2024
8d8e90d
Base. Fixes in handling snapshot download from Cloudflare
vlasonfa Jun 12, 2024
9313d84
Merge branch 'main' into base
vlasonfa Jun 12, 2024
20fd2d0
Base. Pre-review fixes
vlasonfa Jun 17, 2024
4a168a9
Initial commit for Base
vlasonfa Dec 22, 2023
4f19f17
[WIP]Improvements to Base blueprint passing smoke test
vlasonfa Jan 18, 2024
38212d4
Base code changes after e2e testing
vlasonfa Jan 25, 2024
178c55b
WIP Base node bug fixes
vlasonfa Jan 29, 2024
eef7e23
Base updates to README
vlasonfa Feb 2, 2024
7dd57be
Base updated documentation
vlasonfa Feb 2, 2024
699b482
Base fixed sync checker L2 blocks behind metric bug
vlasonfa Feb 7, 2024
c6f541b
Base Removed AMB node stack for now
vlasonfa Feb 8, 2024
48deb80
Remove Goerli / update docs
danyalprout Feb 14, 2024
8a8981f
Base. Added newly required param for L1 Consensus URL
vlasonfa Mar 4, 2024
dabe6e4
Base. Corrected unite tests after adding new configuration prams
vlasonfa Mar 5, 2024
6dc99cd
Base. WIP. Modifications after testing
vlasonfa Mar 25, 2024
8fcbbb0
Base Bug fixes in mainnet configuration after testing
vlasonfa Mar 28, 2024
4794daf
Base. Updates after e2e test
vlasonfa Apr 8, 2024
aa3c8bc
Base. Fixed tests after security group changes
vlasonfa Apr 8, 2024
01f9490
Base. Added README to the website
vlasonfa Apr 8, 2024
9ed7de6
Base. Updates after running code scanning tools
vlasonfa Apr 8, 2024
e597f68
Base. Fixed the website
vlasonfa Apr 15, 2024
31472b3
Base. Debugging deployments and snapshot download
vlasonfa May 6, 2024
de41e10
Ethereum. Added S3 buckets for Amazon Linux 2023 repos
vlasonfa May 6, 2024
059bc7d
Base. Moving to different download method
vlasonfa May 14, 2024
34ce0c1
Base. Refactoring snapshot download.
vlasonfa May 16, 2024
61657d9
Base. Debugging snapshot download
vlasonfa May 20, 2024
aff0693
Base. Removed ulimit from service startup script
vlasonfa May 21, 2024
035ace2
Base. Added Instance Store volume option for storage
vlasonfa May 24, 2024
8f8e433
Base. Added alternative snapshot downloads from S3 URL.
vlasonfa May 27, 2024
e3e5dca
Base. Refactoring service start stop configuration
vlasonfa May 28, 2024
ec2d273
Base. Refactoring restoration of Archive nodes from snapshots
vlasonfa May 29, 2024
b11dd08
Base. Fixes in handling snapshot download from Cloudflare
vlasonfa Jun 12, 2024
7f3eb45
Base. Pre-review fixes
vlasonfa Jun 17, 2024
4e53fa8
Base. Changed Cloud9 to CloudShell in README
vlasonfa Aug 8, 2024
6068760
Merge branch 'base' of https://github.com/aws-samples/aws-blockchain-…
vlasonfa Aug 8, 2024
46d7a7f
Base. Changed Cloud9 for CloudShell in README
vlasonfa Aug 8, 2024
f9afa41
updated blocksbehind logic for bsc and .env file for base
varnarmat Aug 15, 2024
855bc2f
Base. Fixed user-data after breaking changes in snapshot archive and …
vlasonfa Aug 16, 2024
dfbac2e
Base. Fixed sample configs after testing.
vlasonfa Aug 19, 2024
6dc9a21
Base. Added a note on build time to the README
vlasonfa Aug 20, 2024
e5dc9e3
Merge pull request #111 from varnarmat/base
frbrkoala Aug 20, 2024
c02b543
Merge branch 'main' into base
vlasonfa Aug 21, 2024
3d513a9
Base. Moved configuration of CloudWatch Agent to the end of user-data…
vlasonfa Aug 23, 2024
f95057f
Merge branch 'main' into base
vlasonfa Aug 23, 2024
a031ef7
Base. Switched all sample configs to Sepolia
vlasonfa Aug 26, 2024
96c392f
Base. Added cdk-nag to app.ts and more run commends to package.json
vlasonfa Aug 28, 2024
6675342
Base. Updated documentation to change the docker container names for …
vlasonfa Aug 28, 2024
979996f
Base. Reduced swap size to 5GB only
vlasonfa Aug 30, 2024
9e0878d
Base. Restricted snapshot download to a single conection only
vlasonfa Sep 3, 2024
db26b47
Base. Final changes in documentation after review
vlasonfa Sep 4, 2024
d3e9109
Merge branch 'main' into base
frbrkoala Sep 4, 2024
3c4f386
Merge branch 'main' into base
varnarmat Sep 4, 2024
69c8344
base premerge review
varnarmat Sep 4, 2024
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
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ repos:
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: forbid-submodules
- repo: https://github.com/iamthefij/docker-pre-commit
rev: master
hooks:
- id: docker-compose-check
11 changes: 11 additions & 0 deletions lib/base/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.js
!jest.config.js
*.d.ts
node_modules

# CDK asset staging directory
.cdk.staging
cdk.out
.idea

*-node.json
6 changes: 6 additions & 0 deletions lib/base/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.ts
!*.d.ts

# CDK asset staging directory
.cdk.staging
cdk.out
294 changes: 294 additions & 0 deletions lib/base/README.md

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions lib/base/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env node
import 'dotenv/config'
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import * as nag from "cdk-nag";
import * as config from "./lib/config/baseConfig";
import {BaseCommonStack} from "./lib/common-stack";
import {BaseSingleNodeStack} from "./lib/single-node-stack";
import {BaseHANodesStack} from "./lib/ha-nodes-stack";

const app = new cdk.App();
cdk.Tags.of(app).add("Project", "AWSBase");

new BaseCommonStack(app, "base-common", {
stackName: `base-nodes-common`,
env: { account: config.baseConfig.accountId, region: config.baseConfig.region },
});

new BaseSingleNodeStack(app, "base-single-node", {
stackName: `base-single-node-${config.baseNodeConfig.baseNodeConfiguration}-${config.baseNodeConfig.baseNetworkId}`,
env: { account: config.baseConfig.accountId, region: config.baseConfig.region },

instanceType: config.baseNodeConfig.instanceType,
instanceCpuType: config.baseNodeConfig.instanceCpuType,
baseNetworkId: config.baseNodeConfig.baseNetworkId,
baseNodeConfiguration: config.baseNodeConfig.baseNodeConfiguration,
restoreFromSnapshot: config.baseNodeConfig.restoreFromSnapshot,
l1ExecutionEndpoint: config.baseNodeConfig.l1ExecutionEndpoint,
l1ConsensusEndpoint: config.baseNodeConfig.l1ConsensusEndpoint,
snapshotUrl: config.baseNodeConfig.snapshotUrl,
dataVolume: config.baseNodeConfig.dataVolume,
});

new BaseHANodesStack(app, "base-ha-nodes", {
stackName: `base-ha-nodes-${config.baseNodeConfig.baseNodeConfiguration}-${config.baseNodeConfig.baseNetworkId}`,
env: { account: config.baseConfig.accountId, region: config.baseConfig.region },

instanceType: config.baseNodeConfig.instanceType,
instanceCpuType: config.baseNodeConfig.instanceCpuType,
baseNetworkId: config.baseNodeConfig.baseNetworkId,
baseNodeConfiguration: config.baseNodeConfig.baseNodeConfiguration,
restoreFromSnapshot: config.baseNodeConfig.restoreFromSnapshot,
l1ExecutionEndpoint: config.baseNodeConfig.l1ExecutionEndpoint,
l1ConsensusEndpoint: config.baseNodeConfig.l1ConsensusEndpoint,
snapshotUrl: config.baseNodeConfig.snapshotUrl,
dataVolume: config.baseNodeConfig.dataVolume,

albHealthCheckGracePeriodMin: config.haNodeConfig.albHealthCheckGracePeriodMin,
heartBeatDelayMin: config.haNodeConfig.heartBeatDelayMin,
numberOfNodes: config.haNodeConfig.numberOfNodes
});

// Security Check
cdk.Aspects.of(app).add(
new nag.AwsSolutionsChecks({
verbose: false,
reports: true,
logIgnores: false,
})
);
57 changes: 57 additions & 0 deletions lib/base/cdk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"app": "npx ts-node --prefer-ts-exts app.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
"@aws-cdk/core:checkSecretUsage": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
],
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
"@aws-cdk/aws-iam:minimizePolicies": true,
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
"@aws-cdk/core:enablePartitionLiterals": true,
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
"@aws-cdk/aws-iam:standardizedServicePrincipals": true,
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true,
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
"@aws-cdk/aws-route53-patters:useCertificate": true,
"@aws-cdk/customresources:installLatestAwsSdkDefault": false,
"@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true,
"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true,
"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true,
"@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true,
"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true,
"@aws-cdk/aws-redshift:columnId": true,
"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true,
"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true,
"@aws-cdk/aws-apigateway:requestValidatorUniqueId": true,
"@aws-cdk/aws-kms:aliasNameRef": true,
"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true,
"@aws-cdk/core:includePrefixInUniqueNameGeneration": true,
"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true
}
}
Binary file added lib/base/doc/assets/Architecture-HA-nodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading