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/1.21.0 to main #3096

Merged
merged 200 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
ad1e1a4
introduce Synthesize action
eugene-doobu Oct 8, 2024
afc310f
remove blank
eugene-doobu Oct 8, 2024
d5d2286
fix item null check
eugene-doobu Oct 8, 2024
f2e3ad5
add sheet info in exception log
eugene-doobu Oct 8, 2024
494d1a6
fix item sub type
eugene-doobu Oct 8, 2024
e70e7fc
Merge remote-tracking branch 'origin/development' into feature/synthe…
eugene-doobu Oct 15, 2024
abcf985
add grimoire to dict
eugene-doobu Oct 15, 2024
8c1fe5d
add Get Random Aura and Grimoire
eugene-doobu Oct 15, 2024
1dc6c68
fix synthesize action
eugene-doobu Oct 15, 2024
20c8ca8
add default synthesize test
eugene-doobu Oct 15, 2024
3105ff2
add xml comment
eugene-doobu Oct 15, 2024
31dcdc8
Merge branch 'development' into feature/synthesize-interface
eugene-doobu Oct 17, 2024
107910f
remove ItemSubTypeValue serialize field
eugene-doobu Oct 17, 2024
2acbcfe
Merge pull request #2881 from eugene-doobu/feature/synthesize-interface
eugene-doobu Oct 17, 2024
30e760e
hack_and_slash
yeeSilver Oct 27, 2024
3378340
get target exception types for exception serialization test with refl…
boscohyun Oct 29, 2024
d5bb590
fix tests
boscohyun Oct 29, 2024
a6c73f1
Merge branch 'development' into test/improve-exception-test
boscohyun Nov 3, 2024
ef609f7
ignore several types of exception
boscohyun Nov 4, 2024
6ba2f80
remove skip exception types
eugene-doobu Nov 4, 2024
1023381
Merge branch 'development' into test/improve-exception-test
eugene-doobu Nov 5, 2024
f8d7ba7
Merge remote-tracking branch 'origin/development' into feature/growth12
eugene-doobu Nov 6, 2024
c0c94df
add synthesize result pool
eugene-doobu Nov 6, 2024
a9feb6a
add synthesize result pool test
eugene-doobu Nov 6, 2024
7d6406e
add testcase
eugene-doobu Nov 6, 2024
fbbb61e
refactor code
eugene-doobu Nov 6, 2024
533ab5d
Merge branch 'development' into test/improve-exception-test
boscohyun Nov 7, 2024
1c1ed43
handle all of Libplanet exceptions
boscohyun Nov 7, 2024
cb33053
reduce duplicate call get random
eugene-doobu Nov 7, 2024
2e5f709
Merge pull request #2987 from eugene-doobu/feature/synthesize-result-…
eugene-doobu Nov 8, 2024
84ea200
Merge branch 'development' into feature/growth12
eugene-doobu Nov 13, 2024
de2aa1f
add SynthesizeSheet
eugene-doobu Nov 13, 2024
8e38537
add comment to synthesizeSheet
eugene-doobu Nov 14, 2024
cde21ef
apply sheet to synthesize action
eugene-doobu Nov 14, 2024
1f3a41d
add sheet object in tableSheets object
eugene-doobu Nov 14, 2024
251652e
apply sheet to synthesize action test
eugene-doobu Nov 14, 2024
fe7e0e7
add todo comment
eugene-doobu Nov 14, 2024
ad1f766
add synthesize simulator
eugene-doobu Nov 15, 2024
a4c301c
Merge branch 'development' into feat-hack_and_slash
Atralupus Nov 17, 2024
08e309a
Remove any type
Atralupus Nov 17, 2024
f2951f4
Merge pull request #2950 from yeeSilver/feat-hack_and_slash
Atralupus Nov 17, 2024
57bc20c
Merge branch 'release/1.20.0' into feature/synthesize-item
eugene-doobu Nov 18, 2024
8c9a9e0
Merge branch 'feature/synthesize-item' into feature/synthesize-simulator
eugene-doobu Nov 18, 2024
b5d9d30
Merge branch 'release/1.20.0' into feature/growth12
eugene-doobu Nov 18, 2024
c75b22a
Merge branch 'feature/growth12' into feature/synthesize-item
eugene-doobu Nov 18, 2024
ab205df
Merge branch 'feature/synthesize-item' into feature/synthesize-simulator
eugene-doobu Nov 18, 2024
75e0d17
add subtype to sheet
eugene-doobu Nov 18, 2024
194cd82
use gas tracer
eugene-doobu Nov 18, 2024
84fc294
Merge branch 'feature/synthesize-item' into feature/synthesize-simulator
eugene-doobu Nov 18, 2024
4862ee8
Merge branch 'feature/synthesize-simulator' into feature/synthesize-s…
eugene-doobu Nov 18, 2024
dda8d8d
add subtype to simulator
eugene-doobu Nov 18, 2024
81f656e
add isSuccess field
eugene-doobu Nov 18, 2024
02c55c4
fix code style for namespace
eugene-doobu Nov 20, 2024
0543ab3
Merge branch 'development' into test/improve-exception-test
eugene-doobu Nov 20, 2024
58b7a8c
handle more values of the exception's constructor
boscohyun Nov 20, 2024
f7c8303
add docs
boscohyun Nov 20, 2024
8dda982
Merge pull request #3027 from planetarium/test/improve-exception-test
boscohyun Nov 20, 2024
7fdee21
Merge branch 'development' into feature/fix-code-style-namespace
eugene-doobu Nov 20, 2024
4e68199
Merge pull request #3024 from eugene-doobu/feature/fix-code-style-nam…
eugene-doobu Nov 20, 2024
3bfe809
Merge remote-tracking branch 'origin/release/1.20.0' into feature/syn…
eugene-doobu Nov 25, 2024
2082a98
Merge remote-tracking branch 'origin/release/1.20.0' into feature/gro…
eugene-doobu Nov 25, 2024
57bcbad
Merge branch 'feature/growth12' into feature/synthesize-item
eugene-doobu Nov 25, 2024
7002a49
Add account addresses documentations
moreal Nov 25, 2024
76e3528
use decimal in sheet
eugene-doobu Nov 26, 2024
b5f3c6a
add action cost ap value
eugene-doobu Nov 26, 2024
5e98ba7
Merge pull request #3042 from planetarium/moreal/copilot-workspace/mo…
moreal Nov 26, 2024
cfaad72
add chargeAp Property
eugene-doobu Nov 26, 2024
1676626
Add `makeTx` function with `NetworkProvider` interface
moreal Nov 25, 2024
ddf570d
Merge pull request #3043 from planetarium/moreal/copilot-workspace/mo…
moreal Nov 26, 2024
4d11831
Change order of remove item
eugene-doobu Nov 27, 2024
bf33ba9
add action point logic
eugene-doobu Nov 27, 2024
6a6a08e
change weight type to int
eugene-doobu Nov 27, 2024
6b18bf3
add default weight const value
eugene-doobu Nov 27, 2024
a472a34
change sucessedrate type to int
eugene-doobu Nov 27, 2024
cd3e977
add action point test
eugene-doobu Nov 27, 2024
55639a2
change float to int
eugene-doobu Nov 27, 2024
2d926b8
Merge branch 'feature/synthesize-item' into feature/synthesize-simulator
eugene-doobu Nov 27, 2024
3274722
add comment
eugene-doobu Nov 27, 2024
7f2929e
Merge pull request #3001 from eugene-doobu/feature/synthesize-item
eugene-doobu Nov 27, 2024
9c142f7
add summary comment to sheet class
eugene-doobu Nov 27, 2024
491ec2a
fix: Add block actions to PluginActionEvaluator
s2quake Nov 27, 2024
0b7f5ae
Merge remote-tracking branch 'origin/feature/growth12' into feature/s…
eugene-doobu Nov 27, 2024
1e11897
add summary
eugene-doobu Nov 27, 2024
c0819c8
Merge branch 'development' into release/1.20.0
U-lis Nov 27, 2024
195cb90
Merge pull request #3048 from planetarium/fix/update-action-to-plugin
s2quake Nov 27, 2024
de717a8
ci(gh-actions): fix `concurrency.group` in `publish-docs` workflow
moreal Nov 27, 2024
8435d28
Merge pull request #3052 from planetarium/moreal/setup-concurrency-group
moreal Nov 27, 2024
fcb464c
Merge remote-tracking branch 'origin/release/1.20.1' into feature/gro…
eugene-doobu Nov 28, 2024
04a2522
Merge branch 'feature/growth12' into feature/synthesize-simulator
eugene-doobu Nov 28, 2024
4ac5bc3
Merge pull request #3050 from planetarium/release/1.20.0
U-lis Nov 29, 2024
9791bc2
ci(gh-actions): remove the step to check Libplanet submodule
moreal Nov 28, 2024
8728121
Merge pull request #3056 from moreal/ci/gh-actions/remove-libplanet-v…
moreal Nov 29, 2024
2101088
fix: Add block actions to PluginActionEvaluator
s2quake Nov 27, 2024
d9ebef9
Merge branch 'development' into release/1.20.2
eugene-doobu Dec 3, 2024
67ece48
Merge pull request #3063 from planetarium/release/1.20.2
eugene-doobu Dec 3, 2024
531bd83
Merge branch 'development' into feature/growth12
eugene-doobu Dec 3, 2024
7c19a07
remove parse float
eugene-doobu Dec 3, 2024
2f0960d
Merge pull request #3062 from planetarium/feature/growth12
eugene-doobu Dec 3, 2024
52baa92
Merge remote-tracking branch 'origin/development' into feature/synthe…
eugene-doobu Dec 3, 2024
b7135ba
fix input data fields
eugene-doobu Dec 4, 2024
6b74b83
fix parameter
eugene-doobu Dec 4, 2024
1fea71e
fix remainder check
eugene-doobu Dec 4, 2024
47d094a
Merge branch 'feature/synthesize-simulator' into feature/synthesize-s…
eugene-doobu Dec 4, 2024
c537139
fix test
eugene-doobu Dec 4, 2024
8fbdf2e
add summary
eugene-doobu Dec 4, 2024
0038e13
add summary to synthesize
eugene-doobu Dec 4, 2024
7d00a64
apply recipe
eugene-doobu Dec 4, 2024
9d3c479
add multi test
eugene-doobu Dec 4, 2024
048dfc3
add comments
eugene-doobu Dec 4, 2024
f674f0f
Merge pull request #3064 from eugene-doobu/feature/synthesize-simulator
eugene-doobu Dec 5, 2024
575db75
fix GetSynthesizeResultPool
eugene-doobu Dec 5, 2024
87618f4
add summary
eugene-doobu Dec 5, 2024
af2aada
return grade in GetSynthesizeResultPool
eugene-doobu Dec 5, 2024
086353b
feat(js): allow to use shared dependency
moreal Dec 6, 2024
6874cf6
Merge pull request #3071 from moreal/feat/js/peer-dependencies
moreal Dec 6, 2024
1b78189
Revert "Merge pull request #3071 from moreal/feat/js/peer-dependencies"
moreal Dec 6, 2024
e0b90e4
feat(js): prepare 0.4.0
moreal Dec 6, 2024
e8fec78
Merge pull request #3073 from moreal/revert-3071
moreal Dec 6, 2024
b7994a5
feat: bump libplanet-related dependencies
moreal Dec 6, 2024
f95cdad
remove grade dict
eugene-doobu Dec 6, 2024
1da6f39
Merge pull request #3074 from moreal/feat/js/bump-deps
moreal Dec 6, 2024
78f50de
Merge branch 'development' into feature/fix-synthesize-pool
eugene-doobu Dec 6, 2024
f617b80
chore(js): bump `@types/node` package
moreal Dec 6, 2024
75a74d1
docs(js): correct Lib9c.Tools relative path
moreal Dec 6, 2024
071445b
fix(js): handle big quantity FAV too
moreal Dec 6, 2024
790d735
feat(js): introduce `mint_assets` action
moreal Dec 6, 2024
55ded21
test(js): create action instance lazily
moreal Dec 6, 2024
b0e1829
Merge pull request #3075 from moreal/feat/js/mint-assets
moreal Dec 6, 2024
4730b50
feat(js): rename `NetworkProvider` → `TxMetadataProvider`
moreal Dec 9, 2024
40a0bb7
refactor(js): move `tx.ts` → `tx/common.ts`
moreal Dec 9, 2024
b6370d2
feat(js): change return type of `TxMetadataProvider.getGenesisHash`
moreal Dec 9, 2024
8385730
fix(js): correct `package.json` `exports` field
moreal Dec 9, 2024
7d4385a
feat(js): introduce `@planetarium/9c-headless-provider`
moreal Dec 9, 2024
01af74e
ci: make jsr publish 9c-headless-provider too
moreal Dec 9, 2024
27c0031
docs(js): update README
moreal Dec 9, 2024
a1376eb
ci(gh-actions): fix working-directory
moreal Dec 9, 2024
e8a21cf
chore: create test directory
moreal Dec 9, 2024
cc93951
chore: update scripts in `package.json`
moreal Dec 9, 2024
b405a8d
ci(gh-actions): run codegen if it needs
moreal Dec 9, 2024
c53a061
Merge pull request #3077 from moreal/feat/js/tx-metadata-provider
moreal Dec 9, 2024
945f1bf
ci(gh-actions): correct jsr publish workflow
moreal Dec 9, 2024
09ec218
Merge pull request #3078 from moreal/ci/gh-actions/correct-jsr-publis…
moreal Dec 9, 2024
fe3234f
chore: prepare lib9c.js 0.5.0
moreal Dec 9, 2024
e0fb1c7
Merge pull request #3079 from moreal/feat/js/prepare-lib9c-0.5.0
moreal Dec 10, 2024
c7434f8
Merge branch 'development' into feature/fix-synthesize-pool
eugene-doobu Dec 10, 2024
6b378bd
feat: validate about RuneSlotInfo argument at BattleArena
sonohoshi Dec 10, 2024
4b5d212
Merge pull request #3069 from eugene-doobu/feature/fix-synthesize-pool
eugene-doobu Dec 10, 2024
9d9ce82
chore: add unit test about RuneNotFoundException
sonohoshi Dec 10, 2024
c10a410
chore: add comment about runeSlotInfo validating
sonohoshi Dec 10, 2024
eb294fb
Merge branch 'development' into validate/rune-slot
ipdae Dec 11, 2024
487fca8
Merge pull request #3081 from planetarium/validate/rune-slot
ipdae Dec 11, 2024
64e69ed
fix(js): use published `@planetarium/lib9c`
moreal Dec 11, 2024
883b065
Merge pull request #3082 from moreal/bugfix/js/use-published-lib9sjs
moreal Dec 11, 2024
49a1629
fix(js): avoid confusion between jsr pkg and monorepo pkg
moreal Dec 11, 2024
8e39ec6
Merge pull request #3083 from moreal/bugfix/js/avoid-confused-lib9cjs
moreal Dec 11, 2024
7628d5a
remove grade key in synthesize
eugene-doobu Dec 12, 2024
74342ce
Merge branch 'development' into feature/remove-grade-key
eugene-doobu Dec 12, 2024
d9e9a5e
fix: Only a validator can change the commission
s2quake Dec 5, 2024
3ac6d2b
test: Fix test failure for commission change action
s2quake Dec 5, 2024
d36fb9b
fix: A validator can stake whether it is claimable or not.
s2quake Dec 5, 2024
96fa908
test: Test code for validator staking
s2quake Dec 5, 2024
93f810e
fix: The validator cannot claim the stake reward
s2quake Dec 6, 2024
af418fe
test: Test code for a validator claims the stake reward
s2quake Dec 6, 2024
0d5299d
fix: Cannot set commission with the same value
s2quake Dec 9, 2024
66b1d57
test: Test code for SetValidatorCommission action
s2quake Dec 9, 2024
7ea81ce
feat: Introduce RewardBase
OnedgeLee Dec 4, 2024
0964d90
feat: Implement Getter and Setter for RewardBase
OnedgeLee Dec 5, 2024
e1f0e4d
feat: Make use of RewardBase
OnedgeLee Dec 9, 2024
8b19125
fix: Fix to return null when RewardBase not exists
OnedgeLee Dec 9, 2024
00cc540
fix: Fix malfunctions for RewardBase
OnedgeLee Dec 10, 2024
a176e91
fix: Malfunctions for reward
OnedgeLee Dec 10, 2024
3131722
test: Fix tests for rewards
OnedgeLee Dec 10, 2024
ea242b5
fix: Reward migration
OnedgeLee Dec 10, 2024
b408d1d
test: Add reward migration test
OnedgeLee Dec 10, 2024
c2d6966
chore: Redefine RewardBase.Margin as a constant
OnedgeLee Dec 10, 2024
8d5f9f5
chore: Fix Equals for RewardBase
OnedgeLee Dec 10, 2024
0d10efa
fix: Fix Migration to skip set RewardBase when not needed
OnedgeLee Dec 11, 2024
77605bf
doc: Add docstrings for RewardBase
OnedgeLee Dec 11, 2024
107f1ad
fix: Fix bug for zero-transfer
OnedgeLee Dec 12, 2024
4f8a3b7
chore: Apply reviews for better structure.
OnedgeLee Dec 12, 2024
8b5e42c
chore: Fix RewardBase to use BigInteger instead of FAV
OnedgeLee Dec 12, 2024
e58e468
chore: Change MaxAbstainAllowance to 9
OnedgeLee Dec 12, 2024
e64a0bf
fix: ReleaseUnbondings to set unbondings properly
OnedgeLee Dec 12, 2024
d60a473
chore: Rename parameter name as camelCase
OnedgeLee Dec 12, 2024
86b8103
test: Fix reward calculation test method
OnedgeLee Dec 12, 2024
e0f4cb0
fix: Fix release unbondings to update unbonding list
OnedgeLee Dec 13, 2024
af4013a
Merge pull request #3085 from eugene-doobu/feature/remove-grade-key
eugene-doobu Dec 13, 2024
815fa51
refactor: Refactor RewardBase not to store TotalShares
OnedgeLee Dec 13, 2024
04db96d
doc: Add documents for new features
OnedgeLee Dec 13, 2024
373d803
bump libplanet to 5.4.2
limebell Dec 13, 2024
2c67f64
chore: Fix typo
OnedgeLee Dec 13, 2024
702c387
Merge pull request #3086 from planetarium/fix/distribution
OnedgeLee Dec 15, 2024
0e0124b
Merge pull request #3087 from limebell/bump/libplanet-5.4.2
OnedgeLee Dec 15, 2024
b8afec2
add InvalidMaterialItemId
eugene-doobu Dec 16, 2024
e0abdf0
add invalid items
eugene-doobu Dec 16, 2024
7a05af6
add summary
eugene-doobu Dec 17, 2024
498c511
add class summary
eugene-doobu Dec 17, 2024
36bdf88
remove redundant casting
eugene-doobu Dec 17, 2024
84f701a
Merge pull request #3090 from eugene-doobu/feature/add-invalid-item-ids
eugene-doobu Dec 17, 2024
40e9864
Merge branch 'main' into release/1.21.0
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
22 changes: 18 additions & 4 deletions .Lib9c.Plugin/PluginActionEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Libplanet.Store;
using Nekoyume.Action;
using Nekoyume.Action.Loader;
using Nekoyume.Action.ValidatorDelegation;

