Comments (7)
Hey, I took a quick peek at the RXC code and the problem is that the explorer is currently modelled after how DASH and PIVX masternodes work, but your masternode list output is quite different. For example, the explorer is expecting output like this:
{
"rank": 128,
"network": "ipv6",
"txhash": "062540b5786a1cf334bde20fef17cb2caa5fdeb9d66f974a2780c781797df8a2",
"outidx": 0,
"status": "ENABLED",
"addr": "EJTyK7RFrFR6UB3WRBv55byna6bJhEm3S9",
"version": 70914,
"lastseen": 1619893410,
"activetime": 4713775,
"lastpaid": 1619884067
}
but instead your coin is showing:
'631949a7c5903e729df41b99a29aa44de715c5da00ec715d751624d34d45807c-1': {
proTxHash: '4b87dc2d413d1b346b9fe9909b9b913b1f90b8f5185204ca80b18b9aa187779a',
address: '178.62.59.111:23506',
payee: 'RGm7rWA1TKacVnfsbu7WfvXbdv5y4xxrb2',
status: 'ENABLED',
lastpaidtime: 1601882164,
lastpaidblock: 2937,
owneraddress: 'RP2cMFzqpaBR88Ej6R1o5ZbN8HK9mU3EhC',
votingaddress: 'RQMyQGQiKDxKfivrQSCv66p6FFWrcZUPFX',
collateraladdress: 'RWnuQ9bRY9GKWT1ydFyjMLRsXTYaA5k2Ax',
pubkeyoperator: '954364d89102f2498e431879a913f0891fd38aabca802c6eb3a45d4816ac232c96bb2fca83972365e4106c1f49759f94'
}
The following DASH/PIVX fields will need to be mapped to what I think are the RXC equivalents:
lastpaid = lastpaidtime
addr = payee
txhash = proTxHash
But theres a ton of fields from DASH/PIVX that are not found in RXC's masternode list (there is no way to do this via config, it would have to be done by manually editing the explorer code for now):
activetime = ???
lastseen = ???
version = ???
outidx = ???
network = ???
rank = ???
RXC's masternode list also has some additional fields not found in the DASH/PIVX implemenation which could be useful to display such as the address
or lastpaidblock
fields for example.
Unfortunately, because of the huge differences in the data returned from the masternode list cmd, this isn't a quick or easy fix. I would like to further expand the ability for the explorer to handle these types of customizations properly, but its not very high on my priority list right now and probably won't get around to it until after v2.0 is released.
To help determine the best path forward for fixing this problem in a future update, do you know which coin RXC was cloned from? I'm mostly wondering if this newer masternode implementation was inherited from an older coin or if it was custom developed for RXC specifically?
from eiquidus.
Thank you for reply, as RXC is fork of DASH v14, with some Bitcoin properties, so its hybrid of a newer DASH code.
Al those older DASH forks used older codes, v7-v9 thats why RXC masternode commands are different :)
Can you point me in what part of code that is defined, so that i can at least try to learn.
As im learning, i will give my best to figure out what you suggested and if you have any time to just show Enabled and Address on maternode link, that would be enough.
I would gladly pay you some RXC bounty, you can sell it on whitebit
from eiquidus.
Thanks for the info. You are correct, I can confirm that we were behind on the latest Dash masternode format and were only supporting the older format which PIVX and many other coins still use. I've now added preliminary support for the newer Dash masternode format where it will auto detect which format your data is and adjust accordingly. Stop your explorer, do a git pull
, and then restart the explorer to take advantage of the update. The masternode data should appear after the new update is in place and after running /path/to/explorer/scripts/sync.sh /path/to/node masternodes
.
Please take a look and let me know if you notice any problems or see anything you feel can be improved. The one thing I was not 100% sure about was which wallet address to display. The older Dash format only returned a single wallet address, but the newer format returns four wallet addresses. I opted for displaying the payee
address, but perhaps one of the other addresses would be more correct to display instead?
from eiquidus.
Ok i did PULL, but still does not show on masternodes tab, you can check also
when i start script sh masternode i get this, probably something with database?
{ MongoError: E11000 duplicate key error collection: baza.masternodes index: addr_1 dup key: { : "RRRNFr6ya2aZ7AJttcBEfpF2cRXCDdvmM4" }
at Function.create (/root/explorer/node_modules/mongodb/lib/core/error.js:57:12)
error: cannot save masternode RRRNFr6ya2aZ7AJttcBEfpF2cRXCDdvmM4.
After that i go to mongo and do
db.masternodes.remove( { } )
and i get
WriteResult({ "nRemoved" : 1 })
But on sync i get same problem, it sync same address and it stop.
from eiquidus.
Sorry about that, I was trying to patch this quick and therefore didn't test as thoroughly as I should have. I posted another small update which should now allow duplicate masternode wallet addresses. You will need to wipe your explorers masternode database for this to work, so that it can be recreated with the newer changes. Follow these steps:
- #Stop the explorer
- git pull
- mongo
- use explorerdb
- db.masternodes.drop()
- exit
- #Restart the explorer
- /path/to/explorer/scripts/sync.sh /path/to/node masternodes
Hopefully that should work better this time.
from eiquidus.
:) i really cannot thank you enough for this fix!
syncing masternodes.. please wait..
masternode sync complete
Please if you have time register at our wallet/mainwebsite and give me your RXC address.
Please visit https://rxc.crypto.ba
from eiquidus.
You're welcome! Thanks for bringing the issue to my attention.
I wasn't really working for bounty, but if you feel inclined to send coins, I installed an RXC daemon to test this change so I have an address already: RDMv6tP1cA2ts8UugaBiBp8se8nM4kXLCp
I'm closing this issue for now, but feel free to reopen if you notice further problems later.
from eiquidus.
Related Issues (20)
- API listed local IP address HOT 4
- Coin Supply HOT 1
- Empty pages for transcations HOT 2
- hi team-exor Can the function of Extracted by be added? For example https://chainz.cryptoid.info/ltc/ HOT 3
- hi team-exor Can the function of Latest Blocks be added? HOT 3
- install question HOT 1
- sync-masternodes error HOT 7
- Burned coins vs. circulating supply HOT 2
- Unable to start explorer NPM server HOT 9
- Double balance
- Not accepted mined blocks are not hidden nor marked HOT 8
- cannot set headers after they are sent? HOT 3
- Help to add a new exchange file in the system HOT 2
- [Feature Request] Extending the current api explorer to support light wallets up to trezor codebook v2. HOT 3
- error on running HOT 1
- Coin Supply issue HOT 2
- explorer not executing the /etc/getlasttxs/0 command after loading the main index page HOT 5
- logo does not appear in the market, address tabs HOT 2
- the list of masternodes, lists a maximum of 4388 masternodes HOT 7
- add getalldifficulty for the api for MateableCoin HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eiquidus.