当前位置: 首页 > 软件库 > Web3 > 区块链 >

elixir-node

授权协议 ISC License
开发语言
所属分类 Web3、 区块链
软件类型 开源软件
地区 不详
投 递 者 崔恺
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

CURRENTLY NOT 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 in docs/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 lsof
wget -O libsodium-src.tar.gz https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gz
mkdir libsodium-src && tar -zxf libsodium-src.tar.gz -C libsodium-src --strip-components=1
cd 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 using SYNC_PORT=some_port iex -S mix phx.server.The node will run an http api at localhost:4000, this can be adjusted using PORT=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 with mix test

Logging

Debug, error, warning and info logs is found in apps/aecore/logs

Docker Container

A Dockerfile and docker-compose.yml are found in the base directory, prebuilt images are not yet published.

  • Build container docker build . -t elixir-node

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

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

Detailed Usage

docs/detailed-usage.md

Developer Documentation

docs/developer-docs.md

  • 本文是介绍安装Laravel elixir   默认你已经安装了npm和node   1、首先那需要更新下node和npm  步骤: 如果不更新安装过程中很可能会报错  如: root@homestead:/home/vagrant/Code# gulp module.js:471 throw err; ^ Error: Cannot find module 'laravel-e

  • elixir 规格 I’ve been working almost exclusively with Javascript/Node.js since 2016, but since February I’m in a love-hate relationship with Elixir, sometimes more hate than love (way more hate), but I

  • 这一篇是从我自己的笔记里面搬出来的,所以有些描述会过于简洁。 Elixir开始耍 最近无聊,逛ruby社区,发现一个词貌似很火(原谅我最近没读书看报),好奇心又蹦出来了,就开始了学习elixir的道路。 安装elixir 安装只需一行命令 brew install elixir 但是实际安装的东西仔细观察,会发现大概包含相关依赖jpeg, libtiff, wxmac, erlang 具体每个做什

  • 环境准备 1、安装 nodejs 和 npm  如果你使用的是 Laravel 的 Homestead 环境,可以不用安装了,已自带。  我们来查看下它们的版本: $ node -v $ npm -v  如果没有安装,去 nodejs官网 下载安装[ 傻瓜式 ]即可!  nodejs 从 5.0 起就将 npm 打包下载了,所以不用手动再安装 npm 了! 2、安装全局的 gulp 全局安装:

  • 不知什么时候把erlang OTP 和elixir的版本升上去了,和服务器环境不一样了,然后苦逼的事情就开始了,重新安装erlang 和elixir,让其版本和服务器一样。 In this episode we’ll look at one way to install Elixir. I’ve been using the version manager asdf to handle diffe

 相关资料
  • Elixir是基于python界有名的ORM库SQLAlchemy做的封装。而且是轻量级的封装,它提供了更简单的方式来创建Python类并直接映射到关系数据库表(即通常所说的Active Record设计模式),类似于Django中的ORM。 示例: class Person(Entity): name = Field(String(128)) addresses = OneToMan

  • Table of Contents Elixir plugin IDEs Features Project From Existing Sources Import project from external model Create project from existing sources New Project Structure Project Settings Module Settin

  • �� Timber - Great Elixir Logging Made Easy Timber.io is a hosted service for aggregating logs across your entire stack -any language,any platform,any data source. Unlike traditional logging tools, Tim

  • This repository is the stable base upon which we build our Elixir projects at Mirego. We want to share it with the world so you can build awesome Elixir applications too. Introduction To learn more ab

  • Elixir-Slack This is a Slack Real Time Messaging API client for Elixir. You'll need aSlack API token which can be retrieved by following the Token GenerationInstructions or by creating anew bot integr

  • Elixir Runtime for Google Cloud Platform This repository contains the source for the Elixir Runtime for theGoogle App Engine Flexible Environment.It can also be used to run Elixir applications inGoogl