This project contains consensus-related primitives that are currently focused on difficulty / target algorithms.
ICompactTargetAlgorithm+MolinaTargetAlgorithm: Compact target encoding/decoding utilities.IDAAlgorithm: Interface for difficulty adjustment algorithms.ASERT_RTT,ASERT2,ASERTConfiguration: ASERT-style real-time difficulty adjustment.PeriodicStatistics(inHashStats.cs): small helper for periodic stats tracking.
using Sphere10.Framework.Consensus;
ICompactTargetAlgorithm targetAlg = new MolinaTargetAlgorithm();
var cfg = new ASERTConfiguration {
BlockTime = TimeSpan.FromSeconds(60),
RelaxationTime = TimeSpan.FromHours(1)
};
IDAAlgorithm da = new ASERT_RTT(targetAlg, cfg);Distributed under the MIT NON-AI License.