RunOnFlux / fluxd

Flux Daemon
https://runonflux.io
MIT License
79 stars 41 forks source link

Inconsistency between the data returned by my node and the public API node #235

Open YuXiaoCoder opened 8 months ago

YuXiaoCoder commented 8 months ago

public API node

curl -s -X GET https://api.runonflux.io/daemon/getfluxnodestatus | jq
{
  "status": "success",
  "data": {
    "status": "CONFIRMED",
    "collateral": "COutPoint(9d0d3d0d90355ceebe05522a911c70ddefc4d5a1b501a75bbbe8de778d4e422d, 0)",
    "txhash": "9d0d3d0d90355ceebe05522a911c70ddefc4d5a1b501a75bbbe8de778d4e422d",
    "outidx": "0",
    "ip": "64.32.48.28",
    "network": "ipv4",
    "added_height": 1448447,
    "confirmed_height": 1448449,
    "last_confirmed_height": 1556752,
    "last_paid_height": 1555647,
    "tier": "STRATUS",
    "payment_address": "t1VXMTF9roHHMiVd5gXBX5JcLtB9EKbfRwE",
    "pubkey": "043d191972eda72cc0b028ddfaaf8de5d0487d5e90a092161b69e92ca8adfcc00f35bbfc581d19feba6da8dc9c503fd6313962c33ae788027cef8f395dda8b141a",
    "activesince": "1692192728",
    "lastpaid": "1705166055",
    "amount": "40000.00"
  }
}

My Nodes

curl -s -X GET http://127.0.0.1:16127/daemon/getfluxnodestatus | jq
{
  "status": "error",
  "data": {
    "code": -1,
    "name": "Error",
    "message": "This is not a Flux Node"
  }
}

I check the source code and need to enable -zelnode, how should I run the service?

/opt/fluxmain/core/fluxd -disablewallet
daemon=0
server=1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcbind=0.0.0.0:16124
rpcport=16124
rpcallowip=0.0.0.0/0
#datadir=/mnt/fluxmain/node
maxmempool=1024
dbcache=2048
limitancestorcount=400
limitdescedantcount=400
limitdescendantcount=400
rpcworkqueue=1000
rpcthreads=3000
MorningLightMountain713 commented 8 months ago

I'd suggest you check out the Flux discord and ask your questions there. This isn't an issue with fluxd - this is a configuration issue.

Be careful with that rpcallowip - you generally don't want that exposed to the internet.

It also depens what you're trying to achieve - if you're trying to run a fluxnode - just use the https://github.com/RunOnFlux/fluxnode-multitool - it sets up the node for you.