-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add genesis config option for Node #4017
Changes from all commits
290eccb
38f5fca
b740696
557e951
a56650d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ public sealed class GenesisOptions : OptionsBase<GenesisOptions> | |
[PrivateKey] | ||
[Description( | ||
$"The PrivateKey used to generate the genesis block. " + | ||
$"This property cannot be used with {nameof(GenesisBlockPath)}.")] | ||
$"This property cannot be used with {nameof(GenesisBlockPath)} and " + | ||
$"{nameof(GenesisConfigurationPath)}.")] | ||
public string GenesisKey { get; set; } = string.Empty; | ||
|
||
[PublicKeyArray] | ||
|
@@ -26,6 +27,12 @@ public sealed class GenesisOptions : OptionsBase<GenesisOptions> | |
|
||
[Description( | ||
$"The path of the genesis block, which can be a file path or a URI." + | ||
$"This property cannot be used with {nameof(GenesisKey)}.")] | ||
$"This property cannot be used with {nameof(GenesisKey)} and " + | ||
$"{nameof(GenesisConfigurationPath)}.")] | ||
public string GenesisBlockPath { get; set; } = string.Empty; | ||
|
||
[Description( | ||
$"The path of the genesis configuration, which can be a file path or a URI." + | ||
$"This property cannot be used with {nameof(GenesisKey)} and {nameof(GenesisBlockPath)}.")] | ||
public string GenesisConfigurationPath { get; set; } = string.Empty; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If there are many ways to create Genesis blocks, it may be better to create a type variable rather than increase the properties. enum GenesisBlockType
{
Binary,
BinaryUrl,
Json,
JsonUrl
} I don't know what the best way is, but I think it's worth considering. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this suggestion should be dealt in one separated PR |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
<ItemGroup> | ||
<PackageReference Include="Cocona.Lite" Version="2.0.*" /> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="4.1.0" /> | ||
<PackageReference Include="System.Text.Json" Version="7.0.0" /> | ||
<PackageReference Include="System.Text.Json" Version="9.0.*" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bumping to the latest version is always welcome. At least for me. 😀 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vulnerability in 7.0 causes failure in build 😢 |
||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indent level can be reduced by one if the following code is used.
https://github.com/s2quake/libplanet-console/blob/main/src/common/LibplanetConsole.Common/IO/TempFile.cs
However, it's unfortunate that the code is not available in libplanet.node