From 7a37dede536c9f3bbd466e9cfd6d5b37a59f5599 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 5 Oct 2023 23:19:01 +0900 Subject: [PATCH 1/7] Rename WorkScoreStructure to WorkScoreParameters --- go.mod | 2 +- go.sum | 4 ++-- pkg/blockfactory/blockissuer.go | 2 +- .../commitmentfilter/accountsfilter/commitmentfilter.go | 2 +- pkg/protocol/engine/ledger/tests/output.go | 2 +- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 4 ++-- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 5 ++--- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 ++-- 11 files changed, 15 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index e15fa25e3..587cebf63 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 + github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index a899ff5e2..34b42cd9a 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e h1:Mwoe7 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e/go.mod h1:jhzexR5X8m6qcmrwt5OX477O/ZwT7Ak9sPT83ByPkAo= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 h1:qUf1W0fE1IyZzVy3Exv0Kj+SKECXG3S26c9m2ETb07U= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951/go.mod h1:c5778OnWpLq108YE+Eb2m8Ri/t/4ydV0TvI/Sy5YivQ= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 h1:6fuDHswgN9zTwsMuKRKNClnT+rJCojvWf3Hk8f03cvc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e h1:8BIs08UphPaNfJmF0CpvAQcGawkaYSs1MmNqbPUgzqw= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/pkg/blockfactory/blockissuer.go b/pkg/blockfactory/blockissuer.go index eb1692261..72e7f4daf 100644 --- a/pkg/blockfactory/blockissuer.go +++ b/pkg/blockfactory/blockissuer.go @@ -341,7 +341,7 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco } // only set the burned Mana as the last step before signing, so workscore calculation is correct. - basicBlock.MaxBurnedMana, err = basicBlock.ManaCost(rmc, apiForVesion.ProtocolParameters().WorkScoreStructure()) + basicBlock.MaxBurnedMana, err = basicBlock.ManaCost(rmc, apiForVesion.ProtocolParameters().WorkScoreParameters()) if err != nil { return iotago.EmptyBlockID(), ierrors.Wrapf(err, "could not calculate Mana cost for block") } diff --git a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go index 952f3d2e3..d79af95b8 100644 --- a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go +++ b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go @@ -114,7 +114,7 @@ func (c *CommitmentFilter) evaluateBlock(block *blocks.Block) { return } if basicBlock, isBasic := block.BasicBlock(); isBasic { - manaCost, err := basicBlock.ManaCost(rmc, blockAPI.ProtocolParameters().WorkScoreStructure()) + manaCost, err := basicBlock.ManaCost(rmc, blockAPI.ProtocolParameters().WorkScoreParameters()) if err != nil { c.events.BlockFiltered.Trigger(&commitmentfilter.BlockFilteredEvent{ Block: block, diff --git a/pkg/protocol/engine/ledger/tests/output.go b/pkg/protocol/engine/ledger/tests/output.go index b7e45725a..9177c9cab 100644 --- a/pkg/protocol/engine/ledger/tests/output.go +++ b/pkg/protocol/engine/ledger/tests/output.go @@ -12,7 +12,7 @@ func (m *MockedOutput) Size() int { panic("implement me") } -func (m *MockedOutput) WorkScore(_ *iotago.WorkScoreStructure) (iotago.WorkScore, error) { +func (m *MockedOutput) WorkScore(_ *iotago.WorkScoreParameters) (iotago.WorkScore, error) { panic("implement me") } diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index b4678fb13..a88b0e0c2 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 + github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 97376751f..0ecf64d4e 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -195,8 +195,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bf github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d h1:ekHWRypoaiCXgrJVUQS7rCewsK3FuG1gTbPxu5jYn9c= github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 h1:6fuDHswgN9zTwsMuKRKNClnT+rJCojvWf3Hk8f03cvc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e h1:8BIs08UphPaNfJmF0CpvAQcGawkaYSs1MmNqbPUgzqw= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 60253b09e..ed06df812 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -72,7 +72,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 5e0a9c086..890647cda 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -311,9 +311,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e h1:Mwoe7 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e/go.mod h1:jhzexR5X8m6qcmrwt5OX477O/ZwT7Ak9sPT83ByPkAo= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 h1:qUf1W0fE1IyZzVy3Exv0Kj+SKECXG3S26c9m2ETb07U= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951/go.mod h1:c5778OnWpLq108YE+Eb2m8Ri/t/4ydV0TvI/Sy5YivQ= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003162632-bf50df95b5f0 h1:6G9oUOnhhK5oktcsl0BImbrPlgp6tdGskKsAmaMNw8Q= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003162632-bf50df95b5f0/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e h1:8BIs08UphPaNfJmF0CpvAQcGawkaYSs1MmNqbPUgzqw= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index ba29c06b3..1758127ca 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -10,7 +10,7 @@ require ( github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 + github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.13.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index c69dca49d..648352a93 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -50,8 +50,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bf github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d h1:ekHWRypoaiCXgrJVUQS7rCewsK3FuG1gTbPxu5jYn9c= github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 h1:6fuDHswgN9zTwsMuKRKNClnT+rJCojvWf3Hk8f03cvc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e h1:8BIs08UphPaNfJmF0CpvAQcGawkaYSs1MmNqbPUgzqw= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005141305-f6508ee6773e/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= From bfd27866dbe8ad66da2a703635acbf13c7e3b859 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Tue, 17 Oct 2023 21:52:50 +0800 Subject: [PATCH 2/7] Get ValidationBlockPerSlot from ProtocolParameters --- .../sybilprotectionv1/performance/performance.go | 6 +++--- .../sybilprotectionv1/performance/rewards.go | 2 +- .../sybilprotectionv1/performance/testsuite_test.go | 10 +++++----- .../sybilprotectionv1/performance/tracker_test.go | 2 +- pkg/testsuite/testsuite.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go index 27c9f9c9e..7dafd3b62 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go @@ -224,7 +224,7 @@ func (t *Tracker) aggregatePerformanceFactors(slotActivityVector []*model.Valida // we reward not only total number of blocks issued, but also regularity based on block timestamp slotPerformanceFactor := bits.OnesCount32(pf.SlotActivityVector) - if pf.BlockIssuedCount > t.apiProvider.APIForEpoch(epoch).ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot { + if pf.BlockIssuedCount > t.apiProvider.APIForEpoch(epoch).ProtocolParameters().ValidationBlocksPerSlot() { // we harshly punish validators that issue any blocks more than allowed return 0 @@ -269,7 +269,7 @@ func (t *Tracker) trackCommitteeMemberPerformance(validationBlock *iotago.Valida apiForSlot := t.apiProvider.APIForSlot(block.ID().Slot()) // we restrict the number up to ValidatorBlocksPerSlot + 1 to know later if the validator issued more blocks than allowed and be able to punish for it // also it can fint into uint8 - if validatorPerformance.BlockIssuedCount < apiForSlot.ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot+1 { + if validatorPerformance.BlockIssuedCount < apiForSlot.ProtocolParameters().ValidationBlocksPerSlot()+1 { validatorPerformance.BlockIssuedCount++ } validatorPerformance.HighestSupportedVersionAndHash = model.VersionAndHash{ @@ -284,7 +284,7 @@ func (t *Tracker) trackCommitteeMemberPerformance(validationBlock *iotago.Valida // subslotIndex returns the index for timestamp corresponding to subslot created dividing slot on validatorBlocksPerSlot equal parts. func (t *Tracker) subslotIndex(slot iotago.SlotIndex, issuingTime time.Time) int { epochAPI := t.apiProvider.APIForEpoch(t.latestAppliedEpoch) - valBlocksNum := epochAPI.ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot + valBlocksNum := epochAPI.ProtocolParameters().ValidationBlocksPerSlot() subslotDur := time.Duration(epochAPI.TimeProvider().SlotDurationSeconds()) * time.Second / time.Duration(valBlocksNum) slotStart := epochAPI.TimeProvider().SlotStartTime(slot) diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go index 287fa5ec1..5dfa56236 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go @@ -239,7 +239,7 @@ func (t *Tracker) poolReward(slot iotago.SlotIndex, totalValidatorsStake, totalS return 0, ierrors.Wrapf(err, "failed to calculate pool reward without fixed costs due to overflow for slot %d", slot) } - result, err = safemath.SafeDiv(scaledPoolReward, uint64(params.RewardsParameters().ValidatorBlocksPerSlot)) + result, err = safemath.SafeDiv(scaledPoolReward, uint64(params.ValidationBlocksPerSlot())) if err != nil { return 0, ierrors.Wrapf(err, "failed to calculate result reward due division by zero for slot %d", slot) } diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go index 16d5dfa63..9ce7a9f9a 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go @@ -42,7 +42,7 @@ func NewTestSuite(t *testing.T) *TestSuite { api: iotago.V3API( iotago.NewV3ProtocolParameters( iotago.WithTimeProviderOptions(time.Now().Unix(), 10, 3), - iotago.WithRewardsOptions(10, 8, 8, 11, 1154, 2, 1), + iotago.WithRewardsOptions(8, 8, 11, 1154, 2, 1), ), ), } @@ -192,7 +192,7 @@ func (t *TestSuite) AssertRewardForDelegatorsOnly(alias string, epoch iotago.Epo } func (t *TestSuite) validatorReward(alias string, epoch iotago.EpochIndex, profitMargin, poolRewards, stakeAmount, poolStake, fixedCost uint64, action *EpochActions) iotago.Mana { - if action.ValidationBlocksSentPerSlot > uint64(t.api.ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot) { + if action.ValidationBlocksSentPerSlot > uint64(t.api.ProtocolParameters().ValidationBlocksPerSlot()) { return iotago.Mana(0) } if action.FixedCost > t.poolRewards[epoch][alias].PoolRewards { @@ -218,7 +218,7 @@ func (t *TestSuite) validatorReward(alias string, epoch iotago.EpochIndex, profi } func (t *TestSuite) delegatorReward(epoch iotago.EpochIndex, profitMargin, poolRewardWithFixedCost, delegatedAmount, poolStake, fixedCost uint64, action *EpochActions) iotago.Mana { - if action.ValidationBlocksSentPerSlot > uint64(t.api.ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot) { + if action.ValidationBlocksSentPerSlot > uint64(t.api.ProtocolParameters().ValidationBlocksPerSlot()) { return iotago.Mana(0) } @@ -245,7 +245,7 @@ func (t *TestSuite) calculatePoolReward(epoch iotago.EpochIndex, totalValidators poolCoefficient := t.calculatePoolCoefficient(poolStake, totalStake, validatorStake, totalValidatorsStake) scaledPoolReward := poolCoefficient * uint64(targetReward) * performanceFactor - poolRewardNoFixedCost := scaledPoolReward / uint64(params.RewardsParameters().ValidatorBlocksPerSlot) >> (params.RewardsParameters().PoolCoefficientExponent + 1) + poolRewardNoFixedCost := scaledPoolReward / uint64(params.ValidationBlocksPerSlot()) >> (params.RewardsParameters().PoolCoefficientExponent + 1) return poolRewardNoFixedCost } @@ -266,7 +266,7 @@ func (t *TestSuite) calculateProfitMargin(totalValidatorsStake, totalPoolStake i func (t *TestSuite) applyPerformanceFactor(accountID iotago.AccountID, epoch iotago.EpochIndex, activeSlotsCount, validationBlocksSentPerSlot, slotPerformanceFactor uint64) { startSlot := t.api.TimeProvider().EpochStart(epoch) endSlot := t.api.TimeProvider().EpochEnd(epoch) - valBlocksNum := t.api.ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot + valBlocksNum := t.api.ProtocolParameters().ValidationBlocksPerSlot() subslotDur := time.Duration(t.api.TimeProvider().SlotDurationSeconds()) * time.Second / time.Duration(valBlocksNum) slotCount := uint64(0) diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/tracker_test.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/tracker_test.go index dc681463c..46033f793 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/tracker_test.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/tracker_test.go @@ -61,7 +61,7 @@ func TestManager_Rewards(t *testing.T) { Delegators: []iotago.BaseToken{3, 2}, FixedCost: 100, ActiveSlotsCount: 8, - ValidationBlocksSentPerSlot: uint64(ts.api.ProtocolParameters().RewardsParameters().ValidatorBlocksPerSlot + 2), // no reward for validator issuing more blocks than allowed + ValidationBlocksSentPerSlot: uint64(ts.api.ProtocolParameters().ValidationBlocksPerSlot() + 2), // no reward for validator issuing more blocks than allowed SlotPerformance: 10, }, "D": { diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index febd28625..dece896de 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -89,7 +89,7 @@ func NewTestSuite(testingT *testing.T, opts ...options.Option[TestSuite]) *TestS 100, 100, ), - iotago.WithRewardsOptions(10, 8, 8, 31, 1154, 2, 1), + iotago.WithRewardsOptions(8, 8, 31, 1154, 2, 1), iotago.WithStakingOptions(1, 100, 1), iotago.WithTimeProviderOptions( From d36c1b80c48d2067146a4969c351d91efb742fa9 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 18 Oct 2023 10:22:42 +0800 Subject: [PATCH 3/7] Update iota.go version --- go.mod | 2 +- go.sum | 4 ++-- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 4 ++-- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 4 ++-- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 67e8c45f3..86a6b42d1 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad - github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 + github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f github.com/labstack/echo/v4 v4.11.2 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index ee536b771..c8a6fcbe6 100644 --- a/go.sum +++ b/go.sum @@ -309,8 +309,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 h1:Uc0IamOeROD4smHYup+Ij2DnBjXpYTdToUnWG8TBagM= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index ddf56e8a3..38c3a40aa 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 + github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 6b746cc85..4b1a09efa 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -197,8 +197,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 h1:Uc0IamOeROD4smHYup+Ij2DnBjXpYTdToUnWG8TBagM= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 7d356db5b..55fd1ac67 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -73,7 +73,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 29f56386f..2a26eff66 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -313,8 +313,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 h1:Uc0IamOeROD4smHYup+Ij2DnBjXpYTdToUnWG8TBagM= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 9d4f88889..2ce282eab 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -10,7 +10,7 @@ require ( github.com/iotaledger/hive.go/lo v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 + github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.14.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index c1485b5e4..97efd7cc6 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -52,8 +52,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21 h1:Uc0IamOeROD4smHYup+Ij2DnBjXpYTdToUnWG8TBagM= -github.com/iotaledger/iota.go/v4 v4.0.0-20231017134753-c195ef272c21/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= From ee26ee32eee8df1205f5ec673ca318995e4b33fb Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 18 Oct 2023 20:33:25 +0800 Subject: [PATCH 4/7] Update iota.go changes --- go.mod | 2 +- go.sum | 4 ++-- pkg/protocol/engine/ledger/tests/output.go | 2 +- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 4 ++-- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 4 ++-- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 86a6b42d1..a6e796309 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad - github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f + github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f github.com/labstack/echo/v4 v4.11.2 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index c8a6fcbe6..6925dfb79 100644 --- a/go.sum +++ b/go.sum @@ -309,8 +309,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f h1:PsDwQD5knFrFbRgUO4ZI6rpC3fqOCVekS4xSLE9BCMg= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/pkg/protocol/engine/ledger/tests/output.go b/pkg/protocol/engine/ledger/tests/output.go index 9177c9cab..1d1e9436b 100644 --- a/pkg/protocol/engine/ledger/tests/output.go +++ b/pkg/protocol/engine/ledger/tests/output.go @@ -16,7 +16,7 @@ func (m *MockedOutput) WorkScore(_ *iotago.WorkScoreParameters) (iotago.WorkScor panic("implement me") } -func (m *MockedOutput) StorageScore(_ *iotago.RentStructure, _ iotago.StorageScoreFunc) iotago.StorageScore { +func (m *MockedOutput) StorageScore(_ *iotago.StorageScoreStructure, _ iotago.StorageScoreFunc) iotago.StorageScore { panic("implement me") } diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 38c3a40aa..e0c1ab003 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f + github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 4b1a09efa..314981186 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -197,8 +197,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f h1:PsDwQD5knFrFbRgUO4ZI6rpC3fqOCVekS4xSLE9BCMg= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 55fd1ac67..783df36da 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -73,7 +73,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 2a26eff66..f908ec3ad 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -313,8 +313,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f h1:PsDwQD5knFrFbRgUO4ZI6rpC3fqOCVekS4xSLE9BCMg= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 2ce282eab..942facbcc 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -10,7 +10,7 @@ require ( github.com/iotaledger/hive.go/lo v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f + github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.14.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 97efd7cc6..442f004da 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -52,8 +52,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f h1:zPFzTz8KZ+L/9/HXYlDURFsiEaNlU2t1hBJwkoScUto= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018021529-a6e5f211ec4f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f h1:PsDwQD5knFrFbRgUO4ZI6rpC3fqOCVekS4xSLE9BCMg= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= From 73bba7fa48e10f8b37a0b4f60db1aa594fcde7fc Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 18 Oct 2023 21:18:43 +0800 Subject: [PATCH 5/7] Update version --- go.mod | 2 +- go.sum | 6 ++---- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 4 ++-- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 4 ++-- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 76a675061..2b90585da 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad - github.com/iotaledger/iota.go/v4 v4.0.0-20231013092100-ad2a52b5ac9a + github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd github.com/labstack/echo/v4 v4.11.2 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index 42d166a1e..f216bd12f 100644 --- a/go.sum +++ b/go.sum @@ -309,10 +309,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231011161154-7004432004e1 h1:mz5E00q1U/LDiUi/wVAbwdhGNKX0dNThaO99Fsyjkgs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231011161154-7004432004e1/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= -github.com/iotaledger/iota.go/v4 v4.0.0-20231013092100-ad2a52b5ac9a h1:S/n3ZTjnnl0IIMCx+S0pu5CZNArO6Z+omiXt6dDmPK4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231013092100-ad2a52b5ac9a/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 30cc8c60c..3f6b30c46 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -19,7 +19,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231013092100-ad2a52b5ac9a + github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index db0f63d48..be2ae6491 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -199,8 +199,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231013092100-ad2a52b5ac9a h1:S/n3ZTjnnl0IIMCx+S0pu5CZNArO6Z+omiXt6dDmPK4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231013092100-ad2a52b5ac9a/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 783df36da..f1be6fd7b 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -73,7 +73,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index f908ec3ad..370a10ab5 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -313,8 +313,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f h1:PsDwQD5knFrFbRgUO4ZI6rpC3fqOCVekS4xSLE9BCMg= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 942facbcc..aac952917 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -10,7 +10,7 @@ require ( github.com/iotaledger/hive.go/lo v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f + github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.14.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 442f004da..1e5b9b113 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -52,8 +52,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f h1:PsDwQD5knFrFbRgUO4ZI6rpC3fqOCVekS4xSLE9BCMg= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018122701-80edf3b8201f/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= From 4113ec105a6e99a48ba601b4260c428830ad6e27 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 18 Oct 2023 18:37:05 +0100 Subject: [PATCH 6/7] update go mod --- go.mod | 2 +- go.sum | 4 ++-- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 4 ++-- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 4 ++-- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 2b90585da..de92d9217 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad - github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd + github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 github.com/labstack/echo/v4 v4.11.2 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index f216bd12f..ca6b22bc7 100644 --- a/go.sum +++ b/go.sum @@ -309,8 +309,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 h1:Mi+Oyj4HNaZeP4iKSjA7FFCU5ixTyloK92am06Dpfgo= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 3f6b30c46..345182129 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -19,7 +19,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd + github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index be2ae6491..c0fa63911 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -199,8 +199,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 h1:Mi+Oyj4HNaZeP4iKSjA7FFCU5ixTyloK92am06Dpfgo= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index f1be6fd7b..1d2fd3ccf 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -73,7 +73,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 370a10ab5..2e14ff7ad 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -313,8 +313,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uT github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 h1:Mi+Oyj4HNaZeP4iKSjA7FFCU5ixTyloK92am06Dpfgo= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index aac952917..2bd91d3a4 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -10,7 +10,7 @@ require ( github.com/iotaledger/hive.go/lo v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/hive.go/runtime v0.0.0-20231010133617-cdbd5387e2af github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd + github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.14.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 1e5b9b113..3540e78d3 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -52,8 +52,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd538 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231010133617-cdbd5387e2af/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af h1:2/8In9gw03NW1hL4qyXuFYFoWZScHmyZtYUG0kHPmo4= github.com/iotaledger/hive.go/stringify v0.0.0-20231010133617-cdbd5387e2af/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd h1:EOCXP8iWLU+FiGnNQknlx/smmsi6m/HCqMJuk9sF24s= -github.com/iotaledger/iota.go/v4 v4.0.0-20231018131517-29b96fc8e6bd/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477 h1:Mi+Oyj4HNaZeP4iKSjA7FFCU5ixTyloK92am06Dpfgo= +github.com/iotaledger/iota.go/v4 v4.0.0-20231018143050-5701a12ce477/go.mod h1:XmgOVYZ7805zVEYPwhvqBDVa7XieXRgPrCEGZW35W8k= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= From c3ad6dab6255489a4b4bfa86a973682263d8f395 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 18 Oct 2023 18:38:31 +0100 Subject: [PATCH 7/7] rename RentStructure() to StorageScoreStructure() --- pkg/protocol/engine/accounts/mana/manager.go | 4 ++-- pkg/protocol/snapshotcreator/snapshotcreator.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/protocol/engine/accounts/mana/manager.go b/pkg/protocol/engine/accounts/mana/manager.go index 726cc6996..e28cffd74 100644 --- a/pkg/protocol/engine/accounts/mana/manager.go +++ b/pkg/protocol/engine/accounts/mana/manager.go @@ -51,7 +51,7 @@ func (m *Manager) GetManaOnAccount(accountID iotago.AccountID, currentSlot iotag if err != nil { return 0, ierrors.Errorf("failed to resolve AccountOutput for %s in slot %s: %w", accountID, currentSlot, err) } - minDeposit, err := m.apiProvider.CurrentAPI().RentStructure().MinDeposit(output.Output()) + minDeposit, err := m.apiProvider.CurrentAPI().StorageScoreStructure().MinDeposit(output.Output()) if err != nil { return 0, ierrors.Errorf("failed to get min deposit for %s: %w", accountID, err) } @@ -127,7 +127,7 @@ func (m *Manager) ApplyDiff(slot iotago.SlotIndex, destroyedAccounts ds.Set[iota var storedMana iotago.Mana var err error if output, has := accountOutputs[accountID]; has { - minDeposit := lo.PanicOnErr(m.apiProvider.CurrentAPI().RentStructure().MinDeposit(output.Output())) + minDeposit := lo.PanicOnErr(m.apiProvider.CurrentAPI().StorageScoreStructure().MinDeposit(output.Output())) excessBaseTokens, err = safemath.SafeSub(output.BaseTokenAmount(), minDeposit) if err != nil { excessBaseTokens = 0 diff --git a/pkg/protocol/snapshotcreator/snapshotcreator.go b/pkg/protocol/snapshotcreator/snapshotcreator.go index 0d4679f7f..4a61d1151 100644 --- a/pkg/protocol/snapshotcreator/snapshotcreator.go +++ b/pkg/protocol/snapshotcreator/snapshotcreator.go @@ -174,7 +174,7 @@ func createGenesisOutput(genesisTokenAmount iotago.BaseToken, genesisSeed []byte genesisWallet := mock.NewHDWallet("genesis", genesisSeed, 0) output := createOutput(genesisWallet.Address(), genesisTokenAmount) - if _, err := engineInstance.CurrentAPI().RentStructure().CoversMinDeposit(output, genesisTokenAmount); err != nil { + if _, err := engineInstance.CurrentAPI().StorageScoreStructure().CoversMinDeposit(output, genesisTokenAmount); err != nil { return nil, ierrors.Wrap(err, "min rent not covered by Genesis output with index 0") } @@ -190,7 +190,7 @@ func createGenesisAccounts(accounts []AccountDetails, engineInstance *engine.Eng for idx, genesisAccount := range accounts { output := createAccount(genesisAccount.AccountID, genesisAccount.Address, genesisAccount.Amount, genesisAccount.Mana, genesisAccount.IssuerKey, genesisAccount.ExpirySlot, genesisAccount.StakedAmount, genesisAccount.StakingEpochEnd, genesisAccount.FixedCost) - if _, err := engineInstance.CurrentAPI().RentStructure().CoversMinDeposit(output, genesisAccount.Amount); err != nil { + if _, err := engineInstance.CurrentAPI().StorageScoreStructure().CoversMinDeposit(output, genesisAccount.Amount); err != nil { return nil, ierrors.Wrapf(err, "min rent not covered by account output with index %d", idx+1) }