From 8d26f8f3e5130a32f0b63b0bf64c246c712021a6 Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 28 Nov 2023 15:41:20 +0100 Subject: [PATCH 1/3] Adapt to iota.go API changes --- components/restapi/core/accounts.go | 6 +- components/restapi/core/blocks.go | 2 +- components/restapi/core/utxo.go | 65 +++++++++---------- go.mod | 2 +- go.sum | 4 +- .../sybilprotectionv1/sybilprotection.go | 2 +- pkg/retainer/block_metadata.go | 29 ++++----- pkg/testsuite/snapshotcreator/options.go | 2 +- .../snapshotcreator/snapshotcreator.go | 6 +- pkg/testsuite/testsuite.go | 2 +- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 4 +- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 +- tools/genesis-snapshot/presets/presets.go | 12 ++-- 15 files changed, 68 insertions(+), 76 deletions(-) diff --git a/components/restapi/core/accounts.go b/components/restapi/core/accounts.go index ee721bd45..32800c774 100644 --- a/components/restapi/core/accounts.go +++ b/components/restapi/core/accounts.go @@ -148,7 +148,7 @@ func validatorByAccountAddress(c echo.Context) (*api.ValidatorResponse, error) { AddressBech32: accountID.ToAddress().Bech32(deps.Protocol.CommittedAPI().ProtocolParameters().Bech32HRP()), PoolStake: accountData.ValidatorStake + accountData.DelegationStake, ValidatorStake: accountData.ValidatorStake, - StakingEpochEnd: accountData.StakeEndEpoch, + StakingEndEpoch: accountData.StakeEndEpoch, FixedCost: accountData.FixedCost, Active: active, LatestSupportedProtocolVersion: accountData.LatestSupportedProtocolVersionAndHash.Version, @@ -232,8 +232,8 @@ func rewardsByOutputID(c echo.Context) (*api.ManaRewardsResponse, error) { } return &api.ManaRewardsResponse{ - EpochStart: actualStart, - EpochEnd: actualEnd, + StartEpoch: actualStart, + EndEpoch: actualEnd, Rewards: reward, }, nil } diff --git a/components/restapi/core/blocks.go b/components/restapi/core/blocks.go index afd3b987a..7343f4826 100644 --- a/components/restapi/core/blocks.go +++ b/components/restapi/core/blocks.go @@ -89,7 +89,7 @@ func blockIssuance() (*api.IssuanceBlockHeaderResponse, error) { WeakParents: references[iotago.WeakParentType], ShallowLikeParents: references[iotago.ShallowLikeParentType], LatestFinalizedSlot: deps.Protocol.MainEngineInstance().SyncManager.LatestFinalizedSlot(), - Commitment: deps.Protocol.MainEngineInstance().SyncManager.LatestCommitment().Commitment(), + LatestCommitment: deps.Protocol.MainEngineInstance().SyncManager.LatestCommitment().Commitment(), } return resp, nil diff --git a/components/restapi/core/utxo.go b/components/restapi/core/utxo.go index a60b79450..bc23295a5 100644 --- a/components/restapi/core/utxo.go +++ b/components/restapi/core/utxo.go @@ -6,6 +6,7 @@ import ( "github.com/iotaledger/hive.go/ierrors" "github.com/iotaledger/inx-app/pkg/httpserver" "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" + iotago "github.com/iotaledger/iota.go/v4" "github.com/iotaledger/iota.go/v4/api" ) @@ -83,57 +84,53 @@ func outputWithMetadataByID(c echo.Context) (*api.OutputWithMetadataResponse, er func newOutputMetadataResponse(output *utxoledger.Output) (*api.OutputMetadata, error) { latestCommitment := deps.Protocol.MainEngineInstance().SyncManager.LatestCommitment() - resp := &api.OutputMetadata{ - BlockID: output.BlockID(), - TransactionID: output.OutputID().TransactionID(), - OutputIndex: output.OutputID().Index(), - IsSpent: false, - LatestCommitmentID: latestCommitment.ID(), - } - includedSlotIndex := output.SlotBooked() - genesisSlot := deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() - if includedSlotIndex <= latestCommitment.Slot() && includedSlotIndex >= genesisSlot { + includedCommitmentID := iotago.EmptyCommitmentID + + if includedSlotIndex <= latestCommitment.Slot() && + includedSlotIndex >= deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() { includedCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(includedSlotIndex) if err != nil { return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", includedSlotIndex, err) } - resp.IncludedCommitmentID = includedCommitment.ID() + includedCommitmentID = includedCommitment.ID() } - return resp, nil + return &api.OutputMetadata{ + OutputID: output.OutputID(), + BlockID: output.BlockID(), + Included: &api.OutputInclusionMetadata{ + Slot: includedSlotIndex, + TransactionID: output.OutputID().TransactionID(), + CommitmentID: includedCommitmentID, + }, + LatestCommitmentID: latestCommitment.ID(), + }, nil } func newSpentMetadataResponse(spent *utxoledger.Spent) (*api.OutputMetadata, error) { - latestCommitment := deps.Protocol.MainEngineInstance().SyncManager.LatestCommitment() - - resp := &api.OutputMetadata{ - BlockID: spent.BlockID(), - TransactionID: spent.OutputID().TransactionID(), - OutputIndex: spent.OutputID().Index(), - IsSpent: true, - TransactionIDSpent: spent.TransactionIDSpent(), - LatestCommitmentID: latestCommitment.ID(), - } - - includedSlotIndex := spent.Output().SlotBooked() - genesisSlot := deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() - if includedSlotIndex <= latestCommitment.Slot() && includedSlotIndex >= genesisSlot { - includedCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(includedSlotIndex) - if err != nil { - return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", includedSlotIndex, err) - } - resp.IncludedCommitmentID = includedCommitment.ID() + newOutputMetadataResponse, err := newOutputMetadataResponse(spent.Output()) + if err != nil { + return nil, err } spentSlotIndex := spent.SlotSpent() - if spentSlotIndex <= latestCommitment.Slot() && spentSlotIndex >= genesisSlot { + spentCommitmentID := iotago.EmptyCommitmentID + + if spentSlotIndex <= newOutputMetadataResponse.LatestCommitmentID.Slot() && + spentSlotIndex >= deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() { spentCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(spentSlotIndex) if err != nil { return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", spentSlotIndex, err) } - resp.CommitmentIDSpent = spentCommitment.ID() + spentCommitmentID = spentCommitment.ID() + } + + newOutputMetadataResponse.Spent = &api.OutputConsumptionMetadata{ + Slot: spentSlotIndex, + TransactionID: spent.TransactionIDSpent(), + CommitmentID: spentCommitmentID, } - return resp, nil + return newOutputMetadataResponse, nil } diff --git a/go.mod b/go.mod index f81c24c7d..4048f6a47 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 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-20231124103306-ad44904e2b86 + github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d 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 0da512aaf..40f607219 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-20231124103306-ad44904e2b86 h1:vIQemhyUKXzLtmuyadp2VAwg2lGGYciIjRIqWSMs/30= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d h1:EC2USIlNSkJrELcwDNN8sB5SjsPp93c76efHQ/O4KX0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d/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/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go index 649ff5663..f95bcb26a 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go @@ -354,7 +354,7 @@ func (o *SybilProtection) OrderedRegisteredCandidateValidatorsList(epoch iotago. active := activeCandidates.Has(candidate) validatorResp = append(validatorResp, &api.ValidatorResponse{ AddressBech32: accountData.ID.ToAddress().Bech32(o.apiProvider.CommittedAPI().ProtocolParameters().Bech32HRP()), - StakingEpochEnd: accountData.StakeEndEpoch, + StakingEndEpoch: accountData.StakeEndEpoch, PoolStake: accountData.ValidatorStake + accountData.DelegationStake, ValidatorStake: accountData.ValidatorStake, FixedCost: accountData.FixedCost, diff --git a/pkg/retainer/block_metadata.go b/pkg/retainer/block_metadata.go index d9a3373b7..e07251c10 100644 --- a/pkg/retainer/block_metadata.go +++ b/pkg/retainer/block_metadata.go @@ -6,26 +6,22 @@ import ( ) type BlockMetadata struct { - BlockID iotago.BlockID - BlockState api.BlockState - BlockFailureReason api.BlockFailureReason + BlockID iotago.BlockID + BlockState api.BlockState + BlockFailureReason api.BlockFailureReason + + TransactionID iotago.TransactionID TransactionState api.TransactionState TransactionFailureReason api.TransactionFailureReason } func (b *BlockMetadata) BlockMetadataResponse() *api.BlockMetadataResponse { - response := &api.BlockMetadataResponse{ - BlockID: b.BlockID, - BlockState: b.BlockState.String(), - BlockFailureReason: b.BlockFailureReason, - TransactionFailureReason: b.TransactionFailureReason, - } - - if b.TransactionState != api.TransactionStateNoTransaction { - response.TransactionState = b.TransactionState.String() + return &api.BlockMetadataResponse{ + BlockID: b.BlockID, + BlockState: b.BlockState.String(), + BlockFailureReason: b.BlockFailureReason, + TransactionMetadata: b.TransactionMetadataResponse(), } - - return response } func (b *BlockMetadata) TransactionMetadataResponse() *api.TransactionMetadataResponse { @@ -33,10 +29,9 @@ func (b *BlockMetadata) TransactionMetadataResponse() *api.TransactionMetadataRe return nil } - response := &api.TransactionMetadataResponse{ + return &api.TransactionMetadataResponse{ + TransactionID: b.TransactionID, TransactionState: b.TransactionState.String(), TransactionFailureReason: b.TransactionFailureReason, } - - return response } diff --git a/pkg/testsuite/snapshotcreator/options.go b/pkg/testsuite/snapshotcreator/options.go index 05ec414cf..4c9c2ef40 100644 --- a/pkg/testsuite/snapshotcreator/options.go +++ b/pkg/testsuite/snapshotcreator/options.go @@ -103,7 +103,7 @@ type AccountDetails struct { ExpirySlot iotago.SlotIndex BlockIssuanceCredits iotago.BlockIssuanceCredits - StakingEpochEnd iotago.EpochIndex + StakingEndEpoch iotago.EpochIndex FixedCost iotago.Mana StakedAmount iotago.BaseToken } diff --git a/pkg/testsuite/snapshotcreator/snapshotcreator.go b/pkg/testsuite/snapshotcreator/snapshotcreator.go index ccd33d035..d2d6cedd5 100644 --- a/pkg/testsuite/snapshotcreator/snapshotcreator.go +++ b/pkg/testsuite/snapshotcreator/snapshotcreator.go @@ -70,7 +70,7 @@ func CreateSnapshot(opts ...options.Option[Options]) error { committeeAccountsData := make(accounts.AccountsData, 0) for _, snapshotAccountDetails := range opt.Accounts { // Only add genesis validators if an account has both - StakedAmount and StakingEndEpoch - specified. - if snapshotAccountDetails.StakedAmount > 0 && snapshotAccountDetails.StakingEpochEnd > 0 { + if snapshotAccountDetails.StakedAmount > 0 && snapshotAccountDetails.StakingEndEpoch > 0 { blockIssuerKeyEd25519, ok := snapshotAccountDetails.IssuerKey.(*iotago.Ed25519PublicKeyBlockIssuerKey) if !ok { panic("block issuer key must be of type ed25519") @@ -88,7 +88,7 @@ func CreateSnapshot(opts ...options.Option[Options]) error { ValidatorStake: snapshotAccountDetails.StakedAmount, DelegationStake: 0, FixedCost: snapshotAccountDetails.FixedCost, - StakeEndEpoch: snapshotAccountDetails.StakingEpochEnd, + StakeEndEpoch: snapshotAccountDetails.StakingEndEpoch, LatestSupportedProtocolVersionAndHash: model.VersionAndHash{}, }) } @@ -207,7 +207,7 @@ func createGenesisAccounts(api iotago.API, accounts []AccountDetails) (iotago.Tx var outputs iotago.TxEssenceOutputs // Account outputs start from Genesis TX index 1 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) + output := createAccount(genesisAccount.AccountID, genesisAccount.Address, genesisAccount.Amount, genesisAccount.Mana, genesisAccount.IssuerKey, genesisAccount.ExpirySlot, genesisAccount.StakedAmount, genesisAccount.StakingEndEpoch, genesisAccount.FixedCost) if _, err := api.StorageScoreStructure().CoversMinDeposit(output, genesisAccount.Amount); err != nil { return nil, ierrors.Wrapf(err, "min rent not covered by account output with index %d", idx+1) diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index 93dd80f40..f2cc14c89 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -365,7 +365,7 @@ func (t *TestSuite) addNodeToPartition(name string, partition string, validator ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 2, StakedAmount: walletOptions.Amount, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: iotago.Mana(0), AccountID: node.Validator.AccountID, } diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index ac7a78a75..e38ee7ace 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-20231127134220-90b88e35bdb2 // 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-20231124103306-ad44904e2b86 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d // 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 ba2d92e0a..0de4aa408 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-20231124103306-ad44904e2b86 h1:vIQemhyUKXzLtmuyadp2VAwg2lGGYciIjRIqWSMs/30= -github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d h1:EC2USIlNSkJrELcwDNN8sB5SjsPp93c76efHQ/O4KX0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d/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 6e2f96875..acfddbc25 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-20231127134220-90b88e35bdb2 github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231124103306-ad44904e2b86 + github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d 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 4a00412a4..10113bf98 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.20231127134220-90b88e3 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 h1:kYle7Frgv1tAk4zss7wRVFmegZ0xjGIBIhwOzI0EFII= github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -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/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d h1:EC2USIlNSkJrELcwDNN8sB5SjsPp93c76efHQ/O4KX0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d/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= diff --git a/tools/genesis-snapshot/presets/presets.go b/tools/genesis-snapshot/presets/presets.go index 707e7ff1b..208e15859 100644 --- a/tools/genesis-snapshot/presets/presets.go +++ b/tools/genesis-snapshot/presets/presets.go @@ -74,7 +74,7 @@ var ( IssuerKey: iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 4, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protocolParamsDocker), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protocolParamsDocker)), @@ -94,7 +94,7 @@ var ( IssuerKey: iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 4, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protocolParamsDocker), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protocolParamsDocker)), @@ -114,7 +114,7 @@ var ( IssuerKey: iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 4, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protocolParamsDocker), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protocolParamsDocker)), @@ -175,7 +175,7 @@ var ( IssuerKey: iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 4, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protocolParamsFeature), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protocolParamsFeature)), @@ -195,7 +195,7 @@ var ( IssuerKey: iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 4, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protocolParamsFeature), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protocolParamsFeature)), @@ -215,7 +215,7 @@ var ( IssuerKey: iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0xac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 4, - StakingEpochEnd: iotago.MaxEpochIndex, + StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protocolParamsFeature), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protocolParamsFeature)), From 86456d92366dbe6f570f56d714f1a9cbde614e4a Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 28 Nov 2023 17:12:09 +0100 Subject: [PATCH 2/3] Add TransactionID to retainer --- go.mod | 2 +- go.sum | 4 ++-- pkg/retainer/retainer/retainer.go | 15 ++++++++------- pkg/storage/prunable/slotstore/retainer.go | 7 +++++++ 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, 24 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 4048f6a47..33dc8b101 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 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-20231128135020-f4e20efbc45d + github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 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 40f607219..78432c954 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-20231128135020-f4e20efbc45d h1:EC2USIlNSkJrELcwDNN8sB5SjsPp93c76efHQ/O4KX0= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 h1:1sEC/ow5sWfMom8ZJuXz4UIlqwOObmO9AvPxhFBFukc= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2/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/retainer/retainer/retainer.go b/pkg/retainer/retainer/retainer.go index 1a4723814..9e1ff11cb 100644 --- a/pkg/retainer/retainer/retainer.go +++ b/pkg/retainer/retainer/retainer.go @@ -162,12 +162,13 @@ func (r *Retainer) BlockMetadata(blockID iotago.BlockID) (*retainer.BlockMetadat blockStatus = api.BlockStatePending } - txStatus, txFailureReason := r.transactionStatus(blockID) + txID, txStatus, txFailureReason := r.transactionStatus(blockID) return &retainer.BlockMetadata{ BlockID: blockID, BlockState: blockStatus, BlockFailureReason: blockFailureReason, + TransactionID: txID, TransactionState: txStatus, TransactionFailureReason: txFailureReason, }, nil @@ -240,16 +241,16 @@ func (r *Retainer) blockStatus(blockID iotago.BlockID) (api.BlockState, api.Bloc return blockData.State, blockData.FailureReason } -func (r *Retainer) transactionStatus(blockID iotago.BlockID) (api.TransactionState, api.TransactionFailureReason) { +func (r *Retainer) transactionStatus(blockID iotago.BlockID) (iotago.TransactionID, api.TransactionState, api.TransactionFailureReason) { store, err := r.store(blockID.Slot()) if err != nil { r.errorHandler(ierrors.Wrapf(err, "could not get retainer store for slot %d", blockID.Slot())) - return api.TransactionStateNoTransaction, api.TxFailureNone + return iotago.EmptyTransactionID, api.TransactionStateNoTransaction, api.TxFailureNone } txData, exists := store.GetTransaction(blockID) if !exists { - return api.TransactionStateNoTransaction, api.TxFailureNone + return iotago.EmptyTransactionID, api.TransactionStateNoTransaction, api.TxFailureNone } // for confirmed and finalized we need to check for the block status @@ -258,13 +259,13 @@ func (r *Retainer) transactionStatus(blockID iotago.BlockID) (api.TransactionSta switch blockState { case api.BlockStateConfirmed: - return api.TransactionStateConfirmed, api.TxFailureNone + return txData.TransactionID, api.TransactionStateConfirmed, api.TxFailureNone case api.BlockStateFinalized: - return api.TransactionStateFinalized, api.TxFailureNone + return txData.TransactionID, api.TransactionStateFinalized, api.TxFailureNone } } - return txData.State, txData.FailureReason + return txData.TransactionID, txData.State, txData.FailureReason } func (r *Retainer) onBlockAttached(blockID iotago.BlockID) error { diff --git a/pkg/storage/prunable/slotstore/retainer.go b/pkg/storage/prunable/slotstore/retainer.go index 44099e4b9..35a9655b4 100644 --- a/pkg/storage/prunable/slotstore/retainer.go +++ b/pkg/storage/prunable/slotstore/retainer.go @@ -49,6 +49,7 @@ func BlockRetainerDataFromBytes(bytes []byte) (*BlockRetainerData, int, error) { } type TransactionRetainerData struct { + TransactionID iotago.TransactionID State api.TransactionState FailureReason api.TransactionFailureReason } @@ -56,6 +57,9 @@ type TransactionRetainerData struct { func (t *TransactionRetainerData) Bytes() ([]byte, error) { byteBuffer := stream.NewByteBuffer(2) + if err := stream.Write(byteBuffer, t.TransactionID); err != nil { + return nil, ierrors.Wrap(err, "failed to write transaction ID") + } if err := stream.Write(byteBuffer, t.State); err != nil { return nil, ierrors.Wrap(err, "failed to write transaction state") } @@ -72,6 +76,9 @@ func TransactionRetainerDataFromBytes(bytes []byte) (*TransactionRetainerData, i var err error t := new(TransactionRetainerData) + if t.TransactionID, err = stream.Read[iotago.TransactionID](byteReader); err != nil { + return nil, 0, ierrors.Wrap(err, "failed to read transaction ID") + } if t.State, err = stream.Read[api.TransactionState](byteReader); err != nil { return nil, 0, ierrors.Wrap(err, "failed to read transaction state") } diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index e38ee7ace..1e9232081 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-20231127134220-90b88e35bdb2 // 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-20231128135020-f4e20efbc45d // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 // 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 0de4aa408..915f13e99 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-20231128135020-f4e20efbc45d h1:EC2USIlNSkJrELcwDNN8sB5SjsPp93c76efHQ/O4KX0= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 h1:1sEC/ow5sWfMom8ZJuXz4UIlqwOObmO9AvPxhFBFukc= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2/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 acfddbc25..123055ea2 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-20231127134220-90b88e35bdb2 github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d + github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 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 10113bf98..10f5ed778 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.20231127134220-90b88e3 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 h1:kYle7Frgv1tAk4zss7wRVFmegZ0xjGIBIhwOzI0EFII= github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d h1:EC2USIlNSkJrELcwDNN8sB5SjsPp93c76efHQ/O4KX0= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128135020-f4e20efbc45d/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 h1:1sEC/ow5sWfMom8ZJuXz4UIlqwOObmO9AvPxhFBFukc= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2/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= From 2406726a953450cff43cd04daf6550efdbd1d8ba Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 28 Nov 2023 17:38:50 +0100 Subject: [PATCH 3/3] Update inx-app --- components/restapi/core/utxo.go | 24 +++++++------- go.mod | 28 ++++++++--------- go.sum | 56 ++++++++++++++++----------------- pkg/retainer/block_metadata.go | 20 ++++++------ tools/gendoc/go.mod | 28 ++++++++--------- tools/gendoc/go.sum | 56 ++++++++++++++++----------------- tools/genesis-snapshot/go.mod | 20 ++++++------ tools/genesis-snapshot/go.sum | 40 +++++++++++------------ 8 files changed, 136 insertions(+), 136 deletions(-) diff --git a/components/restapi/core/utxo.go b/components/restapi/core/utxo.go index bc23295a5..cfc880f2f 100644 --- a/components/restapi/core/utxo.go +++ b/components/restapi/core/utxo.go @@ -84,14 +84,14 @@ func outputWithMetadataByID(c echo.Context) (*api.OutputWithMetadataResponse, er func newOutputMetadataResponse(output *utxoledger.Output) (*api.OutputMetadata, error) { latestCommitment := deps.Protocol.MainEngineInstance().SyncManager.LatestCommitment() - includedSlotIndex := output.SlotBooked() + includedSlot := output.SlotBooked() includedCommitmentID := iotago.EmptyCommitmentID - if includedSlotIndex <= latestCommitment.Slot() && - includedSlotIndex >= deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() { - includedCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(includedSlotIndex) + if includedSlot <= latestCommitment.Slot() && + includedSlot >= deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() { + includedCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(includedSlot) if err != nil { - return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", includedSlotIndex, err) + return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", includedSlot, err) } includedCommitmentID = includedCommitment.ID() } @@ -100,7 +100,7 @@ func newOutputMetadataResponse(output *utxoledger.Output) (*api.OutputMetadata, OutputID: output.OutputID(), BlockID: output.BlockID(), Included: &api.OutputInclusionMetadata{ - Slot: includedSlotIndex, + Slot: includedSlot, TransactionID: output.OutputID().TransactionID(), CommitmentID: includedCommitmentID, }, @@ -114,20 +114,20 @@ func newSpentMetadataResponse(spent *utxoledger.Spent) (*api.OutputMetadata, err return nil, err } - spentSlotIndex := spent.SlotSpent() + spentSlot := spent.SlotSpent() spentCommitmentID := iotago.EmptyCommitmentID - if spentSlotIndex <= newOutputMetadataResponse.LatestCommitmentID.Slot() && - spentSlotIndex >= deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() { - spentCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(spentSlotIndex) + if spentSlot <= newOutputMetadataResponse.LatestCommitmentID.Slot() && + spentSlot >= deps.Protocol.MainEngineInstance().CommittedAPI().ProtocolParameters().GenesisSlot() { + spentCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(spentSlot) if err != nil { - return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", spentSlotIndex, err) + return nil, ierrors.Wrapf(echo.ErrInternalServerError, "failed to load commitment with index %d: %s", spentSlot, err) } spentCommitmentID = spentCommitment.ID() } newOutputMetadataResponse.Spent = &api.OutputConsumptionMetadata{ - Slot: spentSlotIndex, + Slot: spentSlot, TransactionID: spent.TransactionIDSpent(), CommitmentID: spentCommitmentID, } diff --git a/go.mod b/go.mod index 33dc8b101..e3b6dbe6d 100644 --- a/go.mod +++ b/go.mod @@ -12,20 +12,20 @@ require ( github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2 github.com/iotaledger/hive.go/app v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2 + github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2 + github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2 + github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2 + github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe github.com/iotaledger/hive.go/logger v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 + github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 - 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-20231128160830-5582f462afb2 + github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231128163614-c82e1fa40733 + github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231128162307-cc6b309e93ef + github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec github.com/labstack/echo/v4 v4.11.3 github.com/labstack/gommon v0.4.1 github.com/libp2p/go-libp2p v0.32.0 @@ -41,7 +41,7 @@ require ( github.com/zyedidia/generic v1.2.1 go.uber.org/atomic v1.11.0 go.uber.org/dig v1.17.1 - golang.org/x/crypto v0.15.0 + golang.org/x/crypto v0.16.0 golang.org/x/exp v0.0.0-20231006140011-7918f672742d google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 @@ -85,7 +85,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect @@ -171,14 +171,14 @@ require ( go.uber.org/zap v1.26.0 // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect golang.org/x/tools v0.14.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/go.sum b/go.sum index 78432c954..0f6592c84 100644 --- a/go.sum +++ b/go.sum @@ -266,8 +266,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= @@ -279,36 +279,36 @@ github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2 h1:0FynHsnJ github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= github.com/iotaledger/hive.go/app v0.0.0-20231127134220-90b88e35bdb2 h1:WI6MQCxeANDyO7fOTovefuIusma+wT8VUJ3BisQLZEA= github.com/iotaledger/hive.go/app v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:+riYmeLApkLlj4+EpuJpEJAsj/KGfD7cqLGy7oTsPOM= -github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2 h1:8FPvPHWCNn54B3XpE3lOXAKwrh1LgPYTq0MnWZnk8vs= -github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe h1:vgJj9kXM1IkLjbjWOV565Vil+RlzJwVhxG/KebMmrKE= +github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2 h1:ZL4cGO4zy7IwCIfHQgpvu3yMbNnFFRvSvTqaZM5Uj5U= github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2/go.mod h1:CdixkrB7VdQzEDlVuwsxPtsiJL/WXrQgz3PELIqlLko= -github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2 h1:IcuTEC4KJhLkb5oMMZIzOOaM92U1KjWVbOZPyrmiasY= -github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe h1:/+Qw7fe5oSE5Jxm8RPzcfBKHbwjJ/zwHu3UWdSOvKW8= +github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI= github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2 h1:8YQlcFMexyYvjh3V/YSYzldeYjaDZd+1mHt8SUh8Uqs= github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:JE8cbZSvzbB5TrwXibg6M0B7ck35YxF30ItHBzQRlgc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2 h1:ftGXnXLsaqRqnT1lb7ZMsbQRKc1o9Lyed/qCTpWVHvc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe h1:kVkjbdBANpA8tyu9RM4/GeyVoyRfGcb4LT96PqHTIWc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2 h1:b+AHpClIb7YAjpXgRHCsr+DRdBMuN4Q6k/wpFmT1wok= github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2 h1:CTo8mb+RRZDBAz8RQFaJH7WxmOrj92Qe8boYHeTtPRk= -github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg= +github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe h1:dQBQ+ZOVwC6KJxTABHMMHjJto70gNU5Cn4dXeJp5xmM= +github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg= github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2 h1:3B6UFIJ+IJEiGmUbLt5+Zokv0i8RUs70IuSR9sB60DA= github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:vzO4/wRkEJDEZb/9fD10oKU9k1bj4qLir2Uhl5U1FkM= github.com/iotaledger/hive.go/logger v0.0.0-20231127134220-90b88e35bdb2 h1:1r4fY+R9p2q5CzEkiXMuFr/UCM8RX3yPUllXkjm5/Fk= github.com/iotaledger/hive.go/logger v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:w1psHM2MuKsen1WdsPKrpqElYH7ZOQ+YdQIgJZg4HTo= -github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 h1:a7MnddBEzQYqsRHRQbjqouAdqBuoCZY/G7EeIGbG/6E= -github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q= +github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe h1:jewR0RJ7oTGWjzhTROdIwhMeBH4//frUHizKs/6Em+s= +github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2 h1:vTx/tPH+//CQcDjdC8DZv3s6x9KCqAfTqn3VTjYUUlw= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= -github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 h1:kYle7Frgv1tAk4zss7wRVFmegZ0xjGIBIhwOzI0EFII= -github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b h1:T/9f4eYcP/fxe0G0pYa6TRZxD9rI9uMdDW89hnsNByU= -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-20231128160830-5582f462afb2 h1:1sEC/ow5sWfMom8ZJuXz4UIlqwOObmO9AvPxhFBFukc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe h1:RcFUqhnJ+86+sA0XMrZ0q+086ULrdWQkWrjUt2OnJK4= +github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231128163614-c82e1fa40733 h1:jdjFTuMum+fctCq+UdEGk0pRi+JLqLm3cDMC9kUEPAs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231128163614-c82e1fa40733/go.mod h1:3ae5TFi3uaECV+F4d5ekKz+xcJQmVtCICcs/Rhvgn3w= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231128162307-cc6b309e93ef h1:RImO23W0kL3U9egdLoi5OTmOIhE5rHfR/dKM/6XhZeE= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231128162307-cc6b309e93ef/go.mod h1:bi0zndM3irf8FHYUg6MzG/Zk/t0fV8IwGXAdoT7wn98= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec h1:u9SAuKHygJwqwYxoEd+PyHCU4fTftcPdV2ZUGSRZe8o= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec/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= @@ -713,8 +713,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= @@ -757,8 +757,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -816,8 +816,8 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -877,8 +877,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= diff --git a/pkg/retainer/block_metadata.go b/pkg/retainer/block_metadata.go index e07251c10..a7eaabc8c 100644 --- a/pkg/retainer/block_metadata.go +++ b/pkg/retainer/block_metadata.go @@ -15,23 +15,23 @@ type BlockMetadata struct { TransactionFailureReason api.TransactionFailureReason } -func (b *BlockMetadata) BlockMetadataResponse() *api.BlockMetadataResponse { +func (m *BlockMetadata) BlockMetadataResponse() *api.BlockMetadataResponse { return &api.BlockMetadataResponse{ - BlockID: b.BlockID, - BlockState: b.BlockState.String(), - BlockFailureReason: b.BlockFailureReason, - TransactionMetadata: b.TransactionMetadataResponse(), + BlockID: m.BlockID, + BlockState: m.BlockState.String(), + BlockFailureReason: m.BlockFailureReason, + TransactionMetadata: m.TransactionMetadataResponse(), } } -func (b *BlockMetadata) TransactionMetadataResponse() *api.TransactionMetadataResponse { - if b.TransactionState == api.TransactionStateNoTransaction { +func (m *BlockMetadata) TransactionMetadataResponse() *api.TransactionMetadataResponse { + if m.TransactionState == api.TransactionStateNoTransaction { return nil } return &api.TransactionMetadataResponse{ - TransactionID: b.TransactionID, - TransactionState: b.TransactionState.String(), - TransactionFailureReason: b.TransactionFailureReason, + TransactionID: m.TransactionID, + TransactionState: m.TransactionState.String(), + TransactionFailureReason: m.TransactionFailureReason, } } diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 1e9232081..3da0794a6 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -53,26 +53,26 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe // indirect github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe // indirect github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe // indirect github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2 // indirect github.com/iotaledger/hive.go/logger v0.0.0-20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe // indirect github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 // 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-20231128160830-5582f462afb2 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe // indirect + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231128163614-c82e1fa40733 // indirect + github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231128162307-cc6b309e93ef // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec // 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 @@ -167,18 +167,18 @@ require ( go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.4.0 // indirect golang.org/x/tools v0.14.0 // indirect gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 915f13e99..44394639e 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -268,8 +268,8 @@ github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKe github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2cs= github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= @@ -283,36 +283,36 @@ github.com/iotaledger/hive.go/app v0.0.0-20231127134220-90b88e35bdb2 h1:WI6MQCxe github.com/iotaledger/hive.go/app v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:+riYmeLApkLlj4+EpuJpEJAsj/KGfD7cqLGy7oTsPOM= github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 h1:4aVJTc0KS77uEw0Tny4r0n1ORwcbAQDECaCclgf/6lE= github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3/go.mod h1:TZeAqieDu+xDOZp2e9+S+8pZp1PrfgcwLUnxmd8IgLU= -github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2 h1:8FPvPHWCNn54B3XpE3lOXAKwrh1LgPYTq0MnWZnk8vs= -github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe h1:vgJj9kXM1IkLjbjWOV565Vil+RlzJwVhxG/KebMmrKE= +github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2 h1:ZL4cGO4zy7IwCIfHQgpvu3yMbNnFFRvSvTqaZM5Uj5U= github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2/go.mod h1:CdixkrB7VdQzEDlVuwsxPtsiJL/WXrQgz3PELIqlLko= -github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2 h1:IcuTEC4KJhLkb5oMMZIzOOaM92U1KjWVbOZPyrmiasY= -github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe h1:/+Qw7fe5oSE5Jxm8RPzcfBKHbwjJ/zwHu3UWdSOvKW8= +github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI= github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2 h1:8YQlcFMexyYvjh3V/YSYzldeYjaDZd+1mHt8SUh8Uqs= github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:JE8cbZSvzbB5TrwXibg6M0B7ck35YxF30ItHBzQRlgc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2 h1:ftGXnXLsaqRqnT1lb7ZMsbQRKc1o9Lyed/qCTpWVHvc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe h1:kVkjbdBANpA8tyu9RM4/GeyVoyRfGcb4LT96PqHTIWc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2 h1:b+AHpClIb7YAjpXgRHCsr+DRdBMuN4Q6k/wpFmT1wok= github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2 h1:CTo8mb+RRZDBAz8RQFaJH7WxmOrj92Qe8boYHeTtPRk= -github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg= +github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe h1:dQBQ+ZOVwC6KJxTABHMMHjJto70gNU5Cn4dXeJp5xmM= +github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg= github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2 h1:3B6UFIJ+IJEiGmUbLt5+Zokv0i8RUs70IuSR9sB60DA= github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:vzO4/wRkEJDEZb/9fD10oKU9k1bj4qLir2Uhl5U1FkM= github.com/iotaledger/hive.go/logger v0.0.0-20231127134220-90b88e35bdb2 h1:1r4fY+R9p2q5CzEkiXMuFr/UCM8RX3yPUllXkjm5/Fk= github.com/iotaledger/hive.go/logger v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:w1psHM2MuKsen1WdsPKrpqElYH7ZOQ+YdQIgJZg4HTo= -github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 h1:a7MnddBEzQYqsRHRQbjqouAdqBuoCZY/G7EeIGbG/6E= -github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q= +github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe h1:jewR0RJ7oTGWjzhTROdIwhMeBH4//frUHizKs/6Em+s= +github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2 h1:vTx/tPH+//CQcDjdC8DZv3s6x9KCqAfTqn3VTjYUUlw= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= -github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 h1:kYle7Frgv1tAk4zss7wRVFmegZ0xjGIBIhwOzI0EFII= -github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231123103852-bb039cbab83b h1:T/9f4eYcP/fxe0G0pYa6TRZxD9rI9uMdDW89hnsNByU= -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-20231128160830-5582f462afb2 h1:1sEC/ow5sWfMom8ZJuXz4UIlqwOObmO9AvPxhFBFukc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe h1:RcFUqhnJ+86+sA0XMrZ0q+086ULrdWQkWrjUt2OnJK4= +github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231128163614-c82e1fa40733 h1:jdjFTuMum+fctCq+UdEGk0pRi+JLqLm3cDMC9kUEPAs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231128163614-c82e1fa40733/go.mod h1:3ae5TFi3uaECV+F4d5ekKz+xcJQmVtCICcs/Rhvgn3w= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231128162307-cc6b309e93ef h1:RImO23W0kL3U9egdLoi5OTmOIhE5rHfR/dKM/6XhZeE= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231128162307-cc6b309e93ef/go.mod h1:bi0zndM3irf8FHYUg6MzG/Zk/t0fV8IwGXAdoT7wn98= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec h1:u9SAuKHygJwqwYxoEd+PyHCU4fTftcPdV2ZUGSRZe8o= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec/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= @@ -717,8 +717,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= @@ -761,8 +761,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -820,8 +820,8 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -881,8 +881,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 123055ea2..664f83bcb 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,15 +5,15 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2 - github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 + github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe + github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe + github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe + github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 + github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 - golang.org/x/crypto v0.15.0 + golang.org/x/crypto v0.16.0 ) require ( @@ -23,17 +23,17 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/ethereum/go-ethereum v1.13.5 // indirect github.com/google/uuid v1.4.0 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe // indirect github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2 // indirect github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2 // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2 // indirect github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2 // indirect github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/text v0.2.0 // indirect @@ -61,7 +61,7 @@ require ( go.uber.org/atomic v1.11.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect + golang.org/x/sys v0.15.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 10f5ed778..c4e36dc03 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -22,38 +22,38 @@ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys= github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2 h1:0FynHsnJTZgxQuXk3/maXNgzyvbwQ+TnuiwY48kYSr4= github.com/iotaledger/hive.go/ads v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2 h1:8FPvPHWCNn54B3XpE3lOXAKwrh1LgPYTq0MnWZnk8vs= -github.com/iotaledger/hive.go/constraints v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe h1:vgJj9kXM1IkLjbjWOV565Vil+RlzJwVhxG/KebMmrKE= +github.com/iotaledger/hive.go/constraints v0.0.0-20231128121006-331a9e522dfe/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2 h1:ZL4cGO4zy7IwCIfHQgpvu3yMbNnFFRvSvTqaZM5Uj5U= github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231127134220-90b88e35bdb2/go.mod h1:CdixkrB7VdQzEDlVuwsxPtsiJL/WXrQgz3PELIqlLko= -github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2 h1:IcuTEC4KJhLkb5oMMZIzOOaM92U1KjWVbOZPyrmiasY= -github.com/iotaledger/hive.go/crypto v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe h1:/+Qw7fe5oSE5Jxm8RPzcfBKHbwjJ/zwHu3UWdSOvKW8= +github.com/iotaledger/hive.go/crypto v0.0.0-20231128121006-331a9e522dfe/go.mod h1:OQ9EVTTQT1mkO/16BgwSIyQlAhEg+Cptud/yutevWsI= github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2 h1:8YQlcFMexyYvjh3V/YSYzldeYjaDZd+1mHt8SUh8Uqs= github.com/iotaledger/hive.go/ds v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:JE8cbZSvzbB5TrwXibg6M0B7ck35YxF30ItHBzQRlgc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2 h1:ftGXnXLsaqRqnT1lb7ZMsbQRKc1o9Lyed/qCTpWVHvc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe h1:kVkjbdBANpA8tyu9RM4/GeyVoyRfGcb4LT96PqHTIWc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231128121006-331a9e522dfe/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2 h1:b+AHpClIb7YAjpXgRHCsr+DRdBMuN4Q6k/wpFmT1wok= github.com/iotaledger/hive.go/kvstore v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2 h1:CTo8mb+RRZDBAz8RQFaJH7WxmOrj92Qe8boYHeTtPRk= -github.com/iotaledger/hive.go/lo v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg= +github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe h1:dQBQ+ZOVwC6KJxTABHMMHjJto70gNU5Cn4dXeJp5xmM= +github.com/iotaledger/hive.go/lo v0.0.0-20231128121006-331a9e522dfe/go.mod h1:6Ee7i6b4tuTHuRYnPP8VUb0wr9XFI5qlqtnttBd9jRg= github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2 h1:3B6UFIJ+IJEiGmUbLt5+Zokv0i8RUs70IuSR9sB60DA= github.com/iotaledger/hive.go/log v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:vzO4/wRkEJDEZb/9fD10oKU9k1bj4qLir2Uhl5U1FkM= -github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2 h1:a7MnddBEzQYqsRHRQbjqouAdqBuoCZY/G7EeIGbG/6E= -github.com/iotaledger/hive.go/runtime v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q= +github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe h1:jewR0RJ7oTGWjzhTROdIwhMeBH4//frUHizKs/6Em+s= +github.com/iotaledger/hive.go/runtime v0.0.0-20231128121006-331a9e522dfe/go.mod h1:DrZPvUvLarK8C2qb+3H2vdypp/MuhpQmB3iMJbDCr/Q= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2 h1:vTx/tPH+//CQcDjdC8DZv3s6x9KCqAfTqn3VTjYUUlw= github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231127134220-90b88e35bdb2/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= -github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2 h1:kYle7Frgv1tAk4zss7wRVFmegZ0xjGIBIhwOzI0EFII= -github.com/iotaledger/hive.go/stringify v0.0.0-20231127134220-90b88e35bdb2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2 h1:1sEC/ow5sWfMom8ZJuXz4UIlqwOObmO9AvPxhFBFukc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231128160830-5582f462afb2/go.mod h1:aO+5iL0vTNwNfE4QMGHVIufGziSI1wTvwJY1ipSMgCk= +github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe h1:RcFUqhnJ+86+sA0XMrZ0q+086ULrdWQkWrjUt2OnJK4= +github.com/iotaledger/hive.go/stringify v0.0.0-20231128121006-331a9e522dfe/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec h1:u9SAuKHygJwqwYxoEd+PyHCU4fTftcPdV2ZUGSRZe8o= +github.com/iotaledger/iota.go/v4 v4.0.0-20231128162016-23f1b4e12cec/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= @@ -122,15 +122,15 @@ github.com/zyedidia/generic v1.2.1 h1:Zv5KS/N2m0XZZiuLS82qheRG4X1o5gsWreGb0hR7XD github.com/zyedidia/generic v1.2.1/go.mod h1:ly2RBz4mnz1yeuVbQA/VFwGjK3mnHGRj1JuoG336Bis= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=