From fef8f04f44ef18ab8360cd0a8a03878287888304 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 20 Sep 2023 14:03:57 +0800 Subject: [PATCH 1/8] Update to latest iota.go --- go.mod | 2 +- go.sum | 2 ++ pkg/model/commitment.go | 4 ++-- pkg/protocol/engine/congestioncontrol/rmc/rmc.go | 4 ++-- pkg/storage/permanent/settings.go | 2 +- pkg/tests/accounts_test.go | 2 +- pkg/tests/confirmation_state_test.go | 2 +- pkg/tests/protocol_engine_switching_test.go | 2 +- pkg/tests/protocol_startup_test.go | 2 +- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 2 ++ 11 files changed, 15 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 7b6135a3d..b1c3abe8e 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b - github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d + github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index d2bb86a59..642e9a808 100644 --- a/go.sum +++ b/go.sum @@ -309,6 +309,8 @@ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b h1:EPB/+i github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 h1:sGYy/hf5yz2/goNpZ02h+K46K+agu7QAK112mK7oZmo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/pkg/model/commitment.go b/pkg/model/commitment.go index ba21cacce..6b5830f02 100644 --- a/pkg/model/commitment.go +++ b/pkg/model/commitment.go @@ -23,7 +23,7 @@ type Commitment struct { func NewEmptyCommitment(api iotago.API) *Commitment { emptyCommitment := iotago.NewEmptyCommitment(api.ProtocolParameters().Version()) - emptyCommitment.RMC = api.ProtocolParameters().CongestionControlParameters().RMCMin + emptyCommitment.ReferenceManaCost = api.ProtocolParameters().CongestionControlParameters().RMCMin return lo.PanicOnErr(CommitmentFromCommitment(emptyCommitment, api)) } @@ -84,7 +84,7 @@ func (c *Commitment) Index() iotago.SlotIndex { } func (c *Commitment) PrevID() iotago.CommitmentID { - return c.Commitment().PrevID + return c.Commitment().PreviousCommitmentID } func (c *Commitment) RootsID() iotago.Identifier { diff --git a/pkg/protocol/engine/congestioncontrol/rmc/rmc.go b/pkg/protocol/engine/congestioncontrol/rmc/rmc.go index bb7290677..6c963f59f 100644 --- a/pkg/protocol/engine/congestioncontrol/rmc/rmc.go +++ b/pkg/protocol/engine/congestioncontrol/rmc/rmc.go @@ -76,7 +76,7 @@ func (m *Manager) CommitSlot(index iotago.SlotIndex) (iotago.Mana, error) { if err != nil { return 0, ierrors.Wrapf(err, "failed to load commitment for slot %d", index-1) } - lastRMC := latestCommitment.Commitment().RMC + lastRMC := latestCommitment.Commitment().ReferenceManaCost // load the slotWork for the current slot currentSlotWork, exists := m.slotWork.Get(index) if !exists { @@ -139,7 +139,7 @@ func (m *Manager) RMC(slot iotago.SlotIndex) (iotago.Mana, error) { if err != nil { return 0, ierrors.Wrapf(err, "failed to get RMC for slot %d", slot) } - rmc = latestCommitment.Commitment().RMC + rmc = latestCommitment.Commitment().ReferenceManaCost } return rmc, nil diff --git a/pkg/storage/permanent/settings.go b/pkg/storage/permanent/settings.go index 94f81603e..26110610b 100644 --- a/pkg/storage/permanent/settings.go +++ b/pkg/storage/permanent/settings.go @@ -304,7 +304,7 @@ func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commit var err error if targetCommitment != nil { // We always know the version of the target commitment, so there can be no error. - commitmentBytes, err = lo.PanicOnErr(s.apiProvider.APIForVersion(targetCommitment.Version)).Encode(targetCommitment) + commitmentBytes, err = lo.PanicOnErr(s.apiProvider.APIForVersion(targetCommitment.ProtocolVersion)).Encode(targetCommitment) if err != nil { return ierrors.Wrap(err, "failed to encode target commitment") } diff --git a/pkg/tests/accounts_test.go b/pkg/tests/accounts_test.go index a3e69243d..c7e848872 100644 --- a/pkg/tests/accounts_test.go +++ b/pkg/tests/accounts_test.go @@ -92,7 +92,7 @@ func Test_TransitionAccount(t *testing.T) { var slotIndexBlock1 iotago.SlotIndex = 1 activeNodes := []*mock.Node{node1} genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin block1 := ts.IssueBlockAtSlotWithOptions("block1", slotIndexBlock1, genesisCommitment, node1, tx1) diff --git a/pkg/tests/confirmation_state_test.go b/pkg/tests/confirmation_state_test.go index 8b9c15e48..28d878743 100644 --- a/pkg/tests/confirmation_state_test.go +++ b/pkg/tests/confirmation_state_test.go @@ -88,7 +88,7 @@ func TestConfirmationFlags(t *testing.T) { // Verify that nodes have the expected states. genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/pkg/tests/protocol_engine_switching_test.go b/pkg/tests/protocol_engine_switching_test.go index 0d29be462..8ba609107 100644 --- a/pkg/tests/protocol_engine_switching_test.go +++ b/pkg/tests/protocol_engine_switching_test.go @@ -135,7 +135,7 @@ func TestProtocol_EngineSwitching(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/pkg/tests/protocol_startup_test.go b/pkg/tests/protocol_startup_test.go index 361cc3e1f..ffa701726 100644 --- a/pkg/tests/protocol_startup_test.go +++ b/pkg/tests/protocol_startup_test.go @@ -66,7 +66,7 @@ func Test_StartNodeFromSnapshotAndDisk(t *testing.T) { // Verify that nodes have the expected states. genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 43f8810ea..257397ebe 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20230906114834-b50190b9f9c2 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d + github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 08959c5c6..0f7b28de1 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -199,6 +199,8 @@ github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2 h1:ex github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 h1:sGYy/hf5yz2/goNpZ02h+K46K+agu7QAK112mK7oZmo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= From d0e9184e6fa650c23958e15bd09a6b91b3fa3255 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 20 Sep 2023 16:39:00 +0800 Subject: [PATCH 2/8] Rename PrevID() to PreviousCommitmentID() --- components/dashboard/jsonresponse.go | 2 +- pkg/model/commitment.go | 2 +- pkg/protocol/chainmanager/manager.go | 14 +++++++------- pkg/protocol/chainmanager/testframework.go | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/dashboard/jsonresponse.go b/components/dashboard/jsonresponse.go index 08b0a1833..502ae6ffd 100644 --- a/components/dashboard/jsonresponse.go +++ b/components/dashboard/jsonresponse.go @@ -292,7 +292,7 @@ func NewSlotDetails(commitment *model.Commitment, diffs *utxoledger.SlotDiff) *S return &SlotDetailsResponse{ Index: uint64(commitment.Index()), - PrevID: commitment.PrevID().ToHex(), + PrevID: commitment.PreviousCommitmentID().ToHex(), RootsID: commitment.RootsID().ToHex(), CumulativeWeight: commitment.CumulativeWeight(), CreatedOutputs: createdOutputs, diff --git a/pkg/model/commitment.go b/pkg/model/commitment.go index 6b5830f02..00d0b54c1 100644 --- a/pkg/model/commitment.go +++ b/pkg/model/commitment.go @@ -83,7 +83,7 @@ func (c *Commitment) Index() iotago.SlotIndex { return c.Commitment().Index } -func (c *Commitment) PrevID() iotago.CommitmentID { +func (c *Commitment) PreviousCommitmentID() iotago.CommitmentID { return c.Commitment().PreviousCommitmentID } diff --git a/pkg/protocol/chainmanager/manager.go b/pkg/protocol/chainmanager/manager.go index c7916766a..257817962 100644 --- a/pkg/protocol/chainmanager/manager.go +++ b/pkg/protocol/chainmanager/manager.go @@ -200,7 +200,7 @@ func (m *Manager) Commitments(id iotago.CommitmentID, amount int) (commitments [ commitments[i] = currentCommitment - id = currentCommitment.Commitment().PrevID() + id = currentCommitment.Commitment().PreviousCommitmentID() } return @@ -237,8 +237,8 @@ func (m *Manager) SwitchMainChain(head iotago.CommitmentID) error { func (m *Manager) processCommitment(commitment *model.Commitment) (wasForked bool, isSolid bool, chainCommitment *ChainCommitment) { // Lock access to the parent commitment. We need to lock this first as we are trying to update children later within this function. // Failure to do so, leads to a deadlock, where a child is locked and tries to lock its parent, which is locked by the parent which tries to lock the child. - m.commitmentEntityMutex.Lock(commitment.PrevID()) - defer m.commitmentEntityMutex.Unlock(commitment.PrevID()) + m.commitmentEntityMutex.Lock(commitment.PreviousCommitmentID()) + defer m.commitmentEntityMutex.Unlock(commitment.PreviousCommitmentID()) // Lock access to the chainCommitment so no children are added while we are propagating solidity m.commitmentEntityMutex.Lock(commitment.ID()) @@ -356,7 +356,7 @@ func (m *Manager) forkingPointAgainstMainChain(commitment *ChainCommitment) (*Ch for chain := commitment.Chain(); chain != m.rootCommitment.Chain(); chain = commitment.Chain() { forkingCommitment = chain.ForkingPoint - if commitment, _ = m.Commitment(forkingCommitment.Commitment().PrevID()); commitment == nil { + if commitment, _ = m.Commitment(forkingCommitment.Commitment().PreviousCommitmentID()); commitment == nil { return nil, ierrors.Wrapf(ErrCommitmentUnknown, "unknown parent of solid commitment %s", forkingCommitment.Commitment().ID()) } } @@ -365,7 +365,7 @@ func (m *Manager) forkingPointAgainstMainChain(commitment *ChainCommitment) (*Ch } func (m *Manager) registerCommitment(commitment *model.Commitment) (isNew bool, isSolid bool, wasForked bool, chainCommitment *ChainCommitment) { - parentCommitment, commitmentCreated := m.getOrCreateCommitment(commitment.PrevID()) + parentCommitment, commitmentCreated := m.getOrCreateCommitment(commitment.PreviousCommitmentID()) if commitmentCreated { m.commitmentRequester.StartTicker(parentCommitment.ID()) } @@ -398,7 +398,7 @@ func (m *Manager) switchMainChainToCommitment(commitment *ChainCommitment) error return nil } - parentCommitment, _ := m.Commitment(forkingPoint.Commitment().PrevID()) + parentCommitment, _ := m.Commitment(forkingPoint.Commitment().PreviousCommitmentID()) if parentCommitment == nil { return ierrors.Wrapf(ErrCommitmentUnknown, "unknown parent of solid commitment %s", forkingPoint.ID()) } @@ -408,7 +408,7 @@ func (m *Manager) switchMainChainToCommitment(commitment *ChainCommitment) error // For each forking point coming out of the main chain we need to reorg the children for fp := commitment.Chain().ForkingPoint; ; { - fpParent, _ := m.Commitment(fp.Commitment().PrevID()) + fpParent, _ := m.Commitment(fp.Commitment().PreviousCommitmentID()) mainChild := fpParent.mainChild() newChildChain := NewChain(mainChild) diff --git a/pkg/protocol/chainmanager/testframework.go b/pkg/protocol/chainmanager/testframework.go index 576a30f36..611ceb4a6 100644 --- a/pkg/protocol/chainmanager/testframework.go +++ b/pkg/protocol/chainmanager/testframework.go @@ -142,7 +142,7 @@ func (t *TestFramework) SlotCommitmentRoot(alias string) iotago.Identifier { } func (t *TestFramework) PrevSlotCommitment(alias string) iotago.CommitmentID { - return t.commitment(alias).PrevID() + return t.commitment(alias).PreviousCommitmentID() } func (t *TestFramework) AssertChainIsAlias(chain *Chain, alias string) { From c7924272048542234cc9af7bcd18222388a4de89 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 20 Sep 2023 17:09:38 +0800 Subject: [PATCH 3/8] Rename RMC to ReferenceManaCost in test --- pkg/tests/protocol_engine_rollback_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/tests/protocol_engine_rollback_test.go b/pkg/tests/protocol_engine_rollback_test.go index 940de5d6c..9bfba78f7 100644 --- a/pkg/tests/protocol_engine_rollback_test.go +++ b/pkg/tests/protocol_engine_rollback_test.go @@ -109,7 +109,7 @@ func TestProtocol_EngineRollbackFinalization(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), @@ -293,7 +293,7 @@ func TestProtocol_EngineRollbackNoFinalization(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), @@ -484,7 +484,7 @@ func TestProtocol_EngineRollbackNoFinalizationLastSlot(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), @@ -675,7 +675,7 @@ func TestProtocol_EngineRollbackNoFinalizationBeforePointOfNoReturn(t *testing.T { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.RMC = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), From 5789a055ac057014e41418e447c4a2a6dd09067a Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 20 Sep 2023 18:42:37 +0800 Subject: [PATCH 4/8] Update iota.go version --- go.mod | 4 ++-- go.sum | 8 ++++---- tools/evil-spammer/go.mod | 3 ++- tools/evil-spammer/go.sum | 10 ++++++---- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 55a324319..a11b94d81 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b - github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 + github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 @@ -32,6 +32,7 @@ require ( github.com/multiformats/go-multiaddr v0.11.0 github.com/multiformats/go-varint v0.0.7 github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e + github.com/otiai10/copy v1.12.0 github.com/prometheus/client_golang v1.16.0 github.com/stretchr/testify v1.8.4 github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 @@ -134,7 +135,6 @@ require ( github.com/multiformats/go-multistream v0.4.1 // indirect github.com/onsi/ginkgo/v2 v2.12.0 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect - github.com/otiai10/copy v1.12.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect diff --git a/go.sum b/go.sum index e00007c0e..f4db22f82 100644 --- a/go.sum +++ b/go.sum @@ -307,10 +307,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 h1:BkDuQ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14/go.mod h1:ADBXzdHXTldP0NB2Vf+KbhDxkYciGRjzQVXT6Rdne1g= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b h1:EPB/+iWeSx/WgJlzaXl8yjinxuD8CCOdi2ZPMLeeMVY= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 h1:sGYy/hf5yz2/goNpZ02h+K46K+agu7QAK112mK7oZmo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab h1:E6xbobU2W6igw1JpzPad4DaFXpcYGHfO+wUzZ5R8AOw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= @@ -513,6 +511,8 @@ github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGd github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 257397ebe..84fc521e4 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20230906114834-b50190b9f9c2 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 + github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) @@ -64,6 +64,7 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 0f7b28de1..17379a2db 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -197,10 +197,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912111751-d84fba0 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912111751-d84fba02bb7c/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2 h1:exATYMLT/d8fgMuVNO6kMDsFn9DUJEcyCuoBv9sP13g= github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3 h1:sGYy/hf5yz2/goNpZ02h+K46K+agu7QAK112mK7oZmo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920040621-23911fecbdd3/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab h1:E6xbobU2W6igw1JpzPad4DaFXpcYGHfO+wUzZ5R8AOw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -299,6 +297,10 @@ github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnu github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= +github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= From 802bdd028de3711fe534762b2755375c6afe728d Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 20 Sep 2023 18:57:20 +0800 Subject: [PATCH 5/8] Update iota.go version in genesis-snapshot --- tools/genesis-snapshot/go.mod | 3 ++- tools/genesis-snapshot/go.sum | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 8927fb9b5..139fae356 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-20230906114834-b50190b9f9c2 github.com/iotaledger/hive.go/runtime v0.0.0-20230906114834-b50190b9f9c2 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d + github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.13.0 @@ -47,6 +47,7 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index eab46e060..7bf3ad2c1 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -50,8 +50,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912111751-d84fba0 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912111751-d84fba02bb7c/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2 h1:exATYMLT/d8fgMuVNO6kMDsFn9DUJEcyCuoBv9sP13g= github.com/iotaledger/hive.go/stringify v0.0.0-20230906114834-b50190b9f9c2/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab h1:E6xbobU2W6igw1JpzPad4DaFXpcYGHfO+wUzZ5R8AOw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= 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= @@ -84,6 +84,10 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= +github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c/go.mod h1:1iCZ0433JJMecYqCa+TdWA9Pax8MGl4ByuNDZ7eSnQY= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= From e3d931ae69554b1e2ec95859b20a7dd353e380a2 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Thu, 21 Sep 2023 16:35:45 +0800 Subject: [PATCH 6/8] Update iota.go version --- go.mod | 2 +- go.sum | 4 ++-- tools/evil-spammer/go.mod | 2 +- tools/evil-spammer/go.sum | 4 ++-- tools/gendoc/go.mod | 2 +- tools/gendoc/go.sum | 4 ++-- tools/genesis-snapshot/go.mod | 2 +- tools/genesis-snapshot/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index e0e017db7..ff7cd689a 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 - github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d + github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index d7f01db96..fdf4892a3 100644 --- a/go.sum +++ b/go.sum @@ -307,8 +307,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 h1:7GuYO github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5/go.mod h1:luLlwdZT26MqUWBbiEOYxBwYLVrfz+65D+Tme84+Slw= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 h1:BJb6+fF7zTyrbKQY3JG1Hiw6klONR4anwCFOcNdWu9o= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 5b9d75bd5..1a2731d33 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab + github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index fff3a432c..fa0ab13a0 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -195,8 +195,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab h1:E6xbobU2W6igw1JpzPad4DaFXpcYGHfO+wUzZ5R8AOw= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 12223a44d..cdb15bd84 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-20230912172434-dc477e1f5140 // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index f95aa4aad..ffdd416f1 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.20230919065227-618931c246c5 h1:7GuYO github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5/go.mod h1:luLlwdZT26MqUWBbiEOYxBwYLVrfz+65D+Tme84+Slw= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 h1:BJb6+fF7zTyrbKQY3JG1Hiw6klONR4anwCFOcNdWu9o= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 6cfc8fe59..edad655cf 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-20230912172434-dc477e1f5140 github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab + github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.13.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 5fab09e1f..9e8c0d172 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -50,8 +50,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab h1:E6xbobU2W6igw1JpzPad4DaFXpcYGHfO+wUzZ5R8AOw= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920095758-5948ce9e79ab/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= 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 48000a77e34600e98fae6e754e2f20f455eef421 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:05:32 +0200 Subject: [PATCH 7/8] upgrade iota.go and fix errors upgraded to latest iota.go and fixed some errors with Attestations --- go.mod | 2 +- go.sum | 4 +-- pkg/model/block.go | 3 +- pkg/model/commitment.go | 5 ++- pkg/network/protocols/core/protocol.go | 16 ++------- pkg/protocol/commitment_verifier.go | 11 ++---- .../engine/accounts/accountsledger/manager.go | 5 ++- .../accounts/accountsledger/testsuite_test.go | 2 +- pkg/protocol/engine/accounts/mana/manager.go | 5 ++- .../attestation/slotattestation/manager.go | 5 ++- .../attestation/slotattestation/storage.go | 13 ++----- .../slotattestation/testframework_test.go | 34 ++++++++----------- .../blockdag/inmemoryblockdag/blockdag.go | 5 ++- pkg/protocol/engine/blocks/blocks.go | 5 ++- .../engine/booker/inmemorybooker/booker.go | 5 ++- .../accountsfilter/commitmentfilter.go | 5 ++- .../accountsfilter/commitmentfilter_test.go | 4 +-- .../engine/congestioncontrol/rmc/rmc.go | 9 +++-- .../scheduler/drr/scheduler.go | 5 ++- .../engine/filter/blockfilter/filter.go | 5 ++- .../engine/filter/blockfilter/filter_test.go | 4 +-- pkg/protocol/engine/ledger/ledger/ledger.go | 5 ++- pkg/protocol/engine/mempool/v1/mempool.go | 5 ++- .../notarization/slotnotarization/manager.go | 3 +- .../orchestrator.go | 5 ++- pkg/protocol/engine/utxoledger/manager.go | 5 ++- pkg/protocol/engine/utxoledger/output.go | 7 ++-- pkg/protocol/engine/utxoledger/snapshot.go | 7 ++-- pkg/protocol/protocol.go | 3 +- .../performance/performance.go | 5 ++- .../sybilprotectionv1/sybilprotection.go | 3 +- pkg/storage/permanent/commitments.go | 5 ++- pkg/storage/prunable/prunable.go | 7 ++-- pkg/storage/testframework_test.go | 3 +- pkg/tests/accounts_test.go | 2 +- pkg/tests/confirmation_state_test.go | 2 +- pkg/tests/protocol_engine_rollback_test.go | 8 ++--- pkg/tests/protocol_engine_switching_test.go | 2 +- pkg/tests/protocol_startup_test.go | 2 +- pkg/testsuite/attestations.go | 4 +-- pkg/testsuite/mock/node.go | 5 ++- pkg/testsuite/transactions_framework.go | 3 +- tools/evil-spammer/go.mod | 3 +- tools/evil-spammer/go.sum | 11 +++--- tools/evil-spammer/wallet/connector.go | 3 +- tools/gendoc/go.mod | 3 +- tools/gendoc/go.sum | 11 +++--- tools/genesis-snapshot/go.mod | 3 +- tools/genesis-snapshot/go.sum | 11 +++--- 49 files changed, 113 insertions(+), 175 deletions(-) diff --git a/go.mod b/go.mod index ff7cd689a..fb4f6ef52 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 - github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 + github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 diff --git a/go.sum b/go.sum index fdf4892a3..2e9bd69a4 100644 --- a/go.sum +++ b/go.sum @@ -307,8 +307,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 h1:7GuYO github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5/go.mod h1:luLlwdZT26MqUWBbiEOYxBwYLVrfz+65D+Tme84+Slw= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 h1:BJb6+fF7zTyrbKQY3JG1Hiw6klONR4anwCFOcNdWu9o= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 h1:arct4Q+cCFs6xaUS6lYt8hd1NFT+w1L5qoXGPC5ZYtU= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/pkg/model/block.go b/pkg/model/block.go index a4ab0f88e..e152d26f5 100644 --- a/pkg/model/block.go +++ b/pkg/model/block.go @@ -7,7 +7,6 @@ import ( "github.com/iotaledger/hive.go/ierrors" "github.com/iotaledger/hive.go/serializer/v2/serix" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Block struct { @@ -53,7 +52,7 @@ func BlockFromIDAndBytes(blockID iotago.BlockID, data []byte, api iotago.API, op return newBlock(blockID, protocolBlock, data, api) } -func BlockFromBytes(data []byte, apiProvider api.Provider, opts ...serix.Option) (*Block, error) { +func BlockFromBytes(data []byte, apiProvider iotago.APIProvider, opts ...serix.Option) (*Block, error) { version, _, err := iotago.VersionFromBytes(data) if err != nil { return nil, ierrors.Wrap(err, "failed to determine version") diff --git a/pkg/model/commitment.go b/pkg/model/commitment.go index 00d0b54c1..fb85e1fb4 100644 --- a/pkg/model/commitment.go +++ b/pkg/model/commitment.go @@ -9,7 +9,6 @@ import ( "github.com/iotaledger/hive.go/serializer/v2/serix" "github.com/iotaledger/hive.go/stringify" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Commitment struct { @@ -23,7 +22,7 @@ type Commitment struct { func NewEmptyCommitment(api iotago.API) *Commitment { emptyCommitment := iotago.NewEmptyCommitment(api.ProtocolParameters().Version()) - emptyCommitment.ReferenceManaCost = api.ProtocolParameters().CongestionControlParameters().RMCMin + emptyCommitment.ReferenceManaCost = api.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost return lo.PanicOnErr(CommitmentFromCommitment(emptyCommitment, api)) } @@ -51,7 +50,7 @@ func CommitmentFromCommitment(iotaCommitment *iotago.Commitment, api iotago.API, return newCommitment(commitmentID, iotaCommitment, data, api) } -func CommitmentFromBytes(data []byte, apiProvider api.Provider, opts ...serix.Option) (*Commitment, error) { +func CommitmentFromBytes(data []byte, apiProvider iotago.APIProvider, opts ...serix.Option) (*Commitment, error) { version, _, err := iotago.VersionFromBytes(data) if err != nil { return nil, ierrors.Wrap(err, "failed to determine version") diff --git a/pkg/network/protocols/core/protocol.go b/pkg/network/protocols/core/protocol.go index 3d66683cb..8b38567e4 100644 --- a/pkg/network/protocols/core/protocol.go +++ b/pkg/network/protocols/core/protocol.go @@ -21,14 +21,13 @@ import ( "github.com/iotaledger/iota-core/pkg/network" nwmodels "github.com/iotaledger/iota-core/pkg/network/protocols/core/models" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/merklehasher" ) type Protocol struct { Events *Events - apiProvider api.Provider + apiProvider iotago.APIProvider network network.Endpoint workerPool *workerpool.WorkerPool @@ -38,7 +37,7 @@ type Protocol struct { requestedBlockHashesMutex syncutils.Mutex } -func NewProtocol(network network.Endpoint, workerPool *workerpool.WorkerPool, apiProvider api.Provider, opts ...options.Option[Protocol]) (protocol *Protocol) { +func NewProtocol(network network.Endpoint, workerPool *workerpool.WorkerPool, apiProvider iotago.APIProvider, opts ...options.Option[Protocol]) (protocol *Protocol) { return options.Apply(&Protocol{ Events: NewEvents(), @@ -212,16 +211,7 @@ func (p *Protocol) onAttestations(commitmentBytes []byte, attestationsBytes []by readOffset := 4 attestations := make([]*iotago.Attestation, attestationCount) for i := uint32(0); i < attestationCount; i++ { - version := iotago.Version(attestationsBytes[readOffset]) - apiForVersion, err := p.apiProvider.APIForVersion(version) - if err != nil { - p.Events.Error.Trigger(ierrors.Wrapf(err, "failed to deserialize attestations for commitment %s", cm.ID()), id) - - return - } - - attestation := new(iotago.Attestation) - consumed, err := apiForVersion.Decode(attestationsBytes[readOffset:], attestation, serix.WithValidation()) + attestation, consumed, err := iotago.AttestationFromBytes(p.apiProvider)(attestationsBytes[readOffset:]) if err != nil { p.Events.Error.Trigger(ierrors.Wrap(err, "failed to deserialize attestations"), id) diff --git a/pkg/protocol/commitment_verifier.go b/pkg/protocol/commitment_verifier.go index f0f5ecdcb..d72fd50cc 100644 --- a/pkg/protocol/commitment_verifier.go +++ b/pkg/protocol/commitment_verifier.go @@ -134,13 +134,8 @@ func (c *CommitmentVerifier) verifyAttestations(attestations []*iotago.Attestati return nil, 0, ierrors.Errorf("only ed25519 signatures supported, got %s", att.Signature.Type()) } - api, err := c.engine.APIForVersion(att.ProtocolVersion) - if err != nil { - return nil, 0, ierrors.Wrap(err, "error determining API for attestation") - } - // 2. Verify the signature of the attestation. - if valid, err := att.VerifySignature(api); !valid { + if valid, err := att.VerifySignature(); !valid { if err != nil { return nil, 0, ierrors.Wrap(err, "error validating attestation signature") } @@ -154,7 +149,7 @@ func (c *CommitmentVerifier) verifyAttestations(attestations []*iotago.Attestati } // TODO: this might differ if we have a Accounts with changing weights depending on the SlotIndex/epoch - attestationBlockID, err := att.BlockID(api) + attestationBlockID, err := att.BlockID() if err != nil { return nil, 0, ierrors.Wrap(err, "error calculating blockID from attestation") } @@ -164,7 +159,7 @@ func (c *CommitmentVerifier) verifyAttestations(attestations []*iotago.Attestati visitedIdentities.Add(att.IssuerID) - blockID, err := att.BlockID(api) + blockID, err := att.BlockID() if err != nil { return nil, 0, ierrors.Wrap(err, "error calculating blockID from attestation") } diff --git a/pkg/protocol/engine/accounts/accountsledger/manager.go b/pkg/protocol/engine/accounts/accountsledger/manager.go index 45590c3ff..78d4b223e 100644 --- a/pkg/protocol/engine/accounts/accountsledger/manager.go +++ b/pkg/protocol/engine/accounts/accountsledger/manager.go @@ -18,12 +18,11 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" "github.com/iotaledger/iota-core/pkg/storage/prunable/slotstore" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // Manager is a Block Issuer Credits module responsible for tracking block issuance credit balances. type Manager struct { - apiProvider api.Provider + apiProvider iotago.APIProvider // blockBurns keep tracks of the block issues up to the LatestCommittedSlot. They are used to deduct the burned // amount from the account's credits upon slot commitment. blockBurns *shrinkingmap.ShrinkingMap[iotago.SlotIndex, ds.Set[iotago.BlockID]] @@ -51,7 +50,7 @@ type Manager struct { } func New( - apiProvider api.Provider, + apiProvider iotago.APIProvider, blockFunc func(id iotago.BlockID) (*blocks.Block, bool), slotDiffFunc func(iotago.SlotIndex) (*slotstore.AccountDiffs, error), accountsStore kvstore.KVStore, diff --git a/pkg/protocol/engine/accounts/accountsledger/testsuite_test.go b/pkg/protocol/engine/accounts/accountsledger/testsuite_test.go index 1294ac4f2..d256b09bc 100644 --- a/pkg/protocol/engine/accounts/accountsledger/testsuite_test.go +++ b/pkg/protocol/engine/accounts/accountsledger/testsuite_test.go @@ -26,7 +26,7 @@ import ( type TestSuite struct { T *testing.T - apiProvider api.Provider + apiProvider iotago.APIProvider accounts map[string]iotago.AccountID blockIssuerKeys map[string]iotago.BlockIssuerKey diff --git a/pkg/protocol/engine/accounts/mana/manager.go b/pkg/protocol/engine/accounts/mana/manager.go index ddd83425c..51e9d6066 100644 --- a/pkg/protocol/engine/accounts/mana/manager.go +++ b/pkg/protocol/engine/accounts/mana/manager.go @@ -10,14 +10,13 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/accounts" "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // Manager is used to access stored and potential mana of an account in order. // For stored Mana added to account, or stored/potential Mana spent, we will update on commitment. // For potential Mana updates and decay, we update on demand if the Mana vector is accessed (by the scheduler). type Manager struct { - apiProvider api.Provider + apiProvider iotago.APIProvider manaVectorCache *cache.Cache[iotago.AccountID, *accounts.Mana] @@ -28,7 +27,7 @@ type Manager struct { module.Module } -func NewManager(apiProvider api.Provider, accountOutputResolveFunc func(iotago.AccountID, iotago.SlotIndex) (*utxoledger.Output, error)) *Manager { +func NewManager(apiProvider iotago.APIProvider, accountOutputResolveFunc func(iotago.AccountID, iotago.SlotIndex) (*utxoledger.Output, error)) *Manager { return &Manager{ apiProvider: apiProvider, accountOutputResolveFunc: accountOutputResolveFunc, diff --git a/pkg/protocol/engine/attestation/slotattestation/manager.go b/pkg/protocol/engine/attestation/slotattestation/manager.go index f72592eed..0d2ba7325 100644 --- a/pkg/protocol/engine/attestation/slotattestation/manager.go +++ b/pkg/protocol/engine/attestation/slotattestation/manager.go @@ -12,7 +12,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/attestation" "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) const ( @@ -61,7 +60,7 @@ type Manager struct { commitmentMutex syncutils.RWMutex - apiProvider api.Provider + apiProvider iotago.APIProvider module.Module } @@ -85,7 +84,7 @@ func NewManager( lastCumulativeWeight uint64, bucketedStorage func(index iotago.SlotIndex) (kvstore.KVStore, error), committeeFunc func(index iotago.SlotIndex) *account.SeatedAccounts, - apiProvider api.Provider, + apiProvider iotago.APIProvider, ) *Manager { m := &Manager{ lastCommittedSlot: lastCommittedSlot, diff --git a/pkg/protocol/engine/attestation/slotattestation/storage.go b/pkg/protocol/engine/attestation/slotattestation/storage.go index c6e151ae1..75fc82b07 100644 --- a/pkg/protocol/engine/attestation/slotattestation/storage.go +++ b/pkg/protocol/engine/attestation/slotattestation/storage.go @@ -99,19 +99,10 @@ func (m *Manager) attestationsForSlot(index iotago.SlotIndex) (ads.Map[iotago.Ac return nil, ierrors.Wrapf(err, "failed to get extended realm for attestations of slot %d", index) } - api := m.apiProvider.APIForSlot(index) - return ads.NewMap(attestationsStorage, iotago.Identifier.Bytes, iotago.IdentifierFromBytes, - func(v *iotago.Attestation) ([]byte, error) { - return api.Encode(v) - }, - func(bytes []byte) (object *iotago.Attestation, consumed int, err error) { - attestation := new(iotago.Attestation) - consumed, err = api.Decode(bytes, attestation) - - return attestation, consumed, err - }, + (*iotago.Attestation).Bytes, + iotago.AttestationFromBytes(m.apiProvider), ), nil } diff --git a/pkg/protocol/engine/attestation/slotattestation/testframework_test.go b/pkg/protocol/engine/attestation/slotattestation/testframework_test.go index 8e756c266..41b942640 100644 --- a/pkg/protocol/engine/attestation/slotattestation/testframework_test.go +++ b/pkg/protocol/engine/attestation/slotattestation/testframework_test.go @@ -21,7 +21,6 @@ import ( iotago "github.com/iotaledger/iota.go/v4" "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/builder" - "github.com/iotaledger/iota.go/v4/tpkg" ) type issuer struct { @@ -37,6 +36,8 @@ type TestFramework struct { attestationsByAlias *shrinkingmap.ShrinkingMap[string, *iotago.Attestation] issuerByAlias *shrinkingmap.ShrinkingMap[string, *issuer] + testAPI iotago.API + apiProvider iotago.APIProvider uniqueCounter atomic.Int64 mutex syncutils.RWMutex @@ -67,7 +68,7 @@ func NewTestFramework(test *testing.T) *TestFramework { return accounts.SelectCommittee(members...) } - testAPI := iotago.V3API( + t.testAPI = iotago.V3API( iotago.NewV3ProtocolParameters( iotago.WithNetworkOptions("TestJungle", "tgl"), iotago.WithSupplyOptions(10000, 0, 0, 0, 0, 0, 0), @@ -75,12 +76,14 @@ func NewTestFramework(test *testing.T) *TestFramework { ), ) + t.apiProvider = api.SingleVersionProvider(t.testAPI) + t.Instance = slotattestation.NewManager( 0, 0, bucketedStorage, committeeFunc, - api.SingleVersionProvider(testAPI), + t.apiProvider, ) return t @@ -106,27 +109,27 @@ func (t *TestFramework) AddFutureAttestation(issuerAlias string, attestationAlia defer t.mutex.Unlock() issuer := t.issuer(issuerAlias) - issuingTime := tpkg.TestAPI.TimeProvider().SlotStartTime(blockSlot).Add(time.Duration(t.uniqueCounter.Add(1))).UTC() + issuingTime := t.testAPI.TimeProvider().SlotStartTime(blockSlot).Add(time.Duration(t.uniqueCounter.Add(1))).UTC() - block, err := builder.NewValidationBlockBuilder(tpkg.TestAPI). + block, err := builder.NewValidationBlockBuilder(t.testAPI). IssuingTime(issuingTime). - SlotCommitmentID(iotago.NewCommitment(tpkg.TestAPI.Version(), attestedSlot, iotago.CommitmentID{}, iotago.Identifier{}, 0, 0).MustID()). + SlotCommitmentID(iotago.NewCommitment(t.testAPI.Version(), attestedSlot, iotago.CommitmentID{}, iotago.Identifier{}, 0, 0).MustID()). Sign(issuer.accountID, issuer.priv). Build() require.NoError(t.test, err) - block.MustID(tpkg.TestAPI).RegisterAlias(attestationAlias) - att := iotago.NewAttestation(tpkg.TestAPI, block) + block.MustID(t.testAPI).RegisterAlias(attestationAlias) + att := iotago.NewAttestation(t.testAPI, block) t.attestationsByAlias.Set(attestationAlias, att) - modelBlock, err := model.BlockFromBlock(block, tpkg.TestAPI) + modelBlock, err := model.BlockFromBlock(block, t.testAPI) require.NoError(t.test, err) t.Instance.AddAttestationFromValidationBlock(blocks.NewBlock(modelBlock)) } func (t *TestFramework) blockIDFromAttestation(att *iotago.Attestation) iotago.BlockID { - return lo.PanicOnErr(att.BlockID(tpkg.TestAPI)) + return lo.PanicOnErr(att.BlockID()) } func (t *TestFramework) attestation(alias string) *iotago.Attestation { @@ -148,15 +151,8 @@ func (t *TestFramework) AssertCommit(slot iotago.SlotIndex, expectedCW uint64, e expectedTree := ads.NewMap(mapdb.NewMapDB(), iotago.Identifier.Bytes, iotago.IdentifierFromBytes, - func(attestation *iotago.Attestation) ([]byte, error) { - return tpkg.TestAPI.Encode(attestation) - }, - func(bytes []byte) (*iotago.Attestation, int, error) { - att := new(iotago.Attestation) - n, err := tpkg.TestAPI.Decode(bytes, att) - - return att, n, err - }, + (*iotago.Attestation).Bytes, + iotago.AttestationFromBytes(t.apiProvider), ) expectedAttestations := make([]*iotago.Attestation, 0) for issuerAlias, attestationAlias := range expectedAttestationsAliases { diff --git a/pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go b/pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go index b7a03afe9..9def2d5a7 100644 --- a/pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go +++ b/pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go @@ -15,7 +15,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" "github.com/iotaledger/iota-core/pkg/protocol/engine/eviction" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/nodeclient/apimodels" ) @@ -43,7 +42,7 @@ type BlockDAG struct { workerPool *workerpool.WorkerPool errorHandler func(error) - apiProvider api.Provider + apiProvider iotago.APIProvider module.Module } @@ -85,7 +84,7 @@ func NewProvider(opts ...options.Option[BlockDAG]) module.Provider[*engine.Engin } // New is the constructor for the BlockDAG and creates a new BlockDAG instance. -func New(workers *workerpool.Group, apiProvider api.Provider, evictionState *eviction.State, blockCache *blocks.Blocks, errorHandler func(error), opts ...options.Option[BlockDAG]) (newBlockDAG *BlockDAG) { +func New(workers *workerpool.Group, apiProvider iotago.APIProvider, evictionState *eviction.State, blockCache *blocks.Blocks, errorHandler func(error), opts ...options.Option[BlockDAG]) (newBlockDAG *BlockDAG) { return options.Apply(&BlockDAG{ apiProvider: apiProvider, events: blockdag.NewEvents(), diff --git a/pkg/protocol/engine/blocks/blocks.go b/pkg/protocol/engine/blocks/blocks.go index 19ff09adc..c46d016cd 100644 --- a/pkg/protocol/engine/blocks/blocks.go +++ b/pkg/protocol/engine/blocks/blocks.go @@ -7,18 +7,17 @@ import ( "github.com/iotaledger/iota-core/pkg/model" "github.com/iotaledger/iota-core/pkg/protocol/engine/eviction" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Blocks struct { Evict *event.Event1[iotago.SlotIndex] blocks *memstorage.IndexedStorage[iotago.SlotIndex, iotago.BlockID, *Block] evictionState *eviction.State - apiProvider api.Provider + apiProvider iotago.APIProvider evictionMutex syncutils.RWMutex } -func New(evictionState *eviction.State, apiProvider api.Provider) *Blocks { +func New(evictionState *eviction.State, apiProvider iotago.APIProvider) *Blocks { return &Blocks{ Evict: event.New1[iotago.SlotIndex](), blocks: memstorage.NewIndexedStorage[iotago.SlotIndex, iotago.BlockID, *Block](), diff --git a/pkg/protocol/engine/booker/inmemorybooker/booker.go b/pkg/protocol/engine/booker/inmemorybooker/booker.go index 5028e20fe..26f4e3081 100644 --- a/pkg/protocol/engine/booker/inmemorybooker/booker.go +++ b/pkg/protocol/engine/booker/inmemorybooker/booker.go @@ -15,7 +15,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/nodeclient/apimodels" ) @@ -35,7 +34,7 @@ type Booker struct { retainBlockFailure func(id iotago.BlockID, reason apimodels.BlockFailureReason) errorHandler func(error) - apiProvider api.Provider + apiProvider iotago.APIProvider module.Module } @@ -72,7 +71,7 @@ func NewProvider(opts ...options.Option[Booker]) module.Provider[*engine.Engine, }) } -func New(workers *workerpool.Group, apiProvider api.Provider, blockCache *blocks.Blocks, errorHandler func(error), opts ...options.Option[Booker]) *Booker { +func New(workers *workerpool.Group, apiProvider iotago.APIProvider, blockCache *blocks.Blocks, errorHandler func(error), opts ...options.Option[Booker]) *Booker { return options.Apply(&Booker{ events: booker.NewEvents(), apiProvider: apiProvider, diff --git a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go index 8c00824e6..7df9323a8 100644 --- a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go +++ b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter.go @@ -12,7 +12,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" "github.com/iotaledger/iota-core/pkg/protocol/engine/commitmentfilter" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) var ( @@ -25,7 +24,7 @@ type CommitmentFilter struct { // Events contains the Events of the CommitmentFilter events *commitmentfilter.Events - apiProvider api.Provider + apiProvider iotago.APIProvider // commitmentFunc is a function that returns the commitment corresponding to the given slot index. commitmentFunc func(iotago.SlotIndex) (*model.Commitment, error) @@ -59,7 +58,7 @@ func NewProvider(opts ...options.Option[CommitmentFilter]) module.Provider[*engi }) } -func New(apiProvider api.Provider, opts ...options.Option[CommitmentFilter]) *CommitmentFilter { +func New(apiProvider iotago.APIProvider, opts ...options.Option[CommitmentFilter]) *CommitmentFilter { return options.Apply(&CommitmentFilter{ apiProvider: apiProvider, events: commitmentfilter.NewEvents(), diff --git a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go index 6f2df5ec7..3e6d2e3a2 100644 --- a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go +++ b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go @@ -27,10 +27,10 @@ type TestFramework struct { accountData map[iotago.AccountID]*accounts.AccountData rmcData map[iotago.SlotIndex]iotago.Mana - apiProvider api.Provider + apiProvider iotago.APIProvider } -func NewTestFramework(t *testing.T, apiProvider api.Provider, optsFilter ...options.Option[CommitmentFilter]) *TestFramework { +func NewTestFramework(t *testing.T, apiProvider iotago.APIProvider, optsFilter ...options.Option[CommitmentFilter]) *TestFramework { tf := &TestFramework{ Test: t, apiProvider: apiProvider, diff --git a/pkg/protocol/engine/congestioncontrol/rmc/rmc.go b/pkg/protocol/engine/congestioncontrol/rmc/rmc.go index 6c963f59f..3eeb4f8d6 100644 --- a/pkg/protocol/engine/congestioncontrol/rmc/rmc.go +++ b/pkg/protocol/engine/congestioncontrol/rmc/rmc.go @@ -9,11 +9,10 @@ import ( "github.com/iotaledger/iota-core/pkg/model" "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Manager struct { - apiProvider api.Provider + apiProvider iotago.APIProvider // accumulated work from accepted blocks per slot slotWork *shrinkingmap.ShrinkingMap[iotago.SlotIndex, iotago.WorkScore] @@ -30,7 +29,7 @@ type Manager struct { mutex syncutils.RWMutex } -func NewManager(apiProvider api.Provider, commitmentLoader func(iotago.SlotIndex) (*model.Commitment, error)) *Manager { +func NewManager(apiProvider iotago.APIProvider, commitmentLoader func(iotago.SlotIndex) (*model.Commitment, error)) *Manager { return &Manager{ apiProvider: apiProvider, slotWork: shrinkingmap.New[iotago.SlotIndex, iotago.WorkScore](), @@ -85,10 +84,10 @@ func (m *Manager) CommitSlot(index iotago.SlotIndex) (iotago.Mana, error) { // calculate the new RMC var newRMC iotago.Mana ccParameters := m.apiProvider.APIForSlot(index).ProtocolParameters().CongestionControlParameters() - if currentSlotWork < ccParameters.DecreaseThreshold && lastRMC > ccParameters.RMCMin { + if currentSlotWork < ccParameters.DecreaseThreshold && lastRMC > ccParameters.MinReferenceManaCost { newRMC, err = safemath.SafeSub(lastRMC, ccParameters.Decrease) if err == nil { - newRMC = lo.Max(newRMC, ccParameters.RMCMin) + newRMC = lo.Max(newRMC, ccParameters.MinReferenceManaCost) } } else if currentSlotWork > ccParameters.IncreaseThreshold { newRMC, err = safemath.SafeAdd(lastRMC, ccParameters.Increase) diff --git a/pkg/protocol/engine/congestioncontrol/scheduler/drr/scheduler.go b/pkg/protocol/engine/congestioncontrol/scheduler/drr/scheduler.go index bc698b39e..d72ba2592 100644 --- a/pkg/protocol/engine/congestioncontrol/scheduler/drr/scheduler.go +++ b/pkg/protocol/engine/congestioncontrol/scheduler/drr/scheduler.go @@ -17,7 +17,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/congestioncontrol/scheduler" "github.com/iotaledger/iota-core/pkg/protocol/sybilprotection/seatmanager" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Deficit int64 @@ -31,7 +30,7 @@ type Scheduler struct { latestCommittedSlot func() iotago.SlotIndex - apiProvider api.Provider + apiProvider iotago.APIProvider seatManager seatmanager.SeatManager @@ -123,7 +122,7 @@ func NewProvider(opts ...options.Option[Scheduler]) module.Provider[*engine.Engi }) } -func New(apiProvider api.Provider, opts ...options.Option[Scheduler]) *Scheduler { +func New(apiProvider iotago.APIProvider, opts ...options.Option[Scheduler]) *Scheduler { return options.Apply( &Scheduler{ events: scheduler.NewEvents(), diff --git a/pkg/protocol/engine/filter/blockfilter/filter.go b/pkg/protocol/engine/filter/blockfilter/filter.go index 1e99a7da1..cb1cfa896 100644 --- a/pkg/protocol/engine/filter/blockfilter/filter.go +++ b/pkg/protocol/engine/filter/blockfilter/filter.go @@ -13,7 +13,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine" "github.com/iotaledger/iota-core/pkg/protocol/engine/filter" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) var ErrBlockTimeTooFarAheadInFuture = ierrors.New("a block cannot be too far ahead in the future") @@ -23,7 +22,7 @@ var ErrValidatorNotInCommittee = ierrors.New("validation block issuer is not in type Filter struct { events *filter.Events - apiProvider api.Provider + apiProvider iotago.APIProvider optsMaxAllowedWallClockDrift time.Duration @@ -52,7 +51,7 @@ func NewProvider(opts ...options.Option[Filter]) module.Provider[*engine.Engine, var _ filter.Filter = new(Filter) // New creates a new Filter. -func New(apiProvider api.Provider, opts ...options.Option[Filter]) *Filter { +func New(apiProvider iotago.APIProvider, opts ...options.Option[Filter]) *Filter { return options.Apply(&Filter{ events: filter.NewEvents(), apiProvider: apiProvider, diff --git a/pkg/protocol/engine/filter/blockfilter/filter_test.go b/pkg/protocol/engine/filter/blockfilter/filter_test.go index 18ba4e9b1..6f9eb3fb3 100644 --- a/pkg/protocol/engine/filter/blockfilter/filter_test.go +++ b/pkg/protocol/engine/filter/blockfilter/filter_test.go @@ -22,10 +22,10 @@ type TestFramework struct { Test *testing.T Filter *Filter - apiProvider api.Provider + apiProvider iotago.APIProvider } -func NewTestFramework(t *testing.T, apiProvider api.Provider, optsFilter ...options.Option[Filter]) *TestFramework { +func NewTestFramework(t *testing.T, apiProvider iotago.APIProvider, optsFilter ...options.Option[Filter]) *TestFramework { tf := &TestFramework{ Test: t, apiProvider: apiProvider, diff --git a/pkg/protocol/engine/ledger/ledger/ledger.go b/pkg/protocol/engine/ledger/ledger/ledger.go index 46b80fe49..8ad26da8d 100644 --- a/pkg/protocol/engine/ledger/ledger/ledger.go +++ b/pkg/protocol/engine/ledger/ledger/ledger.go @@ -28,13 +28,12 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/sybilprotection" "github.com/iotaledger/iota-core/pkg/storage/prunable/slotstore" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Ledger struct { events *ledger.Events - apiProvider api.Provider + apiProvider iotago.APIProvider utxoLedger *utxoledger.Manager accountsLedger *accountsledger.Manager @@ -98,7 +97,7 @@ func New( commitmentLoader func(iotago.SlotIndex) (*model.Commitment, error), blocksFunc func(id iotago.BlockID) (*blocks.Block, bool), slotDiffFunc func(iotago.SlotIndex) (*slotstore.AccountDiffs, error), - apiProvider api.Provider, + apiProvider iotago.APIProvider, sybilProtection sybilprotection.SybilProtection, errorHandler func(error), ) *Ledger { diff --git a/pkg/protocol/engine/mempool/v1/mempool.go b/pkg/protocol/engine/mempool/v1/mempool.go index 64c8ef36f..bf3075f51 100644 --- a/pkg/protocol/engine/mempool/v1/mempool.go +++ b/pkg/protocol/engine/mempool/v1/mempool.go @@ -17,7 +17,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool" "github.com/iotaledger/iota-core/pkg/protocol/engine/mempool/conflictdag" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // MemPool is a component that manages the state of transactions that are not yet included in the ledger state. @@ -58,11 +57,11 @@ type MemPool[VoteRank conflictdag.VoteRankType[VoteRank]] struct { optForkAllTransactions bool - apiProvider api.Provider + apiProvider iotago.APIProvider } // New is the constructor of the MemPool. -func New[VoteRank conflictdag.VoteRankType[VoteRank]](vm mempool.VM, inputResolver mempool.StateReferenceResolver, workers *workerpool.Group, conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, iotago.OutputID, VoteRank], apiProvider api.Provider, errorHandler func(error), opts ...options.Option[MemPool[VoteRank]]) *MemPool[VoteRank] { +func New[VoteRank conflictdag.VoteRankType[VoteRank]](vm mempool.VM, inputResolver mempool.StateReferenceResolver, workers *workerpool.Group, conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, iotago.OutputID, VoteRank], apiProvider iotago.APIProvider, errorHandler func(error), opts ...options.Option[MemPool[VoteRank]]) *MemPool[VoteRank] { return options.Apply(&MemPool[VoteRank]{ transactionAttached: event.New1[mempool.TransactionMetadata](), executeStateTransition: vm, diff --git a/pkg/protocol/engine/notarization/slotnotarization/manager.go b/pkg/protocol/engine/notarization/slotnotarization/manager.go index bb25ecc0c..848eb0819 100644 --- a/pkg/protocol/engine/notarization/slotnotarization/manager.go +++ b/pkg/protocol/engine/notarization/slotnotarization/manager.go @@ -18,7 +18,6 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/sybilprotection" "github.com/iotaledger/iota-core/pkg/storage" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // Manager is the component that manages the slot commitments. @@ -38,7 +37,7 @@ type Manager struct { acceptedTimeFunc func() time.Time minCommittableAge iotago.SlotIndex - apiProvider api.Provider + apiProvider iotago.APIProvider module.Module } diff --git a/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go b/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go index 01b6a295f..a3dd1aa67 100644 --- a/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go +++ b/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go @@ -18,7 +18,6 @@ import ( "github.com/iotaledger/iota-core/pkg/storage/prunable/slotstore" "github.com/iotaledger/iota-core/pkg/votes" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // Orchestrator is a component that is in charge of protocol upgrades by signaling the upgrade, gathering @@ -65,7 +64,7 @@ type Orchestrator struct { protocolParametersAndVersionsHashFunc func() (iotago.Identifier, error) epochForVersionFunc func(iotago.Version) (iotago.EpochIndex, bool) - apiProvider api.Provider + apiProvider iotago.APIProvider seatManager seatmanager.SeatManager optsProtocolParameters []iotago.ProtocolParameters @@ -113,7 +112,7 @@ func NewProvider(opts ...options.Option[Orchestrator]) module.Provider[*engine.E func NewOrchestrator(errorHandler func(error), decidedUpgradeSignals *epochstore.Store[model.VersionAndHash], upgradeSignalsFunc func(slot iotago.SlotIndex) (*slotstore.Store[account.SeatIndex, *model.SignaledBlock], error), - apiProvider api.Provider, + apiProvider iotago.APIProvider, setProtocolParametersEpochMappingFunc func(iotago.Version, iotago.Identifier, iotago.EpochIndex) error, protocolParametersAndVersionsHashFunc func() (iotago.Identifier, error), epochForVersionFunc func(iotago.Version) (iotago.EpochIndex, bool), diff --git a/pkg/protocol/engine/utxoledger/manager.go b/pkg/protocol/engine/utxoledger/manager.go index c4673c998..a16828f55 100644 --- a/pkg/protocol/engine/utxoledger/manager.go +++ b/pkg/protocol/engine/utxoledger/manager.go @@ -10,7 +10,6 @@ import ( "github.com/iotaledger/hive.go/lo" "github.com/iotaledger/hive.go/runtime/syncutils" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // ErrOutputsSumNotEqualTotalSupply is returned if the sum of the output base token amounts is not equal the total supply of tokens. @@ -22,10 +21,10 @@ type Manager struct { stateTree ads.Map[iotago.OutputID, *stateTreeMetadata] - apiProvider api.Provider + apiProvider iotago.APIProvider } -func New(store kvstore.KVStore, apiProvider api.Provider) *Manager { +func New(store kvstore.KVStore, apiProvider iotago.APIProvider) *Manager { return &Manager{ store: store, stateTree: ads.NewMap(lo.PanicOnErr(store.WithExtendedRealm(kvstore.Realm{StoreKeyPrefixStateTree})), diff --git a/pkg/protocol/engine/utxoledger/output.go b/pkg/protocol/engine/utxoledger/output.go index 46c22f77c..c9f979443 100644 --- a/pkg/protocol/engine/utxoledger/output.go +++ b/pkg/protocol/engine/utxoledger/output.go @@ -10,7 +10,6 @@ import ( "github.com/iotaledger/hive.go/serializer/v2" "github.com/iotaledger/hive.go/serializer/v2/marshalutil" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // LexicalOrderedOutputs are outputs ordered in lexical order by their outputID. @@ -29,7 +28,7 @@ func (l LexicalOrderedOutputs) Swap(i, j int) { } type Output struct { - apiProvider api.Provider + apiProvider iotago.APIProvider outputID iotago.OutputID blockID iotago.BlockID @@ -114,7 +113,7 @@ func (o Outputs) ToOutputSet() iotago.OutputSet { return outputSet } -func CreateOutput(apiProvider api.Provider, outputID iotago.OutputID, blockID iotago.BlockID, slotIndexBooked iotago.SlotIndex, slotCreated iotago.SlotIndex, output iotago.Output, outputBytes ...[]byte) *Output { +func CreateOutput(apiProvider iotago.APIProvider, outputID iotago.OutputID, blockID iotago.BlockID, slotIndexBooked iotago.SlotIndex, slotCreated iotago.SlotIndex, output iotago.Output, outputBytes ...[]byte) *Output { var encodedOutput []byte if len(outputBytes) == 0 { var err error @@ -142,7 +141,7 @@ func CreateOutput(apiProvider api.Provider, outputID iotago.OutputID, blockID io return o } -func NewOutput(apiProvider api.Provider, blockID iotago.BlockID, slotIndexBooked iotago.SlotIndex, slotCreated iotago.SlotIndex, transaction *iotago.Transaction, index uint16) (*Output, error) { +func NewOutput(apiProvider iotago.APIProvider, blockID iotago.BlockID, slotIndexBooked iotago.SlotIndex, slotCreated iotago.SlotIndex, transaction *iotago.Transaction, index uint16) (*Output, error) { txID, err := transaction.ID(apiProvider.APIForSlot(blockID.Index())) if err != nil { return nil, err diff --git a/pkg/protocol/engine/utxoledger/snapshot.go b/pkg/protocol/engine/utxoledger/snapshot.go index 02e0ab24f..b4283436b 100644 --- a/pkg/protocol/engine/utxoledger/snapshot.go +++ b/pkg/protocol/engine/utxoledger/snapshot.go @@ -9,7 +9,6 @@ import ( "github.com/iotaledger/hive.go/serializer/v2/serix" "github.com/iotaledger/iota-core/pkg/utils" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) // Helpers to serialize/deserialize into/from snapshots @@ -26,7 +25,7 @@ func (o *Output) SnapshotBytes() []byte { return m.Bytes() } -func OutputFromSnapshotReader(reader io.ReadSeeker, apiProvider api.Provider) (*Output, error) { +func OutputFromSnapshotReader(reader io.ReadSeeker, apiProvider iotago.APIProvider) (*Output, error) { outputID := iotago.OutputID{} if _, err := io.ReadFull(reader, outputID[:]); err != nil { return nil, ierrors.Errorf("unable to read LS output ID: %w", err) @@ -74,7 +73,7 @@ func (s *Spent) SnapshotBytes() []byte { return m.Bytes() } -func SpentFromSnapshotReader(reader io.ReadSeeker, apiProvider api.Provider, indexSpent iotago.SlotIndex) (*Spent, error) { +func SpentFromSnapshotReader(reader io.ReadSeeker, apiProvider iotago.APIProvider, indexSpent iotago.SlotIndex) (*Spent, error) { output, err := OutputFromSnapshotReader(reader, apiProvider) if err != nil { return nil, err @@ -93,7 +92,7 @@ func SpentFromSnapshotReader(reader io.ReadSeeker, apiProvider api.Provider, ind return NewSpent(output, transactionIDSpent, indexSpent), nil } -func ReadSlotDiffToSnapshotReader(reader io.ReadSeeker, apiProvider api.Provider) (*SlotDiff, error) { +func ReadSlotDiffToSnapshotReader(reader io.ReadSeeker, apiProvider iotago.APIProvider) (*SlotDiff, error) { slotDiff := &SlotDiff{} var diffIndex uint64 diff --git a/pkg/protocol/protocol.go b/pkg/protocol/protocol.go index f458cff09..ba88b0501 100644 --- a/pkg/protocol/protocol.go +++ b/pkg/protocol/protocol.go @@ -52,7 +52,6 @@ import ( retainer1 "github.com/iotaledger/iota-core/pkg/retainer/retainer" "github.com/iotaledger/iota-core/pkg/storage" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Protocol struct { @@ -311,4 +310,4 @@ func (p *Protocol) HandleError(err error) { } } -var _ api.Provider = &Protocol{} +var _ iotago.APIProvider = &Protocol{} diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go index 43067c244..47356c566 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go @@ -15,7 +15,6 @@ import ( "github.com/iotaledger/iota-core/pkg/storage/prunable/epochstore" "github.com/iotaledger/iota-core/pkg/storage/prunable/slotstore" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Tracker struct { @@ -26,7 +25,7 @@ type Tracker struct { validatorPerformancesFunc func(slot iotago.SlotIndex) (*slotstore.Store[iotago.AccountID, *model.ValidatorPerformance], error) latestAppliedEpoch iotago.EpochIndex - apiProvider api.Provider + apiProvider iotago.APIProvider errHandler func(error) @@ -40,7 +39,7 @@ func NewTracker( committeeStore *epochstore.Store[*account.Accounts], validatorPerformancesFunc func(slot iotago.SlotIndex) (*slotstore.Store[iotago.AccountID, *model.ValidatorPerformance], error), latestAppliedEpoch iotago.EpochIndex, - apiProvider api.Provider, + apiProvider iotago.APIProvider, errHandler func(error), ) *Tracker { return &Tracker{ diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go index a615fa350..3ffa750ba 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go @@ -21,14 +21,13 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/sybilprotection/seatmanager/poa" "github.com/iotaledger/iota-core/pkg/protocol/sybilprotection/sybilprotectionv1/performance" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/nodeclient/apimodels" ) type SybilProtection struct { events *sybilprotection.Events - apiProvider api.Provider + apiProvider iotago.APIProvider seatManager seatmanager.SeatManager ledger ledger.Ledger // do we need the whole Ledger or just a callback to retrieve account data? diff --git a/pkg/storage/permanent/commitments.go b/pkg/storage/permanent/commitments.go index 49608142e..23a656bdb 100644 --- a/pkg/storage/permanent/commitments.go +++ b/pkg/storage/permanent/commitments.go @@ -9,15 +9,14 @@ import ( "github.com/iotaledger/hive.go/serializer/v2/stream" "github.com/iotaledger/iota-core/pkg/model" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Commitments struct { - apiProvider api.Provider + apiProvider iotago.APIProvider store *kvstore.TypedStore[iotago.SlotIndex, *model.Commitment] } -func NewCommitments(store kvstore.KVStore, apiProvider api.Provider) *Commitments { +func NewCommitments(store kvstore.KVStore, apiProvider iotago.APIProvider) *Commitments { return &Commitments{ apiProvider: apiProvider, store: kvstore.NewTypedStore(store, diff --git a/pkg/storage/prunable/prunable.go b/pkg/storage/prunable/prunable.go index ba234ee16..eeeafa43f 100644 --- a/pkg/storage/prunable/prunable.go +++ b/pkg/storage/prunable/prunable.go @@ -15,11 +15,10 @@ import ( "github.com/iotaledger/iota-core/pkg/storage/prunable/epochstore" "github.com/iotaledger/iota-core/pkg/storage/utils" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" ) type Prunable struct { - apiProvider api.Provider + apiProvider iotago.APIProvider prunableSlotStore *BucketManager errorHandler func(error) @@ -32,7 +31,7 @@ type Prunable struct { committee *epochstore.Store[*account.Accounts] } -func New(dbConfig database.Config, apiProvider api.Provider, errorHandler func(error), opts ...options.Option[BucketManager]) *Prunable { +func New(dbConfig database.Config, apiProvider iotago.APIProvider, errorHandler func(error), opts ...options.Option[BucketManager]) *Prunable { dir := utils.NewDirectory(dbConfig.Directory, true) semiPermanentDBConfig := dbConfig.WithDirectory(dir.PathWithCreate("semipermanent")) semiPermanentDB := database.NewDBInstance(semiPermanentDBConfig) @@ -51,7 +50,7 @@ func New(dbConfig database.Config, apiProvider api.Provider, errorHandler func(e } } -func Clone(source *Prunable, dbConfig database.Config, apiProvider api.Provider, errorHandler func(error), opts ...options.Option[BucketManager]) (*Prunable, error) { +func Clone(source *Prunable, dbConfig database.Config, apiProvider iotago.APIProvider, errorHandler func(error), opts ...options.Option[BucketManager]) (*Prunable, error) { // Lock semi-permanent DB and prunable slot store so that nobody can try to use or open them while cloning. source.semiPermanentDB.Lock() defer source.semiPermanentDB.Unlock() diff --git a/pkg/storage/testframework_test.go b/pkg/storage/testframework_test.go index a7d6c44ea..2bd98acc1 100644 --- a/pkg/storage/testframework_test.go +++ b/pkg/storage/testframework_test.go @@ -20,7 +20,6 @@ import ( "github.com/iotaledger/iota-core/pkg/storage/database" "github.com/iotaledger/iota-core/pkg/storage/prunable/epochstore" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/tpkg" ) @@ -34,7 +33,7 @@ const ( type TestFramework struct { t *testing.T Instance *storage.Storage - apiProvider api.Provider + apiProvider iotago.APIProvider baseDir string baseDirPrunable string diff --git a/pkg/tests/accounts_test.go b/pkg/tests/accounts_test.go index c7e848872..911996277 100644 --- a/pkg/tests/accounts_test.go +++ b/pkg/tests/accounts_test.go @@ -92,7 +92,7 @@ func Test_TransitionAccount(t *testing.T) { var slotIndexBlock1 iotago.SlotIndex = 1 activeNodes := []*mock.Node{node1} genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost block1 := ts.IssueBlockAtSlotWithOptions("block1", slotIndexBlock1, genesisCommitment, node1, tx1) diff --git a/pkg/tests/confirmation_state_test.go b/pkg/tests/confirmation_state_test.go index 28d878743..8b2ba7a60 100644 --- a/pkg/tests/confirmation_state_test.go +++ b/pkg/tests/confirmation_state_test.go @@ -88,7 +88,7 @@ func TestConfirmationFlags(t *testing.T) { // Verify that nodes have the expected states. genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/pkg/tests/protocol_engine_rollback_test.go b/pkg/tests/protocol_engine_rollback_test.go index 9bfba78f7..f8b3e9cc0 100644 --- a/pkg/tests/protocol_engine_rollback_test.go +++ b/pkg/tests/protocol_engine_rollback_test.go @@ -109,7 +109,7 @@ func TestProtocol_EngineRollbackFinalization(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), @@ -293,7 +293,7 @@ func TestProtocol_EngineRollbackNoFinalization(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), @@ -484,7 +484,7 @@ func TestProtocol_EngineRollbackNoFinalizationLastSlot(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), @@ -675,7 +675,7 @@ func TestProtocol_EngineRollbackNoFinalizationBeforePointOfNoReturn(t *testing.T { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/pkg/tests/protocol_engine_switching_test.go b/pkg/tests/protocol_engine_switching_test.go index 200fa7fd0..3c8954100 100644 --- a/pkg/tests/protocol_engine_switching_test.go +++ b/pkg/tests/protocol_engine_switching_test.go @@ -135,7 +135,7 @@ func TestProtocol_EngineSwitching(t *testing.T) { { genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/pkg/tests/protocol_startup_test.go b/pkg/tests/protocol_startup_test.go index ffa701726..bccf280cd 100644 --- a/pkg/tests/protocol_startup_test.go +++ b/pkg/tests/protocol_startup_test.go @@ -66,7 +66,7 @@ func Test_StartNodeFromSnapshotAndDisk(t *testing.T) { // Verify that nodes have the expected states. genesisCommitment := iotago.NewEmptyCommitment(ts.API.ProtocolParameters().Version()) - genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().RMCMin + genesisCommitment.ReferenceManaCost = ts.API.ProtocolParameters().CongestionControlParameters().MinReferenceManaCost ts.AssertNodeState(ts.Nodes(), testsuite.WithSnapshotImported(true), testsuite.WithProtocolParameters(ts.API.ProtocolParameters()), diff --git a/pkg/testsuite/attestations.go b/pkg/testsuite/attestations.go index ebbde4fb9..891a2f35b 100644 --- a/pkg/testsuite/attestations.go +++ b/pkg/testsuite/attestations.go @@ -16,7 +16,7 @@ func (t *TestSuite) AssertAttestationsForSlot(slotIndex iotago.SlotIndex, blocks expectedAttestations := make([]iotago.BlockID, len(blocks)) for i, block := range blocks { att := iotago.NewAttestation(t.API, block.ProtocolBlock()) - blockID, err := att.BlockID(t.API) + blockID, err := att.BlockID() require.NoError(t.Testing, err) expectedAttestations[i] = blockID } @@ -30,7 +30,7 @@ func (t *TestSuite) AssertAttestationsForSlot(slotIndex iotago.SlotIndex, blocks storedAttestations := make([]iotago.BlockID, 0) err = attestationTree.Stream(func(key iotago.AccountID, att *iotago.Attestation) error { - blockID, err := att.BlockID(t.API) + blockID, err := att.BlockID() require.NoError(t.Testing, err) storedAttestations = append(storedAttestations, blockID) diff --git a/pkg/testsuite/mock/node.go b/pkg/testsuite/mock/node.go index d5905990d..096406949 100644 --- a/pkg/testsuite/mock/node.go +++ b/pkg/testsuite/mock/node.go @@ -173,7 +173,7 @@ func (n *Node) hookLogging(failOnBlockFiltered bool) { events.Network.AttestationsReceived.Hook(func(commitment *model.Commitment, attestations []*iotago.Attestation, merkleProof *merklehasher.Proof[iotago.Identifier], source peer.ID) { fmt.Printf("%s > Network.AttestationsReceived: from %s %s number of attestations: %d with merkleProof: %s - %s\n", n.Name, source, commitment.ID(), len(attestations), lo.PanicOnErr(json.Marshal(merkleProof)), lo.Map(attestations, func(a *iotago.Attestation) iotago.BlockID { - return lo.PanicOnErr(a.BlockID(lo.PanicOnErr(n.Protocol.APIForVersion(a.ProtocolVersion)))) + return lo.PanicOnErr(a.BlockID()) })) }) @@ -326,9 +326,8 @@ func (n *Node) attachEngineLogs(failOnBlockFiltered bool, instance *engine.Engin attestationBlockIDs := make([]iotago.BlockID, 0) tree, err := instance.Attestations.GetMap(details.Commitment.Index()) if err == nil { - a := instance.APIForSlot(details.Commitment.Index()) err = tree.Stream(func(key iotago.AccountID, value *iotago.Attestation) error { - attestationBlockIDs = append(attestationBlockIDs, lo.PanicOnErr(value.BlockID(a))) + attestationBlockIDs = append(attestationBlockIDs, lo.PanicOnErr(value.BlockID())) return nil }) require.NoError(n.Testing, err) diff --git a/pkg/testsuite/transactions_framework.go b/pkg/testsuite/transactions_framework.go index a306231e7..264b7e69f 100644 --- a/pkg/testsuite/transactions_framework.go +++ b/pkg/testsuite/transactions_framework.go @@ -12,13 +12,12 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/snapshotcreator" "github.com/iotaledger/iota-core/pkg/testsuite/mock" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/builder" "github.com/iotaledger/iota.go/v4/tpkg" ) type TransactionFramework struct { - apiProvider api.Provider + apiProvider iotago.APIProvider wallet *mock.HDWallet states map[string]*utxoledger.Output diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 1a2731d33..003564d3d 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -17,7 +17,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 + github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) @@ -64,7 +64,6 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-varint v0.0.7 // indirect - github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index fa0ab13a0..0267d0241 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -195,8 +195,11 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= +github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920100818-fef1d2f39b5e/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921101118-c208907410a9/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -295,10 +298,6 @@ github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnu github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= -github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= -github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= -github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= -github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= diff --git a/tools/evil-spammer/wallet/connector.go b/tools/evil-spammer/wallet/connector.go index 1ef130fda..1ed3a1706 100644 --- a/tools/evil-spammer/wallet/connector.go +++ b/tools/evil-spammer/wallet/connector.go @@ -8,7 +8,6 @@ import ( "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/iota-core/pkg/model" iotago "github.com/iotaledger/iota.go/v4" - "github.com/iotaledger/iota.go/v4/api" "github.com/iotaledger/iota.go/v4/builder" "github.com/iotaledger/iota.go/v4/nodeclient" "github.com/iotaledger/iota.go/v4/nodeclient/apimodels" @@ -177,7 +176,7 @@ type Client interface { // GetBlockIssuance returns the latest commitment and data needed to create a new block. GetBlockIssuance() (resp *apimodels.IssuanceBlockHeaderResponse, err error) - api.Provider + iotago.APIProvider } // WebClient contains a GoShimmer web API to interact with a node. diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index cdb15bd84..df8408607 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-20230912172434-dc477e1f5140 // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect @@ -128,7 +128,6 @@ require ( github.com/onsi/ginkgo/v2 v2.12.0 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index ffdd416f1..06d8e4f93 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -311,8 +311,11 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 h1:7GuYO github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5/go.mod h1:luLlwdZT26MqUWBbiEOYxBwYLVrfz+65D+Tme84+Slw= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 h1:BJb6+fF7zTyrbKQY3JG1Hiw6klONR4anwCFOcNdWu9o= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= +github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920100818-fef1d2f39b5e/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921101118-c208907410a9/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= @@ -513,10 +516,6 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= -github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= -github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= -github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= -github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index edad655cf..9b36df847 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-20230912172434-dc477e1f5140 github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 + github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.13.0 @@ -47,7 +47,6 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-varint v0.0.7 // indirect - github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 9e8c0d172..e1da61367 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -50,8 +50,11 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2 h1:5DolKQpDO+T+6bSVAeVBjKIQWQtLc7J1nz9PQAlv9fw= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920135033-13b98304eef2/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= +github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230920100818-fef1d2f39b5e/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921101118-c208907410a9/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= 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= @@ -84,10 +87,6 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= -github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= -github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= -github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= -github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c/go.mod h1:1iCZ0433JJMecYqCa+TdWA9Pax8MGl4ByuNDZ7eSnQY= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= From d1b985168918382f0965f047bcb0ab86cb17f5ab Mon Sep 17 00:00:00 2001 From: muXxer Date: Thu, 21 Sep 2023 13:17:49 +0200 Subject: [PATCH 8/8] Update go.mod --- tools/evil-spammer/go.mod | 1 + tools/evil-spammer/go.sum | 9 +++++---- tools/gendoc/go.mod | 1 + tools/gendoc/go.sum | 9 +++++---- tools/genesis-snapshot/go.mod | 1 + tools/genesis-snapshot/go.sum | 9 +++++---- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 003564d3d..8ec19e9fd 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -64,6 +64,7 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 0267d0241..826933505 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -195,10 +195,7 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920100818-fef1d2f39b5e/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230921101118-c208907410a9/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 h1:arct4Q+cCFs6xaUS6lYt8hd1NFT+w1L5qoXGPC5ZYtU= github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= 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= @@ -298,6 +295,10 @@ github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnu github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= +github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index df8408607..c289bf191 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -128,6 +128,7 @@ require ( github.com/onsi/ginkgo/v2 v2.12.0 // indirect github.com/opencontainers/runtime-spec v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 06d8e4f93..322204e16 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -311,10 +311,7 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5 h1:7GuYO github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230919065227-618931c246c5/go.mod h1:luLlwdZT26MqUWBbiEOYxBwYLVrfz+65D+Tme84+Slw= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9 h1:BJb6+fF7zTyrbKQY3JG1Hiw6klONR4anwCFOcNdWu9o= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230918132810-48814818bff9/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920100818-fef1d2f39b5e/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230921101118-c208907410a9/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 h1:arct4Q+cCFs6xaUS6lYt8hd1NFT+w1L5qoXGPC5ZYtU= github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= @@ -516,6 +513,10 @@ github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYr github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= +github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 9b36df847..9ce97cc49 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -47,6 +47,7 @@ require ( github.com/multiformats/go-multicodec v0.9.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/otiai10/copy v1.12.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index e1da61367..5b94ba95f 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -50,10 +50,7 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d h1:p9IchKq6kft758XDlnN/tAEXJMXGlmQPmbdxolba1gs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230913143616-917572c7752d/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230920100818-fef1d2f39b5e/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= -github.com/iotaledger/iota.go/v4 v4.0.0-20230921101118-c208907410a9/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= +github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05 h1:arct4Q+cCFs6xaUS6lYt8hd1NFT+w1L5qoXGPC5ZYtU= github.com/iotaledger/iota.go/v4 v4.0.0-20230921110244-f4f25eb27e05/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= 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= @@ -87,6 +84,10 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e h1:s2RNOM/IGdY0Y6qfTeUKhDawdHDpK9RGBdx80qN4Ttw= github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e/go.mod h1:nBdnFKj15wFbf94Rwfq4m30eAcyY9V/IyKAGQFtqkW0= +github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY= +github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c/go.mod h1:1iCZ0433JJMecYqCa+TdWA9Pax8MGl4ByuNDZ7eSnQY= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=