zold-io / zold

An Experimental Non-Blockchain Cryptocurrency for Fast Micro Payments
https://www.zold.io
MIT License
194 stars 53 forks source link

Node does not expose current score value (or expose it with delay) #611

Open dapi opened 5 years ago

dapi commented 5 years ago

How to reproduce:

  1. Start a node.
  2. Wait a hour.
  3. Check file farm
danil@office:~/code/zold(master*)$ cat farm
13/7: 2018-12-04T21:00:00Z 94.232.57.6 4097 Azu6enIy@1142c2d008235bbe Nb5IbU MUftAn iotIr3 lTMbYy u7yoBE enciKW 3K7x8V 2cLqjA yhAgPH syDSES YigCPF iGsgHC 48S3VE
  1. Check node by HTTP request:
danil@office:~/code/zold(master*)$ curl -I http://localhost:4097/ |  grep Score
X-Zold-Score: 7/7: 2018-12-04T21:00:00Z 94.232.57.6 4097 Azu6enIy@1142c2d008235bbe Nb5IbU MUftAn iotIr3 lTMbYy u7yoBE enciKW 3K7x8V

We see 13 points in farm but only 7 points is published.

0crat commented 5 years ago

@yegor256/z please, pay attention to this issue

0crat commented 5 years ago

@dapi/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

yegor256 commented 5 years ago

@dapi definitely a bug, thanks for reporting

0crat commented 5 years ago

Job #611 is now in scope, role is DEV

0crat commented 5 years ago

Bug was reported, see §29: +15 point(s) just awarded to @dapi/z

denis-konovalyenko commented 5 years ago

@yegor256 , my node is meeting the same thing - the score in farm is 8:

8 5c7bb3d6 91.211.13.180 1000 LtDWbl7z e560c4fb95684c6d

however, the exposed score value is 0:

{
  "repo": "zold-io/zold",
  "version": "0.24.2",
  "alias": "91.211.13.180:4096",
  "network": "zold",
  "protocol": 2,
  "score": {
    "value": 0,
    "host": "91.211.13.180",
    "port": 4096,
    "invoice": "LtDWbl7z@e560c4fb95684c6d",
    "time": "2019-03-03T11:00:15Z",
    "suffixes": [

    ],
    "strength": 8,
    "hash": null,
    "expired": false,
    "valid": true,
    "age": 0,
    "created": "2019-03-03T11:00:15Z"
  },
  "pid": 1042,
  "processes": 4,
  "cpus": 2,
  "memory": 211083264,
  "platform": "i586-freebsd11.2",
  "load": 0.0,
  "total_mem": 2108841984,
  "threads": "1/48",
  "wallets": 359,
  "remotes": 69,
  "nscore": 169,
  "farm": {
    "threads": [
      {
        "name": "0:2207",
        "status": "sleep",
        "alive": true,
        "vars": {
          "tid": "1",
          "start": "2019-03-03T03:06:48Z",
          "futex_lock": null,
          "futex_badge": null,
          "futex_cycle": null,
          "futex_time": null
        }
      },
      {
        "name": "0:2206",
        "status": "sleep",
        "alive": true,
        "vars": {
          "tid": "2",
          "start": "2019-03-02T22:06:27Z",
          "futex_lock": null,
          "futex_badge": null,
          "futex_cycle": null,
          "futex_time": null
        }
      },
      {
        "name": "cleanup",
        "status": "sleep",
        "alive": true,
        "vars": {
          "futex_lock": null,
          "futex_badge": null,
          "futex_cycle": null,
          "futex_time": null
        }
      }
    ],
    "pipeline": 1,
    "best": "0:1100",
    "farmer": "Zold::Farmers::Plain"
  },
  "entrance": {
    "history": "2260.82/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2237.36/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2200.02/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2178.78/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2236.34/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 1949.54/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2194.59/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2247.92/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2208.52/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2495.68/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2363.0/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2604.04/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2478.47/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2524.42/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2546.53/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb, 2652.2/1/17737fee5b825835/0.0000/6388t/7efb9b/2Mb",
    "history_size": 16,
    "speed": 2086.3626562499994,
    "ledger": 0,
    "modified": 0,
    "push": [
      {
        "name": "push",
        "status": "sleep",
        "alive": true,
        "vars": {
          "futex_lock": null,
          "futex_badge": null,
          "futex_cycle": null,
          "futex_time": null,
          "wallet": "17737fee5b825835"
        }
      }
    ],
    "queue": 2014,
    "threads": 9,
    "queue_limit": 256
  },
  "date": "2019-03-03T11:00:16Z",
  "hours_alive": 39.77,
  "home": "https://www.zold.io"
}
denis-konovalyenko commented 5 years ago

@yegor256 , it looks like that this is the root cause of not getting into the list of remotes for a month or so...