Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Enhanced activations data (for SM 0.2) #139

avive opened this issue Mar 17, 2021 · 3 comments

Feature: Enhanced activations data (for SM 0.2) #139

avive opened this issue Mar 17, 2021 · 3 comments


Copy link

avive commented Mar 17, 2021


We'd like to make the non-trivial activations flow transparent to users.
Some activation state is local to the node which submits them to PoET and to the mesh and can't be obtained from the MeshService. We should add to the SmesherService capabilities to provide information about locally created and submitted activations.

Activations Local State

  1. Node submitted activation data to PoET service.
  2. Node got back PoET results.
  3. Node broadcasted an activation to other nodes..
  4. Activation on the mesh in epoch n (public mesh data - not really a local state).

Each of the states has a time-stamp and the last one has an epoch number.

Proposed new functionality

  • Node to track timestamp for locally generated activations and activation data.
  • Add method to SmesherService for clients to query data about all locally created and submitted activations by the node.
  • Add a streaming NodeService method for clients to get a callback when any locally created activation state changes.
  • Add metadata to activation api data object to include the epoch number it got on the mesh.
  • When a locally created activation is returned by the API it should include the timestamps of states 1-3. When a non-locally created activation is returned by the API only its mesh epoch time is known and is returned.
@avive avive added the feature label Mar 17, 2021
Copy link
Member Author

avive commented May 22, 2021

So we have basic activation data for clients via the mesh api.

What we need to do to provide a decent UX for activations, is to add additional meta-data to activations returned by the api so clients have sufficient data to provide useful information to users and to keep them informed and on top of their activations. Here's an initial proposal for api additions:

An activation can only be in one of these states.

enum State {
	STATE_CREATED = 0;  // from post data
	STATE_SUBMITTED = 1; // to poet
	STATE_GOT_PROOF =2;  // from poet
	STATE_BROADCASTED = 3;  // to p2p net
	STATE_MESH =4;  // published on mesh

Add ActivationExtraData field to the Activation protobufs data type or add these fields directly to Activation if can be done in backwards compatible manner.

// timestamps are 0 when they are not set
message ActivationExtraData {
        uint64 Submitted =1; // timestamp when submitted to poet
	uint64 Proof = 2; // proof time  
	uint64 Broadcast = 3; // broadcast time
	uint64 MeshEpoch = 4; // epoch published on mesh (eligibility epoch is this epoch + 1 )

The first 3 fields will only be non-zero when this activation was created locally by the node that serves the api. In the case of all other activations, only the last field will be non-zero.

Based on this data, we would like to display more details about user's activations. Here are rough mocks of activations in smapp.

Activations List

Accessible from smesher screen. Should include all activations created with the smesher's id.

Activations List Screen

Activation Details

Activations Details Screen

Notice the eligibility info in the summary line. If Activation is on mesh on epoch e, then smesher is eligible for rewards in epoch e+1.

@avive avive changed the title Feature request: Node's Activation Data Feature: Enhanced activations data May 22, 2021
@avive avive mentioned this issue May 24, 2021
Copy link
Member Author

avive commented May 24, 2021

@noamnelke @lrettig @moshababo fyi

Copy link
Member Author

avive commented May 30, 2021

@moshababo - what we talked about - please review.

@avive avive changed the title Feature: Enhanced activations data Feature: Enhanced activations data (for SM 0.2) May 30, 2021
@avive avive modified the milestones: v.12, v1.2 May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant