gitlab.com/aquachain/aquachain@v1.17.16-rc3.0.20221018032414-e3ddf1e1c055/README.md (about)

     1  # Aquachain
     2  
     3  Latest Source: https://gitlab.com/aquachain/aquachain
     4  
     5  Mirrored: https://github.com/aquachain/aquachain
     6  
     7  View or Improve the Documentation online: https://aquachain.github.io/docs/
     8  
     9  [![Build and Test](https://github.com/aquachain/aquachain/actions/workflows/test.yml/badge.svg)](https://github.com/aquachain/aquachain/actions/workflows/test.yml)
    10  [![Release](https://github.com/aquachain/aquachain/actions/workflows/release.yml/badge.svg)](https://github.com/aquachain/aquachain/releases/)
    11  
    12  ** Found a bug **in this software**? Documentation lacking?
    13  See https://gitlab.com/aquachain/aquachain/wikis/bugs **
    14  
    15  See bottom of this document for more useful links. 
    16  Your contributions are welcome.
    17  
    18  ## General Purpose Distributed Computing
    19  
    20  Aquachain: peer-to-peer programmable money, distributed code contract platform.
    21  
    22      Target Block Time: 240 second blocks (4 minute)
    23      Block Reward: 1 AQUA
    24      Max Supply: 42 million
    25      Algorithm: argon2id (CPU or GPU mined)
    26      ChainID/NetworkID: 61717561
    27  
    28  ### Known Explorers:
    29  
    30  - https://aquachain.github.io/explorer/
    31  
    32  ### Known Pools:
    33  
    34  - https://aquachain.github.io/pools.json
    35  
    36  ### Known Wallets:
    37  
    38  - https://frame.sh (Desktop)
    39  - https://metamask.io/ (Browser Extension)
    40  - https://download.mycrypto.com (Desktop, creates mnemonic phrases)
    41  - https://walleth.org (Android, burner accounts etc)
    42  
    43  ## GET AQUACHAIN
    44  
    45  The `aquachain` command (full node, RPC server, and wallet) is a portable 
    46  program that doesn't really need an 'installer', you can run it from anywhere. 
    47  
    48  When you first start `aquachain` you will connect to the peer-to-peer network 
    49  and start downloading the chain from whatever peers it can find. 
    50  
    51  To change the way aquachain runs, for example testnet, or with json-rpc 
    52  endpoints, use command line flags or TOML config file. (see Usage section) 
    53  
    54  List all command line flags using the `-h` flag, or `aquachain help [subcommand]`
    55  
    56  You should keep backups of your keystore files, if any, and regularly check 
    57  unlocking them. It is generally better to keep private keys away from your node.
    58  
    59  Wallets connect to RPC nodes and offer an easy-to-use interface.
    60  Hosting your own RPC server is easy and improves privacy and has zero downtime issues.
    61  
    62  By default, using the -rpc flag listens only on 127.0.0.1:8543 and 
    63  offers everything needed to connect wallets such as Frame, Metamask, Hardhat.
    64  
    65  ## COMPILING
    66  
    67  Requires only [Go](https://golang.org/dl). Use the latest.
    68  
    69  ```
    70  git clone https://gitlab.com/aquachain/aquachain
    71  cd aquachain
    72  make
    73  
    74  ```
    75  Programs are built to the ./bin/ directory.
    76  
    77  ### Windows
    78  
    79  On windows, double-click make.bat to compile aquachain.exe onto your Desktop.
    80  
    81  ** Patches can be submitted at Github or Gitlab or Mailing List **
    82  
    83  ## Releases
    84  
    85  While compiled releases may exist, it is better to compile it yourself from latest source.
    86  
    87  - [Releases](https://github.com/aquachain/aquachain/releases/latest)
    88  
    89  ## SYNCHRONIZING
    90  
    91  "Imported new chain segment" means you received new blocks from the network.
    92  
    93  When a single block is imported, the address of the successful miner is printed.
    94  
    95  When you start seeing a single block every 4 minutes or so,
    96  you know that you are fully synchronized with the network.
    97  
    98  ## USAGE
    99  
   100  Enter AQUA javascript console: `aquachain.exe`
   101  
   102  Start Daemon (geth default): `aquachain.exe daemon`
   103  
   104  Run localhost rpc (port 8543): `aquachain.exe -rpc` 
   105  
   106  See more commands: [Wiki](https://gitlab.com/aquachain/aquachain/wikis/Basics)
   107  
   108  Type `help` at the `AQUA>` prompt for common AQUA console commands.
   109  
   110  Run `aquachain.exe help` for command line flags and options.
   111  
   112  ## RPC SERVER
   113  
   114  See "RPC" section in ./Documentation folder and online at:
   115  https://aquachain.github.io/docs/
   116  
   117  Start HTTP JSON/RPC server for local (127.0.0.1) connections only:
   118  aquachain -rpc
   119  
   120  Start HTTP JSON/RPC server for remote connections, listening on 192.168.1.5:8543,
   121  able to be accessed only by 192.168.1.6:
   122  
   123      aquachain -rpc -rpchost 192.168.1.5 -allowip 192.168.1.6/32
   124  
   125  With no other RPC flags, the `-rpc` flag alone is safe for local usage (from the same machine).
   126  
   127  ### Security Note about RPC
   128  
   129  Please be aware that hosting a public RPC server (0.0.0.0) will allow strangers access to your system.
   130  
   131  Do not use the `-rpcaddr` flag unless you absolutely know what you are doing.
   132  
   133  For hosting public RPC servers, please consider using -nokeys (_new!_) and implementing
   134  rate limiting on http (and, if using, websockets) , either via reverse proxy such as
   135  caddyserver or nginx, or firewall.
   136  
   137  ### Restricting RPC access
   138  
   139  Can't connect to your remote RPC server? `-allowip` flag is closed **by default**
   140  
   141  Recent builds of aquachain include support for the `-allowip` flag.
   142  
   143  It is by default, set to 127.0.0.1, which doesn't allow any LAN or WAN addresses access to your RPC methods.
   144  
   145  To add IPs, use `aquachain -rpc -rpchost 192.168.1.4 -allowip 192.168.1.5/32,192.168.2.30/32`
   146  
   147  The CIDR networks are comma separated, no spaces. (the `/32` after an IP means 'one IP')
   148  
   149  ## RPC Clients
   150  
   151  The JSON/RPC server is able to be used with "Web3" libraries for languages such
   152  as **Python** or **Javascript**. 
   153  
   154  These include [Ethers](https://docs.ethers.io/v5/) 
   155  or [Hardhat](https://hardhat.org/)
   156  or [web3js](https://web3js.readthedocs.io/)
   157  or [web3py](https://web3py.readthedocs.io/)
   158  
   159  For compatibility with existing tools, all calls to `eth_` methods are translated to `aqua_`, behind-the-scenes.
   160  
   161  This repository is also a Go library! See each package's documentation (godoc) for more information on usage.
   162  
   163  ## Major differences from upstream
   164  
   165  Aquachain is similar to Ethereum, but differs in a few important ways.
   166  
   167  ### Max Supply
   168  
   169  Max supply of 42 million, estimated to occur Thu Aug  5 04:23:29 AM UTC 2337
   170  (@11600079809)
   171  
   172  ### No Pre-mine
   173  
   174  The number of coins in existence is important.
   175  
   176  On the aquachain network, no coins were created without being mined.
   177  
   178  One coin for each block, with occasional uncle reward.
   179  
   180  Each year the chain grows by approximately 120000 blocks.
   181  
   182  Compare in contrast to the Ethereum network, which distributed around 80 million coins to their foundation and pre-sale on day one.
   183  In such a system with pre-mined coin, there will never be a time where miners have outmined the pre-mined team allocation.
   184  
   185  By dedicating a rig or two to mining this chain you are promoting a healthy strong network!
   186  
   187  Anyone, anywhere, can start mining today to receive a stream of coins to their wallet.
   188  
   189  ### Block header
   190  
   191  Each block has a 'version' which is only known by consensus rules.
   192  
   193  Before calling block.Hash(), the version MUST be 'set' using block.SetVersion(n). **Failure to do so will panic.**
   194  
   195  This should always be done exactly ONCE immediately after deserializing a block.
   196  
   197  ### Hashing Algorithm Switch
   198  
   199  Mining software should use the HF map consensus rules to determine the header version based on block height, which determines which hash function to use.
   200  
   201  Header version 1 uses ethash.
   202  
   203  Header version 2 uses argon2id(1,1,1)
   204  
   205  ### Full node components
   206  
   207  Many non-critical geth components were removed to create a node that is better on resources.
   208  
   209  We have a "100% go" build with no C dependencies.
   210  
   211  When you compile aquachain, you should have built a static binary.
   212  
   213  ### Block target time
   214  
   215  The 240 seconds block time has successfully deterred typical "DEX" and "ERC20 token" projects from existing on the chain.
   216  
   217  This frees up the blocks for you and your user's transactions to be mined at an inexpensive gas price.
   218  
   219  Typical DEX/ERC20 projects depend on a relatively short block time to (seemingly) provide realtime trading.
   220  
   221  The dangers of a slow block time include but are not limited to frontrunning.
   222  
   223  Please do not create a DEX/ERC20 project here.
   224  
   225  ### EVM Version
   226  
   227  Solidity developers take note: the Aquachain EVM is not the same as other chains.
   228  
   229  Certain opcodes simply do not exist here such as CREATE2 and CHAINID and others.
   230  
   231  When compiling solidity, use 'Byzantium' EVM target and enable optimization.
   232  
   233  If you think there should be a change to our EVM, submit a pull request or join chat.
   234  
   235  ### ChainID
   236  
   237  Aquachain chainId is 61717561
   238  
   239  ### Hard Fork Constitution
   240  
   241  By enforcing these HF limitations, we prevent manipulation of the aquachain economy. Rules should be easy to add, and should be difficult to remove one. (subject to change)
   242  
   243    1. A HF will never be made to increase supply
   244  
   245    2. A HF will never be made to censor or block a transaction
   246  
   247    3. A HF will never be made to refund coin for any reason.
   248  
   249    4. A HF will never be made to benefit one or only a small subset of miners.
   250  
   251    5. A HF will never be made to benefit one or only a small subset of users.
   252  
   253    6. A HF will never be made for no good reason.
   254  
   255    7. A HF will never be made when a simple upgrade could replace it.
   256  
   257    8. A HF should be made as soon as possible if an "ASIC threat is realized"
   258  
   259    9. A HF should be made as soon as possible if an exploit is found that can be abused for profit or leads to denial of service or loss of funds.
   260  
   261    10. A HF should be made as soon as possible if a "serious bug" is found in the core aquachain source code that can lead to loss of money for the average aquachain user.
   262  
   263    11. If no HF are required, a scheduled hard fork can be made to tweak the algorithm every 4 to 6 months, to prevent ASIC production.
   264  
   265  
   266  
   267  ## Resources
   268  
   269  Website - https://aquachain.github.io
   270  
   271  Explorer - https://aquachain.github.io/explorer/
   272  
   273  About - https://telegra.ph/Aquachain-AQUA---Decentralized-Processing-07-20
   274  
   275  Mining - https://telegra.ph/Mining-AQUA-05-27
   276  
   277  Wiki - https://gitlab.com/aquachain/aquachain/wikis
   278  
   279  ANN - https://bitcointalk.org/index.php?topic=3138231.0
   280  
   281  Gitlab - http://gitlab.com/aquachain/aquachain
   282  
   283  Github - http://github.com/aquachain
   284  
   285  Telegram News: https://t.me/Aquachain
   286  
   287  Godoc - https://godoc.org/gitlab.com/aquachain/aquachain#pkg-subdirectories
   288  
   289  Report bugs - https://github.com/aquachain/aquachain/issues
   290  
   291  Telegram Chat: https://t.me/AquaCrypto
   292  
   293  Discord: https://discordapp.com/invite/J7jBhZf
   294  
   295  IRC: #aquachain on freenode
   296  
   297  Bugs: https://gitlab.com/aquachain/aquachain/wikis/bugs
   298  
   299  ## Contributing
   300  
   301  Aquachain is free open source software and your contributions are welcome.
   302  
   303  ### Some tips and tricks for hacking on Aquachain core:
   304  
   305  - Always `gofmt -w -l -s` before commiting. If you forget, adding a simple
   306    'gofmt -w -l -s' commit works.
   307  - Before making a merge request, try `make test` to run all tests. If any
   308    tests pass, the PR can not be merged into the master branch.
   309  - Rebase: Don't `git pull` to update your branch. instead, from your branch, type `git rebase -i master` and resolve any conflicts (do this often and there wont be any!)
   310  - Prefix commit message with package name, such as "core: fix blockchain"