Skip to content
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

Release/230 to main #2665

Merged
merged 33 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3f99199
fix code style for namespace
eugene-doobu Nov 20, 2024
23ef6c6
Merge pull request #2639 from planetarium/feature/fix-code-style-name…
moreal Nov 20, 2024
1931e7f
chore: remove 9crun project
moreal Nov 19, 2024
b432dbc
Merge pull request #2636 from moreal/chore/remove-9crun
moreal Nov 21, 2024
628d2a5
fix: Add configuration to host builder
s2quake Nov 21, 2024
e569bf4
Merge pull request #2640 from s2quake/fix/crash-with-url-config
s2quake Nov 21, 2024
069868f
ci(gh-actions): fix tagging docker image
moreal Nov 28, 2024
2cfe859
Merge pull request #2646 from moreal/ci/gh-actions/fix-tagging-docker…
moreal Nov 28, 2024
ac3229c
Merge branch 'development' into release/220
U-lis Nov 29, 2024
d4b5c84
Merge pull request #2645 from planetarium/release/220
U-lis Nov 29, 2024
c474d56
Merge branch 'development' into release/222
U-lis Dec 2, 2024
8326855
Merge pull request #2651 from planetarium/release/222
U-lis Dec 2, 2024
9d04a7b
feat: Add state query for delegation
s2quake Dec 5, 2024
5a1dab6
test: StateQuery test code for validator
s2quake Dec 5, 2024
450ae10
Merge pull request #2652 from s2quake/feature/state-query-for-delegation
s2quake Dec 9, 2024
007a5a4
Bump lib9c 1.21.0
eugene-doobu Dec 11, 2024
6ca1f00
Merge pull request #2657 from planetarium/20241211-bump-lib9c
eugene-doobu Dec 11, 2024
8a9d08a
Use StateRootHash instead of BlockHash
ipdae Dec 12, 2024
604c238
Merge pull request #2658 from planetarium/improve/get-sheets
ipdae Dec 13, 2024
0bd18c8
bump lib9c
eugene-doobu Dec 13, 2024
948e515
bump: libplanet 5.4.2
limebell Dec 13, 2024
2d168ff
feat: delay precommit option
limebell Dec 8, 2024
22aca92
Bump Libplanet to 5.4.2
U-lis Dec 16, 2024
d4b23cc
Merge pull request #2659 from planetarium/feature/precommit-enter-delay
U-lis Dec 16, 2024
71d6136
Merge pull request #2661 from planetarium/release/231
U-lis Dec 16, 2024
23217ce
override rate-limiter when using jwt
area363 Dec 9, 2024
bdfda08
remove unnecessary log
area363 Dec 10, 2024
72a435d
Merge pull request #2653 from area363/override-rate-limit-with-jwt-token
area363 Dec 16, 2024
2454309
bump lib9c 84f70
Atralupus Dec 17, 2024
30e8814
Merge pull request #2663 from Atralupus/bump-lib9c-1.21.0
Atralupus Dec 17, 2024
d60b66a
add ratelimit for transactionresults
area363 Dec 19, 2024
fd7e093
Merge pull request #2664 from area363/transaction-results-rate-limit
area363 Dec 19, 2024
36e4b3f
Merge branch 'main' into release/230
Atralupus Dec 19, 2024
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
9 changes: 4 additions & 5 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ jobs:
--password '${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}'
- name: push git tagged version
run: |
docker pull ${{ matrix.docker.repo }}:git-${{ github.sha }}
if [[ -z "${{ github.event.inputs.imageTag }}" ]]; then
export IMAGE_TAG=${{ github.ref_name }}
else
export IMAGE_TAG=${{ github.event.inputs.imageTag }}
fi

