Giter VIP home page Giter VIP logo

run's Introduction

Run your own DeSo node

Running your own DeSo node is easy:

  1. Install Docker and Docker Compose if you don't have it already
    • On Mac and Windows, Docker comes with Docker Compose
    • On Linux you need to install Docker Engine and Docker Compose separately
  2. Execute make devnet, make testnet, or make mainnet depending on which type of node you want to run
    • This will automatically run the relevant docker-compose
  3. If you want to start from scratch, you can always do make wipe or make {environment}-wipe. This will delete all prior blocks/data for your node and allow it to start syncing from scratch again.
  4. Visit http://localhost:4200. This will load the frontend service you just ran and show you all the data that your node is syncing.

Check sync progress

You can check on the sync progress of your local node either by looking at the output or by looking in the admin panel of the frontend.

  1. Create a new user OR sign in with your existing seed phrase
  2. Head to the Admin panel to see your sync status. The tooltips should explain what most things mean.

If you're looking at the output in the terminal, note that there is a header-download phase that is usually pretty quick (a few minutes) followed by a block syncing phase (if you're running iwith --sync-type=blocksync) or a hypersync phase (if you're running --sync-type=hypersync-archival). The sync type is specified in the base.env and overridden by the docker-compose.yml file for each environment.

Reset your node

If your node fails to sync or you want to try syncing from scratch you can run make wipe.

Learning More

If you want to learn more about how the DeSo node works, you can start by reading each of the relevant docker-compose.yml files and the base.env file, which has a lot of comments describing each of the flags.

If you want to know how the actual underlying node code works, check out our docs page. To learn more about building an app, see our app tutorial. To learn more about our architecture, including a code walkthrough, see our architecture overview.

To run a validator, see our validator instructions doc.

What's next?

Once your node is synced, you have access to the full firehose of DeSo data in real time! Below are some tips on how take full advantage of your node.

  • Go to your Admin tab and watch the unfiltered feed update as your node syncs. It's like a time machine!
    • Note: If your node is having trouble syncing for some reason, try updating the CONNECT_IPS flag in base.env to deso-seed-2.io or deso-seed-4.io and set IGNORE_INBOUND_PEER_INV_MESSAGES to true while you sync. This will pick a fairly reliable node as a sync peer and disregard messages from other peers.
  • Try to whitelist some posts in the Admin tab and see that they've made their way onto your global feed.
  • Read through the flags available in the base.env file. You can adjust these flags however you want, but note that some flags may be overridden in the docker-compose.yml files so just make sure you edit them there if they're set.
  • Set ADMIN_PUBLIC_KEYS to your public key so that the Admin tab is only visible to your account.
  • Set SUPER_ADMIN_PUBLIC_KEYS to your public key so that the super admin tab is only visible to your account.
  • Whitelist some posts and verify that they show up on the global feed.
  • Deploy your node on any cloud provider with a static IP to make it accessible to anyone on the internet.
    • If you do this, you must point two domains at your node. domain.com and api.domain.com.
    • If you do this, you must add your domain to the Caddyfile.dev's Content-Security-Policy or your site won't work. You will need to add two entries: One for domain.com:* and one for api.domain.com:*
  • Add the necessary nginx configuration for your SSL certificates generated by letsencrypt
  • Set the TWILIO* flags to allow new users to get some starter DeSo.
  • Set a SUPPORT_EMAIL so your users can contact you if they run into trouble.
  • Play with the logging verbosity by increasing GLOG_V.

Need help?

You can often find ansers in the DeSo PoS Discussion Telegram Channel The dev team is also active on all DeSo apps such as diamondapp.com and focus.xyz.

run's People

Contributors

chafreaky avatar connerdouglass avatar diamondhands0 avatar ibreznik avatar jaysondemarchi avatar lazynina avatar lvlupguy avatar maebeam avatar mubashariqbal avatar nbardy avatar pingu42069 avatar tijno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

run's Issues

Nodes stuck at 21298

Following fix of #36 - and updating node to stable core/frontend - sync worked but has now again stopped at 21298 whereas chain is at 21354

Core API on port 17001 stopped work

curl --header "Content-Type: application/json" --data-raw '{}' http://localhost:17001/api/v1/node-info
curl: (56) Recv failure: Connection reset by peer

There were no changes, just stopped working a few hours ago. Restarting with downloading the container update does not help.

backend & nginx both exiting

When I do a clean pull and then run run.sh I get the following log output:

This is new as of the last few days. I was running my node over the weekend

~/dev/bitclout/run ~/dev/bitclout/run
Pulling backend  ... done
Pulling frontend ... done
Pulling nginx    ... done
Creating backend  ... done
Creating frontend ... done
Creating nginx    ... done
Attaching to frontend, backend, nginx
frontend    | Loading Caddy config from file: /app/Caddyfile.dev
nginx       | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx       | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
frontend    | {"level":"info","ts":1621479483.483862,"msg":"using provided configuration","config_file":"/app/Caddyfile.dev","config_adapter":""}
nginx       | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
frontend    | {"level":"warn","ts":1621479483.4848008,"logger":"admin","msg":"admin endpoint disabled"}
backend exited with code 0
nginx       | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
frontend    | {"level":"info","ts":1621479483.485014,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0003e6c40"}
nginx       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
frontend    | {"level":"info","ts":1621479483.4853094,"logger":"tls","msg":"cleaned up storage units"}
frontend    | {"level":"info","ts":1621479483.485399,"msg":"autosaved config","file":"/config/caddy/autosave.json"}
frontend    | {"level":"info","ts":1621479483.4854043,"msg":"serving initial configuration"}
nginx       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx       | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx       | 2021/05/20 02:58:04 [emerg] 1#1: host not found in upstream "backend" in /etc/nginx/nginx.conf:14
nginx       | nginx: [emerg] host not found in upstream "backend" in /etc/nginx/nginx.conf:14
nginx exited with code 1

Client sent an HTTP request to an HTTPS server.

Observed behavior:

When connecting to the API https:///get-exchange-rate, i.e., I get a
CORS Missing Allow Origin "Client sent an HTTP request to an HTTPS server."

Configuration:

  1. VPS with fixed IP and domain.
  2. api and domain are pointing to the node
  3. Replaced bitclout.me with domain in nginx.dev
  4. added Content-Security-Policy in Caddyfile
  5. SSL has been added to the nginx.dev (letsencrypt)

Expected behaviour:
API connects to the backend.

Node suddenly shows "502 Bad Gateway" error message

Everything works as normal but sometimes it suddenly shows "502 Bad Gateway" error and everything stops working until I restart the node - sometimes I may need to resync the node for everything to work as normal.

Unable to Sync Node

Syncing stuck with this output being thrown repeatedly for 30 minutes .

Screenshot 2021-04-24 at 2 22 32 AM

CONNECT_IPS flag in dev.env set to bitclout-seed-2.io

IGNORE_INBOUND_PEER_INV_MESSAGES set to true

Unable to login to bitclout.me with original account.

Hi everyone, hope this isn't just an issue I'm experiencing. When I attempt to log in to my main UnknownNFT account, it just spits me back to the homepage and doesn't actually log me in.

UPDATE
I've been able to edit my dev.env file to add my admin public key, which I believe has resolved my problem as I'm able to fully log in and see the proper syncing of the headers and blocks :)

image

image

I do have the node fully up and running and it did actually work momentarily and I could access the admin panel.

I also managed to get some kind of error when trying several times to log in:

unknownerror

Any help would be greatly appreciated! :)

