Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Allow more than one nodes running under the same account for redundancy #191

Open
ngtuna opened this issue Sep 27, 2018 · 6 comments
Open
Labels
enhancement New feature or request

Comments

@ngtuna
Copy link

ngtuna commented Sep 27, 2018

Only allow one node to create block. The other node(s) only import.

Adding a check message calling to bootnode to collect running nodes in the network at this below function:

func (s *Ethereum) StartStaking(local bool) error {
	// TODO: check bootnode.
	// send findnode msg to bootnode here

	eb, err := s.Etherbase()
	if err != nil {
		log.Error("Cannot start mining without etherbase", "err", err)
		return fmt.Errorf("etherbase missing: %v", err)
	}
	if posv, ok := s.engine.(*posv.Posv); ok {
		wallet, err := s.accountManager.Find(accounts.Account{Address: eb})
		if wallet == nil || err != nil {
			log.Error("Etherbase account unavailable locally", "err", err)
			return fmt.Errorf("signer missing: %v", err)
		}
		posv.Authorize(eb, wallet.SignHash)
	}
	if local {
		// If local (CPU) mining is started, we can disable the transaction rejection
		// mechanism introduced to speed sync times. CPU mining on mainnet is ludicrous
		// so noone will ever hit this path, whereas marking sync done on CPU mining
		// will ensure that private networks work in single miner mode too.
		atomic.StoreUint32(&s.protocolManager.acceptTxs, 1)
	}
	go s.miner.Start(eb)
	return nil
}
@ngtuna ngtuna added this to the v1.0.0 (mainnet) milestone Sep 27, 2018
@ngtuna ngtuna modified the milestones: v1.0.0 (mainnet), v1.1.0 Oct 2, 2018
@ngtuna ngtuna added enhancement New feature or request and removed enhancement New feature or request labels Oct 2, 2018
@ngtuna ngtuna changed the title Do not allow two nodes running under the same account Allow more than one nodes running under the same account for redundancy Nov 27, 2018
@ngtuna ngtuna modified the milestones: v1.1.0, v1.2.0 Dec 10, 2018
@ngtuna ngtuna modified the milestones: v1.2.0, v1.3.0 Jan 4, 2019
@etienne-napoleone
Copy link

Isn't a node already a redundancy of the data at the blockchain level?
Wouldn't it be implement redundancy for redundancy?
What are the use cases in a stable chain for that?

@ngtuna
Copy link
Author

ngtuna commented Jan 18, 2019

Isn't a node already a redundancy of the data at the blockchain level?
Wouldn't it be implement redundancy for redundancy?
What are the use cases in a stable chain for that?

Considering the master-slave model that a masternode get trouble and the slaved one can quickly pop-up to producing/validating blocks. It means that we will support multiple nodes running under the same coinbase account but there will be only one of those can produce and validate block.

On the other side, if a masternode runner owns more than one masternode, this case might not be preferred as he can quickly copy the data between them.

@redrocketgt
Copy link

I love the master-slave idea.

There are many scenarios where it will be useful eg, at some point a data center will have maintenance. Why should a normal event like that cause a master node to be slashed at no fault of theirs? Natural disasters etc. If people are on vacation/sleeping and the master node has an issue the slave can take over until the master is fixed.

As of right now I run a full node (in a different country) as backup so that I have chain data available if needed. The chain data is large and hard to copy in-time before a node gets slashed. I would sleep much better if my backup node could automatically take over if needed.

Some people may vote basted on slash history, if there is a way that greater up-time can be achieved I am all for it. It is not mandatory and who desire to run a backup node can. It will only benefit the network.

@etienne-napoleone
Copy link

etienne-napoleone commented Jan 20, 2019

@redrocketgt
I have no strong opinion about this feature, but wouldn't running a backup node cost much more than getting slashed for one/two epoch until the maintenance/outage/restoring from backup is finished?
I agree on the argument about the slashing history

@redrocketgt
Copy link

That would be true if we babysit the node 24hrs a day. What if the node operator is working and does not have access to a PC, sleeping or on a plane traveling? It will be alot longer than one/two epoc.

@ngtuna
Copy link
Author

ngtuna commented Jan 21, 2019

In fact this feature isn't designed for rich person who owns multiple masternodes with strong network connection; and it's also fair to say that this feature doubles the money which is quite bad at this time when $TOMO is under value. Consider the technical pov, master-slave design is quite a standard in the term of database operation. Thus I think in the long run this feature is valuable. But tbh we don't really pay attention on this feature at this moment.

@ngtuna ngtuna removed this from the v1.3.0 milestone Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants