atlas

command module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2022 License: GPL-3.0, GPL-3.0 Imports: 1 Imported by: 0

README

Atlas chain

Atlas chain is a truly fast, permissionless, secure and scalable public blockchain platform. more

Building the source

Building atlas requires both a Go (version 1.14 or later) and a C compiler. You can install them using your favourite package manager. Once the dependencies are installed, run

    make atlas

Running atlas

Going atlas -h can get help infos.

Running on the atlas main network

$ atlas console

Running on the Atlas Chain singlenode(private) network

To start a g instance for single node, run it with these flags:

$ atlas --singlenet  console

Executables

The go-atlas project comes with several wrappers/executables found in the cmd directory.

Command Description
relayer_mock Test cases of relayer module and headerstore module from the perspective of customers.You can get relayer information and storeHeaderMod through this tool
relayer_cli Test cases of relayer module from the perspective of customers. You can get relayer information through this tool

Configuration

As an alternative to passing the numerous flags to the atlas binary, you can also pass a configuration file via:

$ atlas --config /path/to/your_config.toml

To get an idea how the file should look like you can use the dumpconfig subcommand to export your existing configuration:

$ atlas --your-favourite-flags dumpconfig

Do not forget --http.addr 0.0.0.0, if you want to access RPC from other containers and/or hosts. By default, atlas binds to the local interface and RPC endpoints is not accessible from the outside.

DefultParams

param MainnetChain TestnetChain DevnetChain SingleNetChain
ChainId 211 212 213 214
NetworkId 211 212 213 214
Port 20101 20101 20101 20101
RpcPort 7445 7445 7445 7445
param value comment
miner.threads 0
miner.gaslimit 8000000
miner.gasprice 1e9Wei
TxGas 21000 Minimum gas of creating a transaction

Programmatically interfacing atlas nodes

As a developer, sooner rather than later you'll want to start interacting with atlas and the Atlas network via your own programs and not manually through the console. To aid this, atlas has built-in support for a JSON-RPC based APIs standard APIs. These can be exposed via HTTP, WebSockets and IPC (UNIX sockets on UNIX based platforms, and named pipes on Windows).

The IPC interface is enabled by default and exposes all the APIs supported by atlas, whereas the HTTP and WS interfaces need to manually be enabled and only expose a subset of APIs due to security reasons. These can be turned on/off and configured as you'd expect.

HTTP based JSON-RPC API options:

  • --http Enable the HTTP-RPC server
  • --http.addr HTTP-RPC server listening interface (default: localhost)
  • --http.port HTTP-RPC server listening port (default: 8545)
  • --http.api API's offered over the HTTP-RPC interface (default: eth,net,web3)
  • --http.corsdomain Comma separated list of domains from which to accept cross origin requests (browser enforced)
  • --ws Enable the WS-RPC server
  • --ws.addr WS-RPC server listening interface (default: localhost)
  • --ws.port WS-RPC server listening port (default: 8546)
  • --ws.api API's offered over the WS-RPC interface (default: eth,net,web3)
  • --ws.origins Origins from which to accept websockets requests
  • --ipcdisable Disable the IPC-RPC server
  • --ipcapi API's offered over the IPC-RPC interface (default: admin,debug,eth,miner,net,personal,shh,txpool,web3)
  • --ipcpath Filename for IPC socket/pipe within the datadir (explicit paths escape it)

You'll need to use your own programming environments' capabilities (libraries, tools, etc) to connect via HTTP, WS or IPC to a atlas node configured with the above flags and you'll need to speak JSON-RPC on all transports. You can reuse the same connection for multiple requests!

Note: Please understand the security implications of opening up an HTTP/WS based transport before doing so! Hackers on the internet are actively trying to subvert Atlas nodes with exposed APIs! Further, all browser tabs can access locally running web servers, so malicious web pages could try to subvert locally available APIs!

Contribution

Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!

If you'd like to contribute to go-atlas, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our Discord Server to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.

Please make sure your contributions adhere to our coding guidelines:

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • Code must be documented adhering to the official Go commentary guidelines.
  • Pull requests need to be based on and opened against the master branch.
  • Commit messages should be prefixed with the package(s) they modify.
    • E.g. "eth, rpc: make trace configs optional"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package accounts implements high level Ethereum account management.
