New user sign up using AWS Builder ID
New user sign up using AWS Builder ID is currently unavailable on re:Post. To sign up, please use the AWS Management Console instead.
Get Started With Building Ethereum Applications on the Base Blockchain using AWS Blockchain Node Runners
Base, a Layer 2 blockchain network built by Coinbase, addresses Ethereum's scaling challenges while maintaining compatibility with the Ethereum ecosystem. AWS Blockchain Node Runners provides a simplified solution for building applications on Base through a blueprint featuring pre-built automations and configurable EC2 instances, supporting both standalone and highly available setups. Additionally, AWS offers free access to Base blockchain data through their Public Blockchain Datasets.
As Ethereum adoption grows, there has been a need for scalable infrastructure. This rise in demand has lead to creating Layer 2 blockchain networks. They are separate from Ethereum Mainnet and Testnets, but leverage the data integrity guarantees of Ethereum. Base is a Layer 2 blockchain network built by Coinbase with an open-source stack called the OP Stack. The OP Stack was created to simplify the development of public Layer 2 blockchain networks fully compatible with the Ethereum ecosystem, allowing developers to migrate their decentralized applications without extensive rewrites.
On the Base network, developers are building a wide range of decentralized applications (dApps), including Web3 gaming platforms, decentralized exchanges (DEXs), and digital asset marketplaces. To build these dApps, developers need to access the Base network. This can be challenging as it requires proper connection through EVM-compatible wallets, which involves adding Base as a custom network and ensuring correct configuration settings. If any of these steps are misconfigured, it can lead to errors that are difficult to troubleshoot. To avoid these issues, developers can deploy their dApps directly on Base by running their own nodes. Operating dedicated nodes provides more reliable network interaction and helps avoid the bottlenecks and rate limiting commonly associated with third-party node providers.
However, operating your own nodes can be challenging as well. While deploying Base blockchain nodes on AWS can help you integrate into the other AWS services easily, it still involves multiple manual steps. The Base blueprint now published within the AWS Blockchain Node Runners (Node Runners) open-source initiative helps to simplify it with pre-built automations. The blueprint comes with sample configuration files the allow to change EC2 instance types and sizes, discs configuration, and further configure setup scripts to get a node up and running as fast as possible.
Exploring the Optimistic Rollups and OP Stack
The OP Stack allows to build Layer 2 networks levering optimistic rollups. Initially, a special type of nodes called sequencers create blocks by bundling multiple transactions outside of Ethereum’s Mainnet or Sepolia. Then sequencers periodically saves Merkle root of the current state (state root) as calldata by calling a function of a smart contract pre-installed on Ethereum network. At this point the system assumes all transactions and state transitions are valid by default. The correctness of the state root can be challenged within a pre-defined challenge period (typically 7 days) by the network of challengers by submitting fraud proofs. Finally, the state transition has not been challenged successfully within the challenge period, the state root is considered final, otherwise, if the fraud is proven, the invalid state root is removed. To create a separate Layer 2 blockchain network like the Base, the operator needs to install their own smart contract to store the state roots and run a network of sequencers to produce blocks. All nodes on the network will use those sequencers to submit transactions and receive new blocks, while checking the correctness of state roots against the data stored on Ethereum. For example, for Base a configuration file sets parameters to connect OP Stacks nodes with specific sequencer nodes for Base Mainnet or Sepolia networks and, to double-check state roots, with Ethereum node on Mainnet or Sepolia.
Another important aspect of the OP Stack is its compatibility with the Ethereum Virtual Machine (EVM) that allows developers to leverage tools and standards from the existing Ethereum ecosystem. When building decentralized applications (dApps) on AWS, some developers prefer to have tighter control on the blockchain nodes they connect to and they chose to run self-managed Base nodes to achieve it.
Deploying self-managed Base nodes on AWS
The selection of suitable compute and storage configuration for running blockchain nodes is the most common problem for self-managed deployments. In the Base node blueprint that was published as part of the AWS Blockchain Node Runners initiative, we suggest to use Elastic Compute Cloud (EC2) instances powered by AWS Graviton 3 processors. AWS Graviton processors based on ARM processor architecture and designed for achieve better performance a lower costs on cloud. They also use up to 60% less energy than the processors based on x86 architecture with comparable performance. If needed, you can change your configuration in the configuration file, to switch to higher size or a different platform.
The blueprint for Base node can be deployed with a few commands and you can deploy the nodes as standalone single node or you can use a highly available setup with multiple RPC nodes managed by an Auto Scaling group that is run behind an Application Load Balancer. You can opt to deploy a single standalone node for any non-production simple workloads, that require limited resources and for quick testing purposes. The highly available (HA) setup would be for more complex workloads that require high availability and fault tolerance. It is important to note that AWS Blockchain is not particularly designed for production ready workloads. Before using the Base blueprint for production, you will have to do your own research and make sure you know the limitations of Base blueprint before actually using them.
As Base is a L2 chain, you will need to access an Ethereum Layer 1 (L1) node in order to deploy Base nodes. You can alternately opt to use the providers recommended by Base, but in order to run with AWS Blockchain Node Runners, first deploy a single node Ethereum node with the geth-lighthouse combination using the Node Runners Ethereum blueprint. In addition to the m7g.2xlarge EC2 instance, the Sepolia deployment should leverage 1.5TiB of Elastic Block Storage (EBS) volume with at least 5000 IOPS to store the state and for Mainnet you will need a larger EBS gp3 volume size of 4.1TiB. This provisioned 5000 IOPS requirement is necessary to handle the higher transaction throughput requirements compared to the Ethereum Layer 1 networks.
When building EVM-compatible decentralized applications (dApps), you will not only need access to nodes for blockchains supported in your application, but also archival blockchain data for those chains. In 2024, the AWS Public Blockchain Datasets were expanded to provide free access to Base blockchain data. The addition of Base blockchain data opens up new the possibilities for blockchain research, analytics, and applications on AWS across multiple chains such as Ethereum, Bitcoin, Arbitrum and more.
In 2022, we launched the AWS Public Blockchain Datasets to provide researchers and developers with free access to blockchain data. The datasets are stored as Parquet files in Amazon S3, partitioned by date for optimal query performance. In collaboration with SonarX, an AWS Partner specializing in blockchain data indexing, we ensure these datasets are regularly updated and maintain high quality standards. Consider using these open datasets in your application as you build onchain!
Conclusion
This blog post explores what are Layer 2 blockchain networks in Ethereum ecosystem and how Base is built on with OP Stack and leveraging optimistic rollup protocol. The post highlights a blueprint to simplify the deployment of Base nodes on AWS, published as part of AWS Blockchain Node Runners initiative. By running self-managed Base nodes on AWS, developers can have greater control over the blockchain nodes they connect to when building decentralized applications (dApps). The Base node blueprint offers a streamlined approach for developers to explore the benefits of this Layer 2 solution. Developers interested in building Ethereum-compatible applications on AWS can now explore the Base node blueprint and the resources available within the AWS Blockchain Node Runners initiative. Check out our Base Node Runners blueprint and the Base datasets on AWS Public Blockchain Datasets. Happy building!
Relevant content
- asked a year agolg...
- asked 2 years agolg...
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago