Skip to content

Add initial block forge functionality #809

@agaffney

Description

@agaffney

Create a function called something like forgeBlock() as part of ledger.LedgerState, and schedule it to run at the configured block interval for the network. This can be calculated by 1 / ls.config.CardanoNodeConfig.ShelleyGenesis().ActiveSlotsCoeff. This should only be activated if "dev mode" (#808) is enabled.

This function should construct an "empty" block, with the minimum required params populated in the header (prev hash, block number, and slot number, all based on the current chain tip). We should then marshal the block to CBOR and print a log entry at the DEBUG level with the generated block CBOR (as a hex string).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions