Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Nethermind/Nethermind.Core/SealEngineType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ public static class SealEngineType
public const string BeaconChain = nameof(BeaconChain);
public const string Optimism = nameof(Optimism);
public const string Taiko = nameof(Taiko);
public const string XDPoS = nameof(XDPoS);
}
}
10 changes: 10 additions & 0 deletions src/Nethermind/Nethermind.Xdc/Spec/IXdcReleaseSpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core.Specs;

namespace Nethermind.Xdc.Spec;

internal interface IXdcReleaseSpec : IReleaseSpec
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core;
using Nethermind.Int256;
using Nethermind.Specs.ChainSpecStyle;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nethermind.Xdc.Spec;
internal class XdcChainSpecEngineParameters : IChainSpecEngineParameters
{
public string EngineName => SealEngineType;
public string SealEngineType => Core.SealEngineType.XDPoS;
public int Epoch { get; set; }
public int Gap { get; set; }
public bool SkipV1Validation { get; set; }
public Address FoundationWalletAddr { get; set; }
public int Reward { get; set; }
}

16 changes: 16 additions & 0 deletions src/Nethermind/Nethermind.Xdc/Spec/XdcReleaseSpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Specs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nethermind.Xdc.Spec;
internal class XdcReleaseSpec : ReleaseSpec, IXdcReleaseSpec
{
public bool IsV2Enabled { get; set; }

}
32 changes: 32 additions & 0 deletions src/Nethermind/Nethermind.Xdc/Spec/XdcV2ReleaseSpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-FileCopyrightText: 2025 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Int256;
using Nethermind.Specs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nethermind.Xdc.Spec;
internal class XdcV2ReleaseSpec : ReleaseSpec, IXdcReleaseSpec
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between releaseSpec and a Config ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Config is related to node setup usually and specs are settings for the network.
But i also think sometimes you can find network related stuff in config, but generally it should be divided like that.

public int SwitchEpoch { get; set; }
public UInt256 SwitchBlock { get; set; }
public int MaxMasternodes { get; set; } // v2 max masternodes
public int MaxProtectorNodes { get; set; } // v2 max ProtectorNodes
public int MaxObserverNodes { get; set; } // v2 max ObserverNodes
public ulong SwitchRound { get; set; } // v1 to v2 switch block number
public int MinePeriod { get; set; } // Miner mine period to mine a block
public int TimeoutSyncThreshold { get; set; } // send syncInfo after number of timeout
public int TimeoutPeriod { get; set; } // Duration in ms
public double CertThreshold { get; set; } // Necessary number of messages from master nodes to form a certificate
public double MasternodeReward { get; set; } // Block reward per master node (core validator) - unit Ether
public double ProtectorReward { get; set; } // Block reward per protector - unit Ether
public double ObserverReward { get; set; } // Block reward per observer - unit Ether
public int MinimumMinerBlockPerEpoch { get; set; } // Minimum block per epoch for a miner to not be penalized
public int LimitPenaltyEpoch { get; set; } // Epochs in a row that a penalty node needs to be penalized
public int MinimumSigningTx { get; set; } // Signing txs that a node needs to produce to get out of penalty, after `LimitPenaltyEpoch`

}
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
<Project Path="Nethermind.Consensus.AuRa/Nethermind.Consensus.AuRa.csproj" />
<Project Path="Nethermind.Consensus.Clique/Nethermind.Consensus.Clique.csproj" />
<Project Path="Nethermind.Consensus.Ethash/Nethermind.Consensus.Ethash.csproj" />
<Project Path="Nethermind.Consensus.Xdc/Nethermind.Xdc.csproj" Id="a2df25a7-610f-4d9c-a0d4-95bedb7166c5" />
<Project Path="Nethermind.Consensus/Nethermind.Consensus.csproj" />
<Project Path="Nethermind.Core/Nethermind.Core.csproj" />
<Project Path="Nethermind.Crypto/Nethermind.Crypto.csproj" />
Expand Down Expand Up @@ -130,4 +129,5 @@
<Project Path="Nethermind.Trie/Nethermind.Trie.csproj" />
<Project Path="Nethermind.TxPool/Nethermind.TxPool.csproj" />
<Project Path="Nethermind.Wallet/Nethermind.Wallet.csproj" />
<Project Path="Nethermind.Xdc/Nethermind.Xdc.csproj" />
</Solution>