0 Members and 1 Guest are viewing this topic.
ALT会出下面这个问题吗Quote from: emski on July 30, 2014, 08:16:23 pmThis will likely cause you to sign 2 different blocks.How you ensure that they will not sign 2 different blocks ?
This will likely cause you to sign 2 different blocks.How you ensure that they will not sign 2 different blocks ?
<悟空是个好员工>,这本书还有人记得吗? alt就是一个杰出的员工, 我建议alt公开你的别名.我们给你捐献表示敬意!曾经和您共同战斗,是我的荣幸!
alt老弟,这个slave客户端只要加“ next_slot_time += 5;”这行代码后编译,是吗?slave可以和master同时开机而不会相互影响吗?一个代表运行在2个不同的结点是否是BM所允许的。你做过多少测试?Quote from: alt on July 30, 2014, 05:39:54 amQuote from: alt on July 30, 2014, 05:33:00 amhi, delegates. we have a solution for hot standby.set up delegate wallet in 2 machines. one is master, and the other is slave.master run delegate_loop task at seconds 0,10,20 .... slave run the task with 5 seconds delay, at 5, 15, 25 .....Normally master will generate block in time, slave will receive the block less than 5 seconds, than slave will not generate block.If for some reason, master missed generation, slave didn't receive block from master in 5 seconds, slave will generate.here is the patch for slave program:Code: [Select]--- a/libraries/client/client.cpp+++ b/libraries/client/client.cpp@@ -729,6 +729,7 @@ config load_config( const fc::path& datadir ) uint32_t slot_number = blockchain::get_slot_number( now ); time_point_sec next_slot_time = blockchain::get_slot_start_time( slot_number + 1 );+ next_slot_time += 5; ilog( "Rescheduling delegate loop for time: ${t}", ("t",next_slot_time) ); time_point scheduled_time = next_slot_time;
Quote from: alt on July 30, 2014, 05:33:00 amhi, delegates. we have a solution for hot standby.set up delegate wallet in 2 machines. one is master, and the other is slave.master run delegate_loop task at seconds 0,10,20 .... slave run the task with 5 seconds delay, at 5, 15, 25 .....Normally master will generate block in time, slave will receive the block less than 5 seconds, than slave will not generate block.If for some reason, master missed generation, slave didn't receive block from master in 5 seconds, slave will generate.here is the patch for slave program:Code: [Select]--- a/libraries/client/client.cpp+++ b/libraries/client/client.cpp@@ -729,6 +729,7 @@ config load_config( const fc::path& datadir ) uint32_t slot_number = blockchain::get_slot_number( now ); time_point_sec next_slot_time = blockchain::get_slot_start_time( slot_number + 1 );+ next_slot_time += 5; ilog( "Rescheduling delegate loop for time: ${t}", ("t",next_slot_time) ); time_point scheduled_time = next_slot_time;
hi, delegates. we have a solution for hot standby.set up delegate wallet in 2 machines. one is master, and the other is slave.master run delegate_loop task at seconds 0,10,20 .... slave run the task with 5 seconds delay, at 5, 15, 25 .....Normally master will generate block in time, slave will receive the block less than 5 seconds, than slave will not generate block.If for some reason, master missed generation, slave didn't receive block from master in 5 seconds, slave will generate.here is the patch for slave program:Code: [Select]--- a/libraries/client/client.cpp+++ b/libraries/client/client.cpp@@ -729,6 +729,7 @@ config load_config( const fc::path& datadir ) uint32_t slot_number = blockchain::get_slot_number( now ); time_point_sec next_slot_time = blockchain::get_slot_start_time( slot_number + 1 );+ next_slot_time += 5; ilog( "Rescheduling delegate loop for time: ${t}", ("t",next_slot_time) ); time_point scheduled_time = next_slot_time;
--- a/libraries/client/client.cpp+++ b/libraries/client/client.cpp@@ -729,6 +729,7 @@ config load_config( const fc::path& datadir ) uint32_t slot_number = blockchain::get_slot_number( now ); time_point_sec next_slot_time = blockchain::get_slot_start_time( slot_number + 1 );+ next_slot_time += 5; ilog( "Rescheduling delegate loop for time: ${t}", ("t",next_slot_time) ); time_point scheduled_time = next_slot_time;