namespace Lib9c.Plugin
{
Expand All @@ -19,10 +20,23 @@ public PluginActionEvaluator(IPluginKeyValueStore keyValueStore)
var stateStore = new TrieStateStore(new WrappedKeyValueStore(keyValueStore));
_actionEvaluator = new ActionEvaluator(
new PolicyActionsRegistry(
beginBlockActions: ImmutableArray<IAction>.Empty,
endBlockActions: new IAction[] { new RewardGold() }.ToImmutableArray(),
beginTxActions: ImmutableArray<IAction>.Empty,
endTxActions: ImmutableArray<IAction>.Empty),
beginBlockActions: new IAction[] {
new SlashValidator(),
new AllocateGuildReward(),
new AllocateReward(),
}.ToImmutableArray(),
endBlockActions: new IAction[] {
new UpdateValidators(),
new RecordProposer(),
new RewardGold(),
new ReleaseValidatorUnbondings(),
}.ToImmutableArray(),
beginTxActions: new IAction[] {
new Mortgage(),
}.ToImmutableArray(),
endTxActions: new IAction[] {
new Reward(), new Refund(),
}.ToImmutableArray()),
stateStore,
new NCActionLoader());
}
Expand Down
64 changes: 64 additions & 0 deletions .Lib9c.Tests/Action/BattleArenaTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,70 @@ public void Execute_ValidateDuplicateTicketPurchaseException()
}));
}

