You are viewing a single comment's thread from:

RE: BlockTrades Steem wallet is operational again

in #blocktrades5 years ago

I believe a new function called approximate_square_root was used from a library commonly used by steem (the library is called "fc"). It was assumed that this function can only return positive values (like a true square root function). But apparently under some input conditions, it could return a negative number. This negative number in turn managed to trigger a protective check in the code that prevents bad math from happening by stopping block processing.

At first, you might wonder why a "protective check" stops blockchain processing, but it's a good idea to have these checks. These checks prevent generating bad state data or other unintended consequences that could result in money transactions being processed incorrectly.

Sort:  

Thanks for this explanation.

Thats great to know! Can you show us which line of code do this? Just wondering.

Looking at the public steem repo, I think the "quick fix" was here: https://github.com/steemit/steem/commit/587574f7aefd030ac440df853e00263a4d92c610

But there's active commits going on now, so if I had to guess, I would guess they are looking at creating a more elegant solution. But that's pure speculation on my part as I haven't reviewed any of those changes yet.