segfault

node segfaults randomly while syncing

I0502 16:45:20.628398 1 kbkPdUd7.go:1] Server._handleTransactionBundle: Found 0 BitcoinExchange txns that were double-spends!
I0502 16:45:20.630483 1 E2539Jcv.go:1] Server._handleTransactionBundle: Accepted 5 txns from Peer [ Remote Address: 104.238.183.241:17000 PeerID=124 ]
E0502 16:45:21.123435 1 C4lzFMjk.go:1] ReadBitCloutMessage: : ReadMessage: Problem decoding NetworkType: EOF
E0502 16:45:21.123475 1 b1qbZ81P.go:1] _connectPeer: Problem negotiating version with peer with addr: (10.8.12.108:8543) err: (negotiateVersion: Problem reading INBOUND peer version for Peer [ Remote Address: 10.8.12.108:8543 PeerID=2706 ]: readVersion: : ReadBitCloutMessage: : ReadMessage: Problem decoding NetworkType: EOF)
I0502 16:45:21.199448 1 tD3yQjnW.go:1] RECEIVED( seq=1817 ) message of type: INV from peer [ Remote Address: 178.63.32.75:17000 PeerID=479 ]: Num invs: 5, SyncResponse: false, InvList: [Type: TX_INV, Hash: b6f8b540d0e806de298b071dbd54f44d25ef7fc00aecbb98732b3717856803ad Type: TX_INV, Hash: bd44283afe134f7d55e70dcafbb806ae52ccd6c6a8a9efa36df89ec3ecca3dd4 Type: TX_INV, Hash: a49e608057e9bd4fe58e562e0f01919150a73701ce2da5645410bbd9512a74b1 Type: TX_INV, Hash: d49b6dc7a9b84994df7dcac7408158f1fd9aef2b0fd457453f9c38326e986d6f Type: TX_INV, Hash: 6a5614aa1ad9e8d21af305ae8864b767f501ef6989ea3b93f0e322cf644f7ace]
I0502 16:45:21.204520 1 Gm24JbqZ.go:1] StartBitCloutMessageProcessor: RECEIVED message of type INV with num hashes 5 from peer [ Remote Address: 178.63.32.75:17000 PeerID=479 ]
I0502 16:45:21.204557 1 S_Jxg4Om.go:1] Server._handleInv: Processing INV message of size 5 from peer [ Remote Address: 178.63.32.75:17000 PeerID=479 ]
I0502 16:45:21.204612 1 vIYiLWeB.go:1] Server._handleInv: Not sending GET_TRANSACTIONS because no new hashes
I0502 16:45:21.215827 1 Jx1BfN_x.go:1] Server._relayTransactions: Mempool view has regenerated
I0502 16:45:21.257348 1 rvFyTp0F.go:1] Server._relayTransactions: Relay to all peers is complete!
I0502 16:45:21.257371 1 XhDCQEJ4.go:1] Server._relayTransactions: Waiting for mempool readOnlyView to regenerate
E0502 16:45:21.684525 1 C4lzFMjk.go:1] ReadBitCloutMessage: : ReadMessage: Problem decoding NetworkType: EOF
E0502 16:45:21.684566 1 b1qbZ81P.go:1] _connectPeer: Problem negotiating version with peer with addr: (10.8.12.108:34813) err: (negotiateVersion: Problem reading INBOUND peer version for Peer [ Remote Address: 10.8.12.108:34813 PeerID=2707 ]: readVersion: : ReadBitCloutMessage: : ReadMessage: Problem decoding NetworkType: EOF)
I0502 16:45:21.747026 1 tD3yQjnW.go:1] RECEIVED( seq=4991 ) message of type: INV from peer [ Remote Address: 104.238.183.241:17000 PeerID=124 ]: Num invs: 2, SyncResponse: false, InvList: [Type: TX_INV, Hash: ce6ac5439f1807265b969290345ec618003b53f10993982a0e9c6db09638fcf7 Type: TX_INV, Hash: 5c30df3ab42ec3f685eef5b2bc230c50a59a22ed5cc34787edee248c91e8be46]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10f08f6]