Package accounts implements high level Ethereum account management.
abi
Package abi implements the Ethereum ABI (Application Binary Interface).
Package abi implements the Ethereum ABI (Application Binary Interface).
abi/bind
Package bind generates Ethereum contract Go bindings.
Package bind generates Ethereum contract Go bindings.
keystore
Package keystore implements encrypted storage of secp256k1 private keys.
Package keystore implements encrypted storage of secp256k1 private keys.
apis
atlasapi
Package ethapi implements the general Ethereum API functions.
Package ethapi implements the general Ethereum API functions.
jsre
Package jsre provides execution environment for JavaScript.
Package jsre provides execution environment for JavaScript.
jsre/deps
Package deps contains the console JavaScript dependencies Go embedded.
Package deps contains the console JavaScript dependencies Go embedded.
web3ext
package web3ext contains geth specific web3.js extensions.
package web3ext contains geth specific web3.js extensions.
Package eth implements the Ethereum protocol.
Package eth implements the Ethereum protocol.
catalyst
Package catalyst implements the temporary eth1/eth2 RPC integration.
Package catalyst implements the temporary eth1/eth2 RPC integration.
downloader
Package downloader contains the manual full chain synchronisation.
Package downloader contains the manual full chain synchronisation.
ethconfig
Package ethconfig contains the configuration of the ETH and LES protocols.
Package ethconfig contains the configuration of the ETH and LES protocols.
fetcher
Package fetcher contains the announcement based header, blocks or transaction synchronisation.
Package fetcher contains the announcement based header, blocks or transaction synchronisation.
filters
Package filters implements an ethereum filtering system for block, transactions and log events.
Package filters implements an ethereum filtering system for block, transactions and log events.
tracers
Package tracers is a collection of JavaScript transaction tracers.
Package tracers is a collection of JavaScript transaction tracers.
tracers/internal/tracers
Package tracers contains the actual JavaScript tracer assets.
Package tracers contains the actual JavaScript tracer assets.
cmd
atlas is the official command-line client for map-protocol.
atlas is the official command-line client for map-protocol.
node
Package node sets up multi-protocol Ethereum nodes.
Package node sets up multi-protocol Ethereum nodes.
utils
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
Package consensus implements different Ethereum consensus engines.
Package consensus implements different Ethereum consensus engines.
istanbul/validator/random
Package random implements a language independent method of producing random validator orderings.
Package random implements a language independent method of producing random validator orderings.
election
You should have received a copy of the GNU General Public License along with MAP Protocol.
You should have received a copy of the GNU General Public License along with MAP Protocol.
epoch_rewards
You should have received a copy of the GNU General Public License along with MAP Protocol.
You should have received a copy of the GNU General Public License along with MAP Protocol.
validators
You should have received a copy of the GNU General Public License along with MAP Protocol.
You should have received a copy of the GNU General Public License along with MAP Protocol.
asm
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
Provides support for dealing with EVM assembly instructions (e.g., disassembling them).
bloombits
Package bloombits implements bloom filtering on batches of data.
Package bloombits implements bloom filtering on batches of data.
forkid
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124).
Package forkid implements EIP-2124 (https://eips.ethereum.org/EIPS/eip-2124).
mmr
rawdb
Package rawdb contains a collection of low level database accessors.
Package rawdb contains a collection of low level database accessors.
state
Package state provides a caching layer atop the Ethereum state trie.
Package state provides a caching layer atop the Ethereum state trie.
state/snapshot
Package snapshot implements a journalled, dynamic state dump.
Package snapshot implements a journalled, dynamic state dump.
types
Package types contains data types related to Ethereum consensus.
Package types contains data types related to Ethereum consensus.
vm
Package vm implements the Ethereum Virtual Machine.
Package vm implements the Ethereum Virtual Machine.
vm/runtime
Package runtime provides a basic execution model for executing EVM code.
Package runtime provides a basic execution model for executing EVM code.
helper
bls
debug
Package debug interfaces Go runtime debugging facilities.
Package debug interfaces Go runtime debugging facilities.
internal
syncx
Package syncx contains exotic synchronization primitives.
Package syncx contains exotic synchronization primitives.
marker
contract
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
env
Package miner implements Ethereum block creation and mining.
Package miner implements Ethereum block creation and mining.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL