Persist metadata sequence number using Beacon DB (#15554)

* Add entry for sequence number in chain-metadata bucket & Basic getter/setter

* Mark p2p-metadata flag as deprecated

* Fix metaDataFromConfig: use DB instead to get seqnum

* Save sequence number after updating the metadata

* Fix beacon-chain/p2p unit tests: add DB in config

* Add changelog

* Add ReadOnlyDatabaseWithSeqNum

* Code suggestion from Manu

* Remove seqnum getter at interface

---------

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
Jun Song
2025-08-07 05:18:33 +09:00
committed by GitHub
parent 0f6070a866
commit b00aaef202
27 changed files with 239 additions and 65 deletions

View File

@@ -100,7 +100,6 @@ var appFlags = []cli.Flag{
cmd.P2PMaxPeers,
cmd.P2PPrivKey,
cmd.P2PStaticID,
cmd.P2PMetadata,
cmd.P2PAllowList,
cmd.P2PDenyList,
cmd.PubsubQueueSize,

View File

@@ -88,7 +88,6 @@ var appHelpFlagGroups = []flagGroup{
cmd.P2PHostDNS,
cmd.P2PIP,
cmd.P2PMaxPeers,
cmd.P2PMetadata,
cmd.P2PPrivKey,
cmd.P2PQUICPort,
cmd.P2PStaticID,

View File

@@ -158,12 +158,6 @@ var (
Usage: "Enables the peer id of the node to be fixed by saving the generated network key to the default key path.",
Value: false,
}
// P2PMetadata defines a flag to specify the location of the peer metadata file.
P2PMetadata = &cli.StringFlag{
Name: "p2p-metadata",
Usage: "The file containing the metadata to communicate with other peers.",
Value: "",
}
// P2PMaxPeers defines a flag to specify the max number of peers in libp2p.
P2PMaxPeers = &cli.IntFlag{
Name: "p2p-max-peers",