docker tag \
${{ matrix.docker.repo }}:git-${{ github.sha }} \
${{ matrix.docker.repo }}:$IMAGE_TAG
docker push ${{ matrix.docker.repo }}:$IMAGE_TAG
docker buildx imagetools create \
--progress=plain \
--tag ${{ matrix.docker.repo }}:$IMAGE_TAG \
${{ matrix.docker.repo }}:git-${{ github.sha }}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<LibplanetVersion>5.4.1</LibplanetVersion>
<LibplanetVersion>5.4.2</LibplanetVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion Lib9c
Submodule Lib9c updated 110 files
2 changes: 1 addition & 1 deletion Libplanet.Headless/Hosting/LibplanetNodeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ IActionEvaluator BuildActionEvaluator(IActionEvaluatorConfiguration actionEvalua
ConsensusPrivateKey = Properties.ConsensusPrivateKey,
ConsensusWorkers = 500,
TargetBlockInterval = TimeSpan.FromMilliseconds(Properties.ConsensusTargetBlockIntervalMilliseconds ?? 7000),
ContextTimeoutOptions = Properties.ContextTimeoutOption,
ContextOption = Properties.ContextOption,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class LibplanetNodeServiceProperties

public TimeSpan TipTimeout { get; set; } = TimeSpan.FromSeconds(60);

public ContextTimeoutOption ContextTimeoutOption { get; set; }
public ContextOption ContextOption { get; set; }

public int DemandBuffer { get; set; } = 1150;

Expand Down
22 changes: 0 additions & 22 deletions NineChronicles.Headless.Executable.sln
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Libplanet.Extensions.Plugge
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lib9c.Plugin.Shared", "Lib9c\.Lib9c.Plugin.Shared\Lib9c.Plugin.Shared.csproj", "{3D32DA34-E619-429F-8421-848FF4F14417}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NineChronicles.Headless.Executor", "NineChronicles.Headless.Executor\NineChronicles.Headless.Executor.csproj", "{59AD477A-B23C-4E0B-AA26-A528B3BC5234}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -463,30 +461,10 @@ Global
{3D32DA34-E619-429F-8421-848FF4F14417}.Release|x64.Build.0 = Release|Any CPU
{3D32DA34-E619-429F-8421-848FF4F14417}.Release|x86.ActiveCfg = Release|Any CPU
{3D32DA34-E619-429F-8421-848FF4F14417}.Release|x86.Build.0 = Release|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Debug|x64.ActiveCfg = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Debug|x64.Build.0 = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Debug|x86.ActiveCfg = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Debug|x86.Build.0 = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.DevEx|Any CPU.ActiveCfg = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.DevEx|Any CPU.Build.0 = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.DevEx|x64.ActiveCfg = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.DevEx|x64.Build.0 = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.DevEx|x86.ActiveCfg = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.DevEx|x86.Build.0 = Debug|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Release|Any CPU.Build.0 = Release|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Release|x64.ActiveCfg = Release|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Release|x64.Build.0 = Release|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Release|x86.ActiveCfg = Release|Any CPU
{59AD477A-B23C-4E0B-AA26-A528B3BC5234}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B4A2DD82-CCC1-4D74-88FF-91BBEBB5A47F}
EndGlobalSection
Expand Down
8 changes: 6 additions & 2 deletions NineChronicles.Headless.Executable.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_NEW_PARENTHESES/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BETWEEN_ATTRIBUTE_SECTIONS/@EntryValue">False</s:Boolean>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">300</s:Int64>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/PreferQualifiedReference/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AddImportsToDeepestScope/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/AllowAlias/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/CanUseGlobalAlias/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/PreferQualifiedReference/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/SortUsingsWithSystemFirst/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AI/@EntryIndexedValue">AI</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CRYSTAL/@EntryIndexedValue">CRYSTAL</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GARAGE/@EntryIndexedValue">GARAGE</s:String>
Expand Down
9 changes: 6 additions & 3 deletions NineChronicles.Headless.Executable/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public class Configuration
public string[]? ConsensusSeedStrings { get; set; }
public ushort? ConsensusPort { get; set; }
public double? ConsensusTargetBlockIntervalMilliseconds { get; set; }
public int? ConsensusProposeSecondBase { get; set; }
public int? ConsensusProposeTimeoutBase { get; set; }
public int? ConsensusEnterPreCommitDelay { get; set; }

public int? MaxTransactionPerBlock { get; set; }

