Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Fuse/revert message 2 #11

Open
wants to merge 28 commits into
base: fuse_development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7fe4a64
Add missing peer types to limits (#5838)
benaadams Jun 20, 2023
3d19ef7
Use better processing timer for logging (#5843)
benaadams Jun 21, 2023
3559b61
Add Gnosis Shanghai hard-fork timestamp (#5848)
rubo Jun 22, 2023
d5e8ac2
Don't use DarkGray (#5849)
benaadams Jun 21, 2023
b1ce97e
Bump to 1.20.0-rc
kamilchodola Jun 22, 2023
6006747
MaxDegreeOfParallelism defaults for full pruning (#5662)
MarekM25 Jun 23, 2023
a38289e
Perf/smoother peer discovery (#5846)
asdacap Jun 23, 2023
c9ba2d0
Update RocksDB package (#5883)
rubo Jul 4, 2023
9298335
Update DotNetty feed
rubo Jun 29, 2023
d158ec2
Update DotNetty package
rubo Jul 4, 2023
01e5a46
add more gnosis bootnodes (#5910)
MarekM25 Jul 7, 2023
9959da9
Remove `v` of non-legacy tx signature from RPC response (#5927)
rubo Jul 13, 2023
63523ed
Merge branch 'release/1.20.0' of https://github.com/NethermindEth/net…
kamilchodola Jul 14, 2023
ad68701
minor fixes
marcindsobczak Jun 20, 2023
2d43e90
Update version to 1.20.0
kamilchodola Jul 14, 2023
83cfef4
Bump to 1.20.1
kamilchodola Jul 17, 2023
9f39c0c
Restore `v` in tx signature for Geth compatibility (#5937)
rubo Jul 17, 2023
7c75b68
add support for fuse and spark
Andrew-Pohl Jun 15, 2023
2196813
Add a mechanism to ceiling gas price estimation at a minimum value
Andrew-Pohl Jun 15, 2023
32f2cfb
update bootnodes for fuse and spark
Andrew-Pohl Jul 31, 2023
bc57f1e
add fuse version file
Andrew-Pohl Jul 31, 2023
7d3fd12
fix: Spark - added extra bootnodes
AliakseiMalyshau Jul 31, 2023
4bd6f0a
Update fast sync and prune more aggressively on validators.
Andrew-Pohl Aug 1, 2023
b6e820a
Merge branch 'fuse_development' of https://github.com/fuseio/nethermi…
Andrew-Pohl Aug 1, 2023
1899462
Merge branch 'fuse/revert-message-2' into revert-message-upstream
ArseniiPetrovich Sep 13, 2023
5a191c9
Merge pull request #10 from fuseio/revert-message-upstream
ArseniiPetrovich Sep 13, 2023
5eeac2b
Update Directory.Packages.props
ArseniiPetrovich Sep 13, 2023
2512f37
Update InitializeBlockchain.cs
ArseniiPetrovich Sep 13, 2023
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 VERSION.FUSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.3
79 changes: 79 additions & 0 deletions src/Nethermind/Chains/fuse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"name": "FuseNetwork",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "5",
"blockReward": "0x0",
"blockRewardContractAddress": "0x63D4efeD2e3dA070247bea3073BCaB896dFF6C9B",
"blockRewardContractTransition": 100,
"validators": {
"multi": {
"0": {
"list": ["0xd9176e84898a0054680aec3f7c056b200c3d96c3"]
},
"100": {
"safeContract": "0x3014ca10b91cb3D0AD85fEf7A3Cb95BCAc9c0f79"
}
}
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x07a",
"eip155Transition": 0,
"validateChainIdTransition": 0,
"eip140Transition": 0,
"eip211Transition": 0,
"eip214Transition": 0,
"eip658Transition": 0,
"eip150Transition": "0x0",
"eip160Transition": "0x0",
"eip161abcTransition": "0x0",
"eip161dTransition": "0x0",
"eip98Transition": "0x7fffffffffffff",
"eip145Transition": "0x38ada7",
"eip1014Transition": "0x38ada7",
"eip1052Transition": "0x38ada7",
"eip1283Transition": "0xd29240",
"eip1344Transition": "0xd29240",
"eip1706Transition": "0xd29240",
"eip1884Transition": "0xd29240",
"eip2028Transition": "0xd29240",
"eip2929Transition": "0xd29240",
"eip2930Transition": "0xd29240",
"maxCodeSize": 24576,
"maxCodeSizeTransition": "0x0"
},
"genesis": {
"seal": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x20000",
"gasLimit": "0x989680"
},
"nodes": [
"enode://84ee9a7eb287e857c9baec48f3601382174516441e56c8e00e07fbf55d74db60861911a820aec80d6038a0909ae3165423b31644317b580e2f6dc54b3b9a7b66@35.205.73.124:30303",
"enode://1bb0253afcd0c6a04125165c23c911cf20da583f63b3e0f4ab16f70e48b454dc7da0a68329f3224fbf7f406386ee4e904923a826ecf1ee739bd4bcb6f46fc744@34.76.228.61:30303",
"enode://7bc2e851cad345437984d6550b1b98d7029b694f2793e2c592637a793b243760060a5a3e00d6212b75f1c534a97b41d532221071242d01116e9ff3c8dcc95672@95.217.1.4:30303"
],
"accounts": {
"0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } },
"0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } },
"0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } },
"0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } },
"0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "pricing": { "0": { "price": { "modexp": { "divisor": 20 } } }, "0xd29240": { "info": "EIP-2565: ModExp Gas Cost.", "price": { "modexp2565": {} } } } } },
"0x0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "pricing": { "0": { "price": { "alt_bn128_const_operations": { "price": 500 } } }, "0xd29240": { "info": "EIP-1108 Istanbul HF", "price": { "alt_bn128_const_operations": { "price": 150 } } } } } },
"0x0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "pricing": { "0": { "price": { "alt_bn128_const_operations": { "price": 4000 } } }, "0xd29240": { "info": "EIP-1108 Istanbul HF", "price": { "alt_bn128_const_operations": { "price": 6000 } } } } } },
"0x0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "pricing": { "0": { "price": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } }, "0xd29240": { "info": "EIP-1108 Istanbul HF", "price": { "alt_bn128_pairing": { "base": 45000, "pair": 34000 } } } } } },
"0x0000000000000000000000000000000000000009": { "builtin": { "name": "blake2_f", "pricing": { "0xd29240": { "info": "EIP-152 Istanbul HF", "price": { "blake2_f": { "gas_per_round": 1 } } } } } },
"0xd9176e84898a0054680aec3f7c056b200c3d96c3": { "balance": "300000000000000000000000000" }
}
}
120 changes: 120 additions & 0 deletions src/Nethermind/Chains/spark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"name": "FuseNetwork",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "5",
"blockReward": "0x0",
"blockRewardContractAddress": "0x52B9b9585e1b50DA5600f7dbD94E9fE68943162c",
"blockRewardContractTransition": 1000,
"validators": {
"multi": {
"0": {
"list": [ "0xba7829b381f07cca0d186bdf619fdc6c7f756d0a" ]
},
"1000": {
"safeContract": "0xC8c3a332f9e4CE6bfFFcf967026cB006Db2311c7"
},
"6905799": {
"list": [ "0x379e81df609e8235c9026f25a379d49a27b10d30","0xba7829b381f07cca0d186bdf619fdc6c7f756d0a","0xe4cc9b2836ba373c3ccf473cbb15ed07007963ee","0xbc048d3064fd912b40a9aadcf67a14fd4601db77"]
},
"6910120": {
"safeContract": "0xC8c3a332f9e4CE6bfFFcf967026cB006Db2311c7"
},
"6925000": {
"list": [ "0x379e81df609e8235c9026f25a379d49a27b10d30","0xba7829b381f07cca0d186bdf619fdc6c7f756d0a","0xe4cc9b2836ba373c3ccf473cbb15ed07007963ee","0xbc048d3064fd912b40a9aadcf67a14fd4601db77"]
}
}
}
}
}
},
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x07b",
"eip155Transition": 0,
"validateChainIdTransition": 0,
"eip140Transition": 0,
"eip211Transition": 0,
"eip214Transition": 0,
"eip658Transition": 0,
"eip150Transition": "0x0",
"eip160Transition": "0x0",
"eip161abcTransition": "0x0",
"eip161dTransition": "0x0",
"eip98Transition": "0x7fffffffffffff",
"eip145Transition": "0x6bf64",
"eip1014Transition": "0x6bf64",
"eip1052Transition": "0x6bf64",
"eip1283Transition": "0x13d620",
"eip1344Transition": "0x13d620",
"eip1706Transition": "0x13d620",
"eip1884Transition": "0x13d620",
"eip2028Transition": "0x13d620",
"eip2929Transition": "0x13d620",
"eip2930Transition": "0x13d620",
"maxCodeSize": 24576,
"maxCodeSizeTransition": "0x0"
},
"genesis": {
"seal": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x20000",
"gasLimit": "0x5F5E100"
},
"nodes": [
"enode://beea6b15658e694f76d5ac7775c9be5cb88dfe12a67d464fdb1134ca5bf2d47f44047be935547780c8ec300920e2d684a4fe90c9ba1c66a6f559ac2ec0976d28@34.22.208.55:30303",
"enode://4b115030420718523198eaad02c68961814c1d2f2f1c437d25f6a05279438465865b454431b5b0d1e839f6c37d9d52668105eb285e6aa6362c0601ef4fb8854b@34.76.70.196:30303",
"enode://f1eb1ac3f624f6862fd2d6f56c30671d808088adef18a4fafd508665a3a3ce063553ff8be290247ed074ee759d2d05bf95b629a72e30eedd47e2f2df85d6f581@35.205.144.49:30303",
"enode://94230ecf060189d842d14a7c039d37aae328c317d6b0d66e4f1b67b307a6e64a11f5309d45a9c536824909cf828cf34eb730adcb60872cd723be832d2979f811@34.34.138.246:30303"
],
"accounts": {
"0x0000000000000000000000000000000000000001": {
"balance": "1",
"builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } }
},
"0x0000000000000000000000000000000000000002": {
"balance": "1",
"builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } }
},
"0x0000000000000000000000000000000000000003": {
"balance": "1",
"builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } }
},
"0x0000000000000000000000000000000000000004": {
"balance": "1",
"builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } }
},
"0x0000000000000000000000000000000000000005": {
"builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } }
},
"0x0000000000000000000000000000000000000006": {
"builtin": {
"name": "alt_bn128_add",
"activate_at": 0,
"pricing": { "linear": { "base": 500, "word": 0 } }
}
},
"0x0000000000000000000000000000000000000007": {
"builtin": {
"name": "alt_bn128_mul",
"activate_at": 0,
"pricing": { "linear": { "base": 40000, "word": 0 } }
}
},
"0x0000000000000000000000000000000000000008": {
"builtin": {
"name": "alt_bn128_pairing",
"activate_at": 0,
"pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } }
}
},
"0xba7829b381f07cca0d186bdf619fdc6c7f756d0a": { "balance": "300000000000000000000000000" }
}
}
6 changes: 3 additions & 3 deletions src/Nethermind/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.18.1" />
<PackageVersion Include="Nethermind.Crypto.Pairings" Version="1.0.1" />
<PackageVersion Include="Nethermind.Crypto.SecP256k1" Version="1.0.1" />
<PackageVersion Include="Nethermind.DotNetty.Buffers" Version="1.0.1" />
<PackageVersion Include="Nethermind.DotNetty.Handlers" Version="1.0.1" />
<PackageVersion Include="Nethermind.DotNetty.Buffers" Version="1.0.1-preview.2" />
<PackageVersion Include="Nethermind.DotNetty.Handlers" Version="1.0.1-preview.2" />
<PackageVersion Include="Nethermind.DotNetty.Transport" Version="1.0.1" />
<PackageVersion Include="Nethermind.Gmp" Version="1.0.1" />
<PackageVersion Include="Nethermind.Numerics.Int256" Version="1.1.0" />
Expand Down Expand Up @@ -82,4 +82,4 @@
<PackageVersion Include="Websocket.Client" Version="4.6.1" />
<PackageVersion Include="YamlDotNet" Version="13.1.1" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ public void UpdateStats(Block? block, IBlockTree blockTreeCtx, int recoveryQueue
> 75 => whiteText,
_ => ""
};
_logger.Info($"- Block{(chunkBlocks > 1 ? $"s {chunkBlocks,-9:N0}" : " ")}{(chunkBlocks == 1 ? mgasColor : "")} {chunkMGas,7:F2}{resetColor} MGas | {chunkTx,6: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 throughput {mgasPerSecond,7:F2} MGas/s | {txps,9:F2} t/s | {bps,7:F2} Blk/s | recv {recoveryQueueSize,7:N0} | proc {blockQueueSize,6:N0}");
_logger.Info($"- Block{(chunkBlocks > 1 ? "s" : " ")}{(chunkBlocks == 1 ? mgasColor : "")} {chunkMGas,7:F2}{resetColor} MGas | {chunkTx,6: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 throughput {mgasPerSecond,7:F2} MGas/s | {txps,9:F2} t/s | {bps,7:F2} b/s | recv {recoveryQueueSize,7:N0} | proc {blockQueueSize,6:N0}");
// Only output the total throughput in debug mode
if (_logger.IsDebug)
{
_logger.Debug($"- Total throughput {totalMgasPerSecond,7:F2} MGas/s | {totalTxPerSecond,9:F2} t/s | {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.Debug($"- Total throughput {totalMgasPerSecond,7:F2} MGas/s | {totalTxPerSecond,9:F2} t/s | {totalBlocksPerSecond,7:F2} b/s | Gas gwei: {Evm.Metrics.MinGasPrice:N2} .. {Math.Max(Evm.Metrics.MinGasPrice, Evm.Metrics.EstMedianGasPrice):N2} ({Evm.Metrics.AveGasPrice:N2}) .. {Evm.Metrics.MaxGasPrice:N2}");
}

if (_logger.IsTrace)
Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Nethermind.Core/RateLimiter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using Nethermind.Core.Extensions;

namespace Nethermind.Core;

Expand Down
8 changes: 5 additions & 3 deletions src/Nethermind/Nethermind.Init/Steps/InitializeBlockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using Nethermind.Db.FullPruning;
using Nethermind.Evm;
using Nethermind.Evm.TransactionProcessing;
using Nethermind.JsonRpc;
using Nethermind.JsonRpc.Converters;
using Nethermind.JsonRpc.Modules.DebugModule;
using Nethermind.JsonRpc.Modules.Eth.GasPrice;
Expand Down Expand Up @@ -79,6 +80,7 @@ private Task InitBlockchain()
IPruningConfig pruningConfig = getApi.Config<IPruningConfig>();
IBlocksConfig blocksConfig = getApi.Config<IBlocksConfig>();
IMiningConfig miningConfig = getApi.Config<IMiningConfig>();
IJsonRpcConfig jsonRpcConfig = getApi.Config<IJsonRpcConfig>();

if (syncConfig.DownloadReceiptsInFastSync && !syncConfig.DownloadBodiesInFastSync)
{
Expand Down Expand Up @@ -122,7 +124,7 @@ private Task InitBlockchain()
}
else
{
pruningStrategy = No.Pruning;
pruningStrategy = Nethermind.Trie.Pruning.No.Pruning;
persistenceStrategy = Persist.EveryBlock;
}

Expand Down Expand Up @@ -170,7 +172,7 @@ private Task InitBlockchain()
try
{
_logger!.Info("Collecting trie stats and verifying that no nodes are missing...");
TrieStore noPruningStore = new(stateWitnessedBy, No.Pruning, Persist.EveryBlock, getApi.LogManager);
TrieStore noPruningStore = new(stateWitnessedBy, Nethermind.Trie.Pruning.No.Pruning, Persist.EveryBlock, getApi.LogManager);
IWorldState diagStateProvider = new WorldState(noPruningStore, codeDb, getApi.LogManager)
{
StateRoot = getApi.BlockTree!.Head?.StateRoot ?? Keccak.EmptyTreeHash
Expand Down Expand Up @@ -247,7 +249,7 @@ private Task InitBlockchain()
setApi.TxSender = new TxPoolSender(txPool, nonceReservingTxSealer, nonceManager, getApi.EthereumEcdsa!);

setApi.TxPoolInfoProvider = new TxPoolInfoProvider(chainHeadInfoProvider.AccountStateProvider, txPool);
setApi.GasPriceOracle = new GasPriceOracle(getApi.BlockTree, getApi.SpecProvider, _api.LogManager, blocksConfig.MinGasPrice);
setApi.GasPriceOracle = new GasPriceOracle(getApi.BlockTree, getApi.SpecProvider, _api.LogManager, blocksConfig.MinGasPrice, jsonRpcConfig.UseMinGasPriceInEstimates);
IBlockProcessor mainBlockProcessor = setApi.MainBlockProcessor = CreateBlockProcessor();

BlockchainProcessor blockchainProcessor = new(
Expand Down
5 changes: 5 additions & 0 deletions src/Nethermind/Nethermind.JsonRpc/IJsonRpcConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ public interface IJsonRpcConfig : IConfig
DefaultValue = "30000000")]
long? MaxRequestBodySize { get; set; }

[ConfigItem(
Description = "Set a lower limit for GetGasPriceEstimate. This ensure rpc calls to eth_gasPrice are never below the limit set by MiningConfig.MinGasPrice",
DefaultValue = "false")]
bool UseMinGasPriceInEstimates { get; set; }

[ConfigItem(
Description = "Number of concurrent instances for non-sharable calls (" +
nameof(IEthRpcModule.eth_call) + ", " +
Expand Down
4 changes: 2 additions & 2 deletions src/Nethermind/Nethermind.JsonRpc/JsonRpcConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ public int WebSocketsPort
public string[] EngineEnabledModules { get; set; } = ModuleType.DefaultEngineModules.ToArray();
public int MaxBatchSize { get; set; } = 1024;
public long? MaxBatchResponseBodySize { get; set; } = 30.MB();
public bool UseMinGasPriceInEstimates { get; set; } = false;
};
};

};
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class GasPriceOracle : IGasPriceOracle
private readonly IBlockFinder _blockFinder;
private readonly ILogger _logger;
private readonly UInt256 _minGasPrice;
private readonly bool _UseMinGasPrice;
internal PriceCache _gasPriceEstimation;
internal PriceCache _maxPriorityFeePerGasEstimation;
private UInt256 FallbackGasPrice(in UInt256? baseFeePerGas = null) => _gasPriceEstimation.LastPrice ?? GetMinimumGasPrice(baseFeePerGas ?? UInt256.Zero);
Expand All @@ -32,11 +33,13 @@ public GasPriceOracle(
IBlockFinder blockFinder,
ISpecProvider specProvider,
ILogManager logManager,
UInt256? minGasPrice = null)
UInt256? minGasPrice = null,
bool useMinGasPrice = false)
{
_blockFinder = blockFinder;
_logger = logManager.GetClassLogger();
_minGasPrice = minGasPrice ?? new BlocksConfig().MinGasPrice;
_UseMinGasPrice = useMinGasPrice;
SpecProvider = specProvider;
}

Expand All @@ -56,6 +59,10 @@ public UInt256 GetGasPriceEstimate()

IEnumerable<UInt256> txGasPrices = GetSortedGasPricesFromRecentBlocks(headBlock.Number);
UInt256 gasPriceEstimate = GetGasPriceAtPercentile(txGasPrices.ToList()) ?? GetMinimumGasPrice(headBlock.BaseFeePerGas);
if (_UseMinGasPrice == true)
{
gasPriceEstimate = UInt256.Max(gasPriceEstimate, GetMinimumGasPrice(headBlock.BaseFeePerGas));
}
gasPriceEstimate = UInt256.Min(gasPriceEstimate!, EthGasPriceConstants.MaxGasPrice);
_gasPriceEstimation.Set(headBlockHash, gasPriceEstimate);
return gasPriceEstimate!;
Expand Down Expand Up @@ -203,4 +210,4 @@ public bool TryGetPrice(Keccak headHash, out UInt256? price)
}
}
}
}
}
Loading
Loading