Posting data to Ethereum
App chains by default post data directly to Ethereum's L1 for its robust security features, ensuring data immutability and enhanced security through inheritance.
However, this incurs higher transaction fees compared to alternate DA layers.
With EIP-4844 promising future improvements, the issue of posting data to Ethereum is actively being worked upon.
The following steps outline the process of posting data to the Ethereum blockchain.
Use Ethereum for data posting in Madara
When launching a Madara node, you can specify: --da-layer ethereum
.
When launching the node, the da-config.json file path can be provided along the --da-conf
flag.
da-config.json
{
"http_provider": "http://127.0.0.1:8545",
"core_contracts": "0x5FbDB2315678afecb367f032d93F642f64180aa3",
"sequencer_key": "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
"chain_id": 31337
}
Start Anvil and Deploy Core Contracts:
- Clone the Zaun repository:
git clone --recurse-submodules [https://github.com/keep-starknet-strange/zaun.git](https://github.com/keep-starknet-strange/zaun.git) target/zaun 2> /dev/null
- Deploy the Core Contracts using the Zaun scripts:
./target/zaun/scripts/sn-base-dev.sh target target/zaun 2> /dev/null