Skip to content

Commit

Permalink
Merge branch 'development' into release/210
Browse files Browse the repository at this point in the history
  • Loading branch information
U-lis authored Oct 28, 2024
2 parents 294d5d1 + cbb23b9 commit c38d17d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 45 deletions.
50 changes: 15 additions & 35 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,17 @@ jobs:
docker run --rm --privileged multiarch/qemu-user-static \
--reset \
-p yes
- name: build-and-push-amd64
run: |
docker build . \
-f ${{ matrix.docker.dockerfile }}.amd64 \
-t ${{ matrix.docker.repo }}:git-${{ github.sha }}-amd64 \
--build-arg COMMIT=git-${{ github.sha }} \
--build-arg TARGETPLATFORM=linux/amd64
docker push ${{ matrix.docker.repo }}:git-${{ github.sha }}-amd64
- name: build-and-push-arm64v8
run: |
docker build . \
-f ${{ matrix.docker.dockerfile }}.arm64v8 \
-t ${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8 \
--build-arg COMMIT=git-${{ github.sha }} \
--build-arg TARGETPLATFORM=linux/arm64
docker push ${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8
- name: merge-manifest-and-push
run: |
docker manifest create ${{ matrix.docker.repo }}:git-${{ github.sha }} \
--amend ${{ matrix.docker.repo }}:git-${{ github.sha }}-amd64 \
--amend ${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8
docker manifest push ${{ matrix.docker.repo }}:git-${{ github.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/arm/v8,linux/amd64
- name: Build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/arm64,linux/amd64
tags: ${{ matrix.docker.repo }}:git-${{ github.sha }}
file: ${{ matrix.docker.dockerfile }}

tag:
name: tag (${{ matrix.docker.repo }})
Expand All @@ -87,23 +76,14 @@ jobs:
--password '${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}'
- name: push git tagged version
run: |
docker pull ${{ matrix.docker.repo }}:git-${{ github.sha }}-amd64
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 }}-amd64 \
${{ matrix.docker.repo }}:$IMAGE_TAG-amd64
docker push ${{ matrix.docker.repo }}:$IMAGE_TAG-amd64
docker pull ${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8
docker tag \
${{ matrix.docker.repo }}:git-${{ github.sha }}-arm64v8 \
${{ matrix.docker.repo }}:$IMAGE_TAG-arm64v8
docker push ${{ matrix.docker.repo }}:$IMAGE_TAG-arm64v8
docker manifest create ${{ matrix.docker.repo }}:$IMAGE_TAG \
--amend ${{ matrix.docker.repo }}:$IMAGE_TAG-amd64 \
--amend ${{ matrix.docker.repo }}:$IMAGE_TAG-arm64v8
docker manifest push ${{ matrix.docker.repo }}:$IMAGE_TAG
${{ matrix.docker.repo }}:git-${{ github.sha }} \
${{ matrix.docker.repo }}:$IMAGE_TAG
docker push ${{ matrix.docker.repo }}:$IMAGE_TAG
4 changes: 0 additions & 4 deletions NineChronicles.Headless.Executable/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public class Configuration

public AccessControlServiceOptions? AccessControlService { get; set; }

public int ArenaParticipantsSyncInterval { get; set; } = 1000;

public void Overwrite(
string? appProtocolVersionString,
string[]? trustedAppProtocolVersionSignerStrings,
Expand Down Expand Up @@ -143,7 +141,6 @@ public void Overwrite(
double? consensusTargetBlockIntervalMilliseconds,
int? consensusProposeSecondBase,
int? maxTransactionPerBlock,
int? arenaParticipantsSyncInterval,
bool? remoteKeyValueService
)
{
Expand Down Expand Up @@ -195,7 +192,6 @@ public void Overwrite(
ConsensusTargetBlockIntervalMilliseconds = consensusTargetBlockIntervalMilliseconds ?? ConsensusTargetBlockIntervalMilliseconds;
ConsensusProposeSecondBase = consensusProposeSecondBase ?? ConsensusProposeSecondBase;
MaxTransactionPerBlock = maxTransactionPerBlock ?? MaxTransactionPerBlock;
ArenaParticipantsSyncInterval = arenaParticipantsSyncInterval ?? ArenaParticipantsSyncInterval;
RemoteKeyValueService = remoteKeyValueService ?? RemoteKeyValueService;
}
}
Expand Down
6 changes: 1 addition & 5 deletions NineChronicles.Headless.Executable/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ public async Task Run(
[Option("config", new[] { 'C' },
Description = "Absolute path of \"appsettings.json\" file to provide headless configurations.")]
string? configPath = "appsettings.json",
[Option(Description = "arena participants list sync interval time")]
int? arenaParticipantsSyncInterval = null,
[Option(Description = "arena participants list sync enable")]
bool arenaParticipantsSync = true,
[Option(Description = "[DANGER] Turn on RemoteKeyValueService to debug.")]
bool remoteKeyValueService = false,
[Ignore] CancellationToken? cancellationToken = null
Expand Down Expand Up @@ -303,7 +299,7 @@ public async Task Run(
txLifeTime, messageTimeout, tipTimeout, demandBuffer, skipPreload,
minimumBroadcastTarget, bucketSize, chainTipStaleBehaviorType, txQuotaPerSigner, maximumPollPeers,
consensusPort, consensusPrivateKeyString, consensusSeedStrings, consensusTargetBlockIntervalMilliseconds, consensusProposeSecondBase,
maxTransactionPerBlock, arenaParticipantsSyncInterval, remoteKeyValueService
maxTransactionPerBlock, remoteKeyValueService
);

// Clean-up previous temporary log files.
Expand Down
9 changes: 9 additions & 0 deletions NineChronicles.Headless/GraphTypes/ActionMutation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ public class ActionMutation : ObjectGraphType
{
public ActionMutation(NineChroniclesNodeService service)
{
DeprecationReason = "This API is insecure and must not be used.";

Field<NonNullGraphType<TxIdType>>("createAvatar",
description: "Create new avatar.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<StringGraphType>>
{
Expand Down Expand Up @@ -96,6 +99,7 @@ public ActionMutation(NineChroniclesNodeService service)

Field<NonNullGraphType<TxIdType>>("hackAndSlash",
description: "Start stage to get material.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<AddressType>>
{
Expand Down Expand Up @@ -179,6 +183,7 @@ public ActionMutation(NineChroniclesNodeService service)

Field<NonNullGraphType<TxIdType>>("combinationEquipment",
description: "Combine new equipment.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<AddressType>>
{
Expand Down Expand Up @@ -239,6 +244,7 @@ public ActionMutation(NineChroniclesNodeService service)

Field<NonNullGraphType<TxIdType>>("itemEnhancement",
description: "Upgrade equipment.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<AddressType>>
{
Expand Down Expand Up @@ -303,6 +309,7 @@ public ActionMutation(NineChroniclesNodeService service)

Field<NonNullGraphType<TxIdType>>("dailyReward",
description: "Get daily reward.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<AddressType>>
{
Expand Down Expand Up @@ -345,6 +352,7 @@ public ActionMutation(NineChroniclesNodeService service)
});
Field<NonNullGraphType<TxIdType>>("chargeActionPoint",
description: "Charge Action Points using Material.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<AddressType>>
{
Expand Down Expand Up @@ -388,6 +396,7 @@ public ActionMutation(NineChroniclesNodeService service)

Field<NonNullGraphType<TxIdType>>("combinationConsumable",
description: "Combine new Consumable.",
deprecationReason: DeprecationReason,
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<AddressType>>
{
Expand Down
8 changes: 7 additions & 1 deletion NineChronicles.Headless/GraphTypes/CurrencyEnumType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ public enum CurrencyEnum
CRYSTAL,
NCG,
GARAGE,
MEAD
MEAD,
RUNE_GOLDENLEAF,
RUNE_ADVENTURER,
RUNESTONE_FREYA_LIBERATION,
RUNESTONE_FREYA_BLESSING,
RUNESTONE_ODIN_WEAKNESS,
RUNESTONE_ODIN_WISDOM
}

public class CurrencyEnumType : EnumerationGraphType<CurrencyEnum>
Expand Down

0 comments on commit c38d17d

Please sign in to comment.