Replies: 5 comments 6 replies
-
i agree that Problem 1 can/should be easily taken care of by go-spacemesh. Problem 2 sounds more involved. |
Beta Was this translation helpful? Give feedback.
-
I don't understand why historical coinbases should be stored by the node. Sure technically it is trivial, but it is not in the scope. Node doesn't manage keys, why should it manage addresses of the keys? |
Beta Was this translation helpful? Give feedback.
-
The link between the smesher who earned the reward, and the coinbase that receives it, is broken here: go-spacemesh/blocks/generator.go Lines 100 to 126 in 35ab2c2 because the proposals (which receive the rewards) are collapsed into a map of coinbase -> value. From the perspective of the protocol this makes sense, because the smesher associated with a particular reward is no longer useful, but it's less than ideal from a usability perspective. We could theoretically add the smesherID back to the reward data type, but that would result in protocol bloat. @brusherru I think the best thing to do here is just always use the current coinbase when displaying rewards. In other words, just show historical rewards earned by this coinbase. Yes, it's possible that multiple smeshers may use the same coinbase address (which by the way can be any address, including a multisig). If we think this is confusing to users, we can add a tooltip popup in the app to explain it. As you point out it should be pretty uncommon (for home miners) that they'd be using the same coinbase as someone else, anyway. It should also be pretty uncommon for home miners to change their coinbase, so I think this is fine for now. One more UX note: if we also display predicted, upcoming rewards, these are tied to a particular smesher, not a coinbase. We can add a note to explain this too. |
Beta Was this translation helpful? Give feedback.
-
I don't recall if we considered referencing atx id in the rewards. It is almost as compact as using a single address, but provides a reference to both to the coinbase and smesher. |
Beta Was this translation helpful? Give feedback.
-
To sum up what we decided on a dev call:
Hopefully, I don't miss something :) |
Beta Was this translation helpful? Give feedback.
-
Context
In the latest version of Node (0.2.16-beta.0) we get rid of
GlobalStateService.SmesherRewardStream
,GlobalStateService.SmesherDataQuery
SmesherId
withinReward
type (used inGlobalStateService.AccountDataQuery/Stream
)See also: spacemeshos/api#163
Problem 1
Since we can not request rewards filtered by SmesherId, then we need to use a coinbase. It is not a problem to get the current coinbase. But in case if User switched the coinbase we have no history for it.
SmesherId -> Coinbase[]
on fs and use it to request a rewards log.key.bin
file).go-spacemesh
is an independent tool (it runs without any wrappers or clients), then probably the Node should take care of this mapping, as a standard way to store such data.Problem 2
Since we have no
SmesherId
in theReward
message, then how we can distinguish our "Reward" from the reward of another Smesher. Example:I assume that these problems are related and probably will have a single solution for both.
If you have any ideas — welcome! :)
cc: @countvonzero @dshulyak @avive @oriya @lrettig
Beta Was this translation helpful? Give feedback.
All reactions