stellar / stellar-core

Reference implementation for the peer-to-peer agent that manages the Stellar network.
https://www.stellar.org
Other
3.12k stars 970 forks source link

Stellar Core doesn't want to sync (Version: stellar-core 21.3.1) #4448

Closed Nik-1989 closed 2 months ago

Nik-1989 commented 2 months ago

Dear all, hello!

I installed the stellar-core node and I got it to synchronize with the blockchain so that I could watch, see and send transactions from my server.

my config file contains the following code:

NODE_SEED="SDQVDISRYN2JXBS7ICL7QJAEKB3HWBJFP2QECXG7GZICAHBK4UNJCWK2 self"
NODE_IS_VALIDATOR=false
PUBLIC_HTTP_PORT=true
PEER_PORT=11625
HTTP_PORT=11626
PREFERRED_PEERS=[]
KNOWN_PEERS=[]
DATABASE="postgresql://dbname=stellar user=stellar password=stellar host=localhost"
#DATABASE="postgresql://stellar:stellar@localhost:5432/stellar?sslmode=disable"
DEPRECATED_SQL_LEDGER_STATE = false
LOG_FILE_PATH="/var/log/stellar-core.log"
BUCKET_DIR_PATH="buckets"

FAILURE_SAFETY=0
UNSAFE_QUORUM=true

NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"

[QUORUM_SET]
THRESHOLD_PERCENT=100
VALIDATORS=["$self"]

[HISTORY.local]
get="curl -sf https://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}"

_NODESEED - test specified

_[HISTORY.local] get="curl -sf https://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}"_

2024-08-27T08:50:37.919 GCTI6 [default INFO] Application destructing 2024-08-27T08:50:37.919 GCTI6 [default INFO] Joining 11 worker threads 2024-08-27T08:50:37.919 GCTI6 [default INFO] Joined all 12 threads 2024-08-27T08:50:37.919 GCTI6 [default INFO] Application destroyed 2024-08-27T09:05:50.828 GCTI6 [default INFO] Starting stellar-core stellar-core 21.3.1 (4ede19620438bcd136276cdc8d4ed1f2c3b64624) 2024-08-27T09:05:50.828 GCTI6 [Database INFO] Connecting to: postgresql://dbname=stellar user=stellar password=**** host=localhost 2024-08-27T09:05:50.843 GCTI6 [SCP INFO] LocalNode::LocalNode@self qSet: d05a3b 2024-08-27T09:05:50.849 GCTI6 [Database INFO] DB schema is in current version 2024-08-27T09:05:50.849 GCTI6 [default INFO] Dropping accounts 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping trustlines 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping accountdata 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping claimablebalances 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping liquiditypools 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping contractdata 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping contractcode 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping configsettings 2024-08-27T09:05:50.850 GCTI6 [default INFO] Dropping ttl 2024-08-27T09:05:50.851 GCTI6 [default INFO] Listening on 0.0.0.0:11626 for HTTP requests 2024-08-27T09:05:50.851 GCTI6 [Database WARNING] Non-sqlite3 database detected. Support for other sql backends is deprecated and will be removed in a future release. Please use sqlite3 for non-ledger state data. 2024-08-27T09:05:50.851 GCTI6 [Bucket INFO] BucketListDB enabled: pageSizeExponent: 14 indexCutOff: 20MB, persist indexes: true 2024-08-27T09:05:50.851 GCTI6 [default INFO] Connection effective settings: 2024-08-27T09:05:50.851 GCTI6 [default INFO] TARGET_PEER_CONNECTIONS: 8 2024-08-27T09:05:50.851 GCTI6 [default INFO] MAX_ADDITIONAL_PEER_CONNECTIONS: 64 2024-08-27T09:05:50.851 GCTI6 [default INFO] MAX_PENDING_CONNECTIONS: 500 2024-08-27T09:05:50.851 GCTI6 [default INFO] MAX_OUTBOUND_PENDING_CONNECTIONS: 56 2024-08-27T09:05:50.851 GCTI6 [default INFO] MAX_INBOUND_PENDING_CONNECTIONS: 444 2024-08-27T09:05:50.851 GCTI6 [default INFO] EXPERIMENTAL_BACKGROUND_OVERLAY_PROCESSING=false 2024-08-27T09:05:50.851 GCTI6 [History INFO] Archive 'local' has 'get' command only, will not be written 2024-08-27T09:05:50.851 GCTI6 [History WARNING] No writable archives configured, history will not be written. 2024-08-27T09:05:50.851 GCTI6 [Ledger INFO] Last closed ledger (LCL) hash is 39c2a3cd4141b2853e70d84601faa44744660334b48f3228e0309342e3f4eb48 2024-08-27T09:05:50.852 GCTI6 [Ledger INFO] Loaded LCL header from database: [seq=1, hash=39c2a3] 2024-08-27T09:05:50.853 GCTI6 [Ledger INFO] Assumed bucket-state for LCL: [seq=1, hash=39c2a3] 2024-08-27T09:05:50.853 GCTI6 [Ledger INFO] Starting up application 2024-08-27T09:05:50.853 GCTI6 [Ledger INFO] Last closed ledger (LCL) hash is 39c2a3cd4141b2853e70d84601faa44744660334b48f3228e0309342e3f4eb48 2024-08-27T09:05:50.853 GCTI6 [Ledger INFO] Loaded LCL header from database: [seq=1, hash=39c2a3] 2024-08-27T09:05:50.854 GCTI6 [Ledger INFO] Assumed bucket-state for LCL: [seq=1, hash=39c2a3] 2024-08-27T09:05:50.854 GCTI6 [Overlay INFO] Binding to endpoint 0.0.0.0:11625 2024-08-27T09:05:50.854 GCTI6 [History INFO] Downloading history archive state: .well-known/stellar-history.json 2024-08-27T09:05:51.423 GCTI6 [History INFO] Archive information: [name: local, server: stellar-core 21.3.1 (4ede19620438bcd136276cdc8d4ed1f2c3b64624), currentLedger: 53220159] 2024-08-27T09:11:49.854 GCTI6 [default INFO] Performing maintenance 2024-08-27T09:11:49.855 GCTI6 [History INFO] Trimming history <= ledger 0 (rmin=4294967295, qmin=1, lmin=0)

