Lets start with some basics. How does the satellite tracks the download traffic? How does it know what the customer has to pay and what the storage node payout should be? The accounting for used space has not changed and I will not talk about that part. Lets focus on the traffic accounting and explain how that works, what has changed and what are the consequences.
How does it work
Uplink would like to download a file. It requests an order limit from the satellite inclusive a signature. The uplink creates multiple orders with different sizes, signs them and sends them one by one to the storage node together with the order limit. The storage node has to deliver the data in order to get the next order with a bigger size in it. The order limit from the satellite is the guarantee that this download was authorized and will get paid by the satellite.
What has changed
What happens if a storage nodes sends the same order more than once? The order limit contains a unique serial number. In the past (v0.29) the satellite was keeping track of the submitted serial numbers and will reject duplicates. The database queries are way too expensive for different reasons. We changed the way the satellite is processing orders. Instead of rejecing duplicates we are doing a blind insert into the database. If the serial number already exists it will get overwritten. The performance improvement is significant. The problem is that orders are valid for 7 days. A storage node can submit the same orders each day and it would get accounted each day. To solve that problem the accounting will ignore every order that hasn’t expired yet. The accounting gets delayed for 7 days / shifted by 7 days. The download traffic doing the last week of a month will not be included. Instead it will get shifted into the next month.
What are the consequences
With v0.30 the traffic accounting for customers and storage nodes are delayed by 7 days. v0.30 is already deployed on Stefans satellite but not on the other 3 satellites. You will notice the 7 day shift on the storage node webUI and on the satellite webUI.
Finishing graceful exit on the last day of the month will result in a wrong hold back amount. The payout of the last 7 days will be missing in the hold back calculation. An easy way to fix that would be to increase the graceful exit requirement to 9 month. The missing 7 days will get paid in the next month with 0% hold back amount. Should we increase the graceful exit requirement or accept that the hold back calculation might be a few cent off?