goroutine 49683 [running]:
kY5Mrtid.GUHSO8lz(0x0, 0x89ffffffffffffff)
CmVzKbMq.go:1 +0x36
kY5Mrtid.(*BlockHash).String(0x0, 0xc3bdb92150, 0x136eb1b)
v4Tz3fpG.go:1 +0x2f
kY5Mrtid.FICRai_5(0xc4fd70d7f8)
Ji454JBg.go:1 +0x1af2
kY5Mrtid.MZ1OwSEE(0xc062930140, 0x0, 0x0, 0x1)
BFzbDghm.go:1 +0x34cb
kY5Mrtid.(*SyncingService).Start.func1(0xc15b7fa680, 0x0, 0x0)
H2KyrdcH.go:1 +0x1ee
github.com/dgraph-io/badger/v3.(*DB).View(0xc0005b3800, 0xc061947f60, 0x0, 0x0)
github.com/dgraph-io/badger/[email protected]/txn.go:800 +0x95
kY5Mrtid.(*SyncingService).Start(0xc4fd70df88)
OabLXZrx.go:1 +0xe6
main.main.func3(0xc0005b3800)
q3kDz99k.go:1 +0xb3
created by main.main
xzTz5LIn.go:13 +0x199f

Node stuck at block 22159

Hello,

