Bitcoin Forum
April 19, 2024, 08:46:29 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sending Alert messages with Altcoins ?  (Read 1572 times)
integrity42 (OP)
Full Member
***
Offline Offline

Activity: 476
Merit: 100



View Profile WWW
June 22, 2014, 07:08:16 PM
 #1

Is anyone familiar with the alert process?

I'm looking for a walkthrough on how to setup sending an alert on custom alt-coins.

I know sign an alert message with an ECDSA private key -- just looking at how to setup the message.

Thanks.

1713516389
Hero Member
*
Offline Offline

Posts: 1713516389

View Profile Personal Message (Offline)

Ignore
1713516389
Reply with quote  #2

1713516389
Report to moderator
1713516389
Hero Member
*
Offline Offline

Posts: 1713516389

View Profile Personal Message (Offline)

Ignore
1713516389
Reply with quote  #2

1713516389
Report to moderator
1713516389
Hero Member
*
Offline Offline

Posts: 1713516389

View Profile Personal Message (Offline)

Ignore
1713516389
Reply with quote  #2

1713516389
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713516389
Hero Member
*
Offline Offline

Posts: 1713516389

View Profile Personal Message (Offline)

Ignore
1713516389
Reply with quote  #2

1713516389
Report to moderator
HashEngineering
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250

Independent Cryptoveloper


View Profile WWW
June 22, 2014, 08:53:32 PM
 #2

Look at the sendalert rpc command in the peercoin source code.

GRS:  FrFpTbfEAni5Ruf8mNdwVQazJVJaQyEM2Y
BTC:  128Ptecsv4j6NoxdBxdvGzBtipfaAarZMJ
https://bitcointalk.org/index.php?topic=336215 - Android Wallet Creation Service
gatra
Hero Member
*****
Offline Offline

Activity: 583
Merit: 505


CTO @ Flixxo, Riecoin dev


View Profile WWW
October 31, 2014, 07:01:07 PM
 #3

These may help:

https://gist.github.com/laanwj/0e689cfa37b52bcbbb44

https://gist.github.com/gavinandresen/1481736

The first one worked for me.


           ▄▄▄██████████▄▄▄
       ▄▄██
██████████████████▄▄
     ▄█
█████▀████████████▀██████▄
   ▄█
█████████████████████████████▄
  ▄█
█████████▄█▀▀██████████████████▄
 ▄█
███████████▀██████▄▄█████▄███████▄
▄█
██████████▀██▄▄▄▄██▀▀▀▀▀███████████▄
█████████████▀▀██▀████████▀▀████████
█████████████▄█▀████████████████████
████████▀▀▀▀██▀▀▀▀██████████████████
▀█
██████▀▀▀▀██▀▀▀▀███████████████████▀
 ▀█
███████▄████▄▄███████████████████▀
  ▀█
███████████████████████████████▀
   ▀█
█████████████████████████████▀
     ▀█
█████▄████████████▄██████▀
       ▀▀██
██████████████████▀▀
           ▀▀▀██████████▀▀▀
riecoin       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo   
GroundRod
Full Member
***
Offline Offline

Activity: 206
Merit: 100


View Profile
October 31, 2014, 07:54:32 PM
Last edit: October 31, 2014, 08:43:20 PM by GroundRod
 #4

It depends on how your coin has the 'sendalert' command coded.  In order to use the 'sendalert' command the parameters typically go: The message you want to send is the 1st parameter, the 2nd is the private key for every coin I've looked at.  Haven't looked at peercoin though.  Typing 'help sendalert', or sendalert with no parameters into your console should return the help message with the details spelled out.

However knowing what priority to use depends on what other parts of the code use for things like out of hard disk space or major coin forks detected, stuff like that which should always take priority when it comes to alerting the user to issues detected by their client and displayed as the highest priority Alert message.  Picking an alert id is important from the perspective of being able to send another one later on that can delete all the previously issued alerts of a lower value.  That is about all you really need to be known, in order to use the alert system.

Spent a great deal of time on this in Sept for Ixcoin codebase while working on our 0.9.2.1/0.9.3 release.

Wish I'd made the alert commits separate from allot of other stuff, I was working on at the time, so I could reference you to those specific changes.  Originally added the 'sendalert' command code to rpcmisc.cpp, then moved it to rpcnet.cpp, where I think it belongs.

We only build that command into non-release code, but everyone gets the benefit now of being able to use the 'getnetworkinfo' command, where they can see ALL the alerts propagating over the network in the JSON response string returned.  Also our sendalert method offers (for those that know the private key) optional parameters for setting the number of days an alert is relayed, as well as when it expires, not just canceling previous alerts as an optional parameter like I'd seen in many other coins.  My code base and commit history here could possibly help you some:
https://github.com/GroundRod/IXCoin/tree/iXcoin/src

Think the commits on Sept 24th & the 30th were the most relevant to your question:
https://github.com/GroundRod/IXCoin/commits/iXcoin/src
https://github.com/GroundRod/IXCoin/commit/304ec765b20fcda0f5f65847b62c47926a18a8d3

I know that Gavin has done allot of work recently & been changing this part of the code in Bitcoin source, as it heads into rc1, at some point I'll be re-visiting those changes as we once again migrate up...  

Hope that helps,

GR

ETA: Thanks gatra for that link to laanwj's commit, had not seen that particular way of doing sendalert before, it's interesting, yet I still don't like the idea of building an executable with the private key, don't ever let that version get out for your coin, or anyone could generate them.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!