diff --git a/go.mod b/go.mod index 966dd83c3..b4df94167 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231122112629-bdf1cc39fba7 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231123103318-f6ea945e2e98 - github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49 + github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 github.com/labstack/echo/v4 v4.11.3 github.com/labstack/gommon v0.4.1 github.com/libp2p/go-libp2p v0.32.0 diff --git a/go.sum b/go.sum index 853d98815..c20bbda20 100644 --- a/go.sum +++ b/go.sum @@ -307,8 +307,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b h1:T/9f4 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b/go.mod h1:c7ktZxoH5Wp2ixzJn/8RmM5v2QOCIu/79tDFvfLbyPs= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231123103318-f6ea945e2e98 h1:PjGs+njONeFaxFgQ3lxxlRs3wTYw3233f/yDyTV8/F8= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231123103318-f6ea945e2e98/go.mod h1:jFRt2SZO3KE74/mk+zeCjlhVROriEg86K8CJTxvfdP8= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49 h1:xdsynMvuo1KcFCjvuUH8ekh6zigKnOj+/j/WrvHaDxU= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 h1:vIQemhyUKXzLtmuyadp2VAwg2lGGYciIjRIqWSMs/30= +github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI= github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/pkg/tests/accounts_test.go b/pkg/tests/accounts_test.go index 9bb8cf0fe..7df9eda11 100644 --- a/pkg/tests/accounts_test.go +++ b/pkg/tests/accounts_test.go @@ -10,6 +10,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/accounts" "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" "github.com/iotaledger/iota-core/pkg/testsuite" + "github.com/iotaledger/iota-core/pkg/testsuite/depositcalculator" "github.com/iotaledger/iota-core/pkg/testsuite/mock" "github.com/iotaledger/iota-core/pkg/testsuite/snapshotcreator" "github.com/iotaledger/iota-core/pkg/utils" @@ -220,7 +221,14 @@ func Test_StakeDelegateAndDelayedClaim(t *testing.T) { // set the expiry slot of the transitioned genesis account to the latest committed + MaxCommittableAge newAccountExpirySlot := node1.Protocol.MainEngineInstance().Storage.Settings().LatestCommitment().Slot() + ts.API.ProtocolParameters().MaxCommittableAge() - validatorAccountAmount := mock.MinValidatorAccountAmount(ts.API.ProtocolParameters()) + stakedAmount := iotago.BaseToken(10000) + + validatorAccountAmount, err := depositcalculator.MinDeposit(ts.API.ProtocolParameters(), iotago.OutputAccount, + depositcalculator.WithAddress(&iotago.Ed25519Address{}), + depositcalculator.WithBlockIssuerKeys(1), + depositcalculator.WithStakedAmount(stakedAmount), + ) + require.NoError(t, err) var block1Slot iotago.SlotIndex = 1 tx1 := ts.DefaultWallet().CreateAccountFromInput( @@ -228,7 +236,7 @@ func Test_StakeDelegateAndDelayedClaim(t *testing.T) { "Genesis:0", ts.DefaultWallet(), mock.WithBlockIssuerFeature(iotago.BlockIssuerKeys{newAccountBlockIssuerKey}, newAccountExpirySlot), - mock.WithStakingFeature(validatorAccountAmount, 421, 0, 10), // match amount and staked amount to simplify the tests + mock.WithStakingFeature(stakedAmount, 421, 0, 10), // match amount and staked amount to simplify the tests mock.WithAccountAmount(validatorAccountAmount), ) @@ -250,7 +258,7 @@ func Test_StakeDelegateAndDelayedClaim(t *testing.T) { PreviousOutputID: iotago.EmptyOutputID, BlockIssuerKeysAdded: iotago.NewBlockIssuerKeys(newAccountBlockIssuerKey), BlockIssuerKeysRemoved: iotago.NewBlockIssuerKeys(), - ValidatorStakeChange: int64(validatorAccountAmount), + ValidatorStakeChange: int64(stakedAmount), StakeEndEpochChange: 10, FixedCostChange: 421, DelegationStakeChange: 0, @@ -265,7 +273,7 @@ func Test_StakeDelegateAndDelayedClaim(t *testing.T) { StakeEndEpoch: 10, FixedCost: 421, DelegationStake: 0, - ValidatorStake: validatorAccountAmount, + ValidatorStake: stakedAmount, }, ts.Nodes()...) // CREATE DELEGATION TO NEW ACCOUNT FROM BASIC UTXO @@ -304,7 +312,7 @@ func Test_StakeDelegateAndDelayedClaim(t *testing.T) { StakeEndEpoch: 10, FixedCost: 421, DelegationStake: iotago.BaseToken(delegatedAmount), - ValidatorStake: validatorAccountAmount, + ValidatorStake: stakedAmount, }, ts.Nodes()...) // transition a delegation output to a delayed claiming state @@ -337,7 +345,7 @@ func Test_StakeDelegateAndDelayedClaim(t *testing.T) { StakeEndEpoch: 10, FixedCost: 421, DelegationStake: iotago.BaseToken(0), - ValidatorStake: validatorAccountAmount, + ValidatorStake: stakedAmount, }, ts.Nodes()...) } @@ -695,8 +703,13 @@ func Test_NegativeBIC_AccountOutput(t *testing.T) { wallet2BIC := iotago.MaxBlockIssuanceCredits / 2 // Add a default block issuer to the network. This will add another block issuer account to the snapshot. - // TODO: calculate the correct amount - wallet1 := ts.AddGenesisWallet("wallet 1", node1, testsuite.WithWalletAmount(5000000), testsuite.WithWalletBlockIssuanceCredits(wallet1BIC)) + minDeposit, err := depositcalculator.MinDeposit(ts.API.ProtocolParameters(), iotago.OutputAccount, + depositcalculator.WithAddress(&iotago.Ed25519Address{}), + depositcalculator.WithBlockIssuerKeys(2), + ) + require.NoError(t, err) + + wallet1 := ts.AddGenesisWallet("wallet 1", node1, testsuite.WithWalletAmount(minDeposit), testsuite.WithWalletBlockIssuanceCredits(wallet1BIC)) wallet2 := ts.AddGenesisWallet("wallet 2", node1, testsuite.WithWalletBlockIssuanceCredits(wallet2BIC)) ts.Run(true) diff --git a/pkg/testsuite/depositcalculator/depositcalculator.go b/pkg/testsuite/depositcalculator/depositcalculator.go new file mode 100644 index 000000000..803785264 --- /dev/null +++ b/pkg/testsuite/depositcalculator/depositcalculator.go @@ -0,0 +1,334 @@ +package depositcalculator + +import ( + "math/big" + + "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/hive.go/serializer/v2/serix" + iotago "github.com/iotaledger/iota.go/v4" +) + +type Options struct { + // UnlockConditions + Address iotago.Address + StorageDepositReturnAddress iotago.Address + HasTimelock bool + ExpirationAddress iotago.Address + StateControllerAddress iotago.Address + GovernorAddress iotago.Address + + // Features + SenderAddress iotago.Address + IssuerAddress iotago.Address + MetadataLength int + StateMetadataLength int + TagLength int + HasNativeToken bool + BlockIssuerKeys int + StakedAmount iotago.BaseToken + + // Immutable Features + ImmutableIssuerAddress iotago.Address + ImmutableMetadataLength int +} + +// WithAddress sets the address for the address unlock condition. +func WithAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.Address = address + } +} + +// WithStorageDepositReturnAddress adds a storage deposit return unlock condition and sets the address. +func WithStorageDepositReturnAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.StorageDepositReturnAddress = address + } +} + +// WithHasTimelock adds a timelock unlock condition. +func WithHasTimelock() options.Option[Options] { + return func(opts *Options) { + opts.HasTimelock = true + } +} + +// WithExpirationAddress adds a expiration unlock condition and sets the address. +func WithExpirationAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.ExpirationAddress = address + } +} + +// WithStateControllerAddress sets the address for the state controller address unlock condition. +func WithStateControllerAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.StateControllerAddress = address + } +} + +// WithGovernorAddress sets the address for the governor address unlock condition. +func WithGovernorAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.GovernorAddress = address + } +} + +// WithSenderAddress adds a sender feature and sets the address. +func WithSenderAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.SenderAddress = address + } +} + +// WithIssuerAddress adds a issuer feature and sets the address. +func WithIssuerAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.IssuerAddress = address + } +} + +// WithMetadataLength adds a metadata feature and adds an entry with an empty key and a dummy value +// of the given length minus the length of the map length prefix, key length prefix and value length prefix. +func WithMetadataLength(length int) options.Option[Options] { + return func(opts *Options) { + opts.MetadataLength = length + } +} + +// WithStateMetadataLength adds a state metadata feature and adds an entry with an empty key and a dummy value +// of the given length minus the length of the map length prefix, key length prefix and value length prefix. +func WithStateMetadataLength(length int) options.Option[Options] { + return func(opts *Options) { + opts.StateMetadataLength = length + } +} + +// WithTagLength adds a tag feature and sets a dummy tag with the given length. +func WithTagLength(length int) options.Option[Options] { + return func(opts *Options) { + opts.TagLength = length + } +} + +// WithHasNativeToken adds a native token feature. +func WithHasNativeToken() options.Option[Options] { + return func(opts *Options) { + opts.HasNativeToken = true + } +} + +// WithBlockIssuerKeys adds a block issuer feature and adds the given amount of dummy keys. +func WithBlockIssuerKeys(keys int) options.Option[Options] { + return func(opts *Options) { + opts.BlockIssuerKeys = keys + } +} + +// WithStakedAmount adds a staking feature and sets the staked amount. +func WithStakedAmount(amount iotago.BaseToken) options.Option[Options] { + return func(opts *Options) { + opts.StakedAmount = amount + } +} + +// WithImmutableIssuerAddress adds an immutable issuer feature and sets the address. +func WithImmutableIssuerAddress(address iotago.Address) options.Option[Options] { + return func(opts *Options) { + opts.ImmutableIssuerAddress = address + } +} + +// WithImmutableMetadataLength adds an immutable metadata feature and adds an entry with an empty key and a dummy value +// of the given length minus the length of the map length prefix, key length prefix and value length prefix. +func WithImmutableMetadataLength(length int) options.Option[Options] { + return func(opts *Options) { + opts.ImmutableMetadataLength = length + } +} + +func getUnlockConditions[T iotago.UnlockCondition](outputType iotago.OutputType, opts *Options) iotago.UnlockConditions[T] { + unlockConditions := make(iotago.UnlockConditions[T], 0) + + // Mandatory address unlocks + switch outputType { + case iotago.OutputBasic, iotago.OutputAccount, iotago.OutputNFT, iotago.OutputDelegation: + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.AddressUnlockCondition{Address: opts.Address}).(T)) + + case iotago.OutputAnchor: + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.StateControllerAddressUnlockCondition{Address: opts.StateControllerAddress}).(T)) + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.GovernorAddressUnlockCondition{Address: opts.GovernorAddress}).(T)) + + case iotago.OutputFoundry: + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.ImmutableAccountUnlockCondition{Address: &iotago.AccountAddress{}}).(T)) + } + + if opts.StorageDepositReturnAddress != nil { + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.StorageDepositReturnUnlockCondition{ReturnAddress: opts.StorageDepositReturnAddress}).(T)) + } + + if opts.HasTimelock { + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.TimelockUnlockCondition{}).(T)) + } + + if opts.ExpirationAddress != nil { + unlockConditions = append(unlockConditions, iotago.UnlockCondition(&iotago.ExpirationUnlockCondition{ReturnAddress: opts.ExpirationAddress}).(T)) + } + + return unlockConditions +} + +func getFeatures[T iotago.Feature](opts *Options) iotago.Features[T] { + features := iotago.Features[T]{} + + if opts.SenderAddress != nil { + features = append(features, &iotago.SenderFeature{Address: opts.SenderAddress}) + } + + if opts.IssuerAddress != nil { + features = append(features, &iotago.IssuerFeature{Address: opts.IssuerAddress}) + } + + if opts.MetadataLength > 0 { + features = append(features, &iotago.MetadataFeature{ + Entries: iotago.MetadataFeatureEntries{ + // configured length - map length prefix - key length prefix - value length prefix + "": make([]byte, opts.MetadataLength-int(serix.LengthPrefixTypeAsByte)+int(serix.LengthPrefixTypeAsByte)+int(serix.LengthPrefixTypeAsUint16)), + }, + }) + } + + if opts.StateMetadataLength > 0 { + features = append(features, &iotago.StateMetadataFeature{ + Entries: iotago.StateMetadataFeatureEntries{ + // configured length - map length prefix - key length prefix - value length prefix + "": make([]byte, opts.StateMetadataLength-int(serix.LengthPrefixTypeAsByte)+int(serix.LengthPrefixTypeAsByte)+int(serix.LengthPrefixTypeAsUint16)), + }, + }) + } + + if opts.TagLength > 0 { + features = append(features, &iotago.TagFeature{Tag: make([]byte, opts.TagLength)}) + } + + if opts.HasNativeToken { + features = append(features, &iotago.NativeTokenFeature{Amount: big.NewInt(0)}) + } + + if opts.BlockIssuerKeys > 0 { + blockIssuerKeys := make([]iotago.BlockIssuerKey, 0, opts.BlockIssuerKeys) + for i := 0; i < opts.BlockIssuerKeys; i++ { + blockIssuerKeys = append(blockIssuerKeys, &iotago.Ed25519PublicKeyBlockIssuerKey{}) + } + + features = append(features, &iotago.BlockIssuerFeature{BlockIssuerKeys: blockIssuerKeys}) + } + + if opts.StakedAmount > 0 { + features = append(features, &iotago.StakingFeature{StakedAmount: opts.StakedAmount}) + } + + return features +} + +func getImmutableFeatures[T iotago.Feature](opts *Options) iotago.Features[T] { + features := iotago.Features[T]{} + + if opts.ImmutableIssuerAddress != nil { + features = append(features, &iotago.IssuerFeature{Address: opts.ImmutableIssuerAddress}) + } + + if opts.ImmutableMetadataLength > 0 { + features = append(features, &iotago.MetadataFeature{ + Entries: iotago.MetadataFeatureEntries{ + // configured length - map length prefix - key length prefix - value length prefix + "": make([]byte, opts.ImmutableMetadataLength-int(serix.LengthPrefixTypeAsByte)+int(serix.LengthPrefixTypeAsByte)+int(serix.LengthPrefixTypeAsUint16)), + }, + }) + } + + return features +} + +func MinDeposit(protocolParams iotago.ProtocolParameters, outputType iotago.OutputType, opts ...options.Option[Options]) (iotago.BaseToken, error) { + depositCalculationOptions := options.Apply(&Options{}, opts) + + var dummyOutput iotago.Output + switch outputType { + case iotago.OutputBasic: + dummyOutput = &iotago.BasicOutput{ + Amount: 0, + Mana: 0, + UnlockConditions: getUnlockConditions[iotago.BasicOutputUnlockCondition](outputType, depositCalculationOptions), + Features: getFeatures[iotago.BasicOutputFeature](depositCalculationOptions), + } + + case iotago.OutputAccount: + dummyOutput = &iotago.AccountOutput{ + Amount: 0, + Mana: 0, + AccountID: iotago.AccountID{}, + FoundryCounter: 0, + UnlockConditions: getUnlockConditions[iotago.AccountOutputUnlockCondition](outputType, depositCalculationOptions), + Features: getFeatures[iotago.AccountOutputFeature](depositCalculationOptions), + ImmutableFeatures: getImmutableFeatures[iotago.AccountOutputImmFeature](depositCalculationOptions), + } + + case iotago.OutputAnchor: + dummyOutput = &iotago.AnchorOutput{ + Amount: 0, + Mana: 0, + AnchorID: iotago.AnchorID{}, + StateIndex: 0, + UnlockConditions: getUnlockConditions[iotago.AnchorOutputUnlockCondition](outputType, depositCalculationOptions), + Features: getFeatures[iotago.AnchorOutputFeature](depositCalculationOptions), + ImmutableFeatures: getImmutableFeatures[iotago.AnchorOutputImmFeature](depositCalculationOptions), + } + + case iotago.OutputFoundry: + dummyOutput = &iotago.FoundryOutput{ + Amount: 0, + SerialNumber: 0, + TokenScheme: &iotago.SimpleTokenScheme{}, + UnlockConditions: getUnlockConditions[iotago.FoundryOutputUnlockCondition](outputType, depositCalculationOptions), + Features: getFeatures[iotago.FoundryOutputFeature](depositCalculationOptions), + ImmutableFeatures: getImmutableFeatures[iotago.FoundryOutputImmFeature](depositCalculationOptions), + } + + case iotago.OutputNFT: + dummyOutput = &iotago.NFTOutput{ + Amount: 0, + Mana: 0, + NFTID: iotago.NFTID{}, + UnlockConditions: getUnlockConditions[iotago.NFTOutputUnlockCondition](outputType, depositCalculationOptions), + Features: getFeatures[iotago.NFTOutputFeature](depositCalculationOptions), + ImmutableFeatures: getImmutableFeatures[iotago.NFTOutputImmFeature](depositCalculationOptions), + } + + case iotago.OutputDelegation: + dummyOutput = &iotago.DelegationOutput{ + Amount: 0, + DelegatedAmount: 0, + DelegationID: iotago.DelegationID{}, + ValidatorAddress: &iotago.AccountAddress{}, + StartEpoch: 0, + EndEpoch: 0, + UnlockConditions: getUnlockConditions[iotago.DelegationOutputUnlockCondition](outputType, depositCalculationOptions), + } + } + + storageScoreStructure := iotago.NewStorageScoreStructure(protocolParams.StorageScoreParameters()) + + // calculate the minimum storage deposit + minDeposit, err := storageScoreStructure.MinDeposit(dummyOutput) + if err != nil { + return 0, err + } + + // we need to have at least the staked amount in the deposit + if depositCalculationOptions.StakedAmount > minDeposit { + minDeposit = depositCalculationOptions.StakedAmount + } + + return minDeposit, nil +} diff --git a/pkg/testsuite/mock/utils.go b/pkg/testsuite/mock/utils.go index 8b59b713f..92ec20594 100644 --- a/pkg/testsuite/mock/utils.go +++ b/pkg/testsuite/mock/utils.go @@ -4,61 +4,24 @@ import ( "github.com/iotaledger/hive.go/lo" "github.com/iotaledger/hive.go/runtime/options" "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" + "github.com/iotaledger/iota-core/pkg/testsuite/depositcalculator" iotago "github.com/iotaledger/iota.go/v4" "github.com/iotaledger/iota.go/v4/builder" ) func MinIssuerAccountAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken { - // create a dummy account with a block issuer feature to calculate the storage score. - dummyAccountOutput := &iotago.AccountOutput{ - Amount: 0, - Mana: 0, - AccountID: iotago.EmptyAccountID, - FoundryCounter: 0, - UnlockConditions: iotago.AccountOutputUnlockConditions{ - &iotago.AddressUnlockCondition{ - Address: &iotago.Ed25519Address{}, - }, - }, - Features: iotago.AccountOutputFeatures{ - &iotago.BlockIssuerFeature{ - BlockIssuerKeys: iotago.BlockIssuerKeys{ - &iotago.Ed25519PublicKeyBlockIssuerKey{}, - }, - }, - }, - ImmutableFeatures: iotago.AccountOutputImmFeatures{}, - } - storageScoreStructure := iotago.NewStorageScoreStructure(protocolParameters.StorageScoreParameters()) - - return lo.PanicOnErr(storageScoreStructure.MinDeposit(dummyAccountOutput)) + return lo.PanicOnErr(depositcalculator.MinDeposit(protocolParameters, iotago.OutputAccount, + depositcalculator.WithAddress(&iotago.Ed25519Address{}), + depositcalculator.WithBlockIssuerKeys(1), + )) } func MinValidatorAccountAmount(protocolParameters iotago.ProtocolParameters) iotago.BaseToken { - // create a dummy account with a staking and block issuer feature to calculate the storage score. - dummyAccountOutput := &iotago.AccountOutput{ - Amount: 0, - Mana: 0, - AccountID: iotago.EmptyAccountID, - FoundryCounter: 0, - UnlockConditions: iotago.AccountOutputUnlockConditions{ - &iotago.AddressUnlockCondition{ - Address: &iotago.Ed25519Address{}, - }, - }, - Features: iotago.AccountOutputFeatures{ - &iotago.BlockIssuerFeature{ - BlockIssuerKeys: iotago.BlockIssuerKeys{ - &iotago.Ed25519PublicKeyBlockIssuerKey{}, - }, - }, - &iotago.StakingFeature{}, - }, - ImmutableFeatures: iotago.AccountOutputImmFeatures{}, - } - storageScoreStructure := iotago.NewStorageScoreStructure(protocolParameters.StorageScoreParameters()) - - return lo.PanicOnErr(storageScoreStructure.MinDeposit(dummyAccountOutput)) + return lo.PanicOnErr(depositcalculator.MinDeposit(protocolParameters, iotago.OutputAccount, + depositcalculator.WithAddress(&iotago.Ed25519Address{}), + depositcalculator.WithBlockIssuerKeys(1), + depositcalculator.WithStakedAmount(1), + )) } // TODO: add the correct formula later. diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 33697e170..6f312ac5e 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-20231122112629-bdf1cc39fba7 // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231123103318-f6ea945e2e98 // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 // indirect github.com/ipfs/boxo v0.13.1 // 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 8941f11a3..625e4af90 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -311,8 +311,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b h1:T/9f4 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b/go.mod h1:c7ktZxoH5Wp2ixzJn/8RmM5v2QOCIu/79tDFvfLbyPs= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231123103318-f6ea945e2e98 h1:PjGs+njONeFaxFgQ3lxxlRs3wTYw3233f/yDyTV8/F8= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231123103318-f6ea945e2e98/go.mod h1:jFRt2SZO3KE74/mk+zeCjlhVROriEg86K8CJTxvfdP8= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49 h1:xdsynMvuo1KcFCjvuUH8ekh6zigKnOj+/j/WrvHaDxU= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 h1:vIQemhyUKXzLtmuyadp2VAwg2lGGYciIjRIqWSMs/30= +github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI= github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= 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 89bbe8913..cf646a695 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-20231122112629-bdf1cc39fba7 github.com/iotaledger/hive.go/runtime v0.0.0-20231122112629-bdf1cc39fba7 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49 + github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.15.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 23ddfa2f8..d3873d07e 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.20231113110812-4ca2b6c github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231113110812-4ca2b6cc9a42/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= github.com/iotaledger/hive.go/stringify v0.0.0-20231122112629-bdf1cc39fba7 h1:h481Dn+giKO/1MamwuDZ8Mvzg4GbPx/asKD/X3Zs8wc= github.com/iotaledger/hive.go/stringify v0.0.0-20231122112629-bdf1cc39fba7/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49 h1:xdsynMvuo1KcFCjvuUH8ekh6zigKnOj+/j/WrvHaDxU= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124100551-bb617f46bb49/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 h1:vIQemhyUKXzLtmuyadp2VAwg2lGGYciIjRIqWSMs/30= +github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= 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=