-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failover script for a backed up node #41
base: master
Are you sure you want to change the base?
Conversation
babb659
to
aa87f0c
Compare
d3e57ab
to
8196113
Compare
Seems to be working correctly 👍 |
Can it call the secondary node locally and the primary node remotely? In that case we can just change the primary node HTTP URL to stop calling it through |
I don't think it can call primary, it's best to close all ports except SSH on validator node for security reasons. |
In such a case it seems like we'll have to have similar scripts on both primary and secondary |
Could we add an extra RPC call like |
IMO it's best to get a final script in this PR |
OK. In that case how do you check whether the primary is back up? |
Maybe we could have on-chain storage for that in a special smart contract. What do you think? Also cc @varasev |
OK. Let's use smart contract storage. Does this now fit into the old notion of benign misbehaviour? If a miner address failed to produce expected blocks,
|
We can't use the
It is a possible solution if the validator has some So, when some candidate create their pool, they will have to have three addresses:
The This approach would require several changes in the contracts. But I think of the next solution:
I think, ideally, we could open one TCP port on each node (say, For example, we have two nodes for the same validator: Node A (IP = 192.168.10.101, engine_signer = mining address) Each node has the watchguard script listening on port The firewall on the node A allows inbound connections on the port The firewall on the node B allows inbound connections on the port That way the scripts on the nodes would connect to each other, and other unwanted inbound connections are restricted (except SSH). This would be simpler than the scheme with node's |
Ready for review. All tests pass for me. |
For me this test fails
|
258e2ac
to
7228fef
Compare
7228fef
to
e85e963
Compare
See #39. This PR doesn't contain any tests for the failover script.