Categorygithub.com/amazechain/amc
modulepackage
0.1.3
Repository: https://github.com/amazechain/amc.git
Documentation: pkg.go.dev

# README

AmazeChain

AmazeChain(AMC) is an implementation of 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 make no breaking changes, but we don't guarantee anything. Things can and will break.

System Requirements

  • For an Full node :  >=200GB  storage space.

SSD or NVMe. Do not recommend HDD.

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

AMC is written in Go, so building from source code requires the most recent version of Go to be installed. Instructions for installing Go are available at the Go installation page and necessary bundles can be downloaded from the Go download page. And the repository should be cloned to a local repository. Then, the command make amc configures everything for a temporary build and cleans up afterwards. This method of building only works on UNIX-like operating systems

git clone https://github.com/amazechain/amc.git
cd amc
make amc
./build/bin/amc

Windows

Windows users may run AMC 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 amc 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 is executed on the very same computer. If instead your data is hosted on the native Linux filesystem non limitations apply. Please also note the default WSL2 environment has its own IP address which does not match the one of the network interface of Windows host: take this into account when configuring NAT for port 30303 on your router.

Docker container

Docker allows for building and running AMC 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 AMC 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 AmazeChain project comes with one wrappers/executables found in the cmd directory.

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

AMC ports

PortProtocolPurposeExpose
61015UDPThe port used by discv5.Public
61016TCPThe port used by libp2p.Public
20012TCPJson rpc/HTTPPublic
20013TCPJson rpc/WebsocketPublic
20014TCPJson rpc/HTTP/WebsocketJWT Authentication
4000TCPBlockChain ExplorerPublic
6060TCPMetricsPrivate
6060TCPPprofPrivate

License

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

# Packages

Package accounts implements high level Ethereum account management.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

NotFound is returned by API methods if the requested item does not exist.

# Structs

CallMsg contains parameters for contract calls.
FeeHistory provides recent fee market data that consumers can use to determine a reasonable maxPriorityFeePerGas value.
FilterQuery contains options for contract log filtering.
SyncProgress gives progress indications when the node is synchronising with the Ethereum network.

# Interfaces

ChainReader provides access to the blockchain.
ChainStateReader wraps access to the state trie of the canonical blockchain.
ChainSyncReader wraps access to the node's current sync status.
A ContractCaller provides contract calls, essentially transactions that are executed by the EVM but not mined into the blockchain.
GasEstimator wraps EstimateGas, which tries to estimate the gas needed to execute a specific transaction based on the pending state.
GasPricer wraps the gas price oracle, which monitors the blockchain to determine the optimal gas price given current fee market conditions.
LogFilterer provides access to contract log events using a one-off query or continuous event subscription.
PendingContractCaller can be used to perform calls against the pending state.
A PendingStateEventer provides access to real time notifications about changes to the pending state.
A PendingStateReader provides access to the pending state, which is the result of all known executable transactions which have not yet been included in the blockchain.
Subscription represents an event subscription where events are delivered on a data channel.
TransactionReader provides access to past transactions and their receipts.
TransactionSender wraps transaction sending.