From ef3052fd8818f032ba5452b66b084841b2e82b72 Mon Sep 17 00:00:00 2001 From: Yang Chun Ung Date: Fri, 14 Jun 2024 10:11:42 +0900 Subject: [PATCH 1/9] Reduce unnecessary call GetState --- NineChronicles.Headless/ArenaParticipantsWorker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NineChronicles.Headless/ArenaParticipantsWorker.cs b/NineChronicles.Headless/ArenaParticipantsWorker.cs index 93e3e6e98..c31d7f792 100644 --- a/NineChronicles.Headless/ArenaParticipantsWorker.cs +++ b/NineChronicles.Headless/ArenaParticipantsWorker.cs @@ -218,7 +218,7 @@ public static List GetArenaParticipants(IWorldState worldState { var (avatarAddr, score, rank) = tuple; var runeStates = worldState.GetRuneState(avatarAddr, out _); - var avatar = worldState.GetAvatarState(avatarAddr); + var avatar = worldState.GetAvatarState(avatarAddr, getWorldInformation: false, getQuestList: false); var itemSlotState = worldState.GetLegacyState(ItemSlotState.DeriveAddress(avatarAddr, BattleType.Arena)) is List itemSlotList From 43e3e1d9b3f7cfcc115a6719c0bd9c05a23941ae Mon Sep 17 00:00:00 2001 From: hyeon Date: Fri, 28 Jun 2024 16:58:38 +0900 Subject: [PATCH 2/9] Bump lib9c: Merge feature/adventure-boss --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index e79375205..e2ba59df8 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit e7937520578e08c2dc80de9e0ad633095adbc8bf +Subproject commit e2ba59df87acab29365132564533a7cec4ea358f From bb201c59e83fc9b9ecc5e60ec55bf9a78b54faa7 Mon Sep 17 00:00:00 2001 From: hyeon Date: Tue, 2 Jul 2024 14:03:32 +0900 Subject: [PATCH 3/9] Bump lib9c --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index e2ba59df8..f5f370fc5 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit e2ba59df87acab29365132564533a7cec4ea358f +Subproject commit f5f370fc58a8ae9dfef63b1515c96ccffec3ae59 From 5c10437e6f741282cd082a81b041c3ac9491eb77 Mon Sep 17 00:00:00 2001 From: hyeon Date: Wed, 3 Jul 2024 10:53:56 +0900 Subject: [PATCH 4/9] Bump lib9c: Add missing sheet to simulator --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index f5f370fc5..adc7c3017 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit f5f370fc58a8ae9dfef63b1515c96ccffec3ae59 +Subproject commit adc7c3017e24b23fb3ec73895ca421a27303410e From f3ebecec6d754248227f283068d94c2651bf9c6e Mon Sep 17 00:00:00 2001 From: ilgyu Date: Tue, 2 Jul 2024 18:50:57 +0900 Subject: [PATCH 5/9] bump: Lib9c --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index adc7c3017..6e1fcdf48 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit adc7c3017e24b23fb3ec73895ca421a27303410e +Subproject commit 6e1fcdf488f7bcd11a8b84dd60e60208eafb5348 From 3980eb9679b3602c36c5f5dcea5427a5d16fe3b7 Mon Sep 17 00:00:00 2001 From: ilgyu Date: Tue, 2 Jul 2024 18:51:26 +0900 Subject: [PATCH 6/9] test: Fix StageTransaction test --- .../GraphTypes/StandaloneMutationTest.cs | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/NineChronicles.Headless.Tests/GraphTypes/StandaloneMutationTest.cs b/NineChronicles.Headless.Tests/GraphTypes/StandaloneMutationTest.cs index 1cd0808af..556a0deaa 100644 --- a/NineChronicles.Headless.Tests/GraphTypes/StandaloneMutationTest.cs +++ b/NineChronicles.Headless.Tests/GraphTypes/StandaloneMutationTest.cs @@ -903,14 +903,31 @@ public async Task StageTransaction() StandaloneContextFx.BlockChain = service.Swarm?.BlockChain; var pk = new PrivateKey(); - ActionBase action = new ApprovePledge + ActionBase patronPrepareAction = new PrepareRewardAssets { - PatronAddress = new PrivateKey().Address + RewardPoolAddress = MeadConfig.PatronAddress, + Assets = new List + { + 1 * Currencies.Mead, + }, }; - var tx = Transaction.Create(0, pk, BlockChain.Genesis.Hash, new[] { action.PlainValue }); + var tx = Transaction.Create(0, pk, BlockChain.Genesis.Hash, new[] { patronPrepareAction.PlainValue }); var payload = ByteUtil.Hex(tx.Serialize()); var stageTxMutation = $"mutation {{ stageTransaction(payload: \"{payload}\") }}"; var stageTxResult = await ExecuteQueryAsync(stageTxMutation); + Assert.Null(stageTxResult.Errors); + + var block = service.BlockChain.ProposeBlock(ProposerPrivateKey, null); + service.BlockChain.Append(block, GenerateBlockCommit(1, block.Hash, new List() { ProposerPrivateKey })); + + ActionBase action = new ApprovePledge + { + PatronAddress = new PrivateKey().Address + }; + tx = Transaction.Create(0, pk, BlockChain.Genesis.Hash, new[] { action.PlainValue }); + payload = ByteUtil.Hex(tx.Serialize()); + stageTxMutation = $"mutation {{ stageTransaction(payload: \"{payload}\") }}"; + stageTxResult = await ExecuteQueryAsync(stageTxMutation); var error = Assert.Single(stageTxResult.Errors!); Assert.Contains("gas", error.Message); } From a7c8fc1d55af7e68321004c2ea2fc112062f17af Mon Sep 17 00:00:00 2001 From: hyeon Date: Fri, 5 Jul 2024 11:00:18 +0900 Subject: [PATCH 7/9] Bump lib9c --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index 6e1fcdf48..1c30ef655 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit 6e1fcdf488f7bcd11a8b84dd60e60208eafb5348 +Subproject commit 1c30ef655a03127749ea74678cb8f76b8d485a39 From 865098e27fac9ad22e637da947649dea7ea16c1b Mon Sep 17 00:00:00 2001 From: hyeon Date: Fri, 5 Jul 2024 19:02:54 +0900 Subject: [PATCH 8/9] Bump lib9c --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index 1c30ef655..c3ac6aca9 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit 1c30ef655a03127749ea74678cb8f76b8d485a39 +Subproject commit c3ac6aca940d5c2b626e4ee88414569c7fa83fa2 From 3e041beab3735e3085bb34594f8a116c0d82b8bf Mon Sep 17 00:00:00 2001 From: hyeon Date: Mon, 8 Jul 2024 19:17:17 +0900 Subject: [PATCH 9/9] Bump lib9c to 1.14.0 --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index c3ac6aca9..a5dd5bdf9 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit c3ac6aca940d5c2b626e4ee88414569c7fa83fa2 +Subproject commit a5dd5bdf928d819b063a0c193fb9608e9f84f6e9