https://docs.nubits.com/hosting-a-data-feed/
Anybody can indicate me how one constructs the signature URL for a data feed?
https://docs.nubits.com/hosting-a-data-feed/
Anybody can indicate me how one constructs the signature URL for a data feed?
Basically you use signmessage (address, message), address being for example an NSR address, the message being any message but here being the json file content that contains your vote. Then the output is a signature you put into a file on Github and then you indicate the URL to this file.
Nope, in your Nu client.
Sounds like we need to add this process to the docs. I’ll create an issue for it.
Well no. One rpc command in nu client.
Well, after some search , this seems to be giving some details —
Do you have to re-sign your voting data each time it changes?
Do you have to re-sign your voting data each time it changes?
yes
Quite some info here too: https://docs.nubits.com/hosting-a-data-feed/
votenotify configuration
Providing votenotify the path to a script in your
conf file will invoke that script when votes are changed. For feed
providers this can be used to automatically update hosted voting data
when the feed provider manually changes votes. Here’s a sample script
that generates the voting data and vote signature with a supplied NSR
address.
#!/bin/bash
NUD=/path/to/nud
ARGS="-testnet"
VOTE_PATH=/path/to/output/vote.json
SIGNATURE_PATH=/path/to/output/vote.json.signature
ADDRESS=S…
$NUD $ARGS getvote >$VOTE_PATH
$NUD $ARGS signmessage $ADDRESS <$VOTE_PATH >$SIGNATURE_PATH
I guess I will plug into a feed when I cannot do otherwise, since hosting a data feed is quite cumbersome right now.
Which part is cumbersome? I found it easy to set the feed generator overall on win.
Setting up my github account, then running another Nu client, generate my vote and their signature and upload these data each time they change into github
The Nu client must be running with RPC enabled (i.e. having server=1 and an rpcuser and rpcpassword in your nu.conf).
in my case i also set rpcport
The Nu client must be running with RPC enabled (i.e. having server=1 and an rpcuser and rpcpassword in your nu.conf).
As suggested by @cryptog, rpcport/port appear to be also needed. I’m getting a “couldn’t connect to the server” error right now.
I reset my nu.conf file.
What value do I have to provide to rpcport and port in it to use the getvote option in windows bash?
Anyone? @sigmike?
I think maybe there’s a misunderstanding here.
You have two clients. The QT app (GUI), and the daemon (headless).
The daemon (nud) runs as an RPC server by default, so you can send commands to it.
The QT (nu) does not have the feature enabled by default. In order to enable RPC commands against the QT app you must add server=1
to your conf file. Then you can run RPC commands against it like you do with the daemon.
I’m not sure why @cryptog is setting the RPC port in his conf file unless he wanted to use a port number besides the default.
You can see all of the default port numbers here: https://docs.nubits.com/rpc-api/
The QT (nu) does not have the feature enabled by default. In order to enable RPC commands against the QT app you must add server=1 to your conf file. Then you can run RPC commands against it like you do with the daemon.
That makes sense! txs
my nu.conf file:
addnode=198.52.199.75
addnode=218.1.18.78
addnode=212.114.48.31
addnode=212.129.19.120
addnode=176.9.113.75
addnode=84.76.78.204
addnode=167.114.116.72
addnode=79.165.43.191
addnode=52.10.23.117
addnode=97.123.141.92
addnode=108.26.50.128
server=1
rpcuser=xxx
rpcpassword=pass
This above should do then.
Now, is below a command against the daemon or the QT app?
“C:\Program Files (x86)\Nu\daemon\nud.exe” getvote > …
That is the daemon, but it must already be running in daemon mode for you to do calls like that. launch it with:
"C:\Program Files (x86)\Nu\daemon\nud.exe --daemon"
Then you should see it as a running process. Then you can do RPC calls with it like in your example.
Sounds great.
–daemon is not recognized as a command on the bash though.
Weird:
I just ran
Creating data feed
“C:\Program Files (x86)\Nu\daemon\nud.exe” getvote >“C:\MyDataFeed\nu_data_feed\crypto_coiner_nu_data_feed.json”
Signing it
“C:\Program Files (x86)\Nu\daemon\nud.exe” signmessage SkQQBagedDma9tTekKLgdSNvZ29Ujyjprg <“C:\MyDataFeed\nu_data_feed\crypto_coiner_nu_data_feed.json” >“C:\MyDataFeed\nu_data_feed\crypto_coiner_nu_data_feed.json.signature”
and it seem to work, as the last time I updated my feed.
But, i did not run “C:\Program Files (x86)\Nu\daemon\nud.exe --daemon” and nud.exe is not running as background process