Since a few hours back, my node is stuck on block 22159.

I don't know if that is related but the node keeps complaining about the same duplicate range of blocks going from 22126 to 22126

W0508 14:40:58.916311       1 fZhbf2oz.go:1] Got duplicate block < 21877, 00000000004df1710e3a55bfb006005e07c6b75a3d76509875a270ccbeacd81e > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]
W0508 14:40:58.941549       1 fZhbf2oz.go:1] Got duplicate block < 21878, 000000000027799d66ca7a47fb6f9d88bbe3374fb1ea16ffe395277607ba6977 > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]
W0508 14:40:58.941792       1 fZhbf2oz.go:1] Got duplicate block < 21879, 000000000072ba78d0e34e5ff549b50572420b5ae33556b5079044c6b838be77 > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]

.... a few hundreds similar lines

W0508 14:41:33.190892       1 fZhbf2oz.go:1] Got duplicate block < 22125, 00000000003816ccd939633bae7274b283417323f034bdf137d920bd42d873bd > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]
W0508 14:41:33.191315       1 fZhbf2oz.go:1] Got duplicate block < 22126, 000000000072419a36788fc192d6b959b2ad8289dd6c018f28c27e37fe08ae2e > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]
W0508 14:41:33.225144       1 fZhbf2oz.go:1] Got duplicate block < 21877, 00000000004df1710e3a55bfb006005e07c6b75a3d76509875a270ccbeacd81e > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]
W0508 14:41:33.248887       1 fZhbf2oz.go:1] Got duplicate block < 21878, 000000000027799d66ca7a47fb6f9d88bbe3374fb1ea16ffe395277607ba6977 > from peer [ Remote Address: 65.21.92.186:17000 PeerID=238 ]

Edit: Issue still there after pulling the latest core.

`core` exiting

core        | I0423 15:25:21.730420       1 CG67uRND.go:1] Received header bundle with 2000 headers in state SYNCING_HEADERS from peer [ Remote Address: 104.238.183.241:17000 PeerID=1 ] while our header tip is < 2000, 00000000324f341df90a33df81ee501f6caf62aac2e54a920e4cd82389f3f3da >
core exited with code 137

Go crypto/ecdsa verification for admin public keys

When the node is configured to use a whitelist of admin public keys (to restrict access to the Admin tab), we're getting an error from the core when attempting to access the Admin tab.

The website backend / core is returning a HTTP 400 error with this response body for all of the admin-protected endpoints:

{"error":"CheckAdminPublicKey: Invalid token: crypto/ecdsa: verification error"}

And the usual error dialog on the frontend:

Screen Shot 2021-04-22 at 10 57 27 PM

If this is a bug, it exists in the "core" Go project somewhere. As that isn't open sourced yet, I'm reporting the issue here!

Update domain name for Nginx config (removing bitpop mentions)

When setting up a node on a cloud server, the README instructions only work for the one “bitpop.cash” domain and aren’t generalized for developers using their own domain names.

I assume this is a carryover from the development days. We think this should be updated from “bitpop.cash” to a more general whatever domain name you’re using. I have been on the bitpop server in the past.

Error loading shared library libvips.so on Latest

Core container starts but then exits immediately with these errors, when using latest 83b2843a2a059a7cb47a49475acd507bec9d22af

core        | Error loading shared library libvips.so.42: No such file or directory (needed by /core/backend)
core        | Error loading shared library libgobject-2.0.so.0: No such file or directory (needed by /core/backend)
core        | Error loading shared library libglib-2.0.so.0: No such file or directory (needed by /core/backend)
core        | Error relocating /core/backend: vips_cache_drop_all: symbol not found
core        | Error relocating /core/backend: vips_object_print_all: symbol not found

