-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pow check of events incoming #341
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it with pow = 1, then I publish a new order with mostro-cli last commit and mostrod publish the order
If I try to cancel the event now I get INFO mostrod::app: Not POW verified event!
and it doens't cancel, that is ok
I noticed this too...for example i tried with 0x 0 - 4 bits to 0 so 4 I think that we need to think to pow as some robust one like 30 so cannot have a random lucky shot...if you put pow=1 on mostrod it's not so incredible that an event can be generated with the first digit that is zero. This is my opinion, I can ask confirmation to @yukibtc in case or just look at the code. |
I see, great job, let's merge this 👶🏽 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐤
Correct. A POW of 24-32 could be good. Exists an option in the
You can set POW in let client = Client::default();
client.update_min_pow_difficulty(28);
// OR
let opts = Options::default().min_pow(28);
let client = Client::with_opts(signer, opts); Will be logged an error message when receive an event with low difficulty. |
Hi @grunch ,
mostrod
now checks the POW of incoming events.Settings file now in
[mostro]
section has also pow value ( 0 means no pow ).Added also pow requested by mostro in info event.