[SON-HIVE Voting] Refactor sidechain plugin to use separate son schedulers per sidechain #309

Closed
opened 2022-03-03 19:15:01 +00:00 by serkixenos · 21 comments
serkixenos commented 2022-03-03 19:15:01 +00:00 (Migrated from gitlab.com)

The goal is to separate voting for Bitcoin and Hive SONs, so that they can act independently of each others.
All code affected by this change should be refactored, in a way that enables that Bitcoin SON and Hive SON are considered separate entities.

The function of interest is

void peerplays_sidechain_plugin_impl::son_processing()

Since we will be using separate schedulers, processing BTC/Hive/HBD might happen in parallel, not like now, in serial manner.

Simplified, we can start separate "per sidechain" processing threads from here

void peerplays_sidechain_plugin_impl::schedule_son_processing() {
   fc::time_point now = fc::time_point::now();
   int64_t time_to_next_son_processing = 500000;

   fc::time_point next_wakeup(now + fc::microseconds(time_to_next_son_processing));

   _son_processing_task = fc::schedule([this] {
      son_processing();
   },
                                       next_wakeup, "SON Processing");
}
The goal is to separate voting for Bitcoin and Hive SONs, so that they can act independently of each others. All code affected by this change should be refactored, in a way that enables that Bitcoin SON and Hive SON are considered separate entities. The function of interest is ``` void peerplays_sidechain_plugin_impl::son_processing() ``` Since we will be using separate schedulers, processing BTC/Hive/HBD might happen in parallel, not like now, in serial manner. Simplified, we can start separate "per sidechain" processing threads from here ``` void peerplays_sidechain_plugin_impl::schedule_son_processing() { fc::time_point now = fc::time_point::now(); int64_t time_to_next_son_processing = 500000; fc::time_point next_wakeup(now + fc::microseconds(time_to_next_son_processing)); _son_processing_task = fc::schedule([this] { son_processing(); }, next_wakeup, "SON Processing"); } ```
serkixenos commented 2022-03-03 19:15:33 +00:00 (Migrated from gitlab.com)

changed title from Refactor sidechain plugin to use son schedulers to Refactor sidechain plugin to use {+separate +}son schedulers{+ per sidechain+}

changed title from **Refactor sidechain plugin to use son schedulers** to **Refactor sidechain plugin to use {+separate +}son schedulers{+ per sidechain+}**
serkixenos commented 2022-03-03 19:57:56 +00:00 (Migrated from gitlab.com)

These functions, from peerplays_sidechain_plugin should be refactored to their "per sidechain" variants

   std::set<chain::son_id_type> &get_sons();
   const son_id_type get_current_son_id();
   const son_object get_current_son_object();
These functions, from peerplays_sidechain_plugin should be refactored to their "per sidechain" variants ``` std::set<chain::son_id_type> &get_sons(); const son_id_type get_current_son_id(); const son_object get_current_son_object(); ```
hbelakon commented 2022-03-08 03:53:57 +00:00 (Migrated from gitlab.com)

changed title from Refactor sidechain plugin to use separate son schedulers per sidechain to {+[SON-HIVE Voting] +}Refactor sidechain plugin to use separate son schedulers per sidechain

changed title from **Refactor sidechain plugin to use separate son schedulers per sidechain** to **{+[SON-HIVE Voting] +}Refactor sidechain plugin to use separate son schedulers per sidechain**
hbelakon commented 2022-03-08 03:54:09 +00:00 (Migrated from gitlab.com)

assigned to @serkixenos

assigned to @serkixenos
hbelakon commented 2022-03-08 03:54:54 +00:00 (Migrated from gitlab.com)

@serkixenos please estimate

@serkixenos please estimate
serkixenos commented 2022-03-09 03:02:30 +00:00 (Migrated from gitlab.com)

Base your work on feature/son-for-hive-voting branch

https://gitlab.com/PBSA/peerplays/-/tree/feature/son-for-hive-voting

Base your work on feature/son-for-hive-voting branch https://gitlab.com/PBSA/peerplays/-/tree/feature/son-for-hive-voting
serkixenos commented 2022-03-28 14:12:16 +00:00 (Migrated from gitlab.com)

mentioned in issue #155

mentioned in issue #155
serkixenos commented 2022-03-28 14:20:25 +00:00 (Migrated from gitlab.com)

unassigned @serkixenos

unassigned @serkixenos
hbelakon commented 2022-04-08 14:41:20 +00:00 (Migrated from gitlab.com)

changed epic to &295

changed epic to &295
hirunda commented 2022-04-18 11:21:00 +00:00 (Migrated from gitlab.com)

assigned to @hirunda

assigned to @hirunda
vampik commented 2022-04-18 12:22:12 +00:00 (Migrated from gitlab.com)

assigned to @vampik and unassigned @hirunda

assigned to @vampik and unassigned @hirunda
vampik commented 2022-04-19 13:27:15 +00:00 (Migrated from gitlab.com)

mentioned in commit 98cfdc268c2004b84a434acce9c1898b948c77fe

mentioned in commit 98cfdc268c2004b84a434acce9c1898b948c77fe
vampik commented 2022-04-20 05:07:46 +00:00 (Migrated from gitlab.com)

mentioned in commit 5f7b623a9b96e05af7d286a80c86798dd5319ab2

mentioned in commit 5f7b623a9b96e05af7d286a80c86798dd5319ab2
vampik commented 2022-04-21 05:30:44 +00:00 (Migrated from gitlab.com)

mentioned in commit 90531be7802f371e3982fc90275f2048617d7afb

mentioned in commit 90531be7802f371e3982fc90275f2048617d7afb
vampik commented 2022-04-21 06:17:00 +00:00 (Migrated from gitlab.com)

mentioned in merge request !103

mentioned in merge request !103
vampik commented 2022-04-21 12:07:02 +00:00 (Migrated from gitlab.com)

I will resolve Fixme in peerplays_sidechain_plugin in this issue.

I will resolve Fixme in peerplays_sidechain_plugin in this issue.
vampik commented 2022-04-22 09:08:38 +00:00 (Migrated from gitlab.com)

mentioned in commit b6ad9576a270a2ad7c4ce6ef5e9a34b293b3543a

mentioned in commit b6ad9576a270a2ad7c4ce6ef5e9a34b293b3543a
vampik commented 2022-04-25 15:55:02 +00:00 (Migrated from gitlab.com)

mentioned in commit 052a2e833f7a2428dac5ac1fbc839a803fca7a35

mentioned in commit 052a2e833f7a2428dac5ac1fbc839a803fca7a35
serkixenos commented 2022-04-25 15:55:03 +00:00 (Migrated from gitlab.com)

mentioned in commit 163c38fa9d3160282855ea16794ea168a402e67c

mentioned in commit 163c38fa9d3160282855ea16794ea168a402e67c
serkixenos (Migrated from gitlab.com) closed this issue 2022-05-02 23:25:47 +00:00
hbelakon commented 2022-05-04 17:12:41 +00:00 (Migrated from gitlab.com)

changed epic to &530

changed epic to &530
hbelakon commented 2022-05-04 18:31:27 +00:00 (Migrated from gitlab.com)

changed epic to &529

changed epic to &529
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#309
No description provided.