jito-foundation / stakenet

Jito StakeNet
https://www.jito.network/stakenet/
Apache License 2.0
50 stars 19 forks source link

feat: add epoch start timestamp #23

Closed butonium closed 7 months ago

butonium commented 7 months ago

Context:

This PR introduces epoch_start_timestamp within ClusterHistoryEntry to enhance APY tracking, as detailed in https://github.com/jito-foundation/stakenet/issues/18

The epoch_start_timestamp is assigned during the execution of the copy_cluster_info ix for the current epoch

Tests:

A new function has been added to modify the Clock sysvar. This was necessary because advance_num_epochs did not update the Clock sysvar during tests

Dependencies

This PR depends on the successful merge of https://github.com/jito-foundation/stakenet/pull/22. After merge, I will update this accordingly.