This is the repository for the official Erlang implementation of the Arweave protocol and a gateway implementation.
Arweave is a distributed, cryptographically verified permanent archive built on a cryptocurrency that aims to, for the first time, provide feasible data permanence. By leveraging our novel Blockweave datastructure, data is stored in a decentralised, peer-to-peer manner where miners are incentivised to store rare data.
Download and extract the latest archive for your platform on the release
page, then run the included
bin/start script to get started.
For more information, refer to the mining guide.
Building from source
- OpenSSL 1.1.1+
- OpenSSL development headers
- GCC or Clang (GCC 8+ recommended)
- Erlang OTP v24, with OpenSSL support
- GNU Make
- CMake (CMake version > 3.10.0)
- SQLite3 headers (libsqlite3-dev on Ubuntu)
- GNU MP (libgmp-dev on Ubuntu)
To install the dependencies on Ubuntu 22 (recommended), run:
sudo apt install libssl-dev libgmp-dev libsqlite3-dev make cmake gcc g++
On some systems you might need to install
Download the repo:
$ git clone --recursive https://github.com/ArweaveTeam/arweave.git $ cd arweave
Increase the open file limits.
Run in the development mode:
./arweave-server peer 184.108.40.206 peer 220.127.116.11 peer 18.104.22.168 peer 22.214.171.124 peer 126.96.36.199
Make a production build:
$ ./rebar3 as prod tar
You will then find the gzipped tarball at
To make a testnet build, run:
$ ./rebar3 as testnet tar
The tarball is created at
You can join the public testnet now:
./bin/start peer testnet-1.arweave.net peer testnet-2.arweave.net peer testnet-3.arweave.net
We recommend you do not use your mainnet mining address on testnet. Also, do not join the testnet from the mainnet machine.
Starting New Weave
To start a new weave, create a new data directory
mkdir -p localnet_data_dir
, create a wallet:
, and run:
$ ./bin/start-localnet init data_dir <your-data-dir> mining_addr <your-mining-addr> storage_module 0,<your-mining-addr> mine
The given address (if none is specified, one will be generated for you) will be assigned
1000_000_000_000 AR in the new weave.
The network name will be
arweave.localnet. You can not start the same node again with the
init option unless you clean the data directory - you need to either restart with the
start_from_block_index option or specify a peer from the same Arweave network via
peer <peer>. Note that the state is only persisted every 50 blocks so if you
restart the node without peers via
start_from_block_index before reaching the height 50,
it will go back to the genesis block.
As with mainnet peers, each peer must be run in its own physical or virtual environment (e.g. on its own machine or in its own container or virtual machine). If you try to run two nodes within the same environment you will get an error like
Protocol 'inet_tcp': the name firstname.lastname@example.org seems to be in use by another Erlang node
When POST'ing transactions to your localnet make sure to include the
X-Network: arweave.localnet header. If the header is omitted, the mainnet network will be assumed and the request will fail.
Make sure to have the build requirements installed.
Clone the repo and initialize the Git submodules:
$ git clone --recursive https://github.com/ArweaveTeam/arweave.git
Running the tests
Running a shell
bin/shell launch two connected Erlang VMs in distributed mode. The master VM runs an HTTP server on the port 1984. The slave VM uses the port 1983. The data folders are
data_test_slave respectively. The tests that do not depend on two VMs are run against the master VM.
Run a specific test (the shell offers autocompletion):
If it fails, the nodes keep running so you can inspect them through Erlang shell or HTTP API.
The logs from both nodes are collected in
logs/. They are rotated so you probably want to
consult the latest modified
email@example.com.* files first -
ls -lat logs/.
See CONTRIBUTING.md for more information.
You can find documentation regarding our HTTP interface here.
The Arweave project is released under GNU General Public License v2.0. See LICENSE for full license conditions.
Arweave Bug Bounty Program
Arweave core team has initiated an Arweave bug bounty program, with a maximum bounty of up to USD
1,000,000. The program is focused on discovering potential technical vulnerabilities and strengthening Arweave core protocol security.
The Arweave core team puts security as its top priority and has dedicated resources to ensure high incentives to attract the community at large to evaluate and safeguard the ecosystem. Whilst building Arweave, the team has engaged with industry-leading cybersecurity audit firms specializing in Blockchain Security to help secure the codebase of Arweave protocol.
We encourage developers, whitehat hackers to participate, evaluate the code base and hunt for bugs, especially on issues that could potentially put users’ funds or data at risk. In exchange for a responsibly disclosed bug, the bug bounty program will reward up to USD
1,000,000 (paid in
$AR tokens) based on the vulnerability severity level, at the discretion of the Arweave team. Please email us at firstname.lastname@example.org to get in touch.