Getting an error when I set the ADMIN_PUBLIC_KEYS to my public key

When I set my public key to the ADMIN_PUBLIC_KEYS field in the dev.env I get the error below.

I have tried clearing the cache. Setting 1 public key, multiple separated by commas, and one per line. No matter what I get the error.

Oops...
Error global params: {"headers":{"normalizedNames":{},"lazyUpdate":null},"status":502,"statusText":"Bad Gateway","url":"http://13.77.183.42/api/v0/admin/get-global-params","ok":false,"name":"HttpErrorResponse","message":"Http failure response for http://13.77.183.42/api/v0/admin/get-global-params: 502 Bad Gateway","error":"\r\n<title>502 Bad Gateway</title>\r\n\r\n

502 Bad Gateway

\r\n
nginx/1.21.0\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}

image

Node suddenly shows $CLOUT Price as $0

Everything else works, "Network" tab says it's fully synced, and I haven't changed anything from Super Admin. Worked flawless for months before this.

Any idea why this could happen? I can't see console errors either, only the coin price is unsynced

Release the source code

There is no source code in this repository. Compiled binaries can be dangerous, if you're a user proceed with caution. If you're a bitclout developer, RELEASE THE CODE and stop lying. It's NOT open source if you don't release the source code.

Error global params

Hi, can help me check with this error, Im use memory 48G.

image

Config:
image

image

Core error:
server go error: I0428 15:25:30.474926 1 server.go:3139] http: panic serving 172.19.0.4:35504: runtime error: invalid memory address or nil pointer dereference

Thanks.

Nodes stuck at 22073

Same issue as #41 and #36

image

Fully reset node (--volume) and resynced -with recommended sync problem options.
Deleted all docker images, restarted (running from windows terminal as admin .\run.sh (on main branch, having pulled latest).
Same issue, stuck :(

@jemarsh

TxErrorDuplicate

According to the instructions, I set up the environment, but encountered 2 errors.

backend | E0624 08:15:00.272022 1 server.go:1360] Server._handleTransactionBundle: Rejected transaction < TxHash: 03b5cc51ac247e55c3b0ce7a110a8c5ec7647a0c67c920562bd8e5f0b47b27ea, TxnType: BC1YLgJxJipZBW5Z7DBymqERREjRmRiRDF28T9sVQs8faG4MMsUiGjS, PubKey: SUBMIT_POST > from peer [ Remote Address: 95.216.8.224:9013 PeerID=7 ] from mempool: TxErrorDuplicate
backend | E0624 08:15:00.272566 1 server.go:1360] Server._handleTransactionBundle: Rejected transaction < TxHash: b6bdbfd0a8d5645c70cdc23cca9284efd43e085db88dd1e0b766445d4d51f32a, TxnType: BC1YLgkU6Yru4GXc4w73tb1Jfg6gB2uvk7UCXvHZcKstAT2XiMinCmc, PubKey: SUBMIT_POST > from peer [ Remote Address: 95.216.8.224:9013 PeerID=7 ] from mempool: TxErrorDuplicate
backend | E0624 08:15:00.272795 1 server.go:1360] Server._handleTransactionBundle: Rejected transaction < TxHash: 024554b9e9332bccd744c9008e84dd84c3dc7c7136b0c9ee15da88e576e5b5df, TxnType: BC1YLi9hJcM7eUEna1msmVN2pmVddDDaXBpC3jXsV1A88tGmqPsK4uk, PubKey: FOLLOW > from peer [ Remote Address: 95.216.8.224:9013 PeerID=7 ] from mempool: TxErrorDuplicate
backend | E0624 08:15:00.272957 1 server.go:1360] Server._handleTransactionBundle: Rejected transaction < TxHash: 9e4c9cf09b4c20d6a8d303b5d5e17a788540b268f84b0a6755bc77f09cf43adc, TxnType: BC1YLgqYVCtaHUC8Vu3dhCxJ2gin9Z5JaocxRUchYZ92wFqqTX7Ffcy, PubKey: LIKE > from peer [ Remote Address: 95.216.8.224:9013 PeerID=7 ] from mempool: TxErrorDuplicate
backend | E0624 08:15:00.273115 1 server.go:1360] Server._handleTransactionBundle: Rejected transaction < TxHash: 03a145f8fcd3b881d2fc43f48608e0a8f41ee83ca0deaca4a804b209dfe4d8af, TxnType: BC1YLhEETYrWhmHP7mQc3YicMzofjA5oGdSW9wntMu1PYfpp4SgQpv3, PubKey: LIKE > from peer [ Remote Address: 95.216.8.224:9013 PeerID=7 ] from mempool: TxErrorDuplicate

