HorizenOfficial / Sphere_by_Horizen

85 stars 51 forks source link

Zen in Node Payment records is rounded up, payment on blockchain rounded down #57

Open SpencerWhetstone-Horizen opened 3 years ago

SpencerWhetstone-Horizen commented 3 years ago

This from https://horizenofficial.atlassian.net/browse/ZEN-12177


I've downloaded all transactions from the Zen block chain for my staking addresses, I'm then reconciling them against payment records downloaded from the secure and super node apis.
It looks like the payment record will round the 8th decimal digit up, but the transaction in the blockchain always seems to be rounded down.Here's an example:
Zen Blockchain Transaction ID: 53216dfc45fa89a51acefb95849a5a8ff4275bc1734822c1da0b57841336a20e
My Staking Address: znb44VZLZdPaqdBbSmk8X9ZjKyK89V3bbvB
Node URL: 54.secure.zcnode.work
Payment Record Id: 188077959
The amount paid in the blockchain is: 0.04176549
The amount in the payment record from Horizen API is: 0.04176550
I'm not suggesting this is an urgent issue, but I wanted to raise it to ensure it was known. I'm guessing there's some inconsistent rounding logic when recording the payment record, perhaps a missing FLOOR statement.
All the best, please keep up the great work!```