Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: DPOS Delegates DevOps discussion  (Read 451 times)

0 Members and 1 Guest are viewing this topic.

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
DPOS Delegates DevOps discussion
« on: June 07, 2014, 02:04:40 PM »

In order to provide high availability and faith about the network, and not to be fired for missing blocks in their turn, Delegates must have some DevOps process. I want to discuss some processes from scratch with you all.

As the development lasts, there will always be need to upgrade Delegate program versions. Or you will be fired. And you'd better upgrade on-the-fly.

After every shuffle, the order of next 100 blocks' forgers is determined. So most of the delegates may have time to tear the node down for a while and relaunch it. At this time, another instance needs to be already pulled from GitHub and built. In fact, you may always need a 'left' instance and 'right' instance, just like a seesaw. The left instance and right instance can share the same data directory, which is ~/.BitSharesXTS by default.

If I did not miss something, Delegates can miss no block at all in this way.
« Last Edit: June 07, 2014, 02:08:38 PM by coolspeed »
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline bytemaster

Re: DPOS Delegates DevOps discussion
« Reply #1 on: June 07, 2014, 02:26:09 PM »
In order to provide high availability and faith about the network, and not to be fired for missing blocks in their turn, Delegates must have some DevOps process. I want to discuss some processes from scratch with you all.

As the development lasts, there will always be need to upgrade Delegate program versions. Or you will be fired. And you'd better upgrade on-the-fly.

After every shuffle, the order of next 100 blocks' forgers is determined. So most of the delegates may have time to tear the node down for a while and relaunch it. At this time, another instance needs to be already pulled from GitHub and built. In fact, you may always need a 'left' instance and 'right' instance, just like a seesaw. The left instance and right instance can share the same data directory, which is ~/.BitSharesXTS by default.

If I did not miss something, Delegates can miss no block at all in this way.

It is really as simple as having two nodes on the network (different data directories)... then lock one wallet and unlock the other to switch versions.  You can take down the locked version for an update and then bring it back up.

Just make sure you don't unlock them both at the same time or you risk producing 2 blocks at once and getting canned on the spot with extreme prejudice.
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline coolspeed

  • Hero Member
  • *****
  • Posts: 536
    • View Profile
    • My Blog
Re: DPOS Delegates DevOps discussion
« Reply #2 on: June 07, 2014, 03:54:52 PM »
So all we need is just a script that do the lock and unlock stuff automatically and can prevent operators to do it in wrong order.
Please vote for  delegate.coolspeed    dac.coolspeed
BTS account: coolspeed
Sina Weibo:@coolspeed

Offline wackou

Re: DPOS Delegates DevOps discussion
« Reply #3 on: June 07, 2014, 08:47:22 PM »
After every shuffle, the order of next 100 blocks' forgers is determined. So most of the delegates may have time to tear the node down for a while and relaunch it. At this time, another instance needs to be already pulled from GitHub and built. In fact, you may always need a 'left' instance and 'right' instance, just like a seesaw. The left instance and right instance can share the same data directory, which is ~/.BitSharesXTS by default.

Thought exactly the same thing :) Also, you don't really need to wait for a shuffle as the time between blocks is 30s and the client starts in much less than that, so you should have time to hot-swap an upgraded delegate at pretty much any time you want. You definitely need to have it built at that time already so you just need to bring it up. I'll probably write some (python or bash) scripts at some point to deal with that, if it seems that this is the way to go, I'll share them on github.

It is really as simple as having two nodes on the network (different data directories)... then lock one wallet and unlock the other to switch versions.  You can take down the locked version for an update and then bring it back up.

I'm not sure I understand everything here. Do you mean that a delegate can only sign blocks if its wallet is unlocked? So if I start a delegate and open a wallet, but don't unlock it with its password then it won't sign blocks? How can we deal with timeout for unlocking then? Does wallet_unlock accept a timeout of 0 meaning infinite time? Or did you mean open/close instead of unlock/lock?

Also, do I understand correctly that the IP of the delegate is not important as long as it is able to sign blocks in time, and that it is completely feasible to bring one down with an IP and another one up with another IP? That would be super awesome because it means it is possible to have a backup delegate node in a different location which can immediately be switched up if the first one fails.
Please vote for witness wackou! More info at http://digitalgaia.io

Offline bytemaster

Re: DPOS Delegates DevOps discussion
« Reply #4 on: June 07, 2014, 08:52:58 PM »
After every shuffle, the order of next 100 blocks' forgers is determined. So most of the delegates may have time to tear the node down for a while and relaunch it. At this time, another instance needs to be already pulled from GitHub and built. In fact, you may always need a 'left' instance and 'right' instance, just like a seesaw. The left instance and right instance can share the same data directory, which is ~/.BitSharesXTS by default.

Thought exactly the same thing :) Also, you don't really need to wait for a shuffle as the time between blocks is 30s and the client starts in much less than that, so you should have time to hot-swap an upgraded delegate at pretty much any time you want. You definitely need to have it built at that time already so you just need to bring it up. I'll probably write some (python or bash) scripts at some point to deal with that, if it seems that this is the way to go, I'll share them on github.

It is really as simple as having two nodes on the network (different data directories)... then lock one wallet and unlock the other to switch versions.  You can take down the locked version for an update and then bring it back up.

I'm not sure I understand everything here. Do you mean that a delegate can only sign blocks if its wallet is unlocked? So if I start a delegate and open a wallet, but don't unlock it with its password then it won't sign blocks? How can we deal with timeout for unlocking then? Does wallet_unlock accept a timeout of 0 meaning infinite time? Or did you mean open/close instead of unlock/lock?

Also, do I understand correctly that the IP of the delegate is not important as long as it is able to sign blocks in time, and that it is completely feasible to bring one down with an IP and another one up with another IP? That would be super awesome because it means it is possible to have a backup delegate node in a different location which can immediately be switched up if the first one fails.

Wallet must be unlocked to have access to the private key used to sign blocks.

IP is irrelevant so multiple nodes is ok.

You can set the unlock time to near infinity   unlock 999999999 (30 years)
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline wackou

Re: DPOS Delegates DevOps discussion
« Reply #5 on: June 07, 2014, 09:10:49 PM »
Thanks! Getting super excited about this  :D
Please vote for witness wackou! More info at http://digitalgaia.io

 

Google+