@Blocks X - Z:
reward = indendedOutput * Coin
intendedOutput=number you want to be rewarded for that block
Coin is usually dismissed and not thought about.
After we started having issues I dug into it and it turns out Coin is only used to format the rewards section in a more sensible manner.
Coin = 100000000 (adds 8 0's to your coin amount)
So, if we want a reward of 1 coin:
reward = 1 * Coin
But in reality this pushes 100000000, which is sent to be formatted and turns into 1.00000000
So when I tried to do something like:
9.87 * coin, we get issues. Functions like this are only accurate to a certain decimal place in programming.
Instead of 987000000, we get 987000000.00000011920928955078125
While most operating systems would round this particular example to 987000000 automatically, not all results &or operating systems round so cleanly.
So rounding errors like this is some higher (lower?) level computer science voodoo that I honestly wasn't aware of, and didn't show up in my testing.
It can be fixed, but that's the biggest issue facing swing currently.
(On a side note, most altcoins forking issues are caused by this. Lots of devs never figure out the cause and it's killed tons of coins.)
Fortunately I learned of rounding errors thanks to the dev lounge in my slack group, and had a computer based PHD student / friend help me dissect the code to see exactly where things were going wrong.
Also the resulting issues aren't too severe for us (yet). I don't think we are in much danger of catastrophic failure, just minor annoyances.
A side note, if you want to help with core development in Swing reach out to me!
More casually helping people holding Swing and a basic understanding of development = Faster / Better / Cooler upgrades.
Only know how to code? I'm happy to share core development basics. You don't have to understand the entire core to work on an altcoin.
If we want Swing to thrive, we need devs more than anything else.
I'll keep trying to make progress solo in the meantime.
Ok, good. Thanks for the clarification. Looking forward to a bright future for Swing.