And another:

E0624 08:20:48.222504 1 peer.go:145] AddBitCloutMessage: Not enqueueing message GET_HEADERS because peer is disconnecting

These errors have appeared many times, especially the first one.

If I want to mine, besides setting MINER_PUBLIC_KEYS and MAX_BLOCK_TEMPLATES_CACHE(here I set to 2000) in dev.env, what other parameters must I set?

I would be very grateful for any guidance.

RuleErrorDuplicateBlock (E0527, tryUpdateTxindex: Problem running update)

Is this normal? My "Last TxIndex Block Height" (indextip) has been stuck at 11627 for some time now and the log is filling with these messages:-

backend     | I0527 10:28:35.010646       1 exchange.go:794] UpdateTxindex: Updating txindex tip (height: 11627, hash: 0000000000043cb8bd9c7d7bde5ce18ba12fc6080f6635cc3f717d68c1feff33) to block tip (height: 28576, hash: 000000000000927c11bcc0ac354cc3c7e9606f18b0692f733f78b00629932901) ...
backend     | E0527 10:28:35.184930       1 server.go:1079] tryUpdateTxindex: Problem running update: UpdateTxindex: Problem attaching block < TstampSecs: 1617281500, Height: 11628, Hash: 00000000005d2da2a3c3d78f4bb61ab0f895a1b8ebe7f4ac7dc468971cc1919d, ParentHash 0000000000043cb8bd9c7d7bde5ce18ba12fc6080f6635cc3f717d68c1feff33, Status: HEADER_VALIDATED | BLOCK_PROCESSED | BLOCK_STORED | BLOCK_VALIDATED, CumWork: 12100684404445044>: RuleErrorDuplicateBlock
backend     | I0527 10:28:36.214373       1 exchange.go:794] UpdateTxindex: Updating txindex tip (height: 11627, hash: 0000000000043cb8bd9c7d7bde5ce18ba12fc6080f6635cc3f717d68c1feff33) to block tip (height: 28576, hash: 000000000000927c11bcc0ac354cc3c7e9606f18b0692f733f78b00629932901) ...
backend     | E0527 10:28:36.320248       1 server.go:1079] tryUpdateTxindex: Problem running update: UpdateTxindex: Problem attaching block < TstampSecs: 1617281500, Height: 11628, Hash: 00000000005d2da2a3c3d78f4bb61ab0f895a1b8ebe7f4ac7dc468971cc1919d, ParentHash 0000000000043cb8bd9c7d7bde5ce18ba12fc6080f6635cc3f717d68c1feff33, Status: HEADER_VALIDATED | BLOCK_PROCESSED | BLOCK_STORED | BLOCK_VALIDATED, CumWork: 12100684404445044>: RuleErrorDuplicateBlock

Thanks

Uploading profile failed

In the logs I observe regularly the following:

Datadog Tracer v1.29.0 ERROR: Uploading profile failed: Post "http://localhost:8126/profiling/v1/input": dial tcp 127.0.0.1:8126: connect: connection refused. Trying again in 22.735594653s..., 1 additional messages skipped (first occurrence: 29 Apr 21 13:14 UTC)
2021/04/29 13:15:26 Datadog Tracer v1.29.0 ERROR: Failed to upload profile: failed after 2 retries, last error was: Post "http://localhost:8126/profiling/v1/input": dial tcp 127.0.0.1:8126: connect: connection refused

