diff --git a/src/Nethermind/Nethermind.Config/BlocksConfig.cs b/src/Nethermind/Nethermind.Config/BlocksConfig.cs index 5ca66e4c994..83413dc5094 100644 --- a/src/Nethermind/Nethermind.Config/BlocksConfig.cs +++ b/src/Nethermind/Nethermind.Config/BlocksConfig.cs @@ -53,5 +53,9 @@ public byte[] GetExtraDataBytes() { return _extraDataBytes; } + + public string GasToken { get => GasTokenTicker; set => GasTokenTicker = value; } + + public static string GasTokenTicker { get; set; } = "ETH"; } } diff --git a/src/Nethermind/Nethermind.Config/IBlocksConfig.cs b/src/Nethermind/Nethermind.Config/IBlocksConfig.cs index 72b5446a97d..ba036fbe2cd 100644 --- a/src/Nethermind/Nethermind.Config/IBlocksConfig.cs +++ b/src/Nethermind/Nethermind.Config/IBlocksConfig.cs @@ -43,5 +43,8 @@ public interface IBlocksConfig : IConfig [ConfigItem(Description = "The genesis block load timeout, in milliseconds.", DefaultValue = "40000")] int GenesisTimeoutMs { get; set; } + [ConfigItem(Description = "The ticker that gas rewards are denominated in for processing logs", DefaultValue = "ETH", HiddenFromDocs = true)] + string GasToken { get; set; } + byte[] GetExtraDataBytes(); } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs index b63bd0dd59d..62f481c8c91 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs @@ -8,6 +8,7 @@ using Nethermind.Config; using Nethermind.Consensus.Producers; using Nethermind.Core; +using Nethermind.Core.Extensions; using Nethermind.State.Proofs; [assembly: InternalsVisibleTo("Nethermind.Consensus.Test")] @@ -40,5 +41,25 @@ public static bool IsByNethermindNode(this BlockHeader block) => Ascii.IsValid(block.ExtraData) && Encoding.ASCII.GetString(block.ExtraData ?? Array.Empty()) .Contains(BlocksConfig.DefaultExtraData, StringComparison.InvariantCultureIgnoreCase); + + public static string ParsedExtraData(this Block block) + { + byte[]? data = block.ExtraData; + if (data is null || data.Length == 0) + { + // If no extra data just show GasBeneficiary address + return $"Address: {(block.Header.GasBeneficiary?.ToString() ?? "0x")}"; + } + + // Ideally we'd prefer to show text; so convert invalid unicode + // and control chars to spaces and trim leading and trailing spaces. + string extraData = new ReadOnlySpan(data).ToCleanUtf8String(); + + // If the cleaned text is less than half length of input size, + // output it as hex, else output the text. + return extraData.Length > data.Length / 2 ? + $"Extra Data: {extraData}" : + $"Hex: {data.ToHexString(withZeroX: true)}"; + } } } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs index e5812f739f2..5e4ed8b7f2d 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs @@ -90,7 +90,7 @@ public BlockchainProcessor( _blockTree.NewBestSuggestedBlock += OnNewBestBlock; _blockTree.NewHeadBlock += OnNewHeadBlock; - _stats = new ProcessingStats(_logger); + _stats = new ProcessingStats(stateReader, _logger); } private void OnNewHeadBlock(object? sender, BlockEventArgs e) @@ -419,7 +419,8 @@ private void FireProcessingQueueEmpty() Metrics.LastBlockProcessingTimeInMs = blockProcessingTimeInMicrosecs / 1000; Metrics.RecoveryQueueSize = _recoveryQueue.Count; Metrics.ProcessingQueueSize = _blockQueue.Count; - _stats.UpdateStats(lastProcessed, blockProcessingTimeInMicrosecs); + + _stats.UpdateStats(lastProcessed, processingBranch.Root, blockProcessingTimeInMicrosecs); } bool updateHead = !options.ContainsFlag(ProcessingOptions.DoNotUpdateHead); diff --git a/src/Nethermind/Nethermind.Consensus/Processing/ProcessingStats.cs b/src/Nethermind/Nethermind.Consensus/Processing/ProcessingStats.cs index b49407e54e7..c975c529b83 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/ProcessingStats.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/ProcessingStats.cs @@ -2,21 +2,25 @@ // SPDX-License-Identifier: LGPL-3.0-only using System; +using System.Collections.Generic; using System.Diagnostics; using System.Threading; using Nethermind.Blockchain; +using Nethermind.Config; using Nethermind.Core; +using Nethermind.Core.Crypto; using Nethermind.Core.Extensions; using Nethermind.Int256; using Nethermind.Logging; +using Nethermind.State; namespace Nethermind.Consensus.Processing { //TODO Consult on disabling of such metrics from configuration internal class ProcessingStats : IThreadPoolWorkItem { + private readonly IStateReader _stateReader; private readonly ILogger _logger; - private readonly Stopwatch _processingStopwatch = new(); private readonly Stopwatch _runStopwatch = new(); private long _lastBlockNumber; private long _lastElapsedRunningMicroseconds; @@ -27,17 +31,16 @@ internal class ProcessingStats : IThreadPoolWorkItem private long _lastTotalSLoad; private long _lastTotalSStore; private long _lastSelfDestructs; - private long _totalBlocks; private long _chunkProcessingMicroseconds; private long _lastTotalCreates; private long _lastReportMs; - private long _lastContractsAnalysed; + private long _lastContractsAnalyzed; private long _lastCachedContractsUsed; - private long _blockProcessingMicroseconds; private long _runningMicroseconds; private long _runMicroseconds; private long _reportMs; private Block? _lastBlock; + private Hash256 _lastBranchRoot; private long _sloadOpcodeProcessing; private long _sstoreOpcodeProcessing; private long _callsProcessing; @@ -46,8 +49,9 @@ internal class ProcessingStats : IThreadPoolWorkItem private long _contractAnalysedProcessing; private long _createsProcessing; - public ProcessingStats(ILogger logger) + public ProcessingStats(IStateReader stateReader, ILogger logger) { + _stateReader = stateReader; _logger = logger; // the line below just to avoid compilation errors @@ -57,14 +61,9 @@ public ProcessingStats(ILogger logger) #endif } - public void UpdateStats(Block? block, long blockProcessingTimeInMicros) + public void UpdateStats(Block? block, Hash256 branchRoot, long blockProcessingTimeInMicros) { - if (block is null) - { - return; - } - - _processingStopwatch.Stop(); + if (block is null) return; if (_lastBlockNumber == 0) { @@ -83,7 +82,6 @@ public void UpdateStats(Block? block, long blockProcessingTimeInMicros) Metrics.BlockchainHeight = block.Header.Number; - _blockProcessingMicroseconds = _processingStopwatch.ElapsedMicroseconds(); _runningMicroseconds = _runStopwatch.ElapsedMicroseconds(); _runMicroseconds = (_runningMicroseconds - _lastElapsedRunningMicroseconds); @@ -92,6 +90,7 @@ public void UpdateStats(Block? block, long blockProcessingTimeInMicros) { _lastReportMs = _reportMs; _lastBlock = block; + _lastBranchRoot = branchRoot; _sloadOpcodeProcessing = Evm.Metrics.ThreadLocalSLoadOpcode; _sstoreOpcodeProcessing = Evm.Metrics.ThreadLocalSStoreOpcode; _callsProcessing = Evm.Metrics.ThreadLocalCalls; @@ -107,6 +106,7 @@ public void UpdateStats(Block? block, long blockProcessingTimeInMicros) void IThreadPoolWorkItem.Execute() { + const long weiToEth = 1_000_000_000_000_000_000; const string resetColor = "\u001b[37m"; const string whiteText = "\u001b[97m"; const string yellowText = "\u001b[93m"; @@ -118,10 +118,26 @@ void IThreadPoolWorkItem.Execute() const string blueText = "\u001b[94m"; const string darkGreyText = resetColor; // "\u001b[90m"; + Block? block = Interlocked.Exchange(ref _lastBlock, null); + if (block is null) return; + + Transaction[] txs = block.Transactions; + Address beneficiary = block.Header.GasBeneficiary; + Transaction lastTx = txs.Length > 0 ? txs[^1] : null; + bool isMev = false; + if (lastTx is not null && (lastTx.SenderAddress == beneficiary || _alternateMevPayees.Contains(lastTx.SenderAddress))) + { + // Mev reward with in last tx + beneficiary = lastTx.To; + isMev = true; + } + UInt256 beforeBalance = _stateReader.GetBalance(_lastBranchRoot, beneficiary); + UInt256 afterBalance = _stateReader.GetBalance(block.StateRoot, beneficiary); + UInt256 rewards = beforeBalance < afterBalance ? afterBalance - beforeBalance : default; + long currentSelfDestructs = Evm.Metrics.SelfDestructs; long chunkBlocks = Metrics.Blocks - _lastBlockNumber; - _totalBlocks += chunkBlocks; double chunkMicroseconds = _chunkProcessingMicroseconds; double chunkMGas = Metrics.Mgas - _lastTotalMGas; @@ -140,21 +156,16 @@ void IThreadPoolWorkItem.Execute() } } - Block? block = Interlocked.Exchange(ref _lastBlock, null); - if (block is not null && _logger.IsInfo) + if (_logger.IsInfo) { - double totalMicroseconds = _blockProcessingMicroseconds; long chunkTx = Metrics.Transactions - _lastTotalTx; long chunkCalls = _callsProcessing - _lastTotalCalls; long chunkEmptyCalls = _emptyCallsProcessing - _lastTotalEmptyCalls; long chunkCreates = _createsProcessing - _lastTotalCreates; long chunkSload = _sloadOpcodeProcessing - _lastTotalSLoad; long chunkSstore = _sstoreOpcodeProcessing - _lastTotalSStore; - long contractsAnalysed = _contractAnalysedProcessing - _lastContractsAnalysed; + long contractsAnalysed = _contractAnalysedProcessing - _lastContractsAnalyzed; long cachedContractsUsed = _codeDbCacheProcessing - _lastCachedContractsUsed; - double totalMgasPerSecond = totalMicroseconds == 0 ? -1 : Metrics.Mgas / totalMicroseconds * 1_000_000.0; - double totalTxPerSecond = totalMicroseconds == 0 ? -1 : Metrics.Transactions / totalMicroseconds * 1_000_000.0; - double totalBlocksPerSecond = totalMicroseconds == 0 ? -1 : _totalBlocks / totalMicroseconds * 1_000_000.0; double txps = chunkMicroseconds == 0 ? -1 : chunkTx / chunkMicroseconds * 1_000_000.0; double bps = chunkMicroseconds == 0 ? -1 : chunkBlocks / chunkMicroseconds * 1_000_000.0; double chunkMs = (chunkMicroseconds == 0 ? -1 : chunkMicroseconds / 1000.0); @@ -164,7 +175,7 @@ void IThreadPoolWorkItem.Execute() if (chunkBlocks > 1) { - _logger.Info($"Processed {block.Number - chunkBlocks + 1,10}...{block.Number,9} | {chunkMs,10:N1} ms | slot {runMs,7:N0} ms |{blockGas}"); + _logger.Info($"Processed {block.Number - chunkBlocks + 1,10}...{block.Number,9} | {chunkMs,10:N1} ms | slot {runMs,7:N0} ms |{blockGas}"); } else { @@ -191,7 +202,7 @@ void IThreadPoolWorkItem.Execute() < 2000 => orangeText, _ => redText }; - _logger.Info($"Processed {block.Number,10} | {chunkColor}{chunkMs,10:N1}{resetColor} ms | slot {runMs,7:N0} ms |{blockGas}"); + _logger.Info($"Processed {block.Number,10} | {chunkColor}{chunkMs,10:N1}{resetColor} ms | slot {runMs,7:N0} ms |{blockGas}"); } string mgasPerSecondColor = (mgasPerSecond / (block.GasLimit / 1_000_000.0)) switch @@ -235,25 +246,19 @@ void IThreadPoolWorkItem.Execute() var recoveryQueue = Metrics.RecoveryQueueSize; var processingQueue = Metrics.ProcessingQueueSize; - _logger.Info($"- Block{(chunkBlocks > 1 ? $"s {chunkBlocks,-9:N0}" : " ")}{(chunkBlocks == 1 ? mgasColor : "")} {chunkMGas,9:F2}{resetColor} MGas | {chunkTx,8:N0} txs | calls {callsColor}{chunkCalls,6:N0}{resetColor} {darkGreyText}({chunkEmptyCalls,3:N0}){resetColor} | sload {chunkSload,7:N0} | sstore {sstoreColor}{chunkSstore,6:N0}{resetColor} | create {createsColor}{chunkCreates,3:N0}{resetColor}{(currentSelfDestructs - _lastSelfDestructs > 0 ? $"{darkGreyText}({-(currentSelfDestructs - _lastSelfDestructs),3:N0}){resetColor}" : "")}"); + _logger.Info($" Block{(chunkBlocks > 1 ? $"s x{chunkBlocks,-9:N0} " : $"{(isMev ? " mev" : " ")} {rewards.ToDecimal(null) / weiToEth,5:N4}{BlocksConfig.GasTokenTicker,4}")}{(chunkBlocks == 1 ? mgasColor : "")} {chunkMGas,7:F2}{resetColor} MGas | {chunkTx,8:N0} txs | calls {callsColor}{chunkCalls,6:N0}{resetColor} {darkGreyText}({chunkEmptyCalls,3:N0}){resetColor} | sload {chunkSload,7:N0} | sstore {sstoreColor}{chunkSstore,6:N0}{resetColor} | create {createsColor}{chunkCreates,3:N0}{resetColor}{(currentSelfDestructs - _lastSelfDestructs > 0 ? $"{darkGreyText}({-(currentSelfDestructs - _lastSelfDestructs),3:N0}){resetColor}" : "")}"); if (recoveryQueue > 0 || processingQueue > 0) { - _logger.Info($"- Block throughput {mgasPerSecondColor}{mgasPerSecond,9:F2}{resetColor} MGas/s{(mgasPerSecond > 1000 ? "🔥" : " ")}| {txps,10:N1} tps | {bps,7:F2} Blk/s | recover {recoveryQueue,5:N0} | process {processingQueue,5:N0}"); + _logger.Info($" Block throughput {mgasPerSecondColor}{mgasPerSecond,11:F2}{resetColor} MGas/s{(mgasPerSecond > 1000 ? "🔥" : " ")}| {txps,10:N1} tps | {bps,7:F2} Blk/s | recover {recoveryQueue,5:N0} | process {processingQueue,5:N0}"); } else { - _logger.Info($"- Block throughput {mgasPerSecondColor}{mgasPerSecond,9:F2}{resetColor} MGas/s{(mgasPerSecond > 1000 ? "🔥" : " ")}| {txps,10:N1} tps | {bps,7:F2} Blk/s | exec code {resetColor} from cache {cachedContractsUsed,7:N0} |{resetColor} new {contractsAnalysed,6:N0}"); - } - - // Only output the total throughput in debug mode - if (_logger.IsDebug) - { - _logger.Debug($"- Total throughput {totalMgasPerSecond,9:F2} MGas/s | {totalTxPerSecond,9:F2} tps | {totalBlocksPerSecond,7:F2} Blk/s |⛽ Gas gwei: {Evm.Metrics.MinGasPrice:N2} .. {Math.Max(Evm.Metrics.MinGasPrice, Evm.Metrics.EstMedianGasPrice):N2} ({Evm.Metrics.AveGasPrice:N2}) .. {Evm.Metrics.MaxGasPrice:N2}"); + _logger.Info($" Block throughput {mgasPerSecondColor}{mgasPerSecond,11:F2}{resetColor} MGas/s{(mgasPerSecond > 1000 ? "🔥" : " ")}| {txps,10:N1} tps | {bps,7:F2} Blk/s | exec code {resetColor} from cache {cachedContractsUsed,7:N0} |{resetColor} new {contractsAnalysed,6:N0}"); } } _lastCachedContractsUsed = _codeDbCacheProcessing; - _lastContractsAnalysed = _contractAnalysedProcessing; + _lastContractsAnalyzed = _contractAnalysedProcessing; _lastBlockNumber = Metrics.Blocks; _lastTotalMGas = Metrics.Mgas; _lastElapsedRunningMicroseconds = _runningMicroseconds; @@ -269,12 +274,19 @@ void IThreadPoolWorkItem.Execute() public void Start() { - _processingStopwatch.Start(); if (!_runStopwatch.IsRunning) { _lastReportMs = Environment.TickCount64; _runStopwatch.Start(); } } + + // Help identify mev blocks when doesn't follow regular pattern + private static HashSet _alternateMevPayees = new() + { + new Address("0xa83114A443dA1CecEFC50368531cACE9F37fCCcb"), // Extra data as: beaverbuild.org + new Address("0x9FC3da866e7DF3a1c57adE1a97c9f00a70f010c8"), // Extra data as: Titan (titanbuilder.xyz) + new Address("0x0b92619DdE55C0cbf828d32993a7fB004E00c84B"), // Extra data as: Builder+ www.btcs.com/builder + }; } } diff --git a/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs b/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs index 9957bd1e912..bbcb28b73a3 100644 --- a/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs +++ b/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs @@ -18,6 +18,7 @@ using Nethermind.Core.Collections; using Nethermind.Core.Crypto; using Nethermind.Int256; +using System.Buffers; namespace Nethermind.Core.Extensions { @@ -1140,5 +1141,94 @@ public static void ChangeEndianness8(Span bytes) (BinaryPrimitives.ReverseEndianness(endIth), BinaryPrimitives.ReverseEndianness(ith)); } } + + public static string ToCleanUtf8String(this ReadOnlySpan bytes) + { + // The maximum number of UTF-16 chars is bytes.Length, but each Rune can be up to 2 chars. + // So we allocate bytes.Length to bytes.Length * 2 chars. + const int maxOutputChars = 32 * 2; + + if (bytes == null || bytes.Length == 0 || bytes.Length > 32) + return string.Empty; + + // Allocate a char buffer on the stack. + char[]? charsArray = null; + Span outputBuffer = stackalloc char[maxOutputChars]; + + int outputPos = 0; + int index = 0; + bool hasValidContent = false; + bool shouldAddSpace = false; + + while (index < bytes.Length) + { + ReadOnlySpan span = bytes.Slice(index); + + OperationStatus status = Rune.DecodeFromUtf8(span, out Rune rune, out var bytesConsumed); + if (status == OperationStatus.Done) + { + if (!IsControlCharacter(rune)) + { + if (shouldAddSpace) + { + outputBuffer[outputPos++] = ' '; + shouldAddSpace = false; + } + + int charsNeeded = rune.Utf16SequenceLength; + if (outputPos + charsNeeded > outputBuffer.Length) + { + // Expand output buffer + int newSize = outputBuffer.Length * 2; + char[] newBuffer = ArrayPool.Shared.Rent(newSize); + outputBuffer.Slice(0, outputPos).CopyTo(newBuffer); + outputBuffer = newBuffer; + if (charsArray is not null) + { + ArrayPool.Shared.Return(charsArray); + } + charsArray = newBuffer; + } + + rune.EncodeToUtf16(outputBuffer.Slice(outputPos)); + outputPos += charsNeeded; + hasValidContent = true; + } + else + { + // Control character encountered; set flag to add space if needed + shouldAddSpace |= hasValidContent; + } + index += bytesConsumed; + } + else if (status == OperationStatus.NeedMoreData) + { + // Incomplete sequence at the end; break out of the loop + break; + } + else + { + // Unexpected status; treat as invalid data + shouldAddSpace |= hasValidContent; + index++; + } + } + + // Create the final string from the output buffer. + string outputString = outputPos > 0 ? new string(outputBuffer[..outputPos]) : string.Empty; + if (charsArray is not null) + { + ArrayPool.Shared.Return(charsArray); + } + + return outputString; + } + + private static bool IsControlCharacter(Rune rune) + { + // Control characters are U+0000 to U+001F and U+007F to U+009F + return rune.Value <= 0x001F || (rune.Value >= 0x007F && rune.Value <= 0x009F); + } + } } diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs index 127fa34e520..d10c9c0744a 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs @@ -51,6 +51,8 @@ public partial class EngineModuleTests [SetUp] public Task Setup() { + ThreadPool.GetMaxThreads(out int worker, out int completion); + ThreadPool.SetMinThreads(worker, completion); return KzgPolynomialCommitments.InitializeAsync(); } diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs b/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs index 066de1f63d9..f6ce35f2da7 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs @@ -2,8 +2,10 @@ // SPDX-License-Identifier: LGPL-3.0-only using System; +using System.Buffers; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Text; using System.Threading; using System.Threading.Tasks; using Nethermind.Blockchain; @@ -13,6 +15,7 @@ using Nethermind.Consensus.Producers; using Nethermind.Core; using Nethermind.Core.Crypto; +using Nethermind.Core.Extensions; using Nethermind.Core.Specs; using Nethermind.Core.Threading; using Nethermind.Crypto; diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Handlers/NewPayloadHandler.cs b/src/Nethermind/Nethermind.Merge.Plugin/Handlers/NewPayloadHandler.cs index a6250f5e1e7..b7712ee4fe0 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin/Handlers/NewPayloadHandler.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin/Handlers/NewPayloadHandler.cs @@ -12,6 +12,7 @@ using Nethermind.Core; using Nethermind.Core.Caching; using Nethermind.Core.Crypto; +using Nethermind.Core.Extensions; using Nethermind.Crypto; using Nethermind.Int256; using Nethermind.JsonRpc; @@ -86,15 +87,18 @@ public NewPayloadHandler( /// public async Task> HandleAsync(ExecutionPayload request) { - string requestStr = $"New Block: {request}"; - if (_logger.IsInfo) { _logger.Info($"Received {requestStr}"); } - if (!request.TryGetBlock(out Block? block, _poSSwitcher.FinalTotalDifficulty)) { - if (_logger.IsWarn) _logger.Warn($"Invalid request. Result of {requestStr}."); + if (_logger.IsWarn) _logger.Warn($"New Block Request Invalid: {request}."); return NewPayloadV1Result.Invalid(null, $"Block {request} could not be parsed as a block"); } + string requestStr = $"New Block: {request}"; + if (_logger.IsInfo) + { + _logger.Info($"Received {requestStr}, {block.ParsedExtraData()}"); + } + if (!HeaderValidator.ValidateHash(block!.Header)) { if (_logger.IsWarn) _logger.Warn(InvalidBlockHelper.GetMessage(block, "invalid block hash")); diff --git a/src/Nethermind/Nethermind.Runner/configs/chiado.cfg b/src/Nethermind/Nethermind.Runner/configs/chiado.cfg index 1dc33ff7a65..757ec3359fa 100644 --- a/src/Nethermind/Nethermind.Runner/configs/chiado.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/chiado.cfg @@ -25,7 +25,8 @@ "Blocks": { "SecondsPerSlot": 5, "BlockProductionTimeoutMs": 3000, - "TargetBlockGasLimit": 17000000 + "TargetBlockGasLimit": 17000000, + "GasToken": "XDAI" }, "Aura": { "TxPriorityContractAddress": "0x4100000000000000000000000000000000000000", diff --git a/src/Nethermind/Nethermind.Runner/configs/chiado_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/chiado_archive.cfg index 9d50f585634..413820f824b 100644 --- a/src/Nethermind/Nethermind.Runner/configs/chiado_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/chiado_archive.cfg @@ -23,7 +23,8 @@ "Blocks": { "SecondsPerSlot": 5, "BlockProductionTimeoutMs": 3000, - "TargetBlockGasLimit": 17000000 + "TargetBlockGasLimit": 17000000, + "GasToken": "XDAI" }, "Receipt": { "TxLookupLimit": 0 diff --git a/src/Nethermind/Nethermind.Runner/configs/energyweb.cfg b/src/Nethermind/Nethermind.Runner/configs/energyweb.cfg index 22a34ddcd51..81b25ff5527 100644 --- a/src/Nethermind/Nethermind.Runner/configs/energyweb.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/energyweb.cfg @@ -26,6 +26,9 @@ "Mining": { "MinGasPrice": 1 }, + "Blocks": { + "GasToken": "EWT" + }, "Merge": { "Enabled": false } diff --git a/src/Nethermind/Nethermind.Runner/configs/energyweb_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/energyweb_archive.cfg index 051dcc33fc4..8a8727f4719 100644 --- a/src/Nethermind/Nethermind.Runner/configs/energyweb_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/energyweb_archive.cfg @@ -33,6 +33,9 @@ "Receipt": { "TxLookupLimit": 0 }, + "Blocks": { + "GasToken": "EWT" + }, "Merge": { "Enabled": false } diff --git a/src/Nethermind/Nethermind.Runner/configs/exosama.cfg b/src/Nethermind/Nethermind.Runner/configs/exosama.cfg index 06b98dedc16..02d3c30e67d 100644 --- a/src/Nethermind/Nethermind.Runner/configs/exosama.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/exosama.cfg @@ -26,6 +26,9 @@ "Mining": { "MinGasPrice": 999995000 }, + "Blocks": { + "GasToken": "SAMA" + }, "Merge": { "Enabled": false } diff --git a/src/Nethermind/Nethermind.Runner/configs/exosama_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/exosama_archive.cfg index ed5c3772915..9e69483aa40 100644 --- a/src/Nethermind/Nethermind.Runner/configs/exosama_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/exosama_archive.cfg @@ -27,6 +27,9 @@ "Pruning": { "Mode": "None" }, + "Blocks": { + "GasToken": "SAMA" + }, "Merge": { "Enabled": false } diff --git a/src/Nethermind/Nethermind.Runner/configs/gnosis.cfg b/src/Nethermind/Nethermind.Runner/configs/gnosis.cfg index e98e44b71a9..0141c974265 100644 --- a/src/Nethermind/Nethermind.Runner/configs/gnosis.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/gnosis.cfg @@ -22,7 +22,8 @@ "Blocks": { "SecondsPerSlot": 5, "BlockProductionTimeoutMs": 3000, - "TargetBlockGasLimit": 17000000 + "TargetBlockGasLimit": 17000000, + "GasToken": "XDAI" }, "Mining": { "MinGasPrice": "1000000000" diff --git a/src/Nethermind/Nethermind.Runner/configs/gnosis_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/gnosis_archive.cfg index a963524e08b..e25fa600e47 100644 --- a/src/Nethermind/Nethermind.Runner/configs/gnosis_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/gnosis_archive.cfg @@ -16,7 +16,8 @@ "Blocks": { "SecondsPerSlot": 5, "BlockProductionTimeoutMs": 3000, - "TargetBlockGasLimit": 17000000 + "TargetBlockGasLimit": 17000000, + "GasToken": "XDAI" }, "Receipt": { "TxLookupLimit": 0 diff --git a/src/Nethermind/Nethermind.Runner/configs/joc-mainnet.cfg b/src/Nethermind/Nethermind.Runner/configs/joc-mainnet.cfg index db085e11b66..917f1756d1a 100644 --- a/src/Nethermind/Nethermind.Runner/configs/joc-mainnet.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/joc-mainnet.cfg @@ -19,7 +19,8 @@ "NodeName": "JOC-Mainnet" }, "Blocks": { - "TargetBlockGasLimit": 30000000 + "TargetBlockGasLimit": 30000000, + "GasToken": "JOC" }, "JsonRpc": { "Enabled": true diff --git a/src/Nethermind/Nethermind.Runner/configs/joc-mainnet_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/joc-mainnet_archive.cfg index 5440c344f54..7a5816be536 100644 --- a/src/Nethermind/Nethermind.Runner/configs/joc-mainnet_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/joc-mainnet_archive.cfg @@ -19,7 +19,8 @@ "NodeName": "JOC-Mainnet Archive" }, "Blocks": { - "TargetBlockGasLimit": 30000000 + "TargetBlockGasLimit": 30000000, + "GasToken": "JOC" }, "JsonRpc": { "Enabled": true diff --git a/src/Nethermind/Nethermind.Runner/configs/joc-testnet.cfg b/src/Nethermind/Nethermind.Runner/configs/joc-testnet.cfg index 4f8b808ea59..ed044f391e3 100644 --- a/src/Nethermind/Nethermind.Runner/configs/joc-testnet.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/joc-testnet.cfg @@ -19,7 +19,8 @@ "NodeName": "JOC-Testnet" }, "Blocks": { - "TargetBlockGasLimit": 30000000 + "TargetBlockGasLimit": 30000000, + "GasToken": "JOC" }, "JsonRpc": { "Enabled": true diff --git a/src/Nethermind/Nethermind.Runner/configs/joc-testnet_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/joc-testnet_archive.cfg index 5060d24d683..f4be5e23cbe 100644 --- a/src/Nethermind/Nethermind.Runner/configs/joc-testnet_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/joc-testnet_archive.cfg @@ -19,7 +19,8 @@ "NodeName": "JOC-Testnet Archive" }, "Blocks": { - "TargetBlockGasLimit": 30000000 + "TargetBlockGasLimit": 30000000, + "GasToken": "JOC" }, "JsonRpc": { "Enabled": true diff --git a/src/Nethermind/Nethermind.Runner/configs/volta.cfg b/src/Nethermind/Nethermind.Runner/configs/volta.cfg index 24088fac369..e1cc108a237 100644 --- a/src/Nethermind/Nethermind.Runner/configs/volta.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/volta.cfg @@ -30,6 +30,9 @@ "Mining": { "MinGasPrice": 1 }, + "Blocks": { + "GasToken": "VT" + }, "Merge": { "Enabled": false } diff --git a/src/Nethermind/Nethermind.Runner/configs/volta_archive.cfg b/src/Nethermind/Nethermind.Runner/configs/volta_archive.cfg index 83d1d2fb47f..c8282d4179b 100644 --- a/src/Nethermind/Nethermind.Runner/configs/volta_archive.cfg +++ b/src/Nethermind/Nethermind.Runner/configs/volta_archive.cfg @@ -27,6 +27,9 @@ "Pruning": { "Mode": "None" }, + "Blocks": { + "GasToken": "VT" + }, "Merge": { "Enabled": false }