{"id":20184962,"url":"https://github.com/aeternity/localnet","last_synced_at":"2025-04-10T06:07:11.446Z","repository":{"id":42570557,"uuid":"201029013","full_name":"aeternity/localnet","owner":"aeternity","description":"Docker-compose based configuration to easily run locally deployed dev/test network","archived":false,"fork":false,"pushed_at":"2025-03-26T09:47:19.000Z","size":62,"stargazers_count":6,"open_issues_count":3,"forks_count":8,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-10T06:07:01.910Z","etag":null,"topics":["dev","docker","localnet","sandbox"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aeternity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-07T10:35:54.000Z","updated_at":"2025-03-26T09:47:23.000Z","dependencies_parsed_at":"2024-01-16T17:53:07.217Z","dependency_job_id":"3bfa7b93-948b-4872-9022-0b948456ad9a","html_url":"https://github.com/aeternity/localnet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeternity%2Flocalnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeternity%2Flocalnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeternity%2Flocalnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeternity%2Flocalnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeternity","download_url":"https://codeload.github.com/aeternity/localnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dev","docker","localnet","sandbox"],"created_at":"2024-11-14T03:10:11.241Z","updated_at":"2025-04-10T06:07:11.421Z","avatar_url":"https://github.com/aeternity.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aeternity Localnet\n\nDocker compose based configuration to easily run locally deployed dev/test network.\nLatest config files support node `v6.*` For older node versions use the `v1.*` tags of this repository.\n\nThis repository provide two setups described below:\n\n* Single node configuration in devmode (default) -- good for smart contracts testing and node API features\n* 3 Node configuration - good to test p2p, consensus etc. features\n\nSingle node configuration uses the [devmode plugin](https://github.com/aeternity/aeplugin_dev_mode) in default configuration.\n\nThe 3 node configuration uses the `mean15-generic` miner (fastest generic miner).\nAs the beneficiary key-pair is publicly available, this setup should *not* be connected to public networks.\n\nAll local network nodes are configured with the same beneficiary account (for more details on beneficiary see [configuration documentation](https://github.com/aeternity/aeternity/blob/master/docs/configuration.md#beneficiary-account)):\n- public key: ak_twR4h7dEcUtc2iSEDv8kB7UFJJDGiEDQCXr85C3fYF8FdVdyo\n- private key secret: `secret`\n- key-pair binaries can be found in `/node/keys/beneficiary` directory of this repository\n\n### Addresses\n\nThe configuration uses a proxy server to allow CORS and URL routing.\n\nAll APIs (external, internal and state channels websocket) are exposed to the docker host, the URL pattern is as follows:\n\n- external/internal API - http://$DOCKER_HOST_ADDRESS:8080/nodeX\n- channels API - ws://$DOCKER_HOST_ADDRESS:8080/nodeX/channel\n\nFor example if one wants to use `node1` API on local docker host the address is: http://localhost:8080/node1/v2/status\n\nAlso the node1 is always available without URL path suffix, for example:\n\nhttp://localhost:8080/v2/status\n\nAlso node1 have the standard port bindings as well:\n\n- port 3013 - External API\n- port 3113 - Internal API\n- port 3014 - State Channels API\n- port 3313 - Dev Mode plugin\n\n### Single Node Configuraiton (default)\n\nTo use a Single Node Configuration start the containers with the docker compose command. Example:\n\n```bash\ndocker compose up -d\n```\n\nCheck if the node is running:\n\n```bash\ncurl http://localhost:8080/v2/status\n```\n\nTo destroy the network:\n\n```bash\ndocker compose down\n```\n\nTo cleanup the associated docker volumes, `-v` option could be used:\n\n```bash\ndocker compose down -v\n```\n\nMore details can be found in [`docker-compose` documentation](https://docs.docker.com/compose/reference/).\n\n### 3 Node configuration\n\nTo start the 3 node configuration use the additional docker compose config:\n\n```bash\ndocker compose -f docker-compose.multi.yml up -d\n```\n\nNode names:\n- `node1`\n- `node2`\n- `node3`\n\nFor example to access `node2` API (status), assuming docker host address is `localhost`:\n\n```bash\ncurl http://localhost:8080/node2/v2/status\n```\n\n### Full infrastructure configuration\n\nThis configuration includes a node+middleware, explorer, base wallet, faucet and compiler.\nTo boot it run:\n\n```bash\ndocker compose -f docker-compose.full.yml up -d\n```\n\nList of all services and their URLs can be found at: http://localhost:8000\n\n### Hyperchains configuration\n\nThis configuration runs the full infrastructure (see above) as *parent chain* and a copy of it as *child chain* + Hyperchains UI.\nTo boot it run:\n\n```bash\ndocker compose -f docker-compose.full.yml -f docker-compose.hyperchain.yml up -d\n```\n\nList of all *parent chain* services and their URLs can be found at: http://localhost:8000\nList of all *child chain* services and their URLs can be found at: http://localhost:8080\n\nTo rebuild the mdw and node containers with the latest `master` versions, run:\n\n```bash\ndocker compose -f docker-compose.full.yml -f docker-compose.hyperchain.yml down -v --remove-orphans\ndocker compose -f docker-compose.full.yml -f docker-compose.hyperchain.yml build hc_mdw\ndocker compose -f docker-compose.full.yml -f docker-compose.hyperchain.yml up -d\n```\n\n### Image Version\n\n3 node configuration uses the `aeternity/aeternity:latest` image by default, it will be pulled from [docker hub](https://hub.docker.com/r/aeternity/aeternity/) if it's not found locally.\n\nTo change what node version is used set `IMAGE_TAG` environment variable, e.g.:\n\n```bash\nIMAGE_TAG=v4.0.0 docker compose up -d\n```\n\nThis configuration is known to work with node versions \u003e= 5.0.0\n\nThe devmode (single node) configuration uses the `aeternity/aeternity:latest-bundle` by default which included the [devmode plugin](https://github.com/aeternity/aeplugin_dev_mode)\n\nThe image can be changed (i.e. to specific version) by setting `IMAGE_TAG` environment variable.\n\n### Mining Rate\n\nBy default the 3 nodes localnet has set default mine rate of 1 block per 15 seconds.\nIt can be changed by setting `AETERNITY_MINE_RATE` environment variable.\nThe variable is in milliseconds, so to set 1 block per 10 seconds use:\n\n```bash\nAETERNITY_MINE_RATE=10000 docker compose -f docker-compose.multi.yml up\n```\n\n### Accounts\n\nThis configuration includes 3 genesis pre-funded accounts:\n\n| Ammount                           | Public Address    |\n| -----------                       | -----------       |\n| 1000000000000000000000            | ak_AnYx7qbt5PZeNfa8kvAxA9WS3mGpSGAsshGbG6bkDLVtCxmMT       |\n| 2000000000000000000000            | ak_22vGvAfLipm8vK6ExtDxGEfbDXSeSEt9Ur87xyL2F11gb8ZRKg      |\n| 2000000000000000000000            | ak_XwTENL7b2UNqrbqqput7GrPPBxbXXWx7kiwxCz2C4oMAp1H8u       |\n\nWallets for the accounts can be found in the [aepp template repository](https://github.com/aeternity/aepp-template#wallets).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeternity%2Flocalnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeternity%2Flocalnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeternity%2Flocalnet/lists"}