[Fact]
public void ExecuteRuneNotFoundException()
{
var previousStates = _initialStates;
var context = new ActionContext();
Assert.True(
previousStates.GetSheet<ArenaSheet>().TryGetValue(
1,
out var row));

if (!row.TryGetRound(1, out var roundData))
{
throw new RoundNotFoundException(
$"[{nameof(BattleArena)}] ChampionshipId({row.ChampionshipId}) - round({1})");
}

if (roundData.ArenaType != ArenaType.OffSeason)
{
throw new InvalidSeasonException(
$"[{nameof(BattleArena)}] This test is only for OffSeason. ArenaType : {roundData.ArenaType}");
}

var random = new TestRandom();
previousStates = JoinArena(
context,
previousStates,
_agent1Address,
_avatar1Address,
roundData.StartBlockIndex,
1,
1,
random);
previousStates = JoinArena(
context,
previousStates,
_agent2Address,
_avatar2Address,
roundData.StartBlockIndex,
1,
1,
random);

var action = new BattleArena
{
myAvatarAddress = _avatar1Address,
enemyAvatarAddress = _avatar2Address,
championshipId = 1,
round = 1,
ticket = 1,
costumes = new List<Guid>(),
equipments = new List<Guid>(),
runeInfos = new List<RuneSlotInfo> { new (0, 10035), },
};
Assert.Throws<RuneNotFoundException>(
() => action.Execute(
new ActionContext
{
BlockIndex = roundData.StartBlockIndex + 1,
PreviousState = previousStates,
Signer = _agent1Address,
RandomSeed = 0,
}));
}

