├── .gitignore ├── CODEOWNERS ├── nginx.dev ├── mainnet.docker-compose.yml ├── testnet.docker-compose.yml ├── devnet.docker-compose.yml ├── Makefile ├── local.docker-compose.yml ├── Caddyfile.dev ├── README.md └── base.env /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # For now, tag everyone who wants to participate 2 | * @deso-protocol/reviewers 3 | -------------------------------------------------------------------------------- /nginx.dev: -------------------------------------------------------------------------------- 1 | events { 2 | } 3 | http { 4 | client_max_body_size 20m; 5 | 6 | server { 7 | server_name deso.run; 8 | 9 | location / { 10 | proxy_pass http://frontend:8080; 11 | } 12 | 13 | location /api/ { 14 | proxy_pass http://backend:17001; 15 | } 16 | 17 | listen 80; 18 | # listen 443 ssl; 19 | # ssl_certificate /etc/letsencrypt/live/server2.your.domain/fullchain.pem; 20 | # ssl_certificate_key /etc/letsencrypt/live/server2.your.domain/privkey.pem; 21 | # include /etc/letsencrypt/options-ssl-nginx.conf; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /mainnet.docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | backend: 3 | container_name: backend 4 | image: docker.io/desoprotocol/backend:stable 5 | command: run 6 | entrypoint: /deso/bin/backend 7 | volumes: 8 | - mainnet-db:/db 9 | ports: 10 | - 17001:17001 11 | - 17000:17000 12 | - 2345:2345 13 | environment: 14 | # Values we set here OVERRIDE the base.env variables. 15 | # 16 | # Set the seed here if you want to be a validator 17 | # - POS_VALIDATOR_SEED= 18 | # 19 | # For mainnet, we must use a different checkpoint provider 20 | - CHECKPOINT_SYNCING_PROVIDERS=https://node.deso.org 21 | - SYNC_TYPE=blocksync 22 | - FORCE_CHECKSUM=false 23 | - TESTNET=false 24 | - REGTEST=false 25 | - CONNECT_IPS=deso-seed-4.io:17000 26 | - PROTOCOL_PORT=17000 27 | - API_PORT=17001 28 | env_file: 29 | - base.env 30 | expose: 31 | - "17001" 32 | - "17000" 33 | - "2345" 34 | frontend: 35 | container_name: frontend 36 | image: docker.io/desoprotocol/frontend:stable 37 | ports: 38 | - 8080:8080 39 | volumes: 40 | - ./:/app 41 | env_file: 42 | # TODO: We should break the frontend params from the backend params. 43 | - base.env 44 | expose: 45 | - "8080" 46 | nginx: 47 | container_name: nginx 48 | image: nginx:latest 49 | volumes: 50 | - ./nginx.dev:/etc/nginx/nginx.conf 51 | depends_on: 52 | - backend 53 | - frontend 54 | ports: 55 | - 80:80 56 | - 443:443 57 | volumes: 58 | mainnet-db: 59 | -------------------------------------------------------------------------------- /testnet.docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | backend: 3 | container_name: backend 4 | image: docker.io/desoprotocol/backend:stable 5 | command: run 6 | entrypoint: /deso/bin/backend 7 | volumes: 8 | - testnet-db:/db 9 | ports: 10 | - 18001:18001 11 | - 18000:18000 12 | - 2345:2345 13 | environment: 14 | # Values we set here OVERRIDE the base.env variables. 15 | # 16 | # Set the seed here if you want to be a validator 17 | # - POS_VALIDATOR_SEED= 18 | # 19 | # For testnet, we must use a different checkpoint provider 20 | - GLOG_V=1 21 | - TRUSTED_BLOCK_PRODUCER_START_HEIGHT=2000000000 22 | - FORCE_CHECKSUM=false 23 | - SYNC_TYPE=blocksync 24 | - CHECKPOINT_SYNCING_PROVIDERS=https://test.deso.org 25 | - TESTNET=true 26 | # The REGTEST param is the main difference between running a testnet vs devnet node. 27 | - REGTEST=false 28 | - CONNECT_IPS=dorsey.bitclout.com:18000 29 | - PROTOCOL_PORT=18000 30 | - API_PORT=18001 31 | env_file: 32 | - base.env 33 | expose: 34 | - "18001" 35 | - "18000" 36 | - "2345" 37 | frontend: 38 | container_name: frontend 39 | image: docker.io/desoprotocol/frontend:stable 40 | ports: 41 | - 8080:8080 42 | volumes: 43 | - ./:/app 44 | env_file: 45 | # TODO: We should break the frontend params from the backend params. 46 | - base.env 47 | expose: 48 | - "8080" 49 | nginx: 50 | container_name: nginx 51 | image: nginx:latest 52 | volumes: 53 | - ./nginx.dev:/etc/nginx/nginx.conf 54 | depends_on: 55 | - backend 56 | - frontend 57 | ports: 58 | - 80:80 59 | - 443:443 60 | volumes: 61 | testnet-db: 62 | -------------------------------------------------------------------------------- /devnet.docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | backend: 3 | container_name: backend 4 | image: docker.io/desoprotocol/backend:stable 5 | command: run 6 | entrypoint: /deso/bin/backend 7 | volumes: 8 | - devnet-db:/db 9 | ports: 10 | - 18001:18001 11 | - 18000:18000 12 | - 2345:2345 13 | env_file: 14 | - base.env 15 | environment: 16 | # Values we set here OVERRIDE the base.env variables. 17 | # Set the seed to a known devnet validator as an example 18 | - POS_VALIDATOR_SEED=category ignore around vibrant delay cargo apart truly rabbit blue master cash 19 | # For devnet, we must use a different checkpoint provider 20 | #- CHECKPOINT_SYNCING_PROVIDERS=https://test.deso.org 21 | - SYNC_TYPE=blocksync 22 | - MINER_PUBLIC_KEYS=tBCKWZLt6BtJNRzs4qT8DWUY7BCoMUQVFp86HwQJ4RAqNxjwisrK74 23 | - BLOCK_PRODUCER_SEED=category ignore around vibrant delay cargo apart truly rabbit blue master cash 24 | - STARTER_DESO_SEED=category ignore around vibrant delay cargo apart truly rabbit blue master cash 25 | - NUM_MINING_THREADS=1 26 | - TESTNET=true 27 | - REGTEST=true 28 | - TXINDEX=true 29 | #- CONNECT_IPS=devnet-0-root.deso.run:18000 30 | - PROTOCOL_PORT=18000 31 | - API_PORT=18001 32 | expose: 33 | - "18001" 34 | - "18000" 35 | - "2345" 36 | frontend: 37 | container_name: frontend 38 | image: docker.io/desoprotocol/frontend:stable 39 | ports: 40 | - 8080:8080 41 | volumes: 42 | - ./:/app 43 | env_file: 44 | # TODO: We should break the frontend params from the backend params. 45 | - base.env 46 | expose: 47 | - "8080" 48 | nginx: 49 | container_name: nginx 50 | image: nginx:latest 51 | volumes: 52 | - ./nginx.dev:/etc/nginx/nginx.conf 53 | depends_on: 54 | - backend 55 | - frontend 56 | ports: 57 | - 80:80 58 | - 443:443 59 | volumes: 60 | devnet-db: 61 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | COMPOSE_FILES := devnet.docker-compose.yml testnet.docker-compose.yml mainnet.docker-compose.yml local.docker-compose.yml 2 | 3 | define compose_up 4 | docker compose -p $(1) -f $(1).docker-compose.yml build 5 | docker compose -p $(1) -f $(1).docker-compose.yml up 6 | endef 7 | 8 | define compose_down 9 | docker compose -p $(1) -f $(1).docker-compose.yml down --volumes 10 | endef 11 | 12 | define wipe_volumes 13 | @volumes=$$(docker volume ls -qf "name=$(1)") && \ 14 | for volume in $$volumes; do \ 15 | containers=$$(docker ps -a -q --filter "volume=$$volume"); \ 16 | for container in $$containers; do \ 17 | docker stop $$container; \ 18 | docker rm $$container; \ 19 | done; \ 20 | docker volume rm $$volume; \ 21 | done 22 | endef 23 | 24 | define clear_containers 25 | @containers=$$(docker ps -a -q -f "name=$(1)") && \ 26 | for container in $$containers; do \ 27 | docker stop $$container; \ 28 | docker rm $$container; \ 29 | done 30 | endef 31 | 32 | define stop_backend 33 | @if docker ps -a --format '{{.Names}}' | grep -q "backend"; then \ 34 | docker stop backend; \ 35 | docker rm backend; \ 36 | fi 37 | endef 38 | 39 | define stop_frontend 40 | @if docker ps -a --format '{{.Names}}' | grep -q "frontend"; then \ 41 | docker stop frontend; \ 42 | docker rm frontend; \ 43 | fi 44 | endef 45 | 46 | define stop_nginx 47 | @if docker ps -a --format '{{.Names}}' | grep -q "nginx"; then \ 48 | docker stop nginx; \ 49 | docker rm nginx; \ 50 | fi 51 | endef 52 | 53 | .PHONY: devnet testnet mainnet local wipe 54 | 55 | devnet testnet mainnet local: 56 | $(call compose_up,$@) 57 | 58 | devnet-wipe testnet-wipe mainnet-wipe local-wipe: 59 | $(call compose_down,$(subst -wipe,,$@)) 60 | $(call clear_containers,$(subst -wipe,,$@)) 61 | $(call wipe_volumes,$(subst -wipe,,$@)) 62 | $(call stop_backend) 63 | $(call stop_frontend) 64 | $(call stop_nginx) 65 | 66 | local: 67 | (cd ../ && docker buildx build -f ./backend/Dockerfile -t local-backend:latest .) 68 | $(call compose_up,$@) 69 | 70 | wipe: local-wipe devnet-wipe testnet-wipe mainnet-wipe 71 | -------------------------------------------------------------------------------- /local.docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Use this file with `make local` to build and run a locally-compiled Docker image. This 2 | # allows you to develop your node. Note the params are devnet params so you will need to 3 | # change them if you want to run your new code on testnet or mainnet data. 4 | # 5 | # Note you will need to clone the backend and core repos as follows: 6 | # $ cd ../ 7 | # $ git clone https://github.com/deso-protocol/backend 8 | # $ git clone https://github.com/deso-protocol/core 9 | # $ cd run 10 | # $ make local 11 | # 12 | # Everything should work after that. 13 | services: 14 | backend: 15 | container_name: backend 16 | image: local-backend:latest 17 | command: run 18 | entrypoint: /deso/bin/backend 19 | volumes: 20 | - local-db:/db 21 | ports: 22 | - 18001:18001 23 | - 18000:18000 24 | - 2345:2345 25 | environment: 26 | # Values we set here OVERRIDE the base.env variables. 27 | # Set the seed to a known devnet validator as an example 28 | - POS_VALIDATOR_SEED=category ignore around vibrant delay cargo apart truly rabbit blue master cash 29 | # For devnet, we must use a different checkpoint provider 30 | - CHECKPOINT_SYNCING_PROVIDERS=https://devnet-0.deso.run 31 | - TESTNET=true 32 | - REGTEST=true 33 | - CONNECT_IPS=devnet-0-root.deso.run:18000 34 | - PROTOCOL_PORT=18000 35 | - API_PORT=18001 36 | env_file: 37 | - base.env 38 | expose: 39 | - "18001" 40 | - "18000" 41 | - "2345" 42 | frontend: 43 | container_name: frontend 44 | image: docker.io/desoprotocol/frontend:stable 45 | ports: 46 | - 8080:8080 47 | volumes: 48 | - ./:/app 49 | env_file: 50 | # TODO: We should break the frontend params from the backend params. 51 | - base.env 52 | expose: 53 | - "8080" 54 | nginx: 55 | container_name: nginx 56 | image: nginx:latest 57 | volumes: 58 | - ./nginx.dev:/etc/nginx/nginx.conf 59 | depends_on: 60 | - backend 61 | - frontend 62 | ports: 63 | - 80:80 64 | - 443:443 65 | volumes: 66 | local-db: 67 | -------------------------------------------------------------------------------- /Caddyfile.dev: -------------------------------------------------------------------------------- 1 | { 2 | admin off 3 | auto_https off 4 | } 5 | 6 | :8080 { 7 | file_server 8 | try_files {path} index.html 9 | 10 | header Access-Control-Allow-Methods "GET, PUT, POST, DELETE, OPTIONS" 11 | header Access-Control-Allow-Origin "*" 12 | header Content-Security-Policy " 13 | default-src 'self'; 14 | connect-src 'self' 15 | api.bitclout.com bitclout.com:* 16 | bithunt.bitclout.com pulse.bitclout.com https://altumbase.com 17 | api.bitpop.dev 18 | deso.run:* api.deso.run:* 19 | localhost:* 20 | explorer.bitclout.com:* 21 | https://api.blockchain.com/ticker 22 | https://api.blockchain.com/mempool/fees 23 | https://ka-f.fontawesome.com/ 24 | bitcoinfees.earn.com 25 | api.blockcypher.com 26 | amp.bitclout.com 27 | api.bitclout.green api.bitclout.blue 28 | api.bitclout.navy 29 | api.testwyre.com 30 | api.sendwyre.com 31 | https://videodelivery.net 32 | https://upload.videodelivery.net; 33 | script-src 'self' https://cdn.jsdelivr.net/npm/sweetalert2@10 34 | https://kit.fontawesome.com/070ca4195b.js https://ka-f.fontawesome.com/; 35 | style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; 36 | img-src 'self' data: i.imgur.com images.deso.org images.bitclout.com quickchart.io arweave.net *.arweave.net cloudflare-ipfs.com; 37 | font-src 'self' https://fonts.googleapis.com 38 | https://fonts.gstatic.com https://ka-f.fontawesome.com; 39 | frame-src 'self' localhost:* 40 | identity.bitclout.com identity.bitclout.blue identity.bitclout.green 41 | identity.deso.org identity.deso.blue identity.deso.green 42 | https://www.youtube.com 43 | https://player.vimeo.com 44 | https://www.tiktok.com 45 | https://giphy.com 46 | https://open.spotify.com 47 | https://w.soundcloud.com 48 | https://player.twitch.com 49 | https://clips.twitch.com 50 | pay.testwyre.com 51 | pay.sendwyre.com 52 | https://iframe.videodelivery.net;" 53 | } 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Run your own DeSo node 2 | 3 | Running your own DeSo node is easy: 4 | 5 | 1. [Install Docker and Docker Compose](https://docs.docker.com/get-docker/) if you don't have it already 6 | * On Mac and Windows, Docker comes with Docker Compose 7 | * On Linux you need to install Docker Engine and Docker Compose separately 8 | 2. Execute `make devnet`, `make testnet`, or `make mainnet` depending on which type of node you want to run 9 | * This will automatically run the relevant docker-compose 10 | 3. If you want to start from scratch, you can always do `make wipe` or `make {environment}-wipe`. This will 11 | delete all prior blocks/data for your node and allow it to start syncing from scratch again. 12 | 4. Visit http://localhost:4200. This will load the frontend service you just ran and show you all the 13 | data that your node is syncing. 14 | 15 | ## Check sync progress 16 | 17 | You can check on the sync progress of your local node either by looking at the output 18 | or by looking in the admin panel of the frontend. 19 | 20 | 1. Create a new user OR sign in with your existing seed phrase 21 | 2. Head to the Admin panel to see your sync status. The tooltips should explain what 22 | most things mean. 23 | 24 | If you're looking at the output in the terminal, note 25 | that there is a header-download phase that is usually pretty quick (a few minutes) 26 | followed by a block syncing phase (if you're running iwith --sync-type=blocksync) or 27 | a hypersync phase (if you're running --sync-type=hypersync-archival). The sync type is 28 | specified in the base.env and overridden by the docker-compose.yml file for each 29 | environment. 30 | 31 | ## Reset your node 32 | 33 | If your node fails to sync or you want to try syncing from scratch you can run `make wipe`. 34 | 35 | ## Learning More 36 | If you want to learn more about how the DeSo node works, you can start by reading each 37 | of the relevant docker-compose.yml files and the base.env file, which has a lot of 38 | comments describing each of the flags. 39 | 40 | If you want to know how the actual underlying node code works, check out 41 | [our docs page](https://docs.deso.org/). To learn more about building an app, see our 42 | [app tutorial](https://docs.deso.org/deso-tutorial-build-apps). To learn more about our architecture, including a code walkthrough, 43 | see our [architecture overview](https://docs.deso.org/deso-repos/architecture-overview). 44 | 45 | To run a validator, see our [validator instructions doc](https://docs.google.com/document/d/1WAy7ZaRPXeuuOdPdOhgqeWaDAdTUD_8UDOvj4jVxTlw/edit). 46 | 47 | ## What's next? 48 | Once your node is synced, you have access to the full firehose of DeSo 49 | data in real time! Below are some tips on how take full advantage of your node. 50 | 51 | * Go to your Admin tab and watch the unfiltered feed update as your node 52 | syncs. It's like a time machine! 53 | - Note: If your node is having trouble syncing for some reason, try updating 54 | the CONNECT_IPS flag in base.env to deso-seed-2.io or deso-seed-4.io and set 55 | IGNORE\_INBOUND\_PEER\_INV\_MESSAGES to true while you sync. This will pick 56 | a fairly reliable node as a sync peer and disregard messages from other 57 | peers. 58 | * Try to whitelist some posts in the Admin tab and see that they've made their way 59 | onto your global feed. 60 | * Read through the flags available in the base.env 61 | file. You can adjust these flags however you want, but note that some flags may be 62 | overridden in the docker-compose.yml files so just make sure you edit them there if they're 63 | set. 64 | * Set ADMIN\_PUBLIC\_KEYS to your public key so that the Admin tab is only 65 | visible to your account. 66 | * Set SUPER\_ADMIN\_PUBLIC\_KEYS to your public key so that the super admin tab is only 67 | visible to your account. 68 | * Whitelist some posts and verify that they show up on the global feed. 69 | * Deploy your node on any cloud provider with a static IP to make it accessible 70 | to anyone on the internet. 71 | - If you do this, you must point *two* domains at your node. 72 | domain.com *and* api.domain.com. 73 | - If you do this, you *must* add your domain to the Caddyfile.dev's 74 | Content-Security-Policy or your site won't work. You will need to add two 75 | entries: One for domain.com:\* and one for api.domain.com:\* 76 | * Add the necessary nginx configuration for your SSL certificates generated by letsencrypt 77 | * Set the TWILIO\* flags to allow new users to get some starter DeSo. 78 | * Set a SUPPORT\_EMAIL so your users can contact you if they run into trouble. 79 | * Play with the logging verbosity by increasing GLOG\_V. 80 | 81 | ## Need help? 82 | You can often find ansers in the [DeSo PoS Discussion Telegram Channel](https://t.me/deso_pos_discussion) 83 | The dev team is also active on all DeSo apps such as diamondapp.com and focus.xyz. 84 | -------------------------------------------------------------------------------- /base.env: -------------------------------------------------------------------------------- 1 | ### Environment vars for the backend image 2 | # We explain each flag you can pass to a node and what it does in this file. However, note 3 | # that the actual values of many of these flags are passed on a per-environment basis using 4 | # the docker-compose file for the particular node type (eg devent/testnet/mainnet). 5 | 6 | # If you are running a validator, you must set this to the exact same seed that you used to 7 | # register your validator. It will be a twelve word mnemonic you got when you created your 8 | # wallet. You must set this in your docker-compose if you want your node to run as a validator. 9 | POS_VALIDATOR_SEED= 10 | 11 | # Options are: [blocksync, hypersync, hypersync-archival] 12 | # - blocksync: Runs a vanilla blocksync. Will download headers from the beginning of time and 13 | # then download all blocks and connect them. This is the slowest sync type but it's also 14 | # the best supported as of Apr 2024. 15 | # 16 | # - hypersync: Your node will download a snapshot of the state that is at most one week old, 17 | # validate that the state lines up with a checksum, and then only connect the last week of 18 | # blocks. This is much faster than blocksync, but a little more error-prone. In the coming 19 | # months, this will become the recommended sync type. 20 | # 21 | # - hypersync-archival: The same as hypersync, but it also downloads historical blocks without 22 | # connecting them. Much faster than blocksync, but still allows for historical analysis or 23 | # building interesting data structures off of historical data. 24 | SYNC_TYPE='blocksync' 25 | 26 | # When true, the node will build the indexes needed to allow *other nodes* to sync from it. 27 | # Note this can be true with any SYNC_TyPE, but it's required with the hypersync-* 28 | # sync types. 29 | HYPERSYNC=true 30 | 31 | # When this flag is set, we will query these nodes for a checkpoint block and we will skip 32 | # signature checking until we reach this block. Note this flag is extremely important 33 | # for syncing. If you don't set it, syncing will take a really long time. 34 | CHECKPOINT_SYNCING_PROVIDERS= 35 | 36 | # The log level. 0 = INFO, 1 = DEBUG, 2 = TRACE. Defaults to zero 37 | GLOG_V=0 38 | 39 | # The syntax of the argument is a comma-separated list of pattern=N 40 | # where pattern is a literal file name (minus the ".go" suffix) or "glob" 41 | # pattern and N is a V level. For instance, -vmodule=gopher*=3 sets the V 42 | # level to 3 in all Go files whose names begin "gopher". 43 | # Example: GLOG_VMODULE=--glog-vmodule="*api*=0,*balance*=0" 44 | GLOG_VMODULE= 45 | 46 | # Whether or not to use the DeSo testnet. Mainnet is used by default. 47 | TESTNET=false 48 | 49 | # When set to true, this node will only connect to other nodes that have 50 | # regtest=true. This is used to configure nodes to run in devnet. It should 51 | # be falst if you're running on testnet or mainnet. 52 | REGTEST=false 53 | 54 | # A comma-separated list of ip:port addresses that we should listen on. 55 | # These will take priority over addresses discovered by network 56 | # interfaces. 57 | EXTERNAL_IPS= 58 | 59 | # A comma-separated list of ip:port addresses that we should connect to on startup. 60 | # If this argument is specified, we don't connect to any other peers. This is useful 61 | # if you want to debug your node sync without worrying about external factors. 62 | CONNECT_IPS= 63 | 64 | # A miner is started if and only if this field is set. Indicates where to send 65 | # block rewards from mining blocks. Public keys must be 66 | # comma-separated compressed ECDSA public keys formatted as base58 strings. 67 | MINER_PUBLIC_KEYS= 68 | 69 | # How many threads to run for mining. Only has an effect when --miner_public_keys 70 | # is set. If set to zero, which is the default, then the number of 71 | # threads available to the system will be used. 72 | NUM_MINING_THREADS=0 73 | 74 | # A comma-separated list of ip:port addresses that we should connect to on startup. 75 | # If this argument is specified, we will still fetch addresses from DNS seeds and 76 | # potentially connect to them. 77 | ADD_IPS= 78 | 79 | # A comma-separated list of DNS seeds to be used in addition to the 80 | # pre-configured seeds. 81 | ADD_SEEDS= 82 | 83 | # admin_public_keys is list of public keys delimited by a space 84 | # which gives users access to the admin panel. If '*' is specified 85 | # anyone can access the admin panel. 86 | ADMIN_PUBLIC_KEYS=* 87 | 88 | # super_admin_public_keys is a list of public keys delimited by a space 89 | # which gives users access to the super tab of the admin panel and select endpoints 90 | # for these privileged users. At this time, super admins can adjust the reserve price 91 | # at which this node will sell $DESO, set the slippage fee applied to $DESO buys, 92 | # and manage verification of users on this node. 93 | SUPER_ADMIN_PUBLIC_KEYS=* 94 | 95 | # When set, determines the port on which this node will listen for protocol-related 96 | # messages. If unset, the port will default to what is present in the DeSoParams set. 97 | # Note also that even though the node will listen on this port, its outbound 98 | # connections will not be determined by this flag 99 | # (17000 mainnet default, 18000 testnet default). 100 | PROTOCOL_PORT= 101 | 102 | # When set, determines the port on which this node will listen for json 103 | # requests. If unset, the port will default to what is present in the 104 | # DeSoParams set (17001 mainnet default, 18001 testnet default). 105 | API_PORT= 106 | 107 | # Transactions below this feerate will be rate-limited rather than flat-out 108 | # rejected. This is in contrast to min_feerate, which will flat-out reject 109 | # transactions with feerates below what is specified. As such, this value will have no 110 | # effect if it is set below min_feerate. This, along with min_feerate, should 111 | # be the first line of defense against attacks that involve flooding the 112 | # network with low-fee transactions in an attempt to overflow the mempool 113 | RATE_LIMIT_FEERATE=0 114 | 115 | # The minimum feerate this node will accept when processing transactions 116 | # relayed by peers. Increasing this number, along with increasing 117 | # rate_limit_feerate, should be the first line of 118 | # defense against attacks that involve flooding the network with low-fee 119 | # transactions in an attempt to overflow the mempool 120 | # 121 | # TODO: This is deprecated in favor of the dynamic fee estimator introduced 122 | # in Revolution PoS 123 | MIN_FEERATE=1000 124 | 125 | # The target number of outbound peers. The node will continue attempting to connect to 126 | # random addresses until it has this many outbound connections. During testing it's 127 | # useful to turn this number down and test a small number of nodes in a controlled 128 | # environment. 129 | TARGET_OUTBOUND_PEERS=8 130 | 131 | # The maximum number of inbound peers a node can have. 132 | MAX_PEERS=125 133 | 134 | # The location where all of the protocol-related data like blocks is stored. 135 | # Useful for testing situations where multiple clients need to run on the 136 | # same machine without trampling over each other. 137 | # When unset, defaults to the system's configuration directory. 138 | DATA_DIR=/db 139 | 140 | 141 | # When set, the node will not allow more than one connection to/from a particular 142 | # IP. This prevents forms of attack whereby one node tries to monopolize all of 143 | # our connections and potentially make onerous requests as well. Useful to 144 | # disable this flag when testing locally to allow multiple inbound connections 145 | # from test servers 146 | ONE_INBOUND_PER_IP=true 147 | 148 | # How long the node will wait for a peer to reply to certain types of requests. 149 | # We make this gratuitous just in case the node we're connecting to is backed up. 150 | STALL_TIMEOUT_SECONDS=900 151 | 152 | # When set to true, the node does not look up addresses from DNS seeds. 153 | PRIVATE_MODE=false 154 | 155 | # When set to true, the node will generate an index mapping transaction 156 | # ids to transaction information. This enables the use of certain API calls 157 | # like ones that allow the lookup of particular transactions by their ID. 158 | # Defaults to false because the index can be large. 159 | TXINDEX=true 160 | 161 | # The amount of DeSo given to new accounts to get them started. Only 162 | # active if --starter_deso_seed is set and funded. 163 | # 1 milli (~$0.10 at $100 coin price). 164 | STARTER_DESO_NANOS=1000000 165 | 166 | # A comma-separated list of 'prefix=nanos' mappings, where prefix is a phone 167 | # number prefix such as \"+1\". These mappings allow the 168 | # node operator to specify custom amounts of DeSo to users verifying their phone 169 | # numbers based on the country they're in. This is useful as it is more expensive 170 | # for attackers to get phone numbers from certain countries. An example string would 171 | # be '+1=2000000,+2=2000000', which would double the default nanos for users with 172 | # with those prefixes. 173 | STARTER_PREFIX_NANOS_MAP= 174 | 175 | # When proviced, this seed is used to send a 'starter' amount of DeSo to 176 | # newly-created accounts. 177 | STARTER_DESO_SEED= 178 | 179 | # The IP:PORT or DOMAIN:PORT corresponding to a node that can be used to 180 | # set/get global state. When this is not provided, global state is set/fetched 181 | # from a local DB. Global state is used to manage things like user data, e.g. 182 | # emails, that should not be duplicated across multiple nodes. 183 | # 184 | # TODO: Global state is deprecated in favor of the new Postgres+GraphQL pipeline. 185 | # More details on this soon. 186 | GLOBAL_STATE_REMOTE_NODE= 187 | 188 | # When a remote node is being used to set/fetch global state, a shared_secret 189 | # is also required to restrict access. 190 | # 191 | # TODO: Global state is deprecated in favor of the new Postgres+GraphQL pipeline. 192 | # More details on this soon. 193 | GLOBAL_STATE_REMOTE_SECRET= 194 | 195 | # Accepts a space-separated lists of origin domains that will be allowed as the 196 | # Access-Control-Allow-Origin HTTP header. Defaults to * if not set. 197 | ACCESS_CONTROL_ALLOW_ORIGINS=* 198 | 199 | # If set, runs our secure header middleware in development mode, which disables some 200 | # of the options. The default is true to make it easy to run a node locally. 201 | # See https://github.com/unrolled/secure for more info. Note that 202 | SECURE_HEADER_DEVELOPMENT=true 203 | 204 | # These are the domains that our secure middleware will accept requests from. 205 | # Accepts a space-separated lists of origin domains. 206 | # We also set the HTTP Access-Control-Allow-Origin 207 | SECURE_HEADER_ALLOW_HOSTS=* 208 | 209 | # Optional. Client-side amplitude key for instrumenting user behavior. 210 | AMPLITUDE_KEY= 211 | 212 | # Optional. Client-side amplitude API Endpoint. 213 | AMPLITUDE_DOMAIN=api.amplitude.com 214 | 215 | # Optional. Twilio account SID (string id). Twilio is used for sending 216 | # verification texts. See twilio documentation for more info. 217 | TWILIO_ACCOUNT_SID= 218 | 219 | # Optional. Twilio authentication token. See twilio documentation for more info. 220 | TWILIO_AUTH_TOKEN= 221 | 222 | # Optional. ID for a verify service configured within Twilio (used for 223 | # verification texts) 224 | TWILIO_VERIFY_SERVICE_ID= 225 | 226 | # Users won't be able to create a profile unless they buy this 227 | # amount of satoshis or provide a phone number. 228 | # TODO: This field is deprecated by ParamUpdater transaction 229 | MIN_SATOSHIS_FOR_PROFILE=50000 230 | 231 | # Optional. Show a support email to users of this node. 232 | SUPPORT_EMAIL=node.admin@protonmail.com 233 | 234 | ## Arguments for the block producer 235 | # 236 | # When set to a non-zero value, the node will generate block 237 | # templates, and cache the number of templates specified by this flag. When set 238 | # to zero, the node will not produce block templates. 239 | # 240 | # TODO: This field is deprecated with the launch of Revolution Proof of Stake 241 | MAX_BLOCK_TEMPLATES_CACHE=100 242 | 243 | # When set to a non-zero value, the node will wait at least this many seconds 244 | # before producing another block template 245 | # 246 | # TODO: This field is deprecated with the launch of Revolution Proof of Stake 247 | MIN_BLOCK_UPDATE_INTERVAL=10 248 | 249 | # When specified, this key is used to power the BitcoinExchange flow 250 | # and to check for double-spends in the mempool 251 | # 252 | # Note: It is currently a bit dangerous to serve user traffic without a 253 | # BLOCK_CYPHER_API_KEY because the validation of transactions using 254 | # alternative mechanisms is not 100%. 255 | BLOCK_CYPHER_API_KEY= 256 | 257 | # When set, the mempool is initialized using a db in the directory specified, and 258 | # subsequent dumps are also written to this dir 259 | MEMPOOL_DUMP_DIR= 260 | 261 | ## Emergency flags that can help in reducing noise from peers when trying to debug. 262 | 263 | # When set to true, the node will not make any outgoing connections or accept 264 | # any incoming connections. 265 | DISABLE_NETWORKING=false 266 | 267 | # When set to true, the node will ignore all INV messages unless they come 268 | # from an outbound peer. This is useful when setting up a node that you want to 269 | # have a direct and 1:1 relationship with another node, as is common when 270 | # setting up read sharding. 271 | IGNORE_INBOUND_INVS=false 272 | 273 | # When set to true, the node will ignore all transactions created on this node. 274 | READ_ONLY_MODE=false 275 | 276 | # When set to an IP:PORT, the BitcoinManager will use this peer to source Bitcoin 277 | # headers and won't talk to anyone else. When unset, a random Bitcoin peer is chosen. 278 | BITCOIN_CONNECT_PEER= 279 | 280 | # When set to true, the node will log a snapshot of all DB keys every 30s. 281 | LOG_DB_SUMMARY_SNAPSHOTS=false 282 | 283 | # When set to true, the UI will show processing spinners for unmined posts / DeSo 284 | # / creator coins. 285 | SHOW_PROCESSING_SPINNERS=true 286 | 287 | # When set to true, unmined BitcoinExchange transactions from peers are 288 | # disregarded. This is OK because we will eventually reprocess this transaction once 289 | # it gets mined into a block, although anything that is built on top of it may not 290 | # be considered. It's set to false by default because most nodes connect to trusted 291 | # peers right now via --connectips and --ignore_inbound_peer_inv_messages. 292 | # 293 | # TODO: It is currently insecure to serve user write traffic without setting this 294 | # flag to true because soneone could theoretically submit garbage entries to the 295 | # mempool. 296 | IGNORE_UNMINED_BITCOIN=false 297 | 298 | # Google credentials to upload images to bucket. This is needed in order for image 299 | # uploads to work. 300 | GCP_CREDENTIALS_PATH= 301 | 302 | # Name of bucket to store images 303 | GCP_BUCKET_NAME=images.bitclout.com 304 | 305 | ### Environment vars for the frontend image 306 | 307 | # Override the Caddyfile with the one in this directory 308 | CADDY_FILE=/app/Caddyfile.dev 309 | --------------------------------------------------------------------------------