Settings
This section explains the various options available for configuration when creating the Discv5 protocol.
Last updated
byte[] privateKey = ...; // Random 32 byte private key
ISessionKeys sessionKeys = new SessionKeys(privateKey);
IIdentitySchemeV4Signer signer = new IdentitySchemeV4Signer(privateKey);
IIdentitySchemeV4Verifier verifier = new IdentitySchemeV4Verifier();
SessionOptions sessionOptions = new()
.SetSigner(signer)
.SetVerifier(verifier)
.SetSessionKeys(sessionKeys)
.SetCacheSize(1500);TableOptions tableOptions = new()
.SetPingIntervalMilliseconds(6000)
.SetRefreshIntervalMilliseconds(360000)
.SetLookupTimeoutMilliseconds(12000)
.SetMaxAllowedFailures(4)
.SetReplacementCacheSize(250)
.SetConcurrencyParameter(4)
.SetLookupParallelism(3)
.SetBootstrapEnrs(new string[] { "enr:...", "enr:..." });