diff --git a/go.mod b/go.mod index 7d9dd86ea..5ed1609ae 100644 --- a/go.mod +++ b/go.mod @@ -23,9 +23,9 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231020115340-13da292c580b github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023074100-348fe7fe4ec3 - github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231021205014-392b75609cc2 - github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0 + github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd + github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 github.com/labstack/echo/v4 v4.11.2 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.31.0 diff --git a/go.sum b/go.sum index 28e2e9aae..c3565bd8b 100644 --- a/go.sum +++ b/go.sum @@ -305,12 +305,12 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MDZhTZTVDiydXcW5j4TA7HixVCyAdToIMPhHfJee7cE= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023074100-348fe7fe4ec3 h1:7+fCfCWDtt2Ejs0F/hatDh+BUHiiM0a+ZSBWuVRUknQ= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023074100-348fe7fe4ec3/go.mod h1:9MAg2H+eUQZoTAnnYa7wBHtPQS+ahOXsEqYexp2vAYY= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231021205014-392b75609cc2 h1:xC5hFWN5wSGvEFjPWUWdmlj6UuYJOo72T0r0AfbzRUs= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231021205014-392b75609cc2/go.mod h1:8CiEU9nM9q37wtYBnElactUR6RiZ2IGXX7RRtswRuVI= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 h1:Ef2eDsbsIAtcAr4SwGkV3RUkAdyCMbn0rhFSiGHLXIk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0 h1:/8pbFXhTSroJvjJMfJqfHjzoT9N8B4LUY3SbKruD5MM= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0/go.mod h1:My1SB4vZj42EgTDNJ/dgW8lUpLNmvtzu8f89J5y2kP0= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd h1:hh5mAnnaZHOYAi4CIqR9K/mv786ex9AQgpisbJ4ZMow= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 h1:81aWESXFC04iKI9I140eDrBb9zBWXfVoAUMp9berk0c= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI= github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/pkg/protocol/engine/consensus/blockgadget/testframework_test.go b/pkg/protocol/engine/consensus/blockgadget/testframework_test.go index dacce645a..144307109 100644 --- a/pkg/protocol/engine/consensus/blockgadget/testframework_test.go +++ b/pkg/protocol/engine/consensus/blockgadget/testframework_test.go @@ -57,7 +57,7 @@ func NewTestFramework(test *testing.T) *TestFramework { t.Events = instance.Events() t.Instance = instance - genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID, iotago.NewEmptyCommitment(tpkg.TestAPI.Version()).MustID(), time.Unix(tpkg.TestAPI.ProtocolParameters().TimeProvider().GenesisUnixTime(), 0)) + genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID, iotago.NewEmptyCommitment(tpkg.TestAPI.Version()).MustID(), time.Unix(tpkg.TestAPI.TimeProvider().GenesisUnixTime(), 0)) t.blocks.Set("Genesis", genesisBlock) genesisBlock.ID().RegisterAlias("Genesis") evictionState.AddRootBlock(genesisBlock.ID(), genesisBlock.SlotCommitmentID()) diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go index 1f5cb1121..0a2468466 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go @@ -235,7 +235,7 @@ func (t *Tracker) aggregatePerformanceFactors(slotActivityVector []*model.Valida epochPerformanceFactor += uint64(slotPerformanceFactor) } - return epochPerformanceFactor >> uint64(protoParamsForEpoch.TimeProvider().SlotsPerEpochExponent()) + return epochPerformanceFactor >> uint64(protoParamsForEpoch.SlotsPerEpochExponent()) } func (t *Tracker) isCommitteeMember(slot iotago.SlotIndex, accountID iotago.AccountID) (bool, error) { diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go index 9ce7a9f9a..5d9c9ce5d 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go @@ -130,7 +130,7 @@ func (t *TestSuite) ApplyEpochActions(epoch iotago.EpochIndex, actions map[strin t.poolRewards[epoch] = make(map[string]*model.PoolRewards) for alias, action := range actions { - epochPerformanceFactor := action.SlotPerformance * action.ActiveSlotsCount >> t.api.ProtocolParameters().TimeProvider().SlotsPerEpochExponent() + epochPerformanceFactor := action.SlotPerformance * action.ActiveSlotsCount >> t.api.ProtocolParameters().SlotsPerEpochExponent() poolRewards := t.calculatePoolReward(epoch, totalValidatorsStake, totalStake, action.PoolStake, action.ValidatorStake, epochPerformanceFactor) t.poolRewards[epoch][alias] = &model.PoolRewards{ PoolStake: action.PoolStake, @@ -346,7 +346,7 @@ func (e *EpochActions) validate(t *testing.T, api iotago.API) { } require.Equal(t, e.PoolStake, delegatorsTotal+e.ValidatorStake, "pool stake must be equal to the sum of delegators stakes plus validator") - sumOfSlots := 1 << api.ProtocolParameters().TimeProvider().SlotsPerEpochExponent() + sumOfSlots := 1 << api.ProtocolParameters().SlotsPerEpochExponent() require.LessOrEqual(t, e.ActiveSlotsCount, uint64(sumOfSlots), "active slots count must be less or equal to the number of slots in the epoch") require.LessOrEqual(t, e.SlotPerformance, e.ValidationBlocksSentPerSlot, "number of subslots covered cannot be greated than number of blocks sent in a slot") diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index 7ae3ec678..52d99db5c 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -119,7 +119,7 @@ func NewTestSuite(testingT *testing.T, opts ...options.Option[TestSuite]) *TestS t.ProtocolParameterOptions = append(defaultProtocolParameters, t.ProtocolParameterOptions...) t.API = iotago.V3API(iotago.NewV3ProtocolParameters(t.ProtocolParameterOptions...)) - genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID, iotago.NewEmptyCommitment(t.API.ProtocolParameters().Version()).MustID(), time.Unix(t.API.ProtocolParameters().TimeProvider().GenesisUnixTime(), 0)) + genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID, iotago.NewEmptyCommitment(t.API.ProtocolParameters().Version()).MustID(), time.Unix(t.API.ProtocolParameters().GenesisUnixTimestamp(), 0)) t.RegisterBlock("Genesis", genesisBlock) t.snapshotPath = t.Directory.Path("genesis_snapshot.bin") diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 7d819f50b..91ec4b3b6 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -19,7 +19,7 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231020115340-13da292c580b 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-20231023073721-97f39c627159 + github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 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 d94e45509..f66d3f1bb 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -201,8 +201,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MDZhTZTVDiydXcW5j4TA7HixVCyAdToIMPhHfJee7cE= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 h1:Ef2eDsbsIAtcAr4SwGkV3RUkAdyCMbn0rhFSiGHLXIk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 h1:81aWESXFC04iKI9I140eDrBb9zBWXfVoAUMp9berk0c= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= 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 9553c8c9a..65a416839 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -71,9 +71,9 @@ require ( github.com/iotaledger/hive.go/runtime v0.0.0-20231020115340-13da292c580b // indirect github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b // indirect github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b // indirect - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023074100-348fe7fe4ec3 // indirect - github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231021205014-392b75609cc2 // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 // indirect + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0 // indirect + github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 // indirect github.com/ipfs/boxo v0.13.1 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 49227785a..c13517eea 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -309,12 +309,12 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MDZhTZTVDiydXcW5j4TA7HixVCyAdToIMPhHfJee7cE= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023074100-348fe7fe4ec3 h1:7+fCfCWDtt2Ejs0F/hatDh+BUHiiM0a+ZSBWuVRUknQ= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023074100-348fe7fe4ec3/go.mod h1:9MAg2H+eUQZoTAnnYa7wBHtPQS+ahOXsEqYexp2vAYY= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231021205014-392b75609cc2 h1:xC5hFWN5wSGvEFjPWUWdmlj6UuYJOo72T0r0AfbzRUs= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231021205014-392b75609cc2/go.mod h1:8CiEU9nM9q37wtYBnElactUR6RiZ2IGXX7RRtswRuVI= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 h1:Ef2eDsbsIAtcAr4SwGkV3RUkAdyCMbn0rhFSiGHLXIk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0 h1:/8pbFXhTSroJvjJMfJqfHjzoT9N8B4LUY3SbKruD5MM= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0/go.mod h1:My1SB4vZj42EgTDNJ/dgW8lUpLNmvtzu8f89J5y2kP0= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd h1:hh5mAnnaZHOYAi4CIqR9K/mv786ex9AQgpisbJ4ZMow= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 h1:81aWESXFC04iKI9I140eDrBb9zBWXfVoAUMp9berk0c= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI= github.com/ipfs/boxo v0.13.1/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 362c235e6..0743c2ff7 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-20231020115340-13da292c580b github.com/iotaledger/hive.go/runtime v0.0.0-20231020115340-13da292c580b github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 + github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.14.0 diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 287e07d48..f50a589ed 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -52,8 +52,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292 github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MDZhTZTVDiydXcW5j4TA7HixVCyAdToIMPhHfJee7cE= github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159 h1:Ef2eDsbsIAtcAr4SwGkV3RUkAdyCMbn0rhFSiGHLXIk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231023073721-97f39c627159/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 h1:81aWESXFC04iKI9I140eDrBb9zBWXfVoAUMp9berk0c= +github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA= 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=