Consensys / web3signer

Web3Signer is an open-source signing service capable of signing on multiple platforms (Ethereum1 and 2, Filecoin) using private keys stored in an external vault, or encrypted on a disk.
https://docs.web3signer.consensys.net/
Apache License 2.0
196 stars 75 forks source link

Expose network configuration so VC can detect config mismatch early #614

Open jimmygchen opened 2 years ago

jimmygchen commented 2 years ago

Hi,

Is there a way for validator client / web3signer to pick up a network config mismatch early? (e.g. web3signer is configured with a network different to the validator client)

I noticed that web3signer is able to sign attestations even with incorrect network configured (different network to VC, Teku in my case), but will fail to sign a block proposal.

It would be useful if Web3Signer exposes some info about the network / configuration, so that a network mismatch can be picked up early by the VC.

@ajsutton from Teku team suggested this:

...it could be a good thing to add to the liveness check endpoint response or something like that and then Teku could log a warning if it doesn't match. Not sure if it would cover all possible problems (e.g. it probably wouldn't include the full fork schedule so might not detect if web3signer was on the right network but hadn't been updated)

Even if it doesn't cover fork schedule (i assume this would require the teku lib to be in sync with Teku), I think having a network check would be super helpful.

gfukushima commented 2 years ago

We are planning to expose a new endpoint with the network and application information which teku can use.

james-prysm commented 2 years ago

We are planning to expose a new endpoint with the network and application information which teku can use.

do you mind sharing where we can learn more about this?

siladu commented 2 years ago

@james-prysm I believe this ticket is the extent of the plan so far :) It's in our backlog, so will be able to provide more details when we get to it.

Unrelatedly to this issue, but in case you're interested, there is a healthcheck endpoint being added already: https://github.com/ConsenSys/web3signer/pull/610 The intention being so things like Kubernetes can react (reroute traffic etc) to situations where the DB is down for example.

siladu commented 2 years ago

Related to this we've just released https://github.com/ConsenSys/web3signer/releases/tag/22.10.0 which includes a change to log the network details on web3signer startup: https://github.com/ConsenSys/web3signer/issues/640

Not quite what this issue was requesting, but it should help nonetheless. cc @james-prysm