Skip to content

lucyzhang314/ast

 
 

Repository files navigation

Astranet

Astranet (AST) is an implementation of a public blockchain (execution client) on the efficiency frontier, written in Go.

Disclaimer: This software is currently a tech preview. We will do our best to keep it stable and avoid breaking changes, but we make no guarantees. Things can and will break.

System Requirements

  • For an Full node : ≥ 200 GB of storage space (SSD or NVMe recommended; HDD is not recommended).

RAM: >=16GB, 64-bit architecture, Golang version >= 1.19

Build from source code

For building the latest alpha release (this will be suitable for most users just wanting to run a node):

Most Linux systems and macOS

Since ast is written in Go, you'll need the latest version of Go installed to build it from source code. Instructions for installing Go are available at the Go installation page and necessary bundles can be downloaded from the Go download page. The repository should be cloned to a local environment. Once cloned, running the command make ast configures everything for a temporary build and then cleans up afterward. Please note that this build method is only compatible with UNIX-like operating systems.

git clone https://github.com/astranetworld/ast.git
cd ast
make ast
./build/bin/ast

Windows

Windows users may run ast in 3 possible ways:

  • Build executable binaries natively for Windows using Chocolatey package manager
  • Use Docker : see docker-compose.yml
  • Use WSL (Windows Subsystem for Linux) strictly on version 2. Under this option you can build ast just as you would on a regular Linux distribution. You can point your data also to any of the mounted Windows partitions (eg. /mnt/c/[...], /mnt/d/[...] etc) but in such case be advised performance is impacted: this is due to the fact those mount points use DrvFS which is a network file system and, additionally, MDBX locks the db for exclusive access which implies only one process at a time can access data. This has consequences on the running of rpcdaemon which has to be configured as Remote DB Even if it runs on the same computer, limitations may still apply. However, if your data is stored on the native Linux filesystem, these limitations do not apply. Additionally, note that the default WSL2 environment has a separate IP address that differs from the Windows host’s network interface. Consider this when configuring NAT for port 30303 on your router.

Docker container

Docker allows for building and running ast via containers. This alleviates the need for installing build dependencies onto the host OS. see docker-compose.yml dockerfile. For convenience we provide the following commands:

make images # build docker images than contain executable ast binaries
make up # alias for docker-compose up -d && docker-compose logs -f 
make down # alias for docker-compose down && clean docker data
make start #  alias for docker-compose start && docker-compose logs -f 
make stop # alias for docker-compose stop

Executables

The astranet project comes with one wrappers/executables found in the cmd directory.

Command Description
astranet Our main astranet CLI client. It can be used by other processes as a gateway into the astranet network via JSON RPC endpoints exposed on top of HTTP transports. astranet --help for command line options.

ast ports

Port Protocol Purpose Expose
61015 UDP The port used by discv5. Public
61016 TCP The port used by libp2p. Public
20012 TCP Json rpc/HTTP Public
20013 TCP Json rpc/Websocket Public
20014 TCP Json rpc/HTTP/Websocket JWT Authentication
4000 TCP BlockChain Explorer Public
6060 TCP Metrics Private
6060 TCP Pprof Private

License

The astranet library is licensed under the GNU General Public License v3.0.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 89.6%
  • Assembly 9.1%
  • JavaScript 0.6%
  • Solidity 0.4%
  • C 0.2%
  • Makefile 0.1%