Expand Down Expand Up @@ -139,7 +140,8 @@ public void Overwrite(
string? consensusPrivateKeyString,
string[]? consensusSeedStrings,
double? consensusTargetBlockIntervalMilliseconds,
int? consensusProposeSecondBase,
int? consensusProposeTimeoutBase,
int? consensusEnterPreCommitDelay,
int? maxTransactionPerBlock,
bool? remoteKeyValueService
)
Expand Down Expand Up @@ -190,7 +192,8 @@ public void Overwrite(
ConsensusSeedStrings = consensusSeedStrings ?? ConsensusSeedStrings;
ConsensusPrivateKeyString = consensusPrivateKeyString ?? ConsensusPrivateKeyString;
ConsensusTargetBlockIntervalMilliseconds = consensusTargetBlockIntervalMilliseconds ?? ConsensusTargetBlockIntervalMilliseconds;
ConsensusProposeSecondBase = consensusProposeSecondBase ?? ConsensusProposeSecondBase;
ConsensusProposeTimeoutBase = consensusProposeTimeoutBase ?? ConsensusProposeTimeoutBase;
ConsensusEnterPreCommitDelay = consensusEnterPreCommitDelay ?? ConsensusEnterPreCommitDelay;
MaxTransactionPerBlock = maxTransactionPerBlock ?? MaxTransactionPerBlock;
RemoteKeyValueService = remoteKeyValueService ?? RemoteKeyValueService;
}
Expand Down
66 changes: 55 additions & 11 deletions NineChronicles.Headless.Executable/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ public async Task Run(
[Option("consensus-propose-second-base",
Description = "A propose second base for consensus context timeout. The unit is second.")]
int? consensusProposeSecondBase = null,
[Option("consensus-enter-precommit-delay",
Description = "A precommit delay manually set. The unit is millisecond.")]
int? consensusEnterPreCommitDelay = null,
[Option("maximum-transaction-per-block",
Description = "Maximum transactions allowed in a block. null by default.")]
int? maxTransactionPerBlock = null,
Expand Down Expand Up @@ -290,16 +293,55 @@ public async Task Run(
GetActionEvaluatorConfiguration(configuration.GetSection("Headless").GetSection("ActionEvaluator"));

headlessConfig.Overwrite(
appProtocolVersionToken, trustedAppProtocolVersionSigners, genesisBlockPath, host, port,
swarmPrivateKeyString, storeType, storePath, noReduceStore, noMiner, minerCount,
minerPrivateKeyString, minerBlockIntervalMilliseconds, planet, iceServerStrings, peerStrings, rpcServer, rpcListenHost,
rpcListenPort, rpcRemoteServer, rpcHttpServer, graphQLServer, graphQLHost, graphQLPort,
graphQLSecretTokenPath, noCors, nonblockRenderer, nonblockRendererQueue, strictRendering,
logActionRenders, confirmations,
txLifeTime, messageTimeout, tipTimeout, demandBuffer, skipPreload,
minimumBroadcastTarget, bucketSize, chainTipStaleBehaviorType, txQuotaPerSigner, maximumPollPeers,
consensusPort, consensusPrivateKeyString, consensusSeedStrings, consensusTargetBlockIntervalMilliseconds, consensusProposeSecondBase,
maxTransactionPerBlock, remoteKeyValueService
appProtocolVersionToken,
trustedAppProtocolVersionSigners,
genesisBlockPath,
host,
port,
swarmPrivateKeyString,
storeType,
storePath,
noReduceStore,
noMiner,
minerCount,
minerPrivateKeyString,
minerBlockIntervalMilliseconds,
planet,
iceServerStrings,
peerStrings,
rpcServer,
rpcListenHost,
rpcListenPort,
rpcRemoteServer,
rpcHttpServer,
graphQLServer,
graphQLHost,
graphQLPort,
graphQLSecretTokenPath,
noCors,
nonblockRenderer,
nonblockRendererQueue,
strictRendering,
logActionRenders,
confirmations,
txLifeTime,
messageTimeout,
tipTimeout,
demandBuffer,
skipPreload,
minimumBroadcastTarget,
bucketSize,
chainTipStaleBehaviorType,
txQuotaPerSigner,
maximumPollPeers,
consensusPort,
consensusPrivateKeyString,
consensusSeedStrings,
consensusTargetBlockIntervalMilliseconds,
consensusProposeSecondBase * 1_000,
consensusEnterPreCommitDelay,
maxTransactionPerBlock,
remoteKeyValueService
);

// Clean-up previous temporary log files.
Expand Down Expand Up @@ -331,6 +373,7 @@ public async Task Run(
try
{
IHostBuilder hostBuilder = Host.CreateDefaultBuilder();
hostBuilder.ConfigureAppConfiguration(builder => builder.AddConfiguration(configuration));

var standaloneContext = new StandaloneContext
{
Expand Down Expand Up @@ -366,7 +409,8 @@ public async Task Run(
consensusPrivateKeyString: headlessConfig.ConsensusPrivateKeyString,
consensusSeedStrings: headlessConfig.ConsensusSeedStrings,
consensusTargetBlockIntervalMilliseconds: headlessConfig.ConsensusTargetBlockIntervalMilliseconds,
consensusProposeSecondBase: headlessConfig.ConsensusProposeSecondBase,
consensusProposeTimeoutBase: headlessConfig.ConsensusProposeTimeoutBase,
consensusEnterPreCommitDelay: headlessConfig.ConsensusEnterPreCommitDelay,
maximumPollPeers: headlessConfig.MaximumPollPeers,
actionEvaluatorConfiguration: actionEvaluatorConfiguration
);
Expand Down
6 changes: 6 additions & 0 deletions NineChronicles.Headless.Executable/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
"Endpoint": "*:/graphql/stagetransaction",
"Period": "60s",
"Limit": 12
},
{
"Endpoint": "*:/graphql/transactionresults",
"Period": "60s",
"Limit": 60
}
],
"QuotaExceededResponse": {
Expand All @@ -117,6 +122,7 @@
"StatusCode": 429
},
"IpBanThresholdCount": 5,
"TransactionResultsBanThresholdCount": 100,
"IpBanMinute" : 60,
"IpBanResponse": {
"Content": "{ \"message\": \"Your Ip has been banned.\" }",
Expand Down
141 changes: 0 additions & 141 deletions NineChronicles.Headless.Executor/Client/GithubClient.cs

This file was deleted.

Loading
Loading