This adds a batching rewards table to always keep around the most recent 5 blocks (in addition to current block), and then uses that to implement rewards signing requests that request the reward at a recent height, rather than relying on each SN to use its own current height.
The RPC endpoint now takes a "height" parameter, which can be a <= 0 value to indicate "N blocks ago" (so 0 = most recent, -1 = one block ago). The default, if omitted, is -1 so that requests get lagged by a block by default, which should avoid issues with a request being made at the same time a block is propagating through the network.
This adds a batching rewards table to always keep around the most recent 5 blocks (in addition to current block), and then uses that to implement rewards signing requests that request the reward at a recent height, rather than relying on each SN to use its own current height.
The RPC endpoint now takes a "height" parameter, which can be a <= 0 value to indicate "N blocks ago" (so 0 = most recent, -1 = one block ago). The default, if omitted, is -1 so that requests get lagged by a block by default, which should avoid issues with a request being made at the same time a block is propagating through the network.