Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Elixir full node implementation of the aeternity specification

License

NotificationsYou must be signed in to change notification settings

aeternity/elixir-node

Repository files navigation

Travis Build

CURRENTLYNOT COMPATIBLE TO THE AETERNITY NETWORK

This implementation aims to be a aims to be a full node that complies with the aeternity specification, in the current state this is not ready yet and should never be used to join the aeternity network.

Aeternity Elixir Full Node

This is an elixir full node implementation of the aeternity specification.

Compatibility to the erlang aeternity implementation is documented indocs/aeternity-erlang-compatibility.md.

Getting started

Required packages

Elixir 1.6 with Erlang/OTP20 is the basis of the project

Rust is needed for persistent storage dependency

libsodium 1.0.16 is needed for elliptic curve support

sudo apt-get install autoconf autogen libtool libgmp3-dev lsofwget -O libsodium-src.tar.gz https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gzmkdir libsodium-src&& tar -zxf libsodium-src.tar.gz -C libsodium-src --strip-components=1cd libsodium-src&& ./configure&& make&& make check&& sudo make install&&cd ..

Fetching dependencies

mix deps.get

Starting the application

Start the application in interactive Elixir

  • Development config:make iex-0
  • Production config:MIX_ENV=prod make iex-0

The default sync port is 3015, this can be adjusted usingSYNC_PORT=some_port iex -S mix phx.server.The node will run an http api atlocalhost:4000, this can be adjusted usingPORT=some_port iex -S mix phx.server.

Usage

Elixir interactive api-calls

  • Miner.resume() to start the miner

  • Miner.suspend() to stop the miner

  • Miner.mine_sync_block_to_chain() mine the next block

  • Chain.top_block() to get the top block of the current chain

  • Chain.top_block_chain_state() to get the top block chainstate

  • Chain.chain_state(block_hash) to get the chainstate of certain block

  • Pool.get_pool() to get all transactions from the pool

  • Peers.all_peers() to get all connected peers

  • Peers.try_connect(%{host: host, port: port, pubkey: pubkey}) to manually connect a new peer

  • Peers.get_info_try_connect(uri) to connect to another elixir node, providing a get connection info interface

Running the tests

Run the testsuite withmix test

Logging

Debug, error, warning and info logs is found inapps/aecore/logs

Docker Container

ADockerfile anddocker-compose.yml are found in the base directory, prebuilt images are not yet published.

  • Build containerdocker build . -t elixir-node

  • Run node in containerdocker run --name elixir-node -it -p 4000:4000 -p 3015:3015 elixir-node

  • Run multiple nodes network with docker composedocker-compose up runs 3 connected nodes, with 2 mining

Detailed Usage

docs/detailed-usage.md

Developer Documentation

docs/developer-docs.md


[8]ページ先頭

©2009-2025 Movatter.jp