Skip to content

Commit

Permalink
Merge branch 'master' into fix/filter-empty-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaszRozmej authored Dec 12, 2024
2 parents 1339b8e + 7361b13 commit b8c2147
Show file tree
Hide file tree
Showing 47 changed files with 450 additions and 284 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
needs: publish-ppa
steps:
- name: Wait for PPA package to be published
run: sleep 1.5h
run: sleep 2h
- name: Install PPA dependencies
run: |
sudo apt-get update
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sync-supported-chains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ name: Sync Supported Chains
on:
workflow_run:
workflows: ["Publish Docker image"]
branches: [master, release/*]
branches: [release/*]
types:
- completed

schedule:
- cron: "0 0 * * *"

workflow_dispatch:
inputs:
nethermind_image:
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<Copyright>Demerzel Solutions Limited</Copyright>
<Product>Nethermind</Product>
<SourceRevisionId Condition="'$(Commit)' != ''">$(Commit)</SourceRevisionId>
<VersionPrefix>1.30.0</VersionPrefix>
<VersionPrefix>1.31.0</VersionPrefix>
<VersionSuffix>unstable</VersionSuffix>
</PropertyGroup>

Expand Down
1 change: 0 additions & 1 deletion src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ public static IEnumerable<GeneralStateTest> Convert(string json)
List<GeneralStateTest> tests = new();
foreach (KeyValuePair<string, GeneralStateTestJson> namedTest in testsInFile)
{
Console.WriteLine($"Loading {namedTest.Key}\n {namedTest.Value.Post}");
tests.AddRange(Convert(namedTest.Key, namedTest.Value));
}

Expand Down
10 changes: 5 additions & 5 deletions src/Nethermind/Nethermind.Blockchain/Find/BlockParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,15 @@ public static BlockParameter GetBlockParameter(string? value)
{
case null:
case { } empty when string.IsNullOrWhiteSpace(empty):
case { } latest when latest.Equals("latest", StringComparison.InvariantCultureIgnoreCase):
case { } latest when latest.Equals("latest", StringComparison.OrdinalIgnoreCase):
return BlockParameter.Latest;
case { } earliest when earliest.Equals("earliest", StringComparison.InvariantCultureIgnoreCase):
case { } earliest when earliest.Equals("earliest", StringComparison.OrdinalIgnoreCase):
return BlockParameter.Earliest;
case { } pending when pending.Equals("pending", StringComparison.InvariantCultureIgnoreCase):
case { } pending when pending.Equals("pending", StringComparison.OrdinalIgnoreCase):
return BlockParameter.Pending;
case { } finalized when finalized.Equals("finalized", StringComparison.InvariantCultureIgnoreCase):
case { } finalized when finalized.Equals("finalized", StringComparison.OrdinalIgnoreCase):
return BlockParameter.Finalized;
case { } safe when safe.Equals("safe", StringComparison.InvariantCultureIgnoreCase):
case { } safe when safe.Equals("safe", StringComparison.OrdinalIgnoreCase):
return BlockParameter.Safe;
case { Length: 66 } hash when hash.StartsWith("0x"):
return new BlockParameter(new Hash256(hash));
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Config/ConfigProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public object GetRawValue(string category, string name)

return Categories.TryGetValue(category, out object value) ? value.GetType()
.GetProperties(BindingFlags.Instance | BindingFlags.Public)
.SingleOrDefault(p => string.Equals(p.Name, name, StringComparison.InvariantCultureIgnoreCase))
.SingleOrDefault(p => string.Equals(p.Name, name, StringComparison.OrdinalIgnoreCase))
?.GetValue(value) : null;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Config/ConfigSourceHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static object ParseValue(Type valueType, string valueString, string categ
}

private static bool IsNullString(string valueString) =>
string.IsNullOrEmpty(valueString) || valueString.Equals("null", StringComparison.InvariantCultureIgnoreCase);
string.IsNullOrEmpty(valueString) || valueString.Equals("null", StringComparison.OrdinalIgnoreCase);

public static object GetDefault(Type type) => type.IsValueType ? (false, Activator.CreateInstance(type)) : (false, null);

Expand Down
10 changes: 9 additions & 1 deletion src/Nethermind/Nethermind.Consensus.Ethash/Ethash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,15 @@ private IEthashDataSet BuildCache(uint epoch)
_cacheStopwatch.Restart();
IEthashDataSet dataSet = new EthashCache(cacheSize, seed.Bytes);
_cacheStopwatch.Stop();
if (_logger.IsInfo) _logger.Info($"Cache for epoch {epoch} with size {cacheSize} and seed {seed.Bytes.ToHexString()} built in {_cacheStopwatch.ElapsedMilliseconds}ms");
if (_logger.IsInfo)
{
var seedText = seed.Bytes.ToHexString(withZeroX: true);
if (seedText.Length > 17)
{
seedText = $"{seedText[..8]}...{seedText[^6..]}";
}
_logger.Info($"Cache for epoch {epoch} with size {cacheSize} and seed {seedText} built in {_cacheStopwatch.ElapsedMilliseconds}ms");
}
return dataSet;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static bool TrySetTransactions(this Block block, Transaction[] transactio
public static bool IsByNethermindNode(this BlockHeader block) =>
Ascii.IsValid(block.ExtraData)
&& Encoding.ASCII.GetString(block.ExtraData ?? [])
.Contains(BlocksConfig.DefaultExtraData, StringComparison.InvariantCultureIgnoreCase);
.Contains(BlocksConfig.DefaultExtraData, StringComparison.OrdinalIgnoreCase);

public static string ParsedExtraData(this Block block)
{
Expand Down
Loading

0 comments on commit b8c2147

Please sign in to comment.