these errors indicate that it is impossible to synchronize. Please tell me where I made a mistake and how to set up blockchain synchronization quickly and easily. Thank you. I did not find what I needed in the instructions.

2024-08-27T10:05:40.945 GCTI6 [History INFO] Trimming history <= ledger 0 (rmin=4294967295, qmin=1, lmin=0) 2024-08-27T10:11:39.947 GCTI6 [default INFO] Performing maintenance 2024-08-27T10:11:39.949 GCTI6 [History INFO] Trimming history <= ledger 0 (rmin=4294967295, qmin=1, lmin=0) 2024-08-27T10:17:38.959 GCTI6 [default INFO] Performing maintenance 2024-08-27T10:17:38.961 GCTI6 [History INFO] Trimming history <= ledger 0 (rmin=4294967295, qmin=1, lmin=0) 2024-08-27T10:23:37.972 GCTI6 [default INFO] Performing maintenance

Thanks You!

Nik-1989 commented 2 months ago

[HISTORY.local] get="curl -sf https://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}"

Please tell me which link to use to download the blockchain synchronization?

SirTyson commented 2 months ago

The config is incorrectly setup. HISTORY.local is intended to be used when the validator has an archive on the local filesystem, whereas you need to retrieve the archive from an external node. It also appears that this config is setup for a standalone network as indicated by

[QUORUM_SET]
THRESHOLD_PERCENT=100
VALIDATORS=["$self"]

Standalone networks do not follow pubnet and should only be used in testing environments. I recommend you refer to the validator configuration docs. Additionally, this example config is a good starting point: https://github.com/stellar/packages/blob/master/docs/examples/pubnet-validator-full/stellar-core.cfg

Nik-1989 commented 2 months ago

The config is incorrectly setup. HISTORY.local is intended to be used when the validator has an archive on the local filesystem, whereas you need to retrieve the archive from an external node. It also appears that this config is setup for a standalone network as indicated by

Generated QUORUM_SET: {
   "t" : 6,
   "v" : [
      "mystellar-01",
      {
         "t" : 2,
         "v" : [
            "Blockdaemon Validator 1",
            "Blockdaemon Validator 2",
            "Blockdaemon Validator 3"
         ]
      },
      {
         "t" : 2,
         "v" : [ "SDF 3", "SDF 1", "SDF 2" ]
      },
      {
         "t" : 2,
         "v" : [
            "Whalestack (Finland)",
            "Whalestack (Hong Kong)",
            "Whalestack (Germany)"
         ]
      },
      {
         "t" : 2,
         "v" : [ "SatoshiPay Iowa", "SatoshiPay Singapore", "SatoshiPay Frankfurt" ]
      },
      {
         "t" : 2,
         "v" : [ "FT SCV 1", "FT SCV 3", "FT SCV 2" ]
      },
      {
         "t" : 3,
         "v" : [
            "LOBSTR 5 (India)",
            "LOBSTR 4 (Asia)",
            "LOBSTR 2 (Europe)",
            "LOBSTR 1 (Europe)",
            "LOBSTR 3 (North America)"
         ]
      },
      {
         "t" : 2,
         "v" : [ "Hercules by OG Technologies", "Lyra by BP Ventures", "Boötes" ]
      }
   ]
}

Thanks, I'm trying and I think I managed to get it to sync.

2024-09-04T13:24:36.158 GBNQY [History INFO] Catching up to ledger 53343423: downloading ledger files 25840/833491 (3%)
2024-09-04T13:24:36.206 GBNQY [History INFO] Catching up to ledger 53343423: downloading ledger files 25841/833491 (3%)
2024-09-04T13:24:36.208 GBNQY [History INFO] Catching up to ledger 53343423: downloading ledger files 25842/833491 (3%)
Nik-1989 commented 2 months ago
 "startedOn" : "2024-09-04T15:26:44Z",
      "state" : "Catching up",
      "status" : [
         "Catching up to ledger 53344831: Download & apply checkpoints: num checkpoints left to apply:810227 (2% done)",
         "Publishing 23286 queued checkpoints [63-1490303]: update-archives-0000003f:getting archives"
      ]
   }
}

Please tell me, will this process take 2 weeks? Why so slowly? Powerful server with good ssd disks.