Author

Topic: Sending alerts in the testnet-in-a-box (Read 1340 times)

hero member
Activity: 583
Merit: 505
CTO @ Flixxo, Riecoin dev
hero member
Activity: 583
Merit: 505
CTO @ Flixxo, Riecoin dev
October 29, 2013, 12:28:42 PM
#5
I believe it's ok that the keys are kept secret, it would be a mess otherwise.
If you need to test, I can think of two options: comment out the validation (make CAlert::CheckSignature return always true) or use your own keys.
If you create new keys using CKey::MakeNewKey and then IsValid() there should be no such thing as "fluky keys"
But I guess that either way you'll have to code you own alert sending functions.
Asking a dev to generate an alert for you is a good idea but you can do it only once or twice, you can't rely on that for testing/debugging.
I'm working on an alt-coin so I generated new keys but I haven't written the code to actually test them yet... it shouldn't be hard: just create a CAlert manually and then make the client relay it to the other nodes (adding it to mapAlerts).
legendary
Activity: 1512
Merit: 1036
October 29, 2013, 07:53:41 AM
#4
I don't know that it's ever been done, but you could ask for a testnet alert to be set by a core dev if you are a client developer that wants to implement user presentation properly.
sr. member
Activity: 412
Merit: 287
October 29, 2013, 03:49:47 AM
#3
Have you been successful? I'd be wary about altering the pubkey (after generating a private one) and recompiling. Obviously a testing environment should be as close to the real thing as possible. It working because of a fluky choice in key, would be a mess. We shouldn't have to modify code to get this working. Substituting a key I could live with, but right now excluding it feels wrong.

It should be included and adequately documented. Developers are given access to more features on a testnet, signing and sending alerts should be one of those things. Not just being told "you're not one of these 3 people, so youlll never have to look at this code" by omission.

If not the main testnet, it may as well be available for our own testnet in a box.
hero member
Activity: 583
Merit: 505
CTO @ Flixxo, Riecoin dev
October 28, 2013, 01:25:21 PM
#2
I found no code for generating alerts. In alert_tests.cpp, I found this:

// (SignAndSave code not shown, alert signing key is secret)

but I think that code for SignAndSave should be shown: they could share the code without sharing the private key, otherwise it feels like security by obscurity.
Currently we have to make our own code to generate alerts and test them. If we change the keys then the tests no longer work and can't be made to work without extra coding.
sr. member
Activity: 412
Merit: 287
October 28, 2013, 12:00:48 PM
#1
I know the testnet gets periodic alerts but I wanted to do it myself to check how my software will react. Is there any scripts which will do this?

I'm sure others have a similar interest.. I'm also just curious about how to do this, I know for the main bitcoin network Satoshi, theymos and Gavin have they key, but how do we do this using our own testnet?
Jump to: