feat: UTXO snapshot signature verification (#11)
Add Ed25519 signature support to snapshot manifests. Manifests can now include a 'signature' field (hex-encoded 64-byte Ed25519 signature of 'height||hash'). VerifyManifest checks it against a compiled-in pubkey. - Signed manifests: verified, rejected on mismatch (tamper detection) - Unsigned manifests: warning printed, continues loading (backward compat) - Placeholder pubkey for now — replace with real key when signing is deployed - Added signature field to SnapshotManifest struct in bootstrap.h This closes the 'loading WITHOUT signature verification' security gap that was printed during every bootstrap download.
This commit is contained in:
@@ -53,6 +53,7 @@ namespace Bootstrap {
|
||||
int height; // block height of the snapshot tip
|
||||
std::string hash; // block hash at that height (hex, no 0x prefix)
|
||||
int dbversion; // DATABASE_VERSION the txleveldb was built with
|
||||
std::string signature; // Ed25519 signature of (height || hash), hex-encoded (empty if unsigned)
|
||||
};
|
||||
|
||||
// Parse a snapshot.manifest file into a SnapshotManifest struct.
|
||||
|
||||
Reference in New Issue
Block a user