Not sure what the app is trying to do and why it doesn't work.

Error when trying to access the mempool

Request

curl --header "Content-Type: application/json" --request POST --data '{"IsMempool":true}' http://localhost:17001/api/v1/transaction-info

Response

{"B1KKKiGg":"UpdateTxindex: Error connecting txn for mempool request: \u003c TxHash: 1cb76d55c2c33e94411c6fc83109d0fc1efc286e0d451f790d888238dbdf4236, TxnType: BC1YLfgstADdBR2TPmY4njYCLafatVibpFn4hGRX2i8zDs34X2pQhqV, PubKey: PRIVATE_MESSAGE \u003e: UpdateTxindex: Error connecting txn to UtxoView: ConnectTransaction: : _connectPrivateMessage: : RuleErrorInputSpendsNonexistentUtxo"}

What i expect

Screenshot from 2021-04-27 16-00-00
If you go to the admin panel on the node and the mempool section, you can see that there are statistics, but when receiving data from the mempool, there is an incomprehensible error. In response, I expect to receive the same information as on the explorer.bitclout.com

Backend service crashes after "Peer.outHandler: Problem sending message to peer"

Hi, we've been experience strange behavior of the node - it seems to be loosing connection to one of it's peers resulting in crash of the backend container - see the logs attached. Not sure if that's related but also from time to time we can see huge consumption of the memory by the backend (up 99.5%) causing unresponsiveness of the system.

Dockers are run in the Google Cloud VM, 6CPU and 32BG
failed.log

TxnType and PubKey are switched in common logs of the node's core

In logs of the core I see ones like this. It seems that the strings printed in the TxnType and PubKey are switched.
I guess this could be just a logging issue or surfacing some other problem.

I0516 10:12:52.164706       1 PlHe1Obt.go:1] Server._handleTransactionBundle: Transaction (*zdxUKsst.MsgBitCloutTxn)(0xc0424d1f10)(< TxHash: bf64a8ed3579fcd5b6282434f10916048367d89c49a635770ce4c8f06e1eed60, TxnType: BC1YLjHTUnG4X7snVMi9bKWzbLWxfuPRwS5YviTsRLrX6NJsQHWQTUV, PubKey: FOLLOW >)
 from peer [ Remote Address: 107.161.127.130:38040 PeerID=5 ] was added as an ORPHAN

Where is the source code?

Where is the source code of this node? Isn't this supposed to be an open source project? This is only a docker container download containing what? It could contain hostile code. I do not trust this project until you release the code.

Not a real node

This has no source code, or anything similar. It's a docker image downloading and then running a precompiled binary. You're still dependent on their closed source API, and who knows what code could be included in the binary. Do NOT use this. Bitclout is nothing more than a scam.

docker composer up failed on my computer

Hi @maebeam !
I'm trying to run docker-composer-dev.yml, but it shows errors. Of course, I've got pull, just a few mins ago.
Would you like to help me to solve this problem?

Docker Compose is now in the Docker CLI, try `docker compose up`

Recreating backend  ... error
Recreating frontend ...

ERROR: for backend  Cannot start service backend: OCI runtime create failed: container_linux.go:367: startiRecreating frontend ... done

ERROR: for backend  Cannot start service backend: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "run": executable file not found in $PATH: unknown
ERROR: Encountered errors while bringing up the project.
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command docker-compose -f "docker-compose.dev.yml" up -d --build" terminated with exit code: 1.

Release the source code

This code branch is probably in violation of the GPL v2 or v3 or

The MIT License used in bitcoin is widely used across open source software projects to enable innovation and collaboration.

https://opensource.org/licenses/MIT

What is a Substantial Part?

_The Copyright Act does not require that an entire work be copied in order to find that a copyright holder’s rights have been infringed. Copying a substantial part of the work will be sufficiently actionable. In determining whether a substantial part of a work has been copied, the court must exclude from consideration any part of the work not properly the subject matter of copyright under s.3 of the Act.[6] The analysis is largely fact-driven, and the courts will consider both qualitative and quantitative matters. Some of the matters that have been considered include:

a) how central was the element taken to the first work?