[Theory]
[InlineData(8, null)]
[InlineData(100, null)]
Expand Down
29 changes: 29 additions & 0 deletions .Lib9c.Tests/Action/ClaimStakeRewardTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,35 @@ public void Execute_V6()
}
}

[Fact]
public void Execute_Throw_When_Validator_Tries_To_Claim()
{
// When
var world = _initialState;
var validatorKey = new PrivateKey().PublicKey;
var validatorAddress = validatorKey.Address;
var height = 0L;
world = DelegationUtil.EnsureValidatorPromotionReady(world, validatorKey, height);
var stakeAddr = StakeState.DeriveAddress(AgentAddr);
var stakeStateV2 = PrepareStakeStateV2(
_stakePolicySheet,
0,
LegacyStakeState.RewardInterval);
var action = new ClaimStakeReward(validatorAddress);
var actionContext = new ActionContext
{
PreviousState = world,
Signer = validatorAddress,
BlockIndex = height,
};

// When
var e = Assert.Throws<InvalidOperationException>(() => action.Execute(actionContext));

// Then
Assert.Equal("The validator cannot claim the stake reward.", e.Message);
}

private static StakeState PrepareStakeStateV2(
StakePolicySheet stakePolicySheet,
long startedBlockIndex,
Expand Down
Loading
Loading