diff --git a/go.mod b/go.mod index 5f6416868..01e7baae5 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ 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.20231020103531-8702a4719b91 + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231024101555-660b434164ff github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231024101228-5d9abdd08941 github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d github.com/labstack/echo/v4 v4.11.2 diff --git a/go.sum b/go.sum index 1293fb9d3..67ff3a02a 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,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/inx-app v1.0.0-rc.3.0.20231020103531-8702a4719b91 h1:P4g4eoNMW0Esz/SCKzkIby1W1TQ3P3j63RR/Zs9XsYU= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020103531-8702a4719b91/go.mod h1:Pjdgj/uXuyqoUZUmobj8K9ATbdMIOkuNI7L8j4J6ORs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231024101555-660b434164ff h1:cLRjTHMuWaTz1LpEF9KNbsSDaH2OTiIM/FDAcwL3ohU= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231024101555-660b434164ff/go.mod h1:0/7o9/MkkuKNhcEMz6xhPQLupf/OskjGigbmvnJtDL0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231024101228-5d9abdd08941 h1:B0Ht9EijMtHJhbkVNEC8P5hbG3Px+/ClWVD3AKXPjSQ= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231024101228-5d9abdd08941/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY= github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d h1:vGfZmcCCloTzim6TysS3fXxc9xsTfXoVB6bsedZgp7A= diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go index 0a2468466..ab0099044 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go @@ -7,7 +7,6 @@ import ( "github.com/iotaledger/hive.go/ds" "github.com/iotaledger/hive.go/ierrors" "github.com/iotaledger/hive.go/kvstore" - "github.com/iotaledger/hive.go/lo" "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/iota-core/pkg/core/account" "github.com/iotaledger/iota-core/pkg/model" @@ -85,7 +84,16 @@ func (t *Tracker) EligibleValidatorCandidates(epoch iotago.EpochIndex) ds.Set[io eligible := ds.NewSet[iotago.AccountID]() - lo.PanicOnErr(t.committeeStore.Load(epoch - 1)).ForEach(func(accountID iotago.AccountID, _ *account.Pool) bool { + // Avoid underflow error. This will be handled properly once TopStakers branch is merged. + if epoch == 0 { + epoch = 1 + } + + committee, exists := t.LoadCommitteeForEpoch(epoch - 1) + if !exists { + panic(ierrors.Errorf("committee for epoch %d does not exist", epoch-1)) + } + committee.ForEach(func(accountID iotago.AccountID, _ *account.Pool) bool { eligible.Add(accountID) return true diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml index 4405f4e7b..9cd180601 100644 --- a/tools/docker-network/docker-compose.yml +++ b/tools/docker-network/docker-compose.yml @@ -167,6 +167,7 @@ services: environment: - "VALIDATOR_PRV_KEY=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b" command: + - "--logger.level=debug" - "--inx.address=node-1:9029" - "--validator.ignoreBootstrapped=true" - "--validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6" @@ -185,6 +186,7 @@ services: environment: - "VALIDATOR_PRV_KEY=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064" command: + - "--logger.level=debug" - "--inx.address=node-2:9029" - "--validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl" networks: @@ -202,6 +204,7 @@ services: environment: - "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648" command: + - "--logger.level=debug" - "--inx.address=node-3:9029" - "--validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt" networks: diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 66fec4544..1a8d2fa96 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -71,7 +71,7 @@ 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.20231023191159-38919c4705e0 // indirect + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231024101555-660b434164ff // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231024101228-5d9abdd08941 // indirect github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d // indirect github.com/ipfs/boxo v0.13.1 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 33bc76954..675a67e98 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -309,8 +309,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/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-app v1.0.0-rc.3.0.20231024101555-660b434164ff h1:cLRjTHMuWaTz1LpEF9KNbsSDaH2OTiIM/FDAcwL3ohU= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231024101555-660b434164ff/go.mod h1:0/7o9/MkkuKNhcEMz6xhPQLupf/OskjGigbmvnJtDL0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231024101228-5d9abdd08941 h1:B0Ht9EijMtHJhbkVNEC8P5hbG3Px+/ClWVD3AKXPjSQ= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231024101228-5d9abdd08941/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY= github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d h1:vGfZmcCCloTzim6TysS3fXxc9xsTfXoVB6bsedZgp7A=