b) do the selected parts constitute an essential characteristic of the work?

c) would people who see the copy recognize the source?

d) was the part taken used in a manner that would create a substitute to the first work and thereby jeopardize its economic exploitation? [economic damages can be considered]_

source must be provided and a copy of the license.

GitHub Community Guidelines

Errors connection recommended sync node

I'm getting these errors and my core container crashes each time. Tried it multiple times

Seeing these errors.
_connectPeer: Problem negotiating version with peer with addr: (104.238.183.241:17000) err: (negotiateVersion: Problem reading OUTBOUND peer version for Peer [ Remote Address: 104.238.183.241:17000 PeerID=10 ]: readVersion: : ReadBitCloutMessage: : ReadMessage: Problem decoding NetworkType: EOF)

telnet to this ip and port works

have set the recommend node sync settings when having issues.

node fails to start nginx randomly

The node fails to start sometimes. I think nginx shoud be started after starting frontend.
Here is the log

nginx       | 2021/05/09 13:41:54 [emerg] 1#1: host not found in upstream "frontend" in /etc/nginx/nginx.conf:10
nginx       | nginx: [emerg] host not found in upstream "frontend" in /etc/nginx/nginx.conf:10
nginx exited with code 1

Node stopped synchronizing after usage of the new docker image

Hi @maebeam, I'm back with server stopped synchronisation.

After yesterday updated of the docker image to "19c446547510f1e0b83d56611e732e3fa6a0b32d" server stopped syncing, I can see last post 12h ago. It has also started ignoring super_admins, at the moment I can see only new post but not server stats ( I was able to for some time yesterday).

Docker compose file:

version: "3.7"
services:
  backend:
    container_name: backend
    image: docker.io/bitclout/backend:19c446547510f1e0b83d56611e732e3fa6a0b32d
    command: run
    volumes:
    - db:/db
    - ./:/bitclout/run  
    ports:
    - 17001:17001
    - 17000:17000
    env_file:
    - dev.env
    expose:
    - "17001"
    - "17000"
  frontend:
    container_name: frontend 
    image: docker.io/bitclout/frontend:23d22a586e70b2f6700f01ab4feabe98e53ea991
    ports:
    - 8080:8080
    volumes:
    - ./:/app
    env_file:
    - dev.env
    expose:
    - "8080"
  nginx: 
    container_name: nginx
    image: nginx:latest
    command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
    volumes:
      - ./nginx.dev:/etc/nginx/nginx.conf
      - ./data/certbot/conf:/etc/letsencrypt
      - ./data/certbot/www:/var/www/certbot
    depends_on: 
      - backend
      - frontend
    ports:
      - 80:80
      - 443:443
  certbot:
    image: certbot/certbot
    entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
    volumes:
      - ./data/certbot/conf:/etc/letsencrypt
      - ./data/certbot/www:/var/www/certbot
volumes:
  db:

Full logs attached.
full.log

Incorrect Content Security Directive

Observed behaviour:

When running a bitclout node on a custom domain with a custom Caddyfile the wrong content security is propagated to the front end. That leads to the front-end site not being able to access the API even though API access without the front-end is possible.
The error message in the browser reads "Refused to connect to "" because it violates the following Content Security Policy directive: "connect-src 'self' [...several URLs's listed - origin of the URLs is not from my Caddyfile ...]

Expected behaviour:

The front-end uses the URLs listed in the Caddyfile on the server and gives access to resources in the backend.

ERROR addTransaction: _connectTransaction failed on universalUtxoView

Latest image shows a lot of these errors:

W0508 19:03:01.963890       1 TPHFfDAQ.go:1] UpdateAfterConnectBlock: : maybeAcceptTransaction: : 
ERROR addTransaction: _connectTransaction failed on universalUtxoView; 
this is a HUGE problem and should never happen

Not seen before and flagging up due to the "this is a HUGE problem and should never happen" bit.

issue reading google application credentials

setting relative path in dev.env for google credentials results into this :
Error validating body bytes: SubmitPost: Error uploading images: dialing: cannot read credentials file: open /home/username/credentials.json: no such file or directory

i see that there is an "open" before the path could this be it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.