From ba18cc1c241034a898520325dc7914611e89061c Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Wed, 18 Oct 2023 13:25:24 +0200
Subject: [PATCH 01/29] Remove validator component.
---
components/validator/component.go | 93 ----------
components/validator/issuer.go | 160 ------------------
components/validator/params.go | 34 ----
pkg/blockhandler/account.go | 70 --------
pkg/blockhandler/block_params.go | 122 -------------
.../{blockissuer.go => blockhandler.go} | 0
6 files changed, 479 deletions(-)
delete mode 100644 components/validator/component.go
delete mode 100644 components/validator/issuer.go
delete mode 100644 components/validator/params.go
delete mode 100644 pkg/blockhandler/account.go
delete mode 100644 pkg/blockhandler/block_params.go
rename pkg/blockhandler/{blockissuer.go => blockhandler.go} (100%)
diff --git a/components/validator/component.go b/components/validator/component.go
deleted file mode 100644
index c7a79bb96..000000000
--- a/components/validator/component.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package validator
-
-import (
- "context"
- "sync/atomic"
- "time"
-
- "go.uber.org/dig"
-
- "github.com/iotaledger/hive.go/app"
- "github.com/iotaledger/hive.go/runtime/event"
- "github.com/iotaledger/hive.go/runtime/timed"
- "github.com/iotaledger/iota-core/pkg/blockhandler"
- "github.com/iotaledger/iota-core/pkg/daemon"
- "github.com/iotaledger/iota-core/pkg/protocol"
- "github.com/iotaledger/iota-core/pkg/protocol/engine/notarization"
- iotago "github.com/iotaledger/iota.go/v4"
-)
-
-func init() {
- Component = &app.Component{
- Name: "Validator",
- DepsFunc: func(cDeps dependencies) { deps = cDeps },
- Params: params,
- Run: run,
- IsEnabled: func(_ *dig.Container) bool {
- return ParamsValidator.Enabled
- },
- }
-}
-
-var (
- Component *app.Component
- deps dependencies
-
- isValidator atomic.Bool
- executor *timed.TaskExecutor[iotago.AccountID]
- validatorAccount blockhandler.Account
-)
-
-type dependencies struct {
- dig.In
-
- Protocol *protocol.Protocol
- BlockHandler *blockhandler.BlockHandler
-}
-
-func run() error {
- validatorAccount = blockhandler.AccountFromParams(ParamsValidator.Account, ParamsValidator.PrivateKey)
-
- executor = timed.NewTaskExecutor[iotago.AccountID](1)
-
- return Component.Daemon().BackgroundWorker(Component.Name, func(ctx context.Context) {
- Component.LogInfof("Starting Validator with IssuerID: %s", validatorAccount.ID())
-
- checkValidatorStatus(ctx)
-
- deps.Protocol.Events.Engine.Notarization.SlotCommitted.Hook(func(details *notarization.SlotCommittedDetails) {
- checkValidatorStatus(ctx)
- }, event.WithWorkerPool(Component.WorkerPool))
-
- <-ctx.Done()
-
- executor.Shutdown()
-
- Component.LogInfo("Stopping Validator... done")
- }, daemon.PriorityActivity)
-}
-
-func checkValidatorStatus(ctx context.Context) {
- account, exists, err := deps.Protocol.MainEngineInstance().Ledger.Account(validatorAccount.ID(), deps.Protocol.MainEngineInstance().Storage.Settings().LatestCommitment().Slot())
- if err != nil {
- Component.LogErrorf("error when retrieving BlockIssuer account %s: %w", validatorAccount.ID(), err)
-
- return
- }
-
- if !exists || account.StakeEndEpoch <= deps.Protocol.CurrentAPI().TimeProvider().EpochFromSlot(deps.Protocol.CurrentAPI().TimeProvider().SlotFromTime(time.Now())) {
- if prevValue := isValidator.Swap(false); prevValue {
- // If the account stops being a validator, don't issue any blocks.
- Component.LogInfof("BlockIssuer account %s stopped being a validator", validatorAccount.ID())
- executor.Cancel(validatorAccount.ID())
- }
-
- return
- }
-
- if prevValue := isValidator.Swap(true); !prevValue {
- Component.LogInfof("BlockIssuer account %s became a validator", validatorAccount.ID())
- // If the account becomes a validator, start issue validator blocks.
- executor.ExecuteAfter(validatorAccount.ID(), func() { issueValidatorBlock(ctx) }, ParamsValidator.CommitteeBroadcastInterval)
- }
-}
diff --git a/components/validator/issuer.go b/components/validator/issuer.go
deleted file mode 100644
index 6c05d67a3..000000000
--- a/components/validator/issuer.go
+++ /dev/null
@@ -1,160 +0,0 @@
-package validator
-
-import (
- "context"
- "time"
-
- "github.com/iotaledger/hive.go/ierrors"
- "github.com/iotaledger/iota-core/pkg/model"
- iotago "github.com/iotaledger/iota.go/v4"
- "github.com/iotaledger/iota.go/v4/builder"
-)
-
-var ErrBlockTooRecent = ierrors.New("block is too recent compared to latest commitment")
-
-func issueValidatorBlock(ctx context.Context) {
- // Get the main engine instance in case it changes mid-execution.
- engineInstance := deps.Protocol.MainEngineInstance()
-
- blockIssuingTime := time.Now()
- nextBroadcast := blockIssuingTime.Add(ParamsValidator.CommitteeBroadcastInterval)
-
- // Use 'defer' because nextBroadcast is updated during function execution, and the value at the end needs to be used.
- defer func() {
- executor.ExecuteAt(validatorAccount.ID(), func() { issueValidatorBlock(ctx) }, nextBroadcast)
- }()
-
- if !ParamsValidator.IgnoreBootstrapped && !engineInstance.SyncManager.IsBootstrapped() {
- Component.LogDebug("Not issuing validator block because node is not bootstrapped yet.")
-
- return
- }
-
- protocolParametersHash, err := deps.Protocol.CurrentAPI().ProtocolParameters().Hash()
- if err != nil {
- Component.LogWarnf("failed to get protocol parameters hash: %s", err.Error())
-
- return
- }
-
- parents := engineInstance.TipSelection.SelectTips(iotago.BlockTypeValidationMaxParents)
-
- addressableCommitment, err := getAddressableCommitment(deps.Protocol.CurrentAPI().TimeProvider().SlotFromTime(blockIssuingTime))
- if err != nil && ierrors.Is(err, ErrBlockTooRecent) {
- commitment, parentID, reviveChainErr := reviveChain(blockIssuingTime)
- if reviveChainErr != nil {
- Component.LogError("error reviving chain: %s", reviveChainErr.Error())
- return
- }
-
- addressableCommitment = commitment
- parents = make(model.ParentReferences)
- parents[iotago.StrongParentType] = []iotago.BlockID{parentID}
- } else if err != nil {
- Component.LogWarnf("error getting commitment: %s", err.Error())
-
- return
- }
-
- // create the validation block here using the validation block builder from iota.go
- validationBlock, err := builder.NewValidationBlockBuilder(deps.Protocol.CurrentAPI()).
- IssuingTime(blockIssuingTime).
- ProtocolParametersHash(protocolParametersHash).
- SlotCommitmentID(addressableCommitment.MustID()).
- HighestSupportedVersion(deps.Protocol.LatestAPI().Version()).
- LatestFinalizedSlot(engineInstance.SyncManager.LatestFinalizedSlot()).
- StrongParents(parents[iotago.StrongParentType]).
- WeakParents(parents[iotago.WeakParentType]).
- ShallowLikeParents(parents[iotago.ShallowLikeParentType]).
- Sign(validatorAccount.ID(), validatorAccount.PrivateKey()).
- Build()
- if err != nil {
- Component.LogWarnf("error creating validation block: %s", err.Error())
-
- return
- }
-
- modelBlock, err := model.BlockFromBlock(validationBlock)
- if err != nil {
- Component.LogWarnf("error creating model block from validation block: %s", err.Error())
-
- return
- }
-
- if !engineInstance.SybilProtection.SeatManager().Committee(deps.Protocol.CurrentAPI().TimeProvider().SlotFromTime(blockIssuingTime)).HasAccount(validatorAccount.ID()) {
- // update nextBroadcast value here, so that this updated value is used in the `defer`
- // callback to schedule issuing of the next block at a different interval than for committee members
- nextBroadcast = blockIssuingTime.Add(ParamsValidator.CandidateBroadcastInterval)
- }
-
- if err = deps.BlockHandler.SubmitBlock(modelBlock); err != nil {
- Component.LogWarnf("error issuing validator block: %s", err.Error())
-
- return
- }
-
- Component.LogDebugf("Issued validator block: %s - commitment %s %d - latest finalized slot %d", modelBlock.ID(), modelBlock.ProtocolBlock().SlotCommitmentID, modelBlock.ProtocolBlock().SlotCommitmentID.Slot(), modelBlock.ProtocolBlock().LatestFinalizedSlot)
-}
-
-func reviveChain(issuingTime time.Time) (*iotago.Commitment, iotago.BlockID, error) {
- lastCommittedSlot := deps.Protocol.MainEngineInstance().Storage.Settings().LatestCommitment().Slot()
- apiForSlot := deps.Protocol.APIForSlot(lastCommittedSlot)
-
- // Get a rootblock as recent as possible for the parent.
- parentBlockID := iotago.EmptyBlockID
- for rootBlock := range deps.Protocol.MainEngineInstance().EvictionState.ActiveRootBlocks() {
- if rootBlock.Slot() > parentBlockID.Slot() {
- parentBlockID = rootBlock
- }
-
- // Exit the loop if we found a rootblock in the last committed slot (which is the highest we can get).
- if parentBlockID.Slot() == lastCommittedSlot {
- break
- }
- }
-
- issuingSlot := apiForSlot.TimeProvider().SlotFromTime(issuingTime)
-
- // Force commitments until minCommittableAge relative to the block's issuing time. We basically "pretend" that
- // this block was already accepted at the time of issuing so that we have a commitment to reference.
- if issuingSlot < apiForSlot.ProtocolParameters().MinCommittableAge() { // Should never happen as we're beyond maxCommittableAge which is > minCommittableAge.
- return nil, iotago.EmptyBlockID, ierrors.Errorf("issuing slot %d is smaller than min committable age %d", issuingSlot, apiForSlot.ProtocolParameters().MinCommittableAge())
- }
- commitUntilSlot := issuingSlot - apiForSlot.ProtocolParameters().MinCommittableAge()
-
- if err := deps.Protocol.MainEngineInstance().Notarization.ForceCommitUntil(commitUntilSlot); err != nil {
- return nil, iotago.EmptyBlockID, ierrors.Wrapf(err, "failed to force commit until slot %d", commitUntilSlot)
- }
-
- commitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(commitUntilSlot)
- if err != nil {
- return nil, iotago.EmptyBlockID, ierrors.Wrapf(err, "failed to commit until slot %d to revive chain", commitUntilSlot)
- }
-
- return commitment.Commitment(), parentBlockID, nil
-}
-
-func getAddressableCommitment(blockSlot iotago.SlotIndex) (*iotago.Commitment, error) {
- protoParams := deps.Protocol.CurrentAPI().ProtocolParameters()
- commitment := deps.Protocol.MainEngineInstance().Storage.Settings().LatestCommitment().Commitment()
-
- if blockSlot > commitment.Slot+protoParams.MaxCommittableAge() {
- return nil, ierrors.Wrapf(ErrBlockTooRecent, "can't issue block: block slot %d is too far in the future, latest commitment is %d", blockSlot, commitment.Slot)
- }
-
- if blockSlot < commitment.Slot+protoParams.MinCommittableAge() {
- if blockSlot < protoParams.MinCommittableAge() || commitment.Slot < protoParams.MinCommittableAge() {
- return commitment, nil
- }
-
- commitmentSlot := commitment.Slot - protoParams.MinCommittableAge()
- loadedCommitment, err := deps.Protocol.MainEngineInstance().Storage.Commitments().Load(commitmentSlot)
- if err != nil {
- return nil, ierrors.Wrapf(err, "error loading valid commitment of slot %d according to minCommittableAge from storage", commitmentSlot)
- }
-
- return loadedCommitment.Commitment(), nil
- }
-
- return commitment, nil
-}
diff --git a/components/validator/params.go b/components/validator/params.go
deleted file mode 100644
index 037498ab2..000000000
--- a/components/validator/params.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package validator
-
-import (
- "time"
-
- "github.com/iotaledger/hive.go/app"
-)
-
-// ParametersValidator contains the definition of the configuration parameters used by the Validator component.
-type ParametersValidator struct {
- // Enabled defines whether the Validator component is enabled.
- Enabled bool `default:"false" usage:"whether the Validator component is enabled"`
- // CommitteeBroadcastInterval the interval at which the node will broadcast its committee validator block.
- CommitteeBroadcastInterval time.Duration `default:"500ms" usage:"the interval at which the node will broadcast its committee validator block"`
- // CandidateBroadcastInterval the interval at which the node will broadcast its candidate validator block.
- CandidateBroadcastInterval time.Duration `default:"30m" usage:"the interval at which the node will broadcast its candidate validator block"`
- // ParentsCount is the number of parents that node will choose for its validator blocks.
- ParentsCount int `default:"8" usage:"the number of parents that node will choose for its validator blocks"`
- // IgnoreBootstrapped sets whether the Validator component should start issuing validator blocks before the main engine is bootstrapped.
- IgnoreBootstrapped bool `default:"false" usage:"whether the Validator component should start issuing validator blocks before the main engine is bootstrapped"`
- // Account the accountID of the account that will issue the blocks.
- Account string `default:"" usage:"the accountID of the validator account that will issue the blocks"`
- // PrivateKey the private key of the account that will issue the blocks.
- PrivateKey string `default:"" usage:"the private key of the validator account that will issue the blocks"`
-}
-
-// ParamsValidator contains the values of the configuration parameters used by the Activity component.
-var ParamsValidator = &ParametersValidator{}
-
-var params = &app.ComponentParams{
- Params: map[string]any{
- "validator": ParamsValidator,
- },
-}
diff --git a/pkg/blockhandler/account.go b/pkg/blockhandler/account.go
deleted file mode 100644
index 5d71cb86b..000000000
--- a/pkg/blockhandler/account.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package blockhandler
-
-import (
- "crypto/ed25519"
- "fmt"
-
- "github.com/iotaledger/hive.go/crypto"
- iotago "github.com/iotaledger/iota.go/v4"
-)
-
-// Account represents an account.
-type Account interface {
- // ID returns the accountID.
- ID() iotago.AccountID
-
- // Address returns the account address.
- Address() iotago.Address
-
- // PrivateKey returns the account private key for signing.
- PrivateKey() ed25519.PrivateKey
-}
-
-var _ Account = &Ed25519Account{}
-
-// Ed25519Account is an account that uses an Ed25519 key pair.
-type Ed25519Account struct {
- accountID iotago.AccountID
- privateKey ed25519.PrivateKey
-}
-
-// NewEd25519Account creates a new Ed25519Account.
-func NewEd25519Account(accountID iotago.AccountID, privateKey ed25519.PrivateKey) *Ed25519Account {
- return &Ed25519Account{
- accountID: accountID,
- privateKey: privateKey,
- }
-}
-
-// ID returns the accountID.
-func (e *Ed25519Account) ID() iotago.AccountID {
- return e.accountID
-}
-
-// Address returns the account address.
-func (e *Ed25519Account) Address() iotago.Address {
- ed25519PubKey, ok := e.privateKey.Public().(ed25519.PublicKey)
- if !ok {
- panic("invalid public key type")
- }
-
- return iotago.Ed25519AddressFromPubKey(ed25519PubKey)
-}
-
-// PrivateKey returns the account private key for signing.
-func (e *Ed25519Account) PrivateKey() ed25519.PrivateKey {
- return e.privateKey
-}
-
-func AccountFromParams(accountHex, privateKey string) Account {
- accountID, err := iotago.AccountIDFromHexString(accountHex)
- if err != nil {
- panic(fmt.Sprintln("invalid accountID hex string", err))
- }
- privKey, err := crypto.ParseEd25519PrivateKeyFromString(privateKey)
- if err != nil {
- panic(fmt.Sprintln("invalid ed25519 private key string", err))
- }
-
- return NewEd25519Account(accountID, privKey)
-}
diff --git a/pkg/blockhandler/block_params.go b/pkg/blockhandler/block_params.go
deleted file mode 100644
index 951f285c8..000000000
--- a/pkg/blockhandler/block_params.go
+++ /dev/null
@@ -1,122 +0,0 @@
-package blockhandler
-
-import (
- "time"
-
- "github.com/iotaledger/hive.go/runtime/options"
- "github.com/iotaledger/iota-core/pkg/model"
- iotago "github.com/iotaledger/iota.go/v4"
-)
-
-type BlockHeaderParams struct {
- ParentsCount int
- References model.ParentReferences
- SlotCommitment *iotago.Commitment
- LatestFinalizedSlot *iotago.SlotIndex
- IssuingTime *time.Time
- ProtocolVersion *iotago.Version
- Issuer Account
-}
-type BasicBlockParams struct {
- BlockHeader *BlockHeaderParams
- Payload iotago.Payload
-}
-type ValidatorBlockParams struct {
- BlockHeader *BlockHeaderParams
- HighestSupportedVersion *iotago.Version
- ProtocolParametersHash *iotago.Identifier
-}
-
-func WithParentsCount(parentsCount int) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- builder.ParentsCount = parentsCount
- }
-}
-
-func WithStrongParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- if builder.References == nil {
- builder.References = make(model.ParentReferences)
- }
-
- builder.References[iotago.StrongParentType] = blockIDs
- }
-}
-func WithWeakParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- if builder.References == nil {
- builder.References = make(model.ParentReferences)
- }
-
- builder.References[iotago.WeakParentType] = blockIDs
- }
-}
-
-func WithShallowLikeParents(blockIDs ...iotago.BlockID) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- if builder.References == nil {
- builder.References = make(model.ParentReferences)
- }
-
- builder.References[iotago.ShallowLikeParentType] = blockIDs
- }
-}
-
-func WithSlotCommitment(commitment *iotago.Commitment) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- builder.SlotCommitment = commitment
- }
-}
-
-func WithLatestFinalizedSlot(commitmentIndex iotago.SlotIndex) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- builder.LatestFinalizedSlot = &commitmentIndex
- }
-}
-
-func WithIssuingTime(issuingTime time.Time) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- builder.IssuingTime = &issuingTime
- }
-}
-
-func WithProtocolVersion(version iotago.Version) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- builder.ProtocolVersion = &version
- }
-}
-func WithIssuer(issuer Account) func(builder *BlockHeaderParams) {
- return func(builder *BlockHeaderParams) {
- builder.Issuer = issuer
- }
-}
-
-func WithValidationBlockHeaderOptions(opts ...options.Option[BlockHeaderParams]) func(builder *ValidatorBlockParams) {
- return func(builder *ValidatorBlockParams) {
- builder.BlockHeader = options.Apply(&BlockHeaderParams{}, opts)
- }
-}
-
-func WithBasicBlockHeader(opts ...options.Option[BlockHeaderParams]) func(builder *BasicBlockParams) {
- return func(builder *BasicBlockParams) {
- builder.BlockHeader = options.Apply(&BlockHeaderParams{}, opts)
- }
-}
-
-func WithPayload(payload iotago.Payload) func(builder *BasicBlockParams) {
- return func(builder *BasicBlockParams) {
- builder.Payload = payload
- }
-}
-
-func WithHighestSupportedVersion(highestSupportedVersion iotago.Version) func(builder *ValidatorBlockParams) {
- return func(builder *ValidatorBlockParams) {
- builder.HighestSupportedVersion = &highestSupportedVersion
- }
-}
-
-func WithProtocolParametersHash(protocolParametersHash iotago.Identifier) func(builder *ValidatorBlockParams) {
- return func(builder *ValidatorBlockParams) {
- builder.ProtocolParametersHash = &protocolParametersHash
- }
-}
diff --git a/pkg/blockhandler/blockissuer.go b/pkg/blockhandler/blockhandler.go
similarity index 100%
rename from pkg/blockhandler/blockissuer.go
rename to pkg/blockhandler/blockhandler.go
From 5a46738fea19909353586975fe0b43803872bc52 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 20 Oct 2023 12:17:27 +0200
Subject: [PATCH 02/29] Add INX server endpoints to support inx-validator
---
components/app/app.go | 2 -
components/dashboard/component.go | 2 +-
components/inx/server_accounts.go | 44 ++++++++++++
components/inx/server_node.go | 1 +
go.mod | 34 +++++-----
go.sum | 68 +++++++++----------
.../engine/syncmanager/syncmanager.go | 1 +
.../trivialsyncmanager/syncmanager.go | 1 +
tools/evil-spammer/go.mod | 30 ++++----
tools/evil-spammer/go.sum | 60 ++++++++--------
tools/gendoc/go.mod | 34 +++++-----
tools/gendoc/go.sum | 68 +++++++++----------
tools/genesis-snapshot/go.mod | 26 +++----
tools/genesis-snapshot/go.sum | 52 +++++++-------
14 files changed, 234 insertions(+), 189 deletions(-)
create mode 100644 components/inx/server_accounts.go
diff --git a/components/app/app.go b/components/app/app.go
index 4cb029500..0ef0cabb0 100644
--- a/components/app/app.go
+++ b/components/app/app.go
@@ -14,7 +14,6 @@ import (
"github.com/iotaledger/iota-core/components/protocol"
"github.com/iotaledger/iota-core/components/restapi"
coreapi "github.com/iotaledger/iota-core/components/restapi/core"
- "github.com/iotaledger/iota-core/components/validator"
)
var (
@@ -38,7 +37,6 @@ func App() *app.App {
debugapi.Component,
metricstracker.Component,
protocol.Component,
- validator.Component,
dashboardmetrics.Component,
dashboard.Component,
metrics.Component,
diff --git a/components/dashboard/component.go b/components/dashboard/component.go
index 62326f082..360702aaa 100644
--- a/components/dashboard/component.go
+++ b/components/dashboard/component.go
@@ -155,7 +155,7 @@ func currentNodeStatus() *nodestatus {
status.TangleTime = tangleTime{
Synced: syncStatus.NodeSynced,
- Bootstrapped: deps.Protocol.MainEngineInstance().SyncManager.IsBootstrapped(),
+ Bootstrapped: syncStatus.NodeBootstrapped,
AcceptedBlockSlot: int64(syncStatus.LastAcceptedBlockSlot),
ConfirmedBlockSlot: int64(syncStatus.LastConfirmedBlockSlot),
CommittedSlot: int64(syncStatus.LatestCommitment.Slot()),
diff --git a/components/inx/server_accounts.go b/components/inx/server_accounts.go
new file mode 100644
index 000000000..998120dd6
--- /dev/null
+++ b/components/inx/server_accounts.go
@@ -0,0 +1,44 @@
+package inx
+
+import (
+ "context"
+
+ "github.com/iotaledger/hive.go/ierrors"
+ inx "github.com/iotaledger/inx/go"
+ iotago "github.com/iotaledger/iota.go/v4"
+)
+
+func (s *Server) ReadIsAccountValidator(_ context.Context, accountInfoRequest *inx.AccountInfoRequest) (*inx.BoolResponse, error) {
+ slot := iotago.SlotIndex(accountInfoRequest.GetAccountSlot())
+ accountID, _, err := iotago.AccountIDFromBytes(accountInfoRequest.AccountId)
+ if err != nil {
+ return nil, ierrors.Wrap(err, "error when parsing account id")
+ }
+
+ account, exists, err := deps.Protocol.MainEngineInstance().Ledger.Account(accountID, slot)
+ if err != nil {
+ return nil, ierrors.Wrapf(err, "error when retrieving account data for %s", accountID)
+ }
+
+ return inx.WrapBoolResponse(exists && account.StakeEndEpoch <= deps.Protocol.APIForSlot(slot).TimeProvider().EpochFromSlot(slot)), nil
+}
+
+func (s *Server) ReadIsCommitteeMember(_ context.Context, accountInfoRequest *inx.AccountInfoRequest) (*inx.BoolResponse, error) {
+ slot := iotago.SlotIndex(accountInfoRequest.GetAccountSlot())
+ accountID, _, err := iotago.AccountIDFromBytes(accountInfoRequest.AccountId)
+ if err != nil {
+ return nil, ierrors.Wrap(err, "error when parsing account id")
+ }
+
+ return inx.WrapBoolResponse(deps.Protocol.MainEngineInstance().SybilProtection.SeatManager().Committee(slot).HasAccount(accountID)), nil
+}
+
+func (s *Server) ReadIsCandidate(_ context.Context, accountInfoRequest *inx.AccountInfoRequest) (*inx.BoolResponse, error) {
+ slot := iotago.SlotIndex(accountInfoRequest.GetAccountSlot())
+ accountID, _, err := iotago.AccountIDFromBytes(accountInfoRequest.AccountId)
+ if err != nil {
+ return nil, ierrors.Wrap(err, "error when parsing account id")
+ }
+
+ return inx.WrapBoolResponse(deps.Protocol.MainEngineInstance().SybilProtection.IsCandidateActive(accountID, deps.Protocol.APIForSlot(slot).TimeProvider().EpochFromSlot(slot))), nil
+}
diff --git a/components/inx/server_node.go b/components/inx/server_node.go
index 9a2f8386e..0039cad2b 100644
--- a/components/inx/server_node.go
+++ b/components/inx/server_node.go
@@ -25,6 +25,7 @@ func inxNodeStatus(status *syncmanager.SyncStatus) *inx.NodeStatus {
return &inx.NodeStatus{
IsHealthy: status.NodeSynced,
+ IsBootstrapped: status.NodeBootstrapped,
LastAcceptedBlockSlot: uint32(status.LastAcceptedBlockSlot),
LastConfirmedBlockSlot: uint32(status.LastConfirmedBlockSlot),
LatestCommitment: inxCommitment(status.LatestCommitment),
diff --git a/go.mod b/go.mod
index 8f58c8568..2466177a3 100644
--- a/go.mod
+++ b/go.mod
@@ -10,22 +10,22 @@ require (
github.com/google/uuid v1.3.1
github.com/gorilla/websocket v1.5.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
- github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811
+ github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad
- github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
github.com/libp2p/go-libp2p v0.30.0
@@ -39,7 +39,7 @@ require (
github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98
github.com/zyedidia/generic v1.2.1
go.uber.org/atomic v1.11.0
- go.uber.org/dig v1.17.0
+ go.uber.org/dig v1.17.1
golang.org/x/crypto v0.14.0
google.golang.org/grpc v1.58.3
google.golang.org/protobuf v1.31.0
@@ -88,7 +88,7 @@ require (
github.com/huin/goupnp v1.3.0 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect
- github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 // indirect
+ github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 // 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/go.sum b/go.sum
index 1de1123f2..41bc1c322 100644
--- a/go.sum
+++ b/go.sum
@@ -277,40 +277,40 @@ github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJ
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 h1:/Td52GNRrMzh0lVKwQu/BbVciwrKn5LwtkWAzd41X4Q=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
-github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38 h1:t60nsq/lI168gM0WqIP44FDHk784uXy35P6uKt9WbMU=
-github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 h1:xYh6+dUl+iocWofo0Z/0/OJGSdxYaPV1oYo1HlFj8+s=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 h1:3OUYK9wgyH4U6xfGnLdU1QdYQ5dpS/6WRju+eXP051E=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 h1:iXqM0/Y4poiiuNf+0tu3nUj9Dzp4slrWHJ8GXKgt2Zk=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 h1:xyaKXgNt8CQ4t14Raqu/4+aBRZQunGOlK+T+99egkSA=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38 h1:6I6PEdLuwiIpmiXFVEW5lPaNe+xFdaBR6NSHsNZ3o6c=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 h1:SCBXTAhrLFs0o9EJxO9ZBGPyfq1VhOdb5pP7+vFhdtk=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38 h1:qks472rk/MjwwFvDrlpckxWTf4c1yd+k7ve/IkeuPYk=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 h1:6HIBNKOWLXY5Gk1s+q93D6IsTcqwANigfMO3ePtV3HQ=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
-github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38 h1:lTp8+8GgFH63IMY0G9B90v2vmOlgo+c3XiZg4f0Te+I=
-github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38 h1:lPiKbh8o/SN2FGCN9RF7iN1zE+KXCidp815GSOieU8s=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 h1:njGr4TrKdpa66XyioxhDU3slV9gZOZeEg7/M8bjXw7M=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 h1:jh0LHzzLqVO+SW9NkvNIgYo1g3CyTBnR8Qv3+PNH+dY=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uTm1Htn2RQOT53RV2zdCIflpuF8N00Tv2FWYimY0=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 h1:7TnpRtJourFhAEz+/yq9c3zXKSF6cd1xNBHy8jI3zfs=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
+github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1 h1:ymIiuWzy7uaDn51WVEWJVD8fFAgEc0gsg4elPX3MxzA=
+github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 h1:ZUd2zsuTG1tT2u3UUpz9b6IRvZRzJwDOWHeBIbRmdwU=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1 h1:o2z+yaMMoLmiQi0IaDjPGWcRaMhC8UiUwbnmkQl4wOU=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1 h1:dFwSvX/p0P2QLQPdXSqiJJQ8eYtd2YI+PFJN/Msh6Jk=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1 h1:3bLEYHGjvctjFHKkH3l1pJEI3iqbcRv423LFahsCFEQ=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1 h1:ohOZfLq91DTWuf63i2mbpuHWBqFr7TvZ2Pn8k/U2iXo=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 h1:kbQsSCboaEVcrF50ENpFn568RVadvUWpsFe5a/bKUT0=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1 h1:bUxkrvfRnEKcwOuD9HJoL3pNCp0RdkpfMcX1vgV4KAY=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 h1:nP19sKaWMBSql9BTlASjWYWKpiz98zEotiqUGuFYxcg=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
+github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1 h1:lJ8AXHNWex6oJ0bL9G+jbm0nl+eeTNv095a7x5Kca8M=
+github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1 h1:Kq/R4w9hKuNMqffz1w/ucpAb18gCb7saz846Fhlxnjc=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 h1:Qu+gNYpDHsc36L69LjulfAwkZvF9mbXYRiSJi9E1SGA=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:KoN5DlV4m139RtoBMwKxVJiItttdwCn0CgWNzzCB3Tc=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b h1:bJKLJKdCgmByzhCv4IAnjpwDCJH54SYK8iBzctKGOfw=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b/go.mod h1:jVBbv/VLDjxw3HthXXcCr1WFzOj48ODUJyxQQUmq6Ac=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648 h1:Lhk/aEyFwDflE03kdI6Xeap/awDJbxVsBzKh08U9hTY=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
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=
@@ -688,8 +688,8 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
-go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI=
-go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU=
+go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc=
+go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE=
go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ=
go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
diff --git a/pkg/protocol/engine/syncmanager/syncmanager.go b/pkg/protocol/engine/syncmanager/syncmanager.go
index d251dec88..6f0c0cb53 100644
--- a/pkg/protocol/engine/syncmanager/syncmanager.go
+++ b/pkg/protocol/engine/syncmanager/syncmanager.go
@@ -38,6 +38,7 @@ type SyncManager interface {
}
type SyncStatus struct {
+ NodeBootstrapped bool
NodeSynced bool
LastAcceptedBlockSlot iotago.SlotIndex
LastConfirmedBlockSlot iotago.SlotIndex
diff --git a/pkg/protocol/engine/syncmanager/trivialsyncmanager/syncmanager.go b/pkg/protocol/engine/syncmanager/trivialsyncmanager/syncmanager.go
index 8e93f69bd..38fd0bb00 100644
--- a/pkg/protocol/engine/syncmanager/trivialsyncmanager/syncmanager.go
+++ b/pkg/protocol/engine/syncmanager/trivialsyncmanager/syncmanager.go
@@ -139,6 +139,7 @@ func (s *SyncManager) SyncStatus() *syncmanager.SyncStatus {
return &syncmanager.SyncStatus{
NodeSynced: s.IsNodeSynced(),
+ NodeBootstrapped: s.IsBootstrapped(),
LastAcceptedBlockSlot: s.lastAcceptedBlockSlot,
LastConfirmedBlockSlot: s.lastConfirmedBlockSlot,
LatestCommitment: s.latestCommitment,
diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod
index 89b8bdd05..589eb3997 100644
--- a/tools/evil-spammer/go.mod
+++ b/tools/evil-spammer/go.mod
@@ -10,16 +10,16 @@ require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/ethereum/go-ethereum v1.13.4
github.com/google/martian v2.1.0+incompatible
- github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38
+ github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1
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-20231019112751-e9872df31648
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd
github.com/mr-tron/base58 v1.2.0
go.uber.org/atomic v1.11.0
)
@@ -38,13 +38,13 @@ require (
github.com/holiman/uint256 v1.2.3 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect
- github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 // indirect
+ github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum
index 66d6fc334..bad893b35 100644
--- a/tools/evil-spammer/go.sum
+++ b/tools/evil-spammer/go.sum
@@ -173,36 +173,36 @@ github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJ
github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 h1:/Td52GNRrMzh0lVKwQu/BbVciwrKn5LwtkWAzd41X4Q=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
-github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38 h1:t60nsq/lI168gM0WqIP44FDHk784uXy35P6uKt9WbMU=
-github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 h1:xYh6+dUl+iocWofo0Z/0/OJGSdxYaPV1oYo1HlFj8+s=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 h1:3OUYK9wgyH4U6xfGnLdU1QdYQ5dpS/6WRju+eXP051E=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 h1:iXqM0/Y4poiiuNf+0tu3nUj9Dzp4slrWHJ8GXKgt2Zk=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 h1:xyaKXgNt8CQ4t14Raqu/4+aBRZQunGOlK+T+99egkSA=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38 h1:6I6PEdLuwiIpmiXFVEW5lPaNe+xFdaBR6NSHsNZ3o6c=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 h1:SCBXTAhrLFs0o9EJxO9ZBGPyfq1VhOdb5pP7+vFhdtk=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38 h1:qks472rk/MjwwFvDrlpckxWTf4c1yd+k7ve/IkeuPYk=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 h1:6HIBNKOWLXY5Gk1s+q93D6IsTcqwANigfMO3ePtV3HQ=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
-github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38 h1:lTp8+8GgFH63IMY0G9B90v2vmOlgo+c3XiZg4f0Te+I=
-github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38 h1:lPiKbh8o/SN2FGCN9RF7iN1zE+KXCidp815GSOieU8s=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 h1:njGr4TrKdpa66XyioxhDU3slV9gZOZeEg7/M8bjXw7M=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 h1:jh0LHzzLqVO+SW9NkvNIgYo1g3CyTBnR8Qv3+PNH+dY=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648 h1:Lhk/aEyFwDflE03kdI6Xeap/awDJbxVsBzKh08U9hTY=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 h1:7TnpRtJourFhAEz+/yq9c3zXKSF6cd1xNBHy8jI3zfs=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
+github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1 h1:ymIiuWzy7uaDn51WVEWJVD8fFAgEc0gsg4elPX3MxzA=
+github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 h1:ZUd2zsuTG1tT2u3UUpz9b6IRvZRzJwDOWHeBIbRmdwU=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1 h1:o2z+yaMMoLmiQi0IaDjPGWcRaMhC8UiUwbnmkQl4wOU=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1 h1:dFwSvX/p0P2QLQPdXSqiJJQ8eYtd2YI+PFJN/Msh6Jk=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1 h1:3bLEYHGjvctjFHKkH3l1pJEI3iqbcRv423LFahsCFEQ=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1 h1:ohOZfLq91DTWuf63i2mbpuHWBqFr7TvZ2Pn8k/U2iXo=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 h1:kbQsSCboaEVcrF50ENpFn568RVadvUWpsFe5a/bKUT0=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1 h1:bUxkrvfRnEKcwOuD9HJoL3pNCp0RdkpfMcX1vgV4KAY=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 h1:nP19sKaWMBSql9BTlASjWYWKpiz98zEotiqUGuFYxcg=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
+github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1 h1:lJ8AXHNWex6oJ0bL9G+jbm0nl+eeTNv095a7x5Kca8M=
+github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1 h1:Kq/R4w9hKuNMqffz1w/ucpAb18gCb7saz846Fhlxnjc=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 h1:Qu+gNYpDHsc36L69LjulfAwkZvF9mbXYRiSJi9E1SGA=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:KoN5DlV4m139RtoBMwKxVJiItttdwCn0CgWNzzCB3Tc=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
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 9ffe27b94..b5eac266f 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -5,7 +5,7 @@ go 1.21
replace github.com/iotaledger/iota-core => ../../
require (
- github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38
+ github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1
github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3
github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000
)
@@ -58,22 +58,22 @@ require (
github.com/huin/goupnp v1.3.0 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect
- github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 // indirect
+ github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b // indirect
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad // indirect
- github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648 // indirect
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd // 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
@@ -162,7 +162,7 @@ require (
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
- go.uber.org/dig v1.17.0 // indirect
+ go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.20.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum
index 593c433c4..5991ebd59 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -279,42 +279,42 @@ github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJ
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 h1:/Td52GNRrMzh0lVKwQu/BbVciwrKn5LwtkWAzd41X4Q=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
-github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38 h1:t60nsq/lI168gM0WqIP44FDHk784uXy35P6uKt9WbMU=
-github.com/iotaledger/hive.go/app v0.0.0-20231019113503-7986872a7a38/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 h1:7TnpRtJourFhAEz+/yq9c3zXKSF6cd1xNBHy8jI3zfs=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
+github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1 h1:ymIiuWzy7uaDn51WVEWJVD8fFAgEc0gsg4elPX3MxzA=
+github.com/iotaledger/hive.go/app v0.0.0-20231019175611-f85bce9102d1/go.mod h1:8ZbIKR84oQd/3iQ5eeT7xpudO9/ytzXP7veIYnk7Orc=
github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 h1:4aVJTc0KS77uEw0Tny4r0n1ORwcbAQDECaCclgf/6lE=
github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3/go.mod h1:TZeAqieDu+xDOZp2e9+S+8pZp1PrfgcwLUnxmd8IgLU=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 h1:xYh6+dUl+iocWofo0Z/0/OJGSdxYaPV1oYo1HlFj8+s=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 h1:3OUYK9wgyH4U6xfGnLdU1QdYQ5dpS/6WRju+eXP051E=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 h1:iXqM0/Y4poiiuNf+0tu3nUj9Dzp4slrWHJ8GXKgt2Zk=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 h1:xyaKXgNt8CQ4t14Raqu/4+aBRZQunGOlK+T+99egkSA=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38 h1:6I6PEdLuwiIpmiXFVEW5lPaNe+xFdaBR6NSHsNZ3o6c=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 h1:SCBXTAhrLFs0o9EJxO9ZBGPyfq1VhOdb5pP7+vFhdtk=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38 h1:qks472rk/MjwwFvDrlpckxWTf4c1yd+k7ve/IkeuPYk=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 h1:6HIBNKOWLXY5Gk1s+q93D6IsTcqwANigfMO3ePtV3HQ=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
-github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38 h1:lTp8+8GgFH63IMY0G9B90v2vmOlgo+c3XiZg4f0Te+I=
-github.com/iotaledger/hive.go/logger v0.0.0-20231019113503-7986872a7a38/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38 h1:lPiKbh8o/SN2FGCN9RF7iN1zE+KXCidp815GSOieU8s=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 h1:njGr4TrKdpa66XyioxhDU3slV9gZOZeEg7/M8bjXw7M=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 h1:jh0LHzzLqVO+SW9NkvNIgYo1g3CyTBnR8Qv3+PNH+dY=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811 h1:nR8uTm1Htn2RQOT53RV2zdCIflpuF8N00Tv2FWYimY0=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231011161248-cf0bd6e08811/go.mod h1:rmclNpXw5sKJDHU0e51Ar/9zL00P7Uu9hkfaM7vAAiE=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 h1:ZUd2zsuTG1tT2u3UUpz9b6IRvZRzJwDOWHeBIbRmdwU=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1 h1:o2z+yaMMoLmiQi0IaDjPGWcRaMhC8UiUwbnmkQl4wOU=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1 h1:dFwSvX/p0P2QLQPdXSqiJJQ8eYtd2YI+PFJN/Msh6Jk=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1 h1:3bLEYHGjvctjFHKkH3l1pJEI3iqbcRv423LFahsCFEQ=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1 h1:ohOZfLq91DTWuf63i2mbpuHWBqFr7TvZ2Pn8k/U2iXo=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 h1:kbQsSCboaEVcrF50ENpFn568RVadvUWpsFe5a/bKUT0=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1 h1:bUxkrvfRnEKcwOuD9HJoL3pNCp0RdkpfMcX1vgV4KAY=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 h1:nP19sKaWMBSql9BTlASjWYWKpiz98zEotiqUGuFYxcg=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
+github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1 h1:lJ8AXHNWex6oJ0bL9G+jbm0nl+eeTNv095a7x5Kca8M=
+github.com/iotaledger/hive.go/logger v0.0.0-20231019175611-f85bce9102d1/go.mod h1:aBfAfIB2GO/IblhYt5ipCbyeL9bXSNeAwtYVA3hZaHg=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1 h1:Kq/R4w9hKuNMqffz1w/ucpAb18gCb7saz846Fhlxnjc=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 h1:Qu+gNYpDHsc36L69LjulfAwkZvF9mbXYRiSJi9E1SGA=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:KoN5DlV4m139RtoBMwKxVJiItttdwCn0CgWNzzCB3Tc=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b h1:bJKLJKdCgmByzhCv4IAnjpwDCJH54SYK8iBzctKGOfw=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b/go.mod h1:jVBbv/VLDjxw3HthXXcCr1WFzOj48ODUJyxQQUmq6Ac=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648 h1:Lhk/aEyFwDflE03kdI6Xeap/awDJbxVsBzKh08U9hTY=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
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=
@@ -690,8 +690,8 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
-go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI=
-go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU=
+go.uber.org/dig v1.17.1 h1:Tga8Lz8PcYNsWsyHMZ1Vm0OQOUaJNDyvPImgbAu9YSc=
+go.uber.org/dig v1.17.1/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE=
go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ=
go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod
index 15d39c92a..fcaa47021 100644
--- a/tools/genesis-snapshot/go.mod
+++ b/tools/genesis-snapshot/go.mod
@@ -5,12 +5,12 @@ go 1.21
replace github.com/iotaledger/iota-core => ../../
require (
- github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38
- github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38
+ github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1
+ github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1
github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000
- github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd
github.com/mr-tron/base58 v1.2.0
github.com/spf13/pflag v1.0.5
golang.org/x/crypto v0.14.0
@@ -26,14 +26,14 @@ require (
github.com/holiman/uint256 v1.2.3 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect
- github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 // indirect
- github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 // indirect
+ github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 // indirect
+ github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/kr/text v0.2.0 // indirect
diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum
index 1fe1cefe1..f1651ce7e 100644
--- a/tools/genesis-snapshot/go.sum
+++ b/tools/genesis-snapshot/go.sum
@@ -28,32 +28,32 @@ github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJ
github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38 h1:/Td52GNRrMzh0lVKwQu/BbVciwrKn5LwtkWAzd41X4Q=
-github.com/iotaledger/hive.go/ads v0.0.0-20231019113503-7986872a7a38/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38 h1:xYh6+dUl+iocWofo0Z/0/OJGSdxYaPV1oYo1HlFj8+s=
-github.com/iotaledger/hive.go/constraints v0.0.0-20231019113503-7986872a7a38/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38 h1:3OUYK9wgyH4U6xfGnLdU1QdYQ5dpS/6WRju+eXP051E=
-github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019113503-7986872a7a38/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38 h1:iXqM0/Y4poiiuNf+0tu3nUj9Dzp4slrWHJ8GXKgt2Zk=
-github.com/iotaledger/hive.go/crypto v0.0.0-20231019113503-7986872a7a38/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38 h1:xyaKXgNt8CQ4t14Raqu/4+aBRZQunGOlK+T+99egkSA=
-github.com/iotaledger/hive.go/ds v0.0.0-20231019113503-7986872a7a38/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38 h1:6I6PEdLuwiIpmiXFVEW5lPaNe+xFdaBR6NSHsNZ3o6c=
-github.com/iotaledger/hive.go/ierrors v0.0.0-20231019113503-7986872a7a38/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38 h1:SCBXTAhrLFs0o9EJxO9ZBGPyfq1VhOdb5pP7+vFhdtk=
-github.com/iotaledger/hive.go/kvstore v0.0.0-20231019113503-7986872a7a38/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38 h1:qks472rk/MjwwFvDrlpckxWTf4c1yd+k7ve/IkeuPYk=
-github.com/iotaledger/hive.go/lo v0.0.0-20231019113503-7986872a7a38/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38 h1:6HIBNKOWLXY5Gk1s+q93D6IsTcqwANigfMO3ePtV3HQ=
-github.com/iotaledger/hive.go/log v0.0.0-20231019113503-7986872a7a38/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38 h1:lPiKbh8o/SN2FGCN9RF7iN1zE+KXCidp815GSOieU8s=
-github.com/iotaledger/hive.go/runtime v0.0.0-20231019113503-7986872a7a38/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38 h1:njGr4TrKdpa66XyioxhDU3slV9gZOZeEg7/M8bjXw7M=
-github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019113503-7986872a7a38/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38 h1:jh0LHzzLqVO+SW9NkvNIgYo1g3CyTBnR8Qv3+PNH+dY=
-github.com/iotaledger/hive.go/stringify v0.0.0-20231019113503-7986872a7a38/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648 h1:Lhk/aEyFwDflE03kdI6Xeap/awDJbxVsBzKh08U9hTY=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019112751-e9872df31648/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1 h1:7TnpRtJourFhAEz+/yq9c3zXKSF6cd1xNBHy8jI3zfs=
+github.com/iotaledger/hive.go/ads v0.0.0-20231019175611-f85bce9102d1/go.mod h1:IFh0gDfeMgZtfCo+5afK59IDR4xXh+cTR9YtLnZPcbY=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1 h1:ZUd2zsuTG1tT2u3UUpz9b6IRvZRzJwDOWHeBIbRmdwU=
+github.com/iotaledger/hive.go/constraints v0.0.0-20231019175611-f85bce9102d1/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1 h1:o2z+yaMMoLmiQi0IaDjPGWcRaMhC8UiUwbnmkQl4wOU=
+github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231019175611-f85bce9102d1/go.mod h1:Mc+ACqBGPxrPMIPUBOm6/HL0J6m0iVMwjtIEKW3uow8=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1 h1:dFwSvX/p0P2QLQPdXSqiJJQ8eYtd2YI+PFJN/Msh6Jk=
+github.com/iotaledger/hive.go/crypto v0.0.0-20231019175611-f85bce9102d1/go.mod h1:h3o6okvMSEK3KOX6pOp3yq1h9ohTkTfo6X8MzEadeb0=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1 h1:3bLEYHGjvctjFHKkH3l1pJEI3iqbcRv423LFahsCFEQ=
+github.com/iotaledger/hive.go/ds v0.0.0-20231019175611-f85bce9102d1/go.mod h1:3XkUSKfHaVxGbT0XAvjNlVYqPzhfLTGhDtdNA5UBPco=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1 h1:ohOZfLq91DTWuf63i2mbpuHWBqFr7TvZ2Pn8k/U2iXo=
+github.com/iotaledger/hive.go/ierrors v0.0.0-20231019175611-f85bce9102d1/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1 h1:kbQsSCboaEVcrF50ENpFn568RVadvUWpsFe5a/bKUT0=
+github.com/iotaledger/hive.go/kvstore v0.0.0-20231019175611-f85bce9102d1/go.mod h1:O/U3jtiUDeqqM0MZQFu2UPqS9fUm0C5hNISxlmg/thE=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1 h1:bUxkrvfRnEKcwOuD9HJoL3pNCp0RdkpfMcX1vgV4KAY=
+github.com/iotaledger/hive.go/lo v0.0.0-20231019175611-f85bce9102d1/go.mod h1:s4kzx9QY1MVWHJralj+3q5kI0eARtrJhphYD/iBbPfo=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1 h1:nP19sKaWMBSql9BTlASjWYWKpiz98zEotiqUGuFYxcg=
+github.com/iotaledger/hive.go/log v0.0.0-20231019175611-f85bce9102d1/go.mod h1:JvokzmpmFZPDskMlUqqjgHtD8usVJU4nAY/TNMGge8M=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1 h1:Kq/R4w9hKuNMqffz1w/ucpAb18gCb7saz846Fhlxnjc=
+github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1/go.mod h1:jRw8yFipiPaqmTPHh7hTcxAP9u6pjRGpByS3REJKkbY=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 h1:Qu+gNYpDHsc36L69LjulfAwkZvF9mbXYRiSJi9E1SGA=
+github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:KoN5DlV4m139RtoBMwKxVJiItttdwCn0CgWNzzCB3Tc=
+github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
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 30b26cf93467990cbdb37ca6b869f180feeb99c6 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 20 Oct 2023 12:38:17 +0200
Subject: [PATCH 03/29] Update .gitignore entry for go.work
---
.gitignore | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index b404776d6..f8ded2667 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,8 +15,7 @@ iota-core
# IDE related files
.vscode/
.idea/
-go.work
-go.work.sum
+go.work*
# dist packages
dist/
From 9a991c4e2dffefdee0c1b8d2168403d8d9b800fc Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 20 Oct 2023 12:38:47 +0200
Subject: [PATCH 04/29] Bump inx and inx-app version
---
go.mod | 4 ++--
go.sum | 4 ++++
tools/gendoc/go.mod | 2 +-
tools/gendoc/go.sum | 1 +
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/go.mod b/go.mod
index 2466177a3..ca80b4063 100644
--- a/go.mod
+++ b/go.mod
@@ -23,8 +23,8 @@ require (
github.com/iotaledger/hive.go/runtime v0.0.0-20231019175611-f85bce9102d1
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020103531-8702a4719b91
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
diff --git a/go.sum b/go.sum
index 41bc1c322..c72f3333f 100644
--- a/go.sum
+++ b/go.sum
@@ -307,8 +307,12 @@ github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:Ko
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b h1:bJKLJKdCgmByzhCv4IAnjpwDCJH54SYK8iBzctKGOfw=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b/go.mod h1:jVBbv/VLDjxw3HthXXcCr1WFzOj48ODUJyxQQUmq6Ac=
+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/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7 h1:EU1O4N5G601nteXW3VVAXF63EkG6TetI4CdQCZiODGU=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7/go.mod h1:UOcPh1kcNvvKmeOvhz8y19+In51g7ogefkh4MDTBphY=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY=
diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod
index b5eac266f..d6b5d83b4 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -72,7 +72,7 @@ require (
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 // indirect
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 // indirect
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b // indirect
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad // indirect
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7 // indirect
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd // indirect
github.com/ipfs/boxo v0.10.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum
index 5991ebd59..5a6cc53be 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -313,6 +313,7 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b h1:bJKLJ
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b/go.mod h1:jVBbv/VLDjxw3HthXXcCr1WFzOj48ODUJyxQQUmq6Ac=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7/go.mod h1:UOcPh1kcNvvKmeOvhz8y19+In51g7ogefkh4MDTBphY=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY=
From a8fc93f117d7484031af8c4e8a9bdb78724a1d22 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 20 Oct 2023 13:15:34 +0200
Subject: [PATCH 05/29] Run gendoc
---
config_defaults.json | 9 -----
.../docs/references/configuration.md | 34 ++-----------------
go.sum | 4 ---
tools/gendoc/go.mod | 2 +-
tools/gendoc/go.sum | 7 ++--
5 files changed, 7 insertions(+), 49 deletions(-)
diff --git a/config_defaults.json b/config_defaults.json
index 2dc55de16..21ad064c4 100644
--- a/config_defaults.json
+++ b/config_defaults.json
@@ -116,15 +116,6 @@
"useMetricPrefix": false
}
},
- "validator": {
- "enabled": false,
- "committeeBroadcastInterval": "500ms",
- "candidateBroadcastInterval": "30m",
- "parentsCount": 8,
- "ignoreBootstrapped": false,
- "account": "",
- "privateKey": ""
- },
"dashboard": {
"enabled": true,
"bindAddress": "0.0.0.0:8081",
diff --git a/documentation/docs/references/configuration.md b/documentation/docs/references/configuration.md
index acf7bfa3f..2479ad48b 100644
--- a/documentation/docs/references/configuration.md
+++ b/documentation/docs/references/configuration.md
@@ -375,35 +375,7 @@ Example:
}
```
-## 10. Validator
-
-| Name | Description | Type | Default value |
-| -------------------------- | ------------------------------------------------------------------------------------------------------------ | ------- | ------------- |
-| enabled | Whether the Validator component is enabled | boolean | false |
-| committeeBroadcastInterval | The interval at which the node will broadcast its committee validator block | string | "500ms" |
-| candidateBroadcastInterval | The interval at which the node will broadcast its candidate validator block | string | "30m" |
-| parentsCount | The number of parents that node will choose for its validator blocks | int | 8 |
-| ignoreBootstrapped | Whether the Validator component should start issuing validator blocks before the main engine is bootstrapped | boolean | false |
-| account | The accountID of the validator account that will issue the blocks | string | "" |
-| privateKey | The private key of the validator account that will issue the blocks | string | "" |
-
-Example:
-
-```json
- {
- "validator": {
- "enabled": false,
- "committeeBroadcastInterval": "500ms",
- "candidateBroadcastInterval": "30m",
- "parentsCount": 8,
- "ignoreBootstrapped": false,
- "account": "",
- "privateKey": ""
- }
- }
-```
-
-## 11. Dashboard
+## 10. Dashboard
| Name | Description | Type | Default value |
| --------------------------------- | --------------------------------------- | ------- | -------------- |
@@ -445,7 +417,7 @@ Example:
}
```
-## 12. Metrics
+## 11. Metrics
| Name | Description | Type | Default value |
| --------------- | ---------------------------------------------------- | ------- | -------------- |
@@ -469,7 +441,7 @@ Example:
}
```
-## 13. Inx
+## 12. Inx
| Name | Description | Type | Default value |
| ----------- | ------------------------------------------------------ | ------- | ---------------- |
diff --git a/go.sum b/go.sum
index c72f3333f..588e5e3fb 100644
--- a/go.sum
+++ b/go.sum
@@ -305,12 +305,8 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:KoN5DlV4m139RtoBMwKxVJiItttdwCn0CgWNzzCB3Tc=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b h1:bJKLJKdCgmByzhCv4IAnjpwDCJH54SYK8iBzctKGOfw=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b/go.mod h1:jVBbv/VLDjxw3HthXXcCr1WFzOj48ODUJyxQQUmq6Ac=
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/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7 h1:EU1O4N5G601nteXW3VVAXF63EkG6TetI4CdQCZiODGU=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7/go.mod h1:UOcPh1kcNvvKmeOvhz8y19+In51g7ogefkh4MDTBphY=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod
index d6b5d83b4..8c3047857 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-20231019175611-f85bce9102d1 // indirect
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1 // indirect
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 // indirect
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b // indirect
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020103531-8702a4719b91 // indirect
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7 // indirect
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd // indirect
github.com/ipfs/boxo v0.10.0 // indirect
diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum
index 5a6cc53be..d635c0d48 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -309,10 +309,9 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231019175611-f85bce9102d1/go.mod h1:SdK26z8/VhWtxaqCuQrufm80SELgowQPmu9T/8eUQ8g=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1 h1:KoN5DlV4m139RtoBMwKxVJiItttdwCn0CgWNzzCB3Tc=
github.com/iotaledger/hive.go/stringify v0.0.0-20231019175611-f85bce9102d1/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b h1:bJKLJKdCgmByzhCv4IAnjpwDCJH54SYK8iBzctKGOfw=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231020100823-ac958da9ec1b/go.mod h1:jVBbv/VLDjxw3HthXXcCr1WFzOj48ODUJyxQQUmq6Ac=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad h1:TRM9EkAole9fYY1vHEVQ6zCEOGuvCWq/bczZ98Al5Ec=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231011154428-257141868dad/go.mod h1:plZ0+8yLdDWHedj3SfHUwQtIETD+lcS6M1iEAxcjzJ4=
+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/go v1.0.0-rc.2.0.20231020100621-739388b552f7 h1:EU1O4N5G601nteXW3VVAXF63EkG6TetI4CdQCZiODGU=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7/go.mod h1:UOcPh1kcNvvKmeOvhz8y19+In51g7ogefkh4MDTBphY=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
From e0b61d96896bd6032032f9199e45710d64de9c08 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 20 Oct 2023 17:20:00 +0200
Subject: [PATCH 06/29] Add validators to docker-compose.yml
---
tools/docker-network/.env | 2 +-
tools/docker-network/docker-compose.yml | 169 +++++++++++++++---------
tools/docker-network/prometheus.yml | 6 +-
tools/docker-network/run.sh | 37 +++---
tools/evil-spammer/identity/config.go | 6 +-
5 files changed, 130 insertions(+), 90 deletions(-)
diff --git a/tools/docker-network/.env b/tools/docker-network/.env
index ce7903fb0..d953c5463 100644
--- a/tools/docker-network/.env
+++ b/tools/docker-network/.env
@@ -16,5 +16,5 @@ COMMON_CONFIG="
--protocol.snapshot.path=/app/data/snapshot.bin
"
MANUALPEERING_CONFIG="
---p2p.peers=/dns/validator-1/tcp/14666/p2p/12D3KooWRVt4Engu27jHnF2RjfX48EqiAqJbgLfFdHNt3Vn6BtJK\
+--p2p.peers=/dns/node-1/tcp/14666/p2p/12D3KooWRVt4Engu27jHnF2RjfX48EqiAqJbgLfFdHNt3Vn6BtJK\
"
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index 92ae8e023..4405f4e7b 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -4,78 +4,68 @@ x-build-iota-core: &iota-core_build
context: ${DOCKER_BUILD_CONTEXT:-../../}
dockerfile: ${DOCKERFILE_PATH:-./Dockerfile}
services:
- validator-1:
+ node-1:
build: *iota-core_build
stop_grace_period: 1m
command: >
${COMMON_CONFIG}
${MANUALPEERING_CONFIG}
--p2p.identityPrivateKey=08735375679f3d8031353e94282ed1d65119e5c288fe56d6639d9184a3f978fee8febfedff11cc376daea0f59c395ae2e9a870a25ac4e36093000fbf4d0e8f18
- --validator.enabled=true
- --validator.ignoreBootstrapped=true
- --validator.account=0x907c02e9302e0f0571f10f885594e56d8c54ff0708ab7a39bc1b74d396b93b12
- --validator.privateKey=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
ports:
- - "8080:8080/tcp" # web API
- - "8081:8081/tcp" # dashboard
- - "6081:6061/tcp" # pprof
- - "9089:9029/tcp" # inx
+ - "8010:8080/tcp" # web API
+ - "8011:8081/tcp" # dashboard
+ - "6011:6061/tcp" # pprof
+ - "9019:9029/tcp" # inx
networks:
- iota-core
- validator-2:
- image: docker-network-validator-1:latest
+ node-2:
+ image: docker-network-node-1:latest
stop_grace_period: 1m
command: >
${COMMON_CONFIG}
${MANUALPEERING_CONFIG}
--p2p.identityPrivateKey=ba771419c52132a0dfb2521ed18667813f398da159010a55a0a482af939affb92d3338789ad4a07a7631b91791deb11f82ed5dc612822f24275e9f7a313b691f
- --validator.enabled=true
- --validator.account=0x375358f92cc94750669598b0aaa55a6ff73310b90710e1fad524c0f911be0fea
- --validator.privateKey=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
ports:
- - "8070:8080/tcp" # web API
- - "8071:8081/tcp" # dashboard
- - "6071:6061/tcp" # pprof
+ - "8020:8080/tcp" # web API
+ - "8021:8081/tcp" # dashboard
+ - "6021:6061/tcp" # pprof
- "9029:9029/tcp" # inx
networks:
- iota-core
- validator-3:
- image: docker-network-validator-1:latest
+ node-3:
+ image: docker-network-node-1:latest
stop_grace_period: 1m
command: >
${COMMON_CONFIG}
${MANUALPEERING_CONFIG}
--p2p.identityPrivateKey=a6261ac049755675ff1437654ca9f83b305055f01ff08c4f039209ef5a4a7d96d06fb61df77a8815209a8f4d204226dee593e50d0ec897ec440a2c1fbde77656
- --validator.enabled=true
- --validator.account=0x6aee704f25558e8aa7630fed0121da53074188abc423b3c5810f80be4936eb6e
- --validator.privateKey=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648
--inx.enabled=true
--inx.bindAddress=0.0.0.0:9029
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
ports:
- - "8090:8080/tcp" # web API
- - "8091:8081/tcp" # dashboard
- - "6091:6061/tcp" # pprof
- - "9099:9029/tcp" # inx
+ - "8030:8080/tcp" # web API
+ - "8031:8081/tcp" # dashboard
+ - "6031:6061/tcp" # pprof
+ - "9039:9029/tcp" # inx
networks:
- iota-core
- node-1:
- image: docker-network-validator-1:latest
+ node-4:
+ image: docker-network-node-1:latest
stop_grace_period: 1m
command: >
${COMMON_CONFIG}
@@ -94,8 +84,8 @@ services:
networks:
- iota-core
- node-2:
- image: docker-network-validator-1:latest
+ node-5:
+ image: docker-network-node-1:latest
stop_grace_period: 1m
command: >
${COMMON_CONFIG}
@@ -107,10 +97,10 @@ services:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
ports:
- - "8030:8080/tcp" # web API
- - "8031:8081/tcp" # dashboard
- - "6031:6061/tcp" # pprof
- - "9039:9029/tcp" # inx
+ - "8050:8080/tcp" # web API
+ - "8051:8081/tcp" # dashboard
+ - "6051:6061/tcp" # pprof
+ - "9059:9029/tcp" # inx
networks:
- iota-core
@@ -118,53 +108,104 @@ services:
image: iotaledger/inx-indexer:2.0-alpha
stop_grace_period: 1m
depends_on:
- validator-1:
+ node-1:
condition: service_started
command:
- - "--inx.address=validator-1:9029"
+ - "--inx.address=node-1:9029"
- "--restAPI.bindAddress=inx-indexer:9091"
networks:
- iota-core
- inx-blockissuer:
- image: iotaledger/inx-blockissuer:1.0-alpha
- stop_grace_period: 1m
- depends_on:
- validator-1:
- condition: service_started
- inx-indexer:
- condition: service_started
- restart: on-failure
- environment:
- - "BLOCKISSUER_PRV_KEY=432c624ca3260f910df35008d5c740593b222f1e196e6cdb8cd1ad080f0d4e33997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"
- command:
- - "--inx.address=validator-1:9029"
- - "--restAPI.bindAddress=inx-blockissuer:9086"
- - "--blockIssuer.accountAddress=rms1prkursay9fs2qjmfctamd6yxg9x8r3ry47786x0mvwek4qr9xd9d5c6gkun"
- networks:
- - iota-core
+# inx-blockissuer:
+# image: iotaledger/inx-blockissuer:1.0-alpha
+# stop_grace_period: 1m
+# depends_on:
+# node-1:
+# condition: service_started
+# inx-indexer:
+# condition: service_started
+# restart: on-failure
+# environment:
+# - "BLOCKISSUER_PRV_KEY=432c624ca3260f910df35008d5c740593b222f1e196e6cdb8cd1ad080f0d4e33997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"
+# command:
+# - "--inx.address=node-1:9029"
+# - "--restAPI.bindAddress=inx-blockissuer:9086"
+# - "--blockIssuer.accountAddress=rms1prkursay9fs2qjmfctamd6yxg9x8r3ry47786x0mvwek4qr9xd9d5c6gkun"
+# networks:
+# - iota-core
+#
+# inx-faucet:
+# image: iotaledger/inx-faucet:2.0-alpha
+# stop_grace_period: 1m
+# depends_on:
+# node-1:
+# condition: service_started
+# inx-indexer:
+# condition: service_started
+# inx-blockissuer:
+# condition: service_started
+# restart: on-failure
+# environment:
+# - "FAUCET_PRV_KEY=de52b9964dda96564e9fab362ab16c2669c715c6a2a853bece8a25fc58c599755b938327ea463e0c323c0fd44f6fc1843ed94daecc6909c6043d06b7152e4737"
+# command:
+# - "--inx.address=node-1:9029"
+# - "--faucet.bindAddress=inx-faucet:8091"
+# ports:
+# - "8088:8091/tcp" # faucet frontend
+# networks:
+# - iota-core
- inx-faucet:
- image: iotaledger/inx-faucet:2.0-alpha
+ inx-validator-1:
+ image: iotaledger/inx-validator:latest
stop_grace_period: 1m
depends_on:
- validator-1:
+ node-1:
condition: service_started
inx-indexer:
condition: service_started
- inx-blockissuer:
- condition: service_started
restart: on-failure
environment:
- - "FAUCET_PRV_KEY=de52b9964dda96564e9fab362ab16c2669c715c6a2a853bece8a25fc58c599755b938327ea463e0c323c0fd44f6fc1843ed94daecc6909c6043d06b7152e4737"
+ - "VALIDATOR_PRV_KEY=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"
command:
- - "--inx.address=validator-1:9029"
- - "--faucet.bindAddress=inx-faucet:8091"
- ports:
- - "8088:8091/tcp" # faucet frontend
+ - "--inx.address=node-1:9029"
+ - "--validator.ignoreBootstrapped=true"
+ - "--validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6"
networks:
- iota-core
+ inx-validator-2:
+ image: iotaledger/inx-validator:latest
+ stop_grace_period: 1m
+ depends_on:
+ node-1:
+ condition: service_started
+ inx-indexer:
+ condition: service_started
+ restart: on-failure
+ environment:
+ - "VALIDATOR_PRV_KEY=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"
+ command:
+ - "--inx.address=node-2:9029"
+ - "--validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl"
+ networks:
+ - iota-core
+
+ inx-validator-3:
+ image: iotaledger/inx-validator:latest
+ stop_grace_period: 1m
+ depends_on:
+ node-1:
+ condition: service_started
+ inx-indexer:
+ condition: service_started
+ restart: on-failure
+ environment:
+ - "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"
+ command:
+ - "--inx.address=node-3:9029"
+ - "--validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt"
+ networks:
+ - iota-core
prometheus:
image: prom/prometheus:latest
profiles:
@@ -178,7 +219,7 @@ services:
networks:
- iota-core
depends_on:
- - validator-1
+ - node-1
grafana:
image: grafana/grafana:9.5.6
diff --git a/tools/docker-network/prometheus.yml b/tools/docker-network/prometheus.yml
index 28817e795..3b64a1c47 100644
--- a/tools/docker-network/prometheus.yml
+++ b/tools/docker-network/prometheus.yml
@@ -3,11 +3,11 @@ scrape_configs:
scrape_interval: 5s
static_configs:
- targets:
- - validator-1:9311
- - validator-2:9311
- - validator-3:9311
- node-1:9311
- node-2:9311
+ - node-3:9311
+ - node-4:9311
+ - node-5:9311
dns_sd_configs:
- names:
- 'peer_replica'
diff --git a/tools/docker-network/run.sh b/tools/docker-network/run.sh
index 46a728c16..0ee2fbfe7 100755
--- a/tools/docker-network/run.sh
+++ b/tools/docker-network/run.sh
@@ -1,12 +1,16 @@
#!/bin/bash
# Create a function to join an array of strings by a given character
-function join { local IFS="$1"; shift; echo "$*"; }
+function join {
+ local IFS="$1"
+ shift
+ echo "$*"
+}
# All parameters can be optional now, just make sure we don't have too many
-if [[ $# -gt 4 ]] ; then
- echo 'Call with ./run [replicas=1|2|3|...] [grafana=0|1] [feature=0|1]'
- exit 0
+if [[ $# -gt 4 ]]; then
+ echo 'Call with ./run [replicas=1|2|3|...] [grafana=0|1] [feature=0|1]'
+ exit 0
fi
REPLICAS=${1:-1}
@@ -14,12 +18,10 @@ GRAFANA=${2:-0}
FEATURE=${3:-0}
DOCKER_COMPOSE_FILE=docker-compose.yml
-if [ $FEATURE -ne 0 ]
-then
+if [ $FEATURE -ne 0 ]; then
DOCKER_COMPOSE_FILE=docker-compose-feature.yml
fi
-
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
echo "Build iota-core"
@@ -28,8 +30,7 @@ echo "Build iota-core"
export DOCKER_BUILD_CONTEXT="../../"
export DOCKERFILE_PATH="./Dockerfile.dev"
-if [[ "$WITH_GO_WORK" -eq 1 ]]
-then
+if [[ "$WITH_GO_WORK" -eq 1 ]]; then
export DOCKER_BUILD_CONTEXT="../../../"
export DOCKERFILE_PATH="./iota-core/Dockerfile.dev"
fi
@@ -38,36 +39,34 @@ fi
echo $DOCKER_BUILD_CONTEXT $DOCKERFILE_PATH
docker compose -f $DOCKER_COMPOSE_FILE build --build-arg WITH_GO_WORK=${WITH_GO_WORK:-0} --build-arg DOCKER_BUILD_CONTEXT=${DOCKER_BUILD_CONTEXT} --build-arg DOCKERFILE_PATH=${DOCKERFILE_PATH}
-docker compose pull inx-indexer inx-blockissuer inx-faucet
+docker compose pull inx-indexer # inx-blockissuer inx-faucet
# check exit code of builder
-if [ $? -ne 0 ]
-then
+if [ $? -ne 0 ]; then
echo "Building failed. Please fix and try again!"
exit 1
fi
# create snapshot file
echo "Create snapshot"
-if [ $FEATURE -ne 0 ]
-then
- pushd ../genesis-snapshot; go run -tags=rocksdb . --config feature
+if [ $FEATURE -ne 0 ]; then
+ pushd ../genesis-snapshot
+ go run -tags=rocksdb . --config feature
else
- pushd ../genesis-snapshot; go run -tags=rocksdb . --config docker --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih
+ pushd ../genesis-snapshot
+ go run -tags=rocksdb . --config docker --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih
fi
popd
mv ../genesis-snapshot/*.snapshot .
chmod o+r *.snapshot
-
echo "Run iota-core network with ${DOCKER_COMPOSE_FILE}"
# IOTA_CORE_PEER_REPLICAS is used in docker-compose.yml to determine how many replicas to create
export IOTA_CORE_PEER_REPLICAS=$REPLICAS
# Profiles is created to set which docker profiles to run
# https://docs.docker.com/compose/profiles/
PROFILES=()
-if [ $GRAFANA -ne 0 ]
-then
+if [ $GRAFANA -ne 0 ]; then
PROFILES+=("grafana")
fi
diff --git a/tools/evil-spammer/identity/config.go b/tools/evil-spammer/identity/config.go
index 4529b5055..ebd279482 100644
--- a/tools/evil-spammer/identity/config.go
+++ b/tools/evil-spammer/identity/config.go
@@ -14,15 +14,15 @@ var Config = Params{}
var identityConfigJSON = `{
"docker": {
- "validator-1": [
+ "node-1": [
"8q491c3YWjbPwLmF2WD95YmCgh61j2kenCKHfGfByoWi",
"http://localhost:8080"
],
- "validator-2": [
+ "node-2": [
"4ata8GcTRMJ5sSv2jQJWmSYYTHct748p3tXmCFYm7wjA",
"http://localhost:8070"
],
- "validator-3": [
+ "node-3": [
"3YX6e7AL28hHihZewKdq6CMkEYVsTJBLgRiprUNiNq5E",
"http://localhost:8090"
]
From 80f6841dcf7e293bc19c701bc57e18ce9302c434 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 24 Oct 2023 12:22:24 +0200
Subject: [PATCH 07/29] Update dependency versions.
---
go.mod | 4 ++--
go.sum | 8 ++++----
tools/evil-spammer/go.mod | 2 +-
tools/evil-spammer/go.sum | 4 ++--
tools/gendoc/go.mod | 4 ++--
tools/gendoc/go.sum | 8 ++++----
tools/genesis-snapshot/go.mod | 2 +-
tools/genesis-snapshot/go.sum | 4 ++--
8 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/go.mod b/go.mod
index 5d4cf4870..5f6416868 100644
--- a/go.mod
+++ b/go.mod
@@ -24,8 +24,8 @@ require (
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/go v1.0.0-rc.2.0.20231020100621-739388b552f7
- github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd
+ 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
github.com/labstack/gommon v0.4.0
github.com/libp2p/go-libp2p v0.31.0
diff --git a/go.sum b/go.sum
index 09a448315..1293fb9d3 100644
--- a/go.sum
+++ b/go.sum
@@ -307,10 +307,10 @@ github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MD
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/go v1.0.0-rc.2.0.20231020100621-739388b552f7 h1:EU1O4N5G601nteXW3VVAXF63EkG6TetI4CdQCZiODGU=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231020100621-739388b552f7/go.mod h1:UOcPh1kcNvvKmeOvhz8y19+In51g7ogefkh4MDTBphY=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd h1:FKiEzy3gOyWDGXs6mTMS9qFHGXSxH97N5w+08ljbEtU=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231019174124-aa2290512bcd/go.mod h1:XFwcDfAF0hv6wB/trCsyDmQyPLjEZ60yTrllJ2bprN8=
+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=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d/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/evil-spammer/go.mod b/tools/evil-spammer/go.mod
index 91ec4b3b6..152c841ad 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-20231023190719-1a9daaa83ca8
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d
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 f66d3f1bb..cf5492131 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-20231023190719-1a9daaa83ca8 h1:81aWESXFC04iKI9I140eDrBb9zBWXfVoAUMp9berk0c=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d h1:vGfZmcCCloTzim6TysS3fXxc9xsTfXoVB6bsedZgp7A=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d/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 65a416839..66fec4544 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -72,8 +72,8 @@ require (
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/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd // indirect
- github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8 // 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
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 c13517eea..33bc76954 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -311,10 +311,10 @@ github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MD
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/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/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=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d/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 0743c2ff7..adc7cdb7f 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-20231023190719-1a9daaa83ca8
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d
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 f50a589ed..0154c5692 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-20231023190719-1a9daaa83ca8 h1:81aWESXFC04iKI9I140eDrBb9zBWXfVoAUMp9berk0c=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231023190719-1a9daaa83ca8/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d h1:vGfZmcCCloTzim6TysS3fXxc9xsTfXoVB6bsedZgp7A=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d/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=
From 970fea1f0b5687d9f4ba7fc1fac86cfe15a8d7b9 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 24 Oct 2023 13:14:49 +0200
Subject: [PATCH 08/29] Update dependencies.
---
go.mod | 2 +-
go.sum | 4 ++--
.../sybilprotectionv1/performance/performance.go | 12 ++++++++++--
tools/docker-network/docker-compose.yml | 3 +++
tools/gendoc/go.mod | 2 +-
tools/gendoc/go.sum | 4 ++--
6 files changed, 19 insertions(+), 8 deletions(-)
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=
From 52732056fe2cb205298b54ce24ec499dc52f3860 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Wed, 25 Oct 2023 21:51:16 +0200
Subject: [PATCH 09/29] Post merge fixes
---
components/inx/server_accounts.go | 13 +++++++++++--
go.mod | 2 +-
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 ++--
7 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/components/inx/server_accounts.go b/components/inx/server_accounts.go
index 998120dd6..cb3fe68ad 100644
--- a/components/inx/server_accounts.go
+++ b/components/inx/server_accounts.go
@@ -29,8 +29,12 @@ func (s *Server) ReadIsCommitteeMember(_ context.Context, accountInfoRequest *in
if err != nil {
return nil, ierrors.Wrap(err, "error when parsing account id")
}
+ committee, exists := deps.Protocol.MainEngineInstance().SybilProtection.SeatManager().CommitteeInSlot(slot)
+ if !exists {
+ return nil, ierrors.Errorf("committee does not exist for slot %d", slot)
+ }
- return inx.WrapBoolResponse(deps.Protocol.MainEngineInstance().SybilProtection.SeatManager().Committee(slot).HasAccount(accountID)), nil
+ return inx.WrapBoolResponse(committee.HasAccount(accountID)), nil
}
func (s *Server) ReadIsCandidate(_ context.Context, accountInfoRequest *inx.AccountInfoRequest) (*inx.BoolResponse, error) {
@@ -40,5 +44,10 @@ func (s *Server) ReadIsCandidate(_ context.Context, accountInfoRequest *inx.Acco
return nil, ierrors.Wrap(err, "error when parsing account id")
}
- return inx.WrapBoolResponse(deps.Protocol.MainEngineInstance().SybilProtection.IsCandidateActive(accountID, deps.Protocol.APIForSlot(slot).TimeProvider().EpochFromSlot(slot))), nil
+ isCandidateActive, err := deps.Protocol.MainEngineInstance().SybilProtection.IsCandidateActive(accountID, deps.Protocol.APIForSlot(slot).TimeProvider().EpochFromSlot(slot))
+ if err != nil {
+ return nil, ierrors.Wrap(err, "error when checking if candidate is active")
+ }
+
+ return inx.WrapBoolResponse(isCandidateActive), nil
}
diff --git a/go.mod b/go.mod
index 3895dd8e8..ae91ca026 100644
--- a/go.mod
+++ b/go.mod
@@ -25,7 +25,7 @@ require (
github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b
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-20231025071930-7cc5b35d50b1
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba
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 40540cd56..ea83849f2 100644
--- a/go.sum
+++ b/go.sum
@@ -309,8 +309,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231023191159-38919c4705e0 h1:/8pbF
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-20231025071930-7cc5b35d50b1 h1:7ChiFHg4KsdS4mKjYpFUUNe9t9nsQzNtJ/XnUV2w5ZM=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231025071930-7cc5b35d50b1/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba h1:/OYVTnZTxOX87CrdZ86HwRjiVrxhkdy36/ePSq/EN24=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba/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/gendoc/go.mod b/tools/gendoc/go.mod
index 1a8d2fa96..79aae10a9 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -73,7 +73,7 @@ require (
github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b // 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/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba // 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 675a67e98..d6d77e984 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -313,8 +313,8 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231024101555-660b434164ff h1:cLRjT
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=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231023205010-58a0b5c7fe6d/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba h1:/OYVTnZTxOX87CrdZ86HwRjiVrxhkdy36/ePSq/EN24=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba/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 080b961b4..13e737d52 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-20231025071930-7cc5b35d50b1
+ github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba
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 fd8d7e3ec..637a77ed9 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-20231025071930-7cc5b35d50b1 h1:7ChiFHg4KsdS4mKjYpFUUNe9t9nsQzNtJ/XnUV2w5ZM=
-github.com/iotaledger/iota.go/v4 v4.0.0-20231025071930-7cc5b35d50b1/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba h1:/OYVTnZTxOX87CrdZ86HwRjiVrxhkdy36/ePSq/EN24=
+github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba/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=
From 2b5a4ca9d3225685ce1db9d14d7fffb4e409b042 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Thu, 26 Oct 2023 09:44:03 +0200
Subject: [PATCH 10/29] Fix docker-compose after merge
---
tools/docker-network/docker-compose.yml | 75 +++++++++++--------------
1 file changed, 33 insertions(+), 42 deletions(-)
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index 08e8d2290..68e85c0b2 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -8,7 +8,6 @@ services:
###################
# IOTA-CORE Nodes #
###################
-
node-1-validator:
build: *iota-core_build
stop_grace_period: 1m
@@ -194,7 +193,7 @@ services:
--inx.address=node-1-validator:9019
--restAPI.bindAddress=inx-indexer:9011
-inx-blockissuer:
+ inx-blockissuer:
image: iotaledger/inx-blockissuer:1.0-alpha
stop_grace_period: 1m
restart: unless-stopped
@@ -244,7 +243,6 @@ inx-blockissuer:
condition: service_started
inx-indexer:
condition: service_started
- restart: on-failure
environment:
- "VALIDATOR_PRV_KEY=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"
command:
@@ -254,49 +252,42 @@ inx-blockissuer:
- "--validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6"
networks:
- iota-core
- environment:
- - "BLOCKISSUER_PRV_KEY=432c624ca3260f910df35008d5c740593b222f1e196e6cdb8cd1ad080f0d4e33997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"
- command: >
- --inx.address=node-1-validator:9029
- --restAPI.bindAddress=inx-blockissuer:9086
- --blockIssuer.accountAddress=rms1prkursay9fs2qjmfctamd6yxg9x8r3ry47786x0mvwek4qr9xd9d5c6gkun
- --blockIssuer.proofOfWork.targetTrailingZeros=5
inx-validator-2:
- image: iotaledger/inx-validator:latest
- stop_grace_period: 1m
- depends_on:
- node-1:
- condition: service_started
- inx-indexer:
- condition: service_started
- restart: on-failure
- environment:
- - "VALIDATOR_PRV_KEY=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"
- command:
- - "--logger.level=debug"
- - "--inx.address=node-2:9029"
- - "--validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl"
- networks:
- - iota-core
+ image: iotaledger/inx-validator:latest
+ stop_grace_period: 1m
+ restart: unless-stopped
+ depends_on:
+ node-2-validator:
+ condition: service_started
+ inx-indexer:
+ condition: service_started
+ environment:
+ - "VALIDATOR_PRV_KEY=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"
+ command:
+ - "--logger.level=debug"
+ - "--inx.address=node-2-validator:9029"
+ - "--validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl"
+ networks:
+ - iota-core
inx-validator-3:
- image: iotaledger/inx-validator:latest
- stop_grace_period: 1m
- depends_on:
- node-1:
- condition: service_started
- inx-indexer:
- condition: service_started
- restart: on-failure
- environment:
- - "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"
- command:
- - "--logger.level=debug"
- - "--inx.address=node-3:9029"
- - "--validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt"
- networks:
- - iota-core
+ image: iotaledger/inx-validator:latest
+ stop_grace_period: 1m
+ restart: unless-stopped
+ depends_on:
+ node-3-validator:
+ condition: service_started
+ inx-indexer:
+ condition: service_started
+ environment:
+ - "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"
+ command:
+ - "--logger.level=debug"
+ - "--inx.address=node-3:9029"
+ - "--validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt"
+ networks:
+ - iota-core
# Create our own network
networks:
From 8cb895a91f703003e51692afb395b8ff7c8fd7bd Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Thu, 26 Oct 2023 09:44:14 +0200
Subject: [PATCH 11/29] Add ForceCommitUntil and ActiveRootBlocks methods
---
components/inx/server_blocks.go | 6 ++++++
components/inx/server_commitments.go | 8 ++++++++
go.mod | 4 ++--
go.sum | 4 ++++
4 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/components/inx/server_blocks.go b/components/inx/server_blocks.go
index 77a5e9b77..b73cd1941 100644
--- a/components/inx/server_blocks.go
+++ b/components/inx/server_blocks.go
@@ -16,6 +16,12 @@ import (
iotago "github.com/iotaledger/iota.go/v4"
)
+func (s *Server) ActiveRootBlocks(_ context.Context, _ *inx.NoParams) *inx.RootBlocksResponse {
+ activeRootBlocks := deps.Protocol.MainEngineInstance().EvictionState.ActiveRootBlocks()
+
+ return inx.WrapRootBlocks(activeRootBlocks)
+}
+
func (s *Server) ReadBlock(_ context.Context, blockID *inx.BlockId) (*inx.RawBlock, error) {
blkID := blockID.Unwrap()
block, exists := deps.Protocol.MainEngineInstance().Block(blkID) // block +1
diff --git a/components/inx/server_commitments.go b/components/inx/server_commitments.go
index 7dd44ba84..94926794f 100644
--- a/components/inx/server_commitments.go
+++ b/components/inx/server_commitments.go
@@ -22,6 +22,14 @@ func inxCommitment(commitment *model.Commitment) *inx.Commitment {
}
}
+func (s *Server) ForceCommitUntil(_ context.Context, slot *inx.SlotIndex) error {
+ err := deps.Protocol.MainEngineInstance().Notarization.ForceCommitUntil(slot.Unwrap())
+ if err != nil {
+ return ierrors.Wrapf(err, "error while performing force commit until %s", slot.Index)
+ }
+
+ return nil
+}
func (s *Server) ReadCommitment(_ context.Context, req *inx.CommitmentRequest) (*inx.Commitment, error) {
commitmentSlot := iotago.SlotIndex(req.GetCommitmentSlot())
diff --git a/go.mod b/go.mod
index ae91ca026..d0ca7efaa 100644
--- a/go.mod
+++ b/go.mod
@@ -23,8 +23,8 @@ 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.20231023191159-38919c4705e0
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231023190837-6e7b2cdfd4fd
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231026074243-aa6acabc771d
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777
github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
diff --git a/go.sum b/go.sum
index ea83849f2..ce318f8bd 100644
--- a/go.sum
+++ b/go.sum
@@ -307,8 +307,12 @@ github.com/iotaledger/hive.go/stringify v0.0.0-20231020115340-13da292c580b h1:MD
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.20231026074243-aa6acabc771d h1:3DzcNXfH24h8As7yMoq9m4qL2nxZyXAYIosYv/ShZbs=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231026074243-aa6acabc771d/go.mod h1:XEWewbBaqL+APJJlckhQBsg6GVc4gRmNQ+ARQtSRrvc=
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/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777 h1:e2C37LxDRxnoDVMK8rhktxSB/dnL0AcXFLNwkArdaoo=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY=
github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba h1:/OYVTnZTxOX87CrdZ86HwRjiVrxhkdy36/ePSq/EN24=
github.com/iotaledger/iota.go/v4 v4.0.0-20231025085218-4121986877ba/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
From 17ed5141908e10b6f223903069b241deeb697ad1 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Thu, 26 Oct 2023 13:53:51 +0200
Subject: [PATCH 12/29] Fix some bugs
---
components/inx/server_blocks.go | 4 ++--
components/inx/server_commitments.go | 6 +++---
.../sybilprotectionv1/performance/performance.go | 11 +++++++----
tools/docker-network/docker-compose.yml | 4 ++--
tools/docker-network/run.sh | 2 +-
5 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/components/inx/server_blocks.go b/components/inx/server_blocks.go
index b73cd1941..19cdfce31 100644
--- a/components/inx/server_blocks.go
+++ b/components/inx/server_blocks.go
@@ -16,10 +16,10 @@ import (
iotago "github.com/iotaledger/iota.go/v4"
)
-func (s *Server) ActiveRootBlocks(_ context.Context, _ *inx.NoParams) *inx.RootBlocksResponse {
+func (s *Server) ReadActiveRootBlocks(_ context.Context, _ *inx.NoParams) (*inx.RootBlocksResponse, error) {
activeRootBlocks := deps.Protocol.MainEngineInstance().EvictionState.ActiveRootBlocks()
- return inx.WrapRootBlocks(activeRootBlocks)
+ return inx.WrapRootBlocks(activeRootBlocks), nil
}
func (s *Server) ReadBlock(_ context.Context, blockID *inx.BlockId) (*inx.RawBlock, error) {
diff --git a/components/inx/server_commitments.go b/components/inx/server_commitments.go
index 94926794f..b16713f48 100644
--- a/components/inx/server_commitments.go
+++ b/components/inx/server_commitments.go
@@ -22,13 +22,13 @@ func inxCommitment(commitment *model.Commitment) *inx.Commitment {
}
}
-func (s *Server) ForceCommitUntil(_ context.Context, slot *inx.SlotIndex) error {
+func (s *Server) ForceCommitUntil(_ context.Context, slot *inx.SlotIndex) (*inx.NoParams, error) {
err := deps.Protocol.MainEngineInstance().Notarization.ForceCommitUntil(slot.Unwrap())
if err != nil {
- return ierrors.Wrapf(err, "error while performing force commit until %s", slot.Index)
+ return nil, ierrors.Wrapf(err, "error while performing force commit until %d", slot.Index)
}
- return nil
+ return &inx.NoParams{}, nil
}
func (s *Server) ReadCommitment(_ context.Context, req *inx.CommitmentRequest) (*inx.Commitment, error) {
commitmentSlot := iotago.SlotIndex(req.GetCommitmentSlot())
diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go
index a09cdadd9..d679fedd4 100644
--- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go
+++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/performance.go
@@ -141,17 +141,20 @@ func (t *Tracker) ValidatorCandidates(epoch iotago.EpochIndex) (ds.Set[iotago.Ac
}
func (t *Tracker) getValidatorCandidates(epoch iotago.EpochIndex) (ds.Set[iotago.AccountID], error) {
+ candidates := ds.NewSet[iotago.AccountID]()
+
+ // Epoch 0 has no candidates as it's the genesis committee.
+ if epoch == 0 {
+ return candidates, nil
+ }
+
// we store candidates in the store for the epoch of their activity, but the passed argument points to the target epoch,
// so it's necessary to subtract one epoch from the passed value
- // TODO: handle query for epoch 0
-
candidateStore, err := t.committeeCandidatesInEpochFunc(epoch - 1)
if err != nil {
return nil, ierrors.Wrapf(err, "error while retrieving candidates for epoch %d", epoch)
}
- candidates := ds.NewSet[iotago.AccountID]()
-
var innerErr error
err = candidateStore.IterateKeys(kvstore.EmptyPrefix, func(key kvstore.Key) bool {
accountID, _, err := iotago.AccountIDFromBytes(key)
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index 68e85c0b2..5b2f3ce5c 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -247,7 +247,7 @@ services:
- "VALIDATOR_PRV_KEY=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"
command:
- "--logger.level=debug"
- - "--inx.address=node-1:9029"
+ - "--inx.address=node-1-validator:9029"
- "--validator.ignoreBootstrapped=true"
- "--validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6"
networks:
@@ -284,7 +284,7 @@ services:
- "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"
command:
- "--logger.level=debug"
- - "--inx.address=node-3:9029"
+ - "--inx.address=node-3-validator:9029"
- "--validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt"
networks:
- iota-core
diff --git a/tools/docker-network/run.sh b/tools/docker-network/run.sh
index d13453261..40744cb18 100755
--- a/tools/docker-network/run.sh
+++ b/tools/docker-network/run.sh
@@ -36,7 +36,7 @@ fi
echo $DOCKER_BUILD_CONTEXT $DOCKERFILE_PATH
docker compose -f $DOCKER_COMPOSE_FILE build --build-arg WITH_GO_WORK=${WITH_GO_WORK:-0} --build-arg DOCKER_BUILD_CONTEXT=${DOCKER_BUILD_CONTEXT} --build-arg DOCKERFILE_PATH=${DOCKERFILE_PATH}
-docker compose pull inx-indexer # inx-blockissuer inx-faucet
+docker compose pull inx-indexer inx-blockissuer inx-faucet
# check exit code of builder
if [ $? -ne 0 ]; then
From 0a2142c7233ee3b27fb398032de23d89ccfcc6f9 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 27 Oct 2023 09:42:51 +0200
Subject: [PATCH 13/29] Update inx and inx-app
---
go.mod | 4 ++--
go.sum | 8 ++++----
tools/gendoc/go.mod | 4 ++--
tools/gendoc/go.sum | 8 ++++----
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/go.mod b/go.mod
index 69e6bdd7f..263347d68 100644
--- a/go.mod
+++ b/go.mod
@@ -23,8 +23,8 @@ 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.20231026074243-aa6acabc771d
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231027074131-1b65b7ff82a4
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231027074002-08b776089472
github.com/iotaledger/iota.go/v4 v4.0.0-20231026154111-efd63ff4f03d
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
diff --git a/go.sum b/go.sum
index 923d237fd..e1ccbd64b 100644
--- a/go.sum
+++ b/go.sum
@@ -305,10 +305,10 @@ 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.20231026074243-aa6acabc771d h1:3DzcNXfH24h8As7yMoq9m4qL2nxZyXAYIosYv/ShZbs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231026074243-aa6acabc771d/go.mod h1:XEWewbBaqL+APJJlckhQBsg6GVc4gRmNQ+ARQtSRrvc=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777 h1:e2C37LxDRxnoDVMK8rhktxSB/dnL0AcXFLNwkArdaoo=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231027074131-1b65b7ff82a4 h1:0H27ANY7q1PM2FZpu2ns720dAx/KlHqQ3qMfZOmwRdU=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231027074131-1b65b7ff82a4/go.mod h1:yx3gYzpPYH3qQgXzpyigx+DwQcmZWGaL8XaorJQWX8o=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231027074002-08b776089472 h1:/yFKxodL9oi5YBpmGBXlxgs9VZDlfz6tQ7k0Gce7l7Y=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231027074002-08b776089472/go.mod h1:iXG/tO+GQZQzgIUyITnQDigb6Ny1wSueHFIYne4HBkc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231026154111-efd63ff4f03d h1:gcJz0J3xFELIPT7y4xqW+q25oOcK6QMlxNnrfFu8srA=
github.com/iotaledger/iota.go/v4 v4.0.0-20231026154111-efd63ff4f03d/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod
index 448246bea..a6d66cce7 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -71,8 +71,8 @@ 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.20231026074243-aa6acabc771d // indirect
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777 // indirect
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231027074131-1b65b7ff82a4 // indirect
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231027074002-08b776089472 // indirect
github.com/iotaledger/iota.go/v4 v4.0.0-20231026154111-efd63ff4f03d // indirect
github.com/ipfs/boxo v0.13.1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum
index 1b4de1068..e1a105cd1 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -309,10 +309,10 @@ 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.20231026074243-aa6acabc771d h1:3DzcNXfH24h8As7yMoq9m4qL2nxZyXAYIosYv/ShZbs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231026074243-aa6acabc771d/go.mod h1:XEWewbBaqL+APJJlckhQBsg6GVc4gRmNQ+ARQtSRrvc=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777 h1:e2C37LxDRxnoDVMK8rhktxSB/dnL0AcXFLNwkArdaoo=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231026074031-5d93e02f7777/go.mod h1:MK0SHfNicBmcaZb3qS3tA8NEJIWKNbcNtNNKuSDKqXY=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231027074131-1b65b7ff82a4 h1:0H27ANY7q1PM2FZpu2ns720dAx/KlHqQ3qMfZOmwRdU=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231027074131-1b65b7ff82a4/go.mod h1:yx3gYzpPYH3qQgXzpyigx+DwQcmZWGaL8XaorJQWX8o=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231027074002-08b776089472 h1:/yFKxodL9oi5YBpmGBXlxgs9VZDlfz6tQ7k0Gce7l7Y=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231027074002-08b776089472/go.mod h1:iXG/tO+GQZQzgIUyITnQDigb6Ny1wSueHFIYne4HBkc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231026154111-efd63ff4f03d h1:gcJz0J3xFELIPT7y4xqW+q25oOcK6QMlxNnrfFu8srA=
github.com/iotaledger/iota.go/v4 v4.0.0-20231026154111-efd63ff4f03d/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
From 320a9a9229f827ceffd65c0e050577faeaf4b72a Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Fri, 27 Oct 2023 10:17:20 +0200
Subject: [PATCH 14/29] Trigger OnlineCommitteeSeatRemoved only when the seat
was actually removed.
---
.../activitytracker/activitytrackerv1/activitytracker.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pkg/protocol/sybilprotection/activitytracker/activitytrackerv1/activitytracker.go b/pkg/protocol/sybilprotection/activitytracker/activitytrackerv1/activitytracker.go
index e167e2ff5..9a58b6680 100644
--- a/pkg/protocol/sybilprotection/activitytracker/activitytrackerv1/activitytracker.go
+++ b/pkg/protocol/sybilprotection/activitytracker/activitytrackerv1/activitytracker.go
@@ -77,7 +77,9 @@ func (a *ActivityTracker) MarkSeatActive(seat account.SeatIndex, id iotago.Accou
func (a *ActivityTracker) markSeatInactive(seat account.SeatIndex) {
a.lastActivities.Delete(seat)
- a.onlineCommittee.Delete(seat)
- a.Events.OnlineCommitteeSeatRemoved.Trigger(seat)
+ // Only trigger the event if online committee member is removed.
+ if a.onlineCommittee.Delete(seat) {
+ a.Events.OnlineCommitteeSeatRemoved.Trigger(seat)
+ }
}
From bfe211fb54aa2d9cc83079d5dfbe5278fcbf90ea Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Mon, 30 Oct 2023 12:24:47 +0100
Subject: [PATCH 15/29] Update go.mod versions
---
go.mod | 4 ++--
go.sum | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/go.mod b/go.mod
index ec5d2d7d5..54970ad19 100644
--- a/go.mod
+++ b/go.mod
@@ -23,8 +23,8 @@ require (
github.com/iotaledger/hive.go/runtime v0.0.0-20231027195901-620bd7470e42
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
diff --git a/go.sum b/go.sum
index 4bf13faa4..9d4df161f 100644
--- a/go.sum
+++ b/go.sum
@@ -307,8 +307,12 @@ github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42 h1:Ol
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26 h1:ZZs7IzdxrogQWGF1HfUUfR3KW8WhfxE4hUbfwZCDXFY=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26/go.mod h1:aFS0dN6QgKGgZakGgEv57NOLw+pLGdEiGcfDZ3h9GL0=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 h1:/X+ooE7JtCPO8dU3Z7NCQi6bRdbQsmJ5CSMIFphb7Io=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1/go.mod h1:N/COrSaVwR8pSe/3JaTjofplvcpQSE5aItHPgv38UZw=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d h1:0SVvkN04C+Ylc2puM/c77HuvRMmHRl0BkNjlZx1YWeA=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 h1:Ziqm6j7+uXxw3suhinqmXxEocXL04tAf3rcGSnPJiaU=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a h1:WLW4iaJAx4N9Pujv+gzHklnnjCt5MPrtXyVcK3UXdNc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
From 15bdd0d37da8af41fef13801dc91a1c586befcec Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Mon, 30 Oct 2023 12:25:39 +0100
Subject: [PATCH 16/29] Update go.mod versions
---
go.sum | 4 ----
tools/gendoc/go.mod | 4 ++--
tools/gendoc/go.sum | 8 ++++----
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/go.sum b/go.sum
index 9d4df161f..af6743539 100644
--- a/go.sum
+++ b/go.sum
@@ -305,12 +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-20231027195901-620bd7470e42 h1:OlDhgvJ48bZxcvTeebJ1b96xtNnJAddejd2Q4rlH1mU=
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26 h1:ZZs7IzdxrogQWGF1HfUUfR3KW8WhfxE4hUbfwZCDXFY=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26/go.mod h1:aFS0dN6QgKGgZakGgEv57NOLw+pLGdEiGcfDZ3h9GL0=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 h1:/X+ooE7JtCPO8dU3Z7NCQi6bRdbQsmJ5CSMIFphb7Io=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1/go.mod h1:N/COrSaVwR8pSe/3JaTjofplvcpQSE5aItHPgv38UZw=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d h1:0SVvkN04C+Ylc2puM/c77HuvRMmHRl0BkNjlZx1YWeA=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 h1:Ziqm6j7+uXxw3suhinqmXxEocXL04tAf3rcGSnPJiaU=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a h1:WLW4iaJAx4N9Pujv+gzHklnnjCt5MPrtXyVcK3UXdNc=
diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod
index 0fa7e6386..d536b2883 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -71,8 +71,8 @@ require (
github.com/iotaledger/hive.go/runtime v0.0.0-20231027195901-620bd7470e42 // 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-20231027195901-620bd7470e42 // indirect
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26 // indirect
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d // indirect
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 // indirect
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 // indirect
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a // indirect
github.com/ipfs/boxo v0.13.1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum
index 955217c98..eff404424 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -309,10 +309,10 @@ 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-20231027195901-620bd7470e42 h1:OlDhgvJ48bZxcvTeebJ1b96xtNnJAddejd2Q4rlH1mU=
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26 h1:ZZs7IzdxrogQWGF1HfUUfR3KW8WhfxE4hUbfwZCDXFY=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231028104239-869296c43f26/go.mod h1:aFS0dN6QgKGgZakGgEv57NOLw+pLGdEiGcfDZ3h9GL0=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d h1:0SVvkN04C+Ylc2puM/c77HuvRMmHRl0BkNjlZx1YWeA=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231028104044-69b02af0058d/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 h1:/X+ooE7JtCPO8dU3Z7NCQi6bRdbQsmJ5CSMIFphb7Io=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1/go.mod h1:N/COrSaVwR8pSe/3JaTjofplvcpQSE5aItHPgv38UZw=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 h1:Ziqm6j7+uXxw3suhinqmXxEocXL04tAf3rcGSnPJiaU=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a h1:WLW4iaJAx4N9Pujv+gzHklnnjCt5MPrtXyVcK3UXdNc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
From d5481eb422b534db6ce5844af8cbf9a6805a94f5 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Mon, 30 Oct 2023 12:52:58 +0100
Subject: [PATCH 17/29] Apply review suggestions.
---
components/inx/server_accounts.go | 2 +-
tools/docker-network/docker-compose.yml | 40 +++++++++++++------------
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/components/inx/server_accounts.go b/components/inx/server_accounts.go
index cb3fe68ad..6e8585be6 100644
--- a/components/inx/server_accounts.go
+++ b/components/inx/server_accounts.go
@@ -8,7 +8,7 @@ import (
iotago "github.com/iotaledger/iota.go/v4"
)
-func (s *Server) ReadIsAccountValidator(_ context.Context, accountInfoRequest *inx.AccountInfoRequest) (*inx.BoolResponse, error) {
+func (s *Server) ReadIsValidatorAccount(_ context.Context, accountInfoRequest *inx.AccountInfoRequest) (*inx.BoolResponse, error) {
slot := iotago.SlotIndex(accountInfoRequest.GetAccountSlot())
accountID, _, err := iotago.AccountIDFromBytes(accountInfoRequest.AccountId)
if err != nil {
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index 941303cd1..98bf63fde 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -244,15 +244,16 @@ services:
condition: service_started
inx-indexer:
condition: service_started
- environment:
- - "VALIDATOR_PRV_KEY=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"
- command:
- - "--logger.level=debug"
- - "--inx.address=node-1-validator:9029"
- - "--validator.ignoreBootstrapped=true"
- - "--validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6"
networks:
- iota-core
+ environment:
+ - "VALIDATOR_PRV_KEY=443a988ea61797651217de1f4662d4d6da11fd78e67f94511453bf6576045a05293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"
+ command: >
+ --logger.level=debug
+ --inx.address=node-1-validator:9029
+ --validator.ignoreBootstrapped=true
+ --validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6
+
inx-validator-2:
image: iotaledger/inx-validator:latest
@@ -263,14 +264,14 @@ services:
condition: service_started
inx-indexer:
condition: service_started
- environment:
- - "VALIDATOR_PRV_KEY=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"
- command:
- - "--logger.level=debug"
- - "--inx.address=node-2-validator:9029"
- - "--validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl"
networks:
- iota-core
+ environment:
+ - "VALIDATOR_PRV_KEY=3a5d39f8b60367a17fd54dac2a32c172c8e1fd6cf74ce65f1e13edba565f281705c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"
+ command: >
+ --logger.level=debug
+ --inx.address=node-2-validator:9029
+ --validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl
inx-validator-3:
image: iotaledger/inx-validator:latest
@@ -281,14 +282,15 @@ services:
condition: service_started
inx-indexer:
condition: service_started
- environment:
- - "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"
- command:
- - "--logger.level=debug"
- - "--inx.address=node-3-validator:9029"
- - "--validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt"
networks:
- iota-core
+ environment:
+ - "VALIDATOR_PRV_KEY=db39d2fde6301d313b108dc9db1ee724d0f405f6fde966bd776365bc5f4a5fb31e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"
+ command: >
+ --logger.level=debug
+ --inx.address=node-3-validator:9029
+ --validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt
+
# Create our own network
networks:
From 5851ebd9b1fe272be6a0f86e92f0841f457bbfd5 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Mon, 30 Oct 2023 15:58:43 +0100
Subject: [PATCH 18/29] Add inx-validator deployment to Ansible.
---
deploy/ansible/hosts/feature.yml | 10 +-
.../templates/docker-compose-iota-core.yml.j2 | 32 +++++--
tools/docker-network/docker-compose.yml | 11 ---
tools/docker-network/run.sh | 2 +-
tools/genesis-snapshot/presets/presets.go | 94 ++++++++++++++-----
5 files changed, 101 insertions(+), 48 deletions(-)
diff --git a/deploy/ansible/hosts/feature.yml b/deploy/ansible/hosts/feature.yml
index ac8e44cfc..6f0f8446d 100644
--- a/deploy/ansible/hosts/feature.yml
+++ b/deploy/ansible/hosts/feature.yml
@@ -7,20 +7,24 @@ cores:
internal_nodes:
hosts:
node-01.feature.shimmer.iota.cafe:
- validatorAccount: "{{ NODE_01_ACCOUNTID }}"
+ # validatorAccountAddress: "{{ NODE_01_ACCOUNTID }}"
+ validatorAccountAddress:"rms1pqlhggrg2ml9p0q5c4593r2yd3jwgxn20d65ulyw6z9r7xmm78apq2067mf"
validatorPrvKey: "{{ NODE_01_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_01_P2PIDENTITYPRIVATEKEY }}"
node-02.feature.shimmer.iota.cafe:
- validatorAccount: "{{ NODE_02_ACCOUNTID }}"
+ # validatorAccountAddress: "{{ NODE_02_ACCOUNTID }}"
+ validatorAccountAddress:"rms1pzjwamvhjuqtw3dkfwmmj2fgcetcdyt4uxrnjxel4caxfstzz903y7hhr3d"
validatorPrvKey: "{{ NODE_02_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_02_P2PIDENTITYPRIVATEKEY }}"
node-03.feature.shimmer.iota.cafe:
- validatorAccount: "{{ NODE_03_ACCOUNTID }}"
+ # validatorAccountAddress: "{{ NODE_03_ACCOUNTID }}"
+ validatorAccountAddress:"rms1pz6kedkxyw9md2cmp0wcdhvsxrn2e7gzuyly76ffymy4dhvtkm58qqazeuk"
validatorPrvKey: "{{ NODE_03_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_03_P2PIDENTITYPRIVATEKEY }}"
node-04.feature.shimmer.iota.cafe:
p2pIdentityPrvKey: "{{ NODE_04_P2PIDENTITYPRIVATEKEY }}"
blockissuerPrvKey: "{{ NODE_04_BLOCKISSUER_PRV_KEY }}"
+ blockissuerAccountAddress: "rms1pqas0clgfsf8du9e6dw0yx9nwclqe0dd4f728pvgmcshpscm8r5mkddrrfc"
faucetPrvKey: "{{ NODE_04_FAUCET_PRV_KEY }}"
node-05.feature.shimmer.iota.cafe:
p2pIdentityPrvKey: "{{ NODE_05_P2PIDENTITYPRIVATEKEY }}"
diff --git a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2 b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
index d3bc9d82b..c9879df51 100644
--- a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
+++ b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
@@ -49,14 +49,6 @@ services:
--restAPI.bindAddress=0.0.0.0:14265
--database.path=/app/data/database
--protocol.snapshot.path=/app/data/snapshot.bin
- {% if 'node-01' in inventory_hostname or 'node-02' in inventory_hostname or 'node-03' in inventory_hostname %}
- --validator.enabled=true
- {% if 'node-01' in inventory_hostname %}
- --validator.ignoreBootstrapped=true
- {% endif %}
- --validator.account={{validatorAccount}}
- --validator.privateKey={{validatorPrvKey}}
- {% endif %}
--dashboard.bindAddress=0.0.0.0:8081
--metrics.bindAddress=iota-core:9311
--inx.enabled=true
@@ -101,7 +93,7 @@ services:
command: >
--inx.address=iota-core:9029
--restAPI.bindAddress=inx-blockissuer:9086
- --blockIssuer.accountAddress=rms1pqas0clgfsf8du9e6dw0yx9nwclqe0dd4f728pvgmcshpscm8r5mkddrrfc
+ --blockIssuer.accountAddress={{blockissuerAccountAddress}}
--blockIssuer.proofOfWork.targetTrailingZeros=5
inx-faucet:
@@ -125,4 +117,26 @@ services:
command: >
--inx.address=iota-core:9029
--faucet.bindAddress=0.0.0.0:8091
+{% endif %}
+
+{% if 'node-01' in inventory_hostname or 'node-02' in inventory_hostname or 'node-03' in inventory_hostname %}
+ inx-validator:
+ container_name: inx-validator
+ image: iotaledger/inx-validator:1.0-alpha
+ stop_grace_period: 1m
+ restart: unless-stopped
+ depends_on:
+ iota-core:
+ condition: service_healthy
+ networks:
+ - iota-core
+ environment:
+ - "VALIDATOR_PRV_KEY={{validatorPrvKey}}"
+ command: >
+ --logger.level=debug
+ --inx.address=iota-core:9029
+ {% if 'node-01' in inventory_hostname %}
+ --validator.ignoreBootstrapped=true
+ {% endif %}
+ --validator.accountAddress={{validatorAccountAddress}}
{% endif %}
\ No newline at end of file
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index 98bf63fde..7874bd3db 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -242,8 +242,6 @@ services:
depends_on:
node-1-validator:
condition: service_started
- inx-indexer:
- condition: service_started
networks:
- iota-core
environment:
@@ -252,8 +250,6 @@ services:
--logger.level=debug
--inx.address=node-1-validator:9029
--validator.ignoreBootstrapped=true
- --validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6
-
inx-validator-2:
image: iotaledger/inx-validator:latest
@@ -262,8 +258,6 @@ services:
depends_on:
node-2-validator:
condition: service_started
- inx-indexer:
- condition: service_started
networks:
- iota-core
environment:
@@ -271,7 +265,6 @@ services:
command: >
--logger.level=debug
--inx.address=node-2-validator:9029
- --validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl
inx-validator-3:
image: iotaledger/inx-validator:latest
@@ -280,8 +273,6 @@ services:
depends_on:
node-3-validator:
condition: service_started
- inx-indexer:
- condition: service_started
networks:
- iota-core
environment:
@@ -289,8 +280,6 @@ services:
command: >
--logger.level=debug
--inx.address=node-3-validator:9029
- --validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt
-
# Create our own network
networks:
diff --git a/tools/docker-network/run.sh b/tools/docker-network/run.sh
index 40744cb18..7ac82d24a 100755
--- a/tools/docker-network/run.sh
+++ b/tools/docker-network/run.sh
@@ -36,7 +36,7 @@ fi
echo $DOCKER_BUILD_CONTEXT $DOCKERFILE_PATH
docker compose -f $DOCKER_COMPOSE_FILE build --build-arg WITH_GO_WORK=${WITH_GO_WORK:-0} --build-arg DOCKER_BUILD_CONTEXT=${DOCKER_BUILD_CONTEXT} --build-arg DOCKERFILE_PATH=${DOCKERFILE_PATH}
-docker compose pull inx-indexer inx-blockissuer inx-faucet
+docker compose pull inx-indexer inx-blockissuer inx-faucet inx-validator-1
# check exit code of builder
if [ $? -ne 0 ]; then
diff --git a/tools/genesis-snapshot/presets/presets.go b/tools/genesis-snapshot/presets/presets.go
index 8157c81e2..29babde9f 100644
--- a/tools/genesis-snapshot/presets/presets.go
+++ b/tools/genesis-snapshot/presets/presets.go
@@ -37,7 +37,15 @@ var Base = []options.Option[snapshotcreator.Options]{
var Docker = []options.Option[snapshotcreator.Options]{
snapshotcreator.WithFilePath("docker-network.snapshot"),
snapshotcreator.WithAccounts(
- snapshotcreator.AccountDetails{ // node-1-validator
+ snapshotcreator.AccountDetails{
+ /*
+ node-01-validator
+
+ Ed25519 Public Key: 293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b
+ Ed25519 Address: rms1qzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3ytgk0ny
+ Account Address: rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6
+ Restricted Address: rms1xqqfqlqzayczurc9w8cslzz4jnjkmrz5lurs32m68x7pkaxnj6unkyspqg8mulpm, Capabilities: mana
+ */
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"))),
Amount: mock.MinValidatorAccountAmount,
@@ -49,7 +57,15 @@ var Docker = []options.Option[snapshotcreator.Options]{
StakedAmount: mock.MinValidatorAccountAmount,
Mana: iotago.Mana(mock.MinValidatorAccountAmount),
},
- snapshotcreator.AccountDetails{ // node-2-validator
+ snapshotcreator.AccountDetails{
+ /*
+ node-02-validator
+
+ Ed25519 Public Key: 05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064
+ Ed25519 Address: rms1qqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875flpz2p
+ Account Address: rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl
+ Restricted Address: rms1xqqrw56clykvj36sv62e3v9254dxlaenzzuswy8plt2jfs8ezxlql6spqgkulf7u, Capabilities: mana
+ */
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"))),
Amount: mock.MinValidatorAccountAmount,
@@ -61,7 +77,15 @@ var Docker = []options.Option[snapshotcreator.Options]{
StakedAmount: mock.MinValidatorAccountAmount,
Mana: iotago.Mana(mock.MinValidatorAccountAmount),
},
- snapshotcreator.AccountDetails{ // node-3-validator
+ snapshotcreator.AccountDetails{
+ /*
+ node-03-validator
+
+ Ed25519 Public Key: 1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648
+ Ed25519 Address: rms1qp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kuvz0a44
+ Account Address: rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt
+ Restricted Address: rms1xqqx4mnsfuj4tr525a3slmgpy8d9xp6p3z4ugganckqslq97fymwkmspqgnzrkjq, Capabilities: mana
+ */
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"))),
Amount: mock.MinValidatorAccountAmount,
@@ -77,10 +101,11 @@ var Docker = []options.Option[snapshotcreator.Options]{
/*
inx-blockissuer
- ed25519 private key: 432c624ca3260f910df35008d5c740593b222f1e196e6cdb8cd1ad080f0d4e33997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270
- ed25519 public key: 997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270
- ed25519 address: edc1c3a42a60a04b69c2fbb6e886414c71c464afbc7d19fb63b36a8065334ada
- bech32 address: rms1prkursay9fs2qjmfctamd6yxg9x8r3ry47786x0mvwek4qr9xd9d5c6gkun
+ Ed25519 Private Key: 432c624ca3260f910df35008d5c740593b222f1e196e6cdb8cd1ad080f0d4e33997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270
+ Ed25519 Public Key: 997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270
+ Ed25519 Address: rms1qrkursay9fs2qjmfctamd6yxg9x8r3ry47786x0mvwek4qr9xd9d583cnpd
+ Account Address: rms1prkursay9fs2qjmfctamd6yxg9x8r3ry47786x0mvwek4qr9xd9d5c6gkun
+ Restricted Address: rms1xqqwmswr5s4xpgztd8p0hdhgseq5cuwyvjhmclgeld3mx65qv5e54kspqgda0nrn, Capabilities: mana
*/
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"))),
@@ -95,12 +120,10 @@ var Docker = []options.Option[snapshotcreator.Options]{
/*
inx-faucet
- ed25519 private key: de52b9964dda96564e9fab362ab16c2669c715c6a2a853bece8a25fc58c599755b938327ea463e0c323c0fd44f6fc1843ed94daecc6909c6043d06b7152e4737
- ed25519 public key: 5b938327ea463e0c323c0fd44f6fc1843ed94daecc6909c6043d06b7152e4737
- ed25519 address: 2f64f9d179991f50542b01e034fa043b195403875b8677efaf196b41c88803d0
- bech32 address: rms1qqhkf7w30xv375z59vq7qd86qsa3j4qrsadcval04uvkkswg3qpaqf4hga2
-
- => restricted address with mana enabled: rms1xqqz7e8e69uej86s2s4srcp5lgzrkx25qwr4hpnha7h3j66pezyq85qpqg55v3ur
+ Ed25519 Private Key: de52b9964dda96564e9fab362ab16c2669c715c6a2a853bece8a25fc58c599755b938327ea463e0c323c0fd44f6fc1843ed94daecc6909c6043d06b7152e4737
+ Ed25519 Public Key: 5b938327ea463e0c323c0fd44f6fc1843ed94daecc6909c6043d06b7152e4737
+ Ed25519 Address: rms1qqhkf7w30xv375z59vq7qd86qsa3j4qrsadcval04uvkkswg3qpaqf4hga2
+ Restricted Address: rms1xqqz7e8e69uej86s2s4srcp5lgzrkx25qwr4hpnha7h3j66pezyq85qpqg55v3ur, Capabilities: mana
*/
snapshotcreator.BasicOutputDetails{
Address: lo.Return2(iotago.ParseBech32("rms1xqqz7e8e69uej86s2s4srcp5lgzrkx25qwr4hpnha7h3j66pezyq85qpqg55v3ur")),
@@ -125,7 +148,15 @@ var Docker = []options.Option[snapshotcreator.Options]{
var Feature = []options.Option[snapshotcreator.Options]{
snapshotcreator.WithFilePath("docker-network.snapshot"),
snapshotcreator.WithAccounts(
- snapshotcreator.AccountDetails{ // node-01
+ snapshotcreator.AccountDetails{
+ /*
+ node-01-validator
+
+ Ed25519 Public Key: 01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe
+ Ed25519 Address: rms1qqlhggrg2ml9p0q5c4593r2yd3jwgxn20d65ulyw6z9r7xmm78apq4y2mxh
+ Account Address: rms1pqlhggrg2ml9p0q5c4593r2yd3jwgxn20d65ulyw6z9r7xmm78apq2067mf
+ Restricted Address: rms1xqqr7apqdpt0u59uznzkskydg3kxfeq6dfah2nnu3mgg50cm00cl5yqpqgrpy62q, Capabilities: mana
+ */
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe"))),
Amount: mock.MinValidatorAccountAmount,
@@ -137,7 +168,15 @@ var Feature = []options.Option[snapshotcreator.Options]{
StakedAmount: mock.MinValidatorAccountAmount,
Mana: iotago.Mana(mock.MinValidatorAccountAmount),
},
- snapshotcreator.AccountDetails{ // node-02
+ snapshotcreator.AccountDetails{
+ /*
+ node-02-validator
+
+ Ed25519 Public Key: 83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6
+ Ed25519 Address: rms1qzjwamvhjuqtw3dkfwmmj2fgcetcdyt4uxrnjxel4caxfstzz903ypu8xvn
+ Account Address: rms1pzjwamvhjuqtw3dkfwmmj2fgcetcdyt4uxrnjxel4caxfstzz903y7hhr3d
+ Restricted Address: rms1xqq2fmhdj7tspd69ke9m0wff9rr90p53whscwwgm87hr5expvgg47yspqgm6whkx, Capabilities: mana
+ */
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6"))),
Amount: mock.MinValidatorAccountAmount,
@@ -149,7 +188,15 @@ var Feature = []options.Option[snapshotcreator.Options]{
StakedAmount: mock.MinValidatorAccountAmount,
Mana: iotago.Mana(mock.MinValidatorAccountAmount),
},
- snapshotcreator.AccountDetails{ // node-03
+ snapshotcreator.AccountDetails{
+ /*
+ node-03-validator
+
+ Ed25519 Public Key: ac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805
+ Ed25519 Address: rms1qz6kedkxyw9md2cmp0wcdhvsxrn2e7gzuyly76ffymy4dhvtkm58qlkjupg
+ Account Address: rms1pz6kedkxyw9md2cmp0wcdhvsxrn2e7gzuyly76ffymy4dhvtkm58qqazeuk
+ Restricted Address: rms1xqqt2m9kcc3chd4trv9ampkajqcwdt8eqtsnunmf9ynvj4ka3wmwsuqpqgvp9zxl, Capabilities: mana
+ */
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0xac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0xac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805"))),
Amount: mock.MinValidatorAccountAmount,
@@ -165,9 +212,10 @@ var Feature = []options.Option[snapshotcreator.Options]{
/*
inx-blockissuer
- ed25519 public key: 670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25
- ed25519 address: 3b07e3e84c1276f0b9d35cf218b3763e0cbdadaa7ca38588de2170c31b38e9bb
- bech32 address: rms1pqas0clgfsf8du9e6dw0yx9nwclqe0dd4f728pvgmcshpscm8r5mkddrrfc
+ Ed25519 Public Key: 670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25
+ Ed25519 Address: rms1qqas0clgfsf8du9e6dw0yx9nwclqe0dd4f728pvgmcshpscm8r5mkjxnx5x
+ Account Address: rms1pqas0clgfsf8du9e6dw0yx9nwclqe0dd4f728pvgmcshpscm8r5mkddrrfc
+ Restricted Address: rms1xqqrkplrapxpyahsh8f4eusckdmrur9a4k48egu93r0zzuxrrvuwnwcpqgj0nu8t, Capabilities: mana
*/
AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25"))),
Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25"))),
@@ -182,11 +230,9 @@ var Feature = []options.Option[snapshotcreator.Options]{
/*
inx-faucet
- ed25519 public key: dcd760a51cfafe901f4ca0745d399af7146028af643e8a339c7bb82fbb1be7f9
- ed25519 address: 48acd764f626523646d5ccf22f807e96d30b7ab0064f370b66fa811985985ec4
- bech32 address: rms1qpy2e4my7cn9ydjx6hx0ytuq06tdxzm6kqry7dctvmagzxv9np0vg9c55n4
-
- => restricted address with mana enabled: rms1xqqy3txhvnmzv53kgm2ueu30splfd5ct02cqvnehpdn04qgeskv9a3qpqgrhlhv3
+ Ed25519 Public Key: dcd760a51cfafe901f4ca0745d399af7146028af643e8a339c7bb82fbb1be7f9
+ Ed25519 Address: rms1qpy2e4my7cn9ydjx6hx0ytuq06tdxzm6kqry7dctvmagzxv9np0vg9c55n4
+ Restricted Address: rms1xqqy3txhvnmzv53kgm2ueu30splfd5ct02cqvnehpdn04qgeskv9a3qpqgrhlhv3, Capabilities: mana
*/
snapshotcreator.BasicOutputDetails{
Address: lo.Return2(iotago.ParseBech32("rms1xqqy3txhvnmzv53kgm2ueu30splfd5ct02cqvnehpdn04qgeskv9a3qpqgrhlhv3")),
From 9c446699d5fa1b890c62831bcc6dbd6fd59a9558 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Mon, 30 Oct 2023 16:20:14 +0100
Subject: [PATCH 19/29] Add validator account address
---
tools/docker-network/docker-compose.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index 7874bd3db..c0c4a2401 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -250,6 +250,7 @@ services:
--logger.level=debug
--inx.address=node-1-validator:9029
--validator.ignoreBootstrapped=true
+ --validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6
inx-validator-2:
image: iotaledger/inx-validator:latest
@@ -265,6 +266,7 @@ services:
command: >
--logger.level=debug
--inx.address=node-2-validator:9029
+ --validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl
inx-validator-3:
image: iotaledger/inx-validator:latest
@@ -280,6 +282,7 @@ services:
command: >
--logger.level=debug
--inx.address=node-3-validator:9029
+ --validator.accountAddress=rms1pp4wuuz0y42caz48vv876qfpmffswsvg40zz8v79sy8cp0jfxm4kunflcgt
# Create our own network
networks:
From 9efbf6c126d2ba04bc0515cf4340cb7cb3c79be5 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Mon, 30 Oct 2023 17:00:52 +0100
Subject: [PATCH 20/29] Update inx and inx-app
---
go.mod | 4 ++--
go.sum | 8 ++++----
tools/gendoc/go.mod | 4 ++--
tools/gendoc/go.sum | 8 ++++----
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/go.mod b/go.mod
index 54970ad19..379f529fd 100644
--- a/go.mod
+++ b/go.mod
@@ -23,8 +23,8 @@ require (
github.com/iotaledger/hive.go/runtime v0.0.0-20231027195901-620bd7470e42
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231020115340-13da292c580b
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030154537-9f9e608942b2
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030154325-ff4a4c375aed
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a
github.com/labstack/echo/v4 v4.11.2
github.com/labstack/gommon v0.4.0
diff --git a/go.sum b/go.sum
index af6743539..304469955 100644
--- a/go.sum
+++ b/go.sum
@@ -305,10 +305,10 @@ 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-20231027195901-620bd7470e42 h1:OlDhgvJ48bZxcvTeebJ1b96xtNnJAddejd2Q4rlH1mU=
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 h1:/X+ooE7JtCPO8dU3Z7NCQi6bRdbQsmJ5CSMIFphb7Io=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1/go.mod h1:N/COrSaVwR8pSe/3JaTjofplvcpQSE5aItHPgv38UZw=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 h1:Ziqm6j7+uXxw3suhinqmXxEocXL04tAf3rcGSnPJiaU=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030154537-9f9e608942b2 h1:nVuTdRTrRXes843xq296LjIr+QGwD1GfJMezltsZ0DE=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030154537-9f9e608942b2/go.mod h1:N9rYLyJbP/GIZwg5vcJe96whWswTvgeQ0hkzZSRlaRc=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030154325-ff4a4c375aed h1:LKWhsZUdrQzsnhEL4bvp/kiztWcWtxbKSz2n6fICuKM=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030154325-ff4a4c375aed/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a h1:WLW4iaJAx4N9Pujv+gzHklnnjCt5MPrtXyVcK3UXdNc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod
index d536b2883..5e28271c5 100644
--- a/tools/gendoc/go.mod
+++ b/tools/gendoc/go.mod
@@ -71,8 +71,8 @@ require (
github.com/iotaledger/hive.go/runtime v0.0.0-20231027195901-620bd7470e42 // 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-20231027195901-620bd7470e42 // indirect
- github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 // indirect
- github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 // indirect
+ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030154537-9f9e608942b2 // indirect
+ github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030154325-ff4a4c375aed // indirect
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a // indirect
github.com/ipfs/boxo v0.13.1 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum
index eff404424..5f1412ad7 100644
--- a/tools/gendoc/go.sum
+++ b/tools/gendoc/go.sum
@@ -309,10 +309,10 @@ 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-20231027195901-620bd7470e42 h1:OlDhgvJ48bZxcvTeebJ1b96xtNnJAddejd2Q4rlH1mU=
github.com/iotaledger/hive.go/stringify v0.0.0-20231027195901-620bd7470e42/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1 h1:/X+ooE7JtCPO8dU3Z7NCQi6bRdbQsmJ5CSMIFphb7Io=
-github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030111108-3774fe9809f1/go.mod h1:N/COrSaVwR8pSe/3JaTjofplvcpQSE5aItHPgv38UZw=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968 h1:Ziqm6j7+uXxw3suhinqmXxEocXL04tAf3rcGSnPJiaU=
-github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030111018-bf900d105968/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030154537-9f9e608942b2 h1:nVuTdRTrRXes843xq296LjIr+QGwD1GfJMezltsZ0DE=
+github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231030154537-9f9e608942b2/go.mod h1:N9rYLyJbP/GIZwg5vcJe96whWswTvgeQ0hkzZSRlaRc=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030154325-ff4a4c375aed h1:LKWhsZUdrQzsnhEL4bvp/kiztWcWtxbKSz2n6fICuKM=
+github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231030154325-ff4a4c375aed/go.mod h1:WFa5hHen6fi3RBX4K6r4fzhGpoh+7KJVIyFztZHdM84=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a h1:WLW4iaJAx4N9Pujv+gzHklnnjCt5MPrtXyVcK3UXdNc=
github.com/iotaledger/iota.go/v4 v4.0.0-20231028103644-b834fd54b02a/go.mod h1:jqbLYq4a/FwuiPBqFfkAwwxU8vs3+kReRq2/tyX5qRA=
github.com/ipfs/boxo v0.13.1 h1:nQ5oQzcMZR3oL41REJDcTbrvDvuZh3J9ckc9+ILeRQI=
From a5adb00b19af9c12782b5337f74b2fa92aa122f4 Mon Sep 17 00:00:00 2001
From: Andrea V <1577639+karimodm@users.noreply.github.com>
Date: Mon, 30 Oct 2023 17:21:11 +0100
Subject: [PATCH 21/29] Rename variables for feature deploy
---
deploy/ansible/hosts/feature.yml | 12 +++--------
.../templates/docker-compose-iota-core.yml.j2 | 6 +++---
deploy/ansible/run.sh | 21 ++++++++++---------
3 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/deploy/ansible/hosts/feature.yml b/deploy/ansible/hosts/feature.yml
index 6f0f8446d..7048e1507 100644
--- a/deploy/ansible/hosts/feature.yml
+++ b/deploy/ansible/hosts/feature.yml
@@ -7,25 +7,19 @@ cores:
internal_nodes:
hosts:
node-01.feature.shimmer.iota.cafe:
- # validatorAccountAddress: "{{ NODE_01_ACCOUNTID }}"
- validatorAccountAddress:"rms1pqlhggrg2ml9p0q5c4593r2yd3jwgxn20d65ulyw6z9r7xmm78apq2067mf"
+ validatorAccountAddress:"{{ NODE_01_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_01_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_01_P2PIDENTITYPRIVATEKEY }}"
node-02.feature.shimmer.iota.cafe:
- # validatorAccountAddress: "{{ NODE_02_ACCOUNTID }}"
- validatorAccountAddress:"rms1pzjwamvhjuqtw3dkfwmmj2fgcetcdyt4uxrnjxel4caxfstzz903y7hhr3d"
+ validatorAccountAddress:"{{ NODE_02_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_02_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_02_P2PIDENTITYPRIVATEKEY }}"
node-03.feature.shimmer.iota.cafe:
- # validatorAccountAddress: "{{ NODE_03_ACCOUNTID }}"
- validatorAccountAddress:"rms1pz6kedkxyw9md2cmp0wcdhvsxrn2e7gzuyly76ffymy4dhvtkm58qqazeuk"
+ validatorAccountAddress:"{{ NODE_03_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_03_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_03_P2PIDENTITYPRIVATEKEY }}"
node-04.feature.shimmer.iota.cafe:
p2pIdentityPrvKey: "{{ NODE_04_P2PIDENTITYPRIVATEKEY }}"
- blockissuerPrvKey: "{{ NODE_04_BLOCKISSUER_PRV_KEY }}"
- blockissuerAccountAddress: "rms1pqas0clgfsf8du9e6dw0yx9nwclqe0dd4f728pvgmcshpscm8r5mkddrrfc"
- faucetPrvKey: "{{ NODE_04_FAUCET_PRV_KEY }}"
node-05.feature.shimmer.iota.cafe:
p2pIdentityPrvKey: "{{ NODE_05_P2PIDENTITYPRIVATEKEY }}"
vars:
diff --git a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2 b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
index c9879df51..5fb4ee16f 100644
--- a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
+++ b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
@@ -89,11 +89,11 @@ services:
inx-indexer:
condition: service_started
environment:
- - "BLOCKISSUER_PRV_KEY={{blockissuerPrvKey}}"
+ - "BLOCKISSUER_PRV_KEY={{NODE_04_BLOCKISSUER_PRIVKEY}}"
command: >
--inx.address=iota-core:9029
--restAPI.bindAddress=inx-blockissuer:9086
- --blockIssuer.accountAddress={{blockissuerAccountAddress}}
+ --blockIssuer.accountAddress={{NODE_04_BLOCKISSUER_ACCOUNTADDRESS}}
--blockIssuer.proofOfWork.targetTrailingZeros=5
inx-faucet:
@@ -113,7 +113,7 @@ services:
ports:
- "8091:8091/tcp" # Faucet Frontend
environment:
- - "FAUCET_PRV_KEY={{faucetPrvKey}}"
+ - "FAUCET_PRV_KEY={{NODE_04_FAUCET_PRIVKEY}}"
command: >
--inx.address=iota-core:9029
--faucet.bindAddress=0.0.0.0:8091
diff --git a/deploy/ansible/run.sh b/deploy/ansible/run.sh
index 3d800611d..eb97ecfd7 100755
--- a/deploy/ansible/run.sh
+++ b/deploy/ansible/run.sh
@@ -17,22 +17,23 @@ elkElasticUser=$ELASTIC_USER
elkElasticPassword=$ELASTIC_PASSWORD
grafanaAdminPassword=$GRAFANA_ADMIN_PASSWORD
-NODE_01_ACCOUNTID=$NODE_01_ACCOUNTID
+NODE_01_VALIDATOR_ACCOUNTADDRESS=$NODE_01_VALIDATOR_ACCOUNTADDRESS
NODE_01_VALIDATOR_PRIVKEY=$NODE_01_VALIDATOR_PRIVKEY
-NODE_01_P2PIDENTITYPRIVATEKEY=$NODE_01_P2PIDENTITYPRIVATEKEY
+NODE_01_P2PIDENTITY_PRIVKEY=$NODE_01_P2PIDENTITY_PRIVKEY
-NODE_02_ACCOUNTID=$NODE_02_ACCOUNTID
+NODE_02_VALIDATOR_ACCOUNTADDRESS=$NODE_02_VALIDATOR_ACCOUNTADDRESS
NODE_02_VALIDATOR_PRIVKEY=$NODE_02_VALIDATOR_PRIVKEY
-NODE_02_P2PIDENTITYPRIVATEKEY=$NODE_02_P2PIDENTITYPRIVATEKEY
+NODE_02_P2PIDENTITY_PRIVKEY=$NODE_02_P2PIDENTITY_PRIVKEY
-NODE_03_ACCOUNTID=$NODE_03_ACCOUNTID
+NODE_03_VALIDATOR_ACCOUNTADDRESS=$NODE_03_VALIDATOR_ACCOUNTADDRESS
NODE_03_VALIDATOR_PRIVKEY=$NODE_03_VALIDATOR_PRIVKEY
-NODE_03_P2PIDENTITYPRIVATEKEY=$NODE_03_P2PIDENTITYPRIVATEKEY
+NODE_03_P2PIDENTITY_PRIVKEY=$NODE_03_P2PIDENTITY_PRIVKEY
-NODE_04_P2PIDENTITYPRIVATEKEY=$NODE_04_P2PIDENTITYPRIVATEKEY
-NODE_04_BLOCKISSUER_PRV_KEY=$NODE_04_BLOCKISSUER_PRIVKEY
-NODE_04_FAUCET_PRV_KEY=$NODE_04_FAUCET_PRIVKEY
+NODE_04_BLOCKISSUER_ACCOUNTADDRESS=$NODE_04_BLOCKISSUER_ACCOUNTADDRESS
+NODE_04_BLOCKISSUER_PRIVKEY=$NODE_04_BLOCKISSUER_PRIVKEY
+NODE_04_FAUCET_PRIVKEY=$NODE_04_FAUCET_PRIVKEY
+NODE_04_P2PIDENTITY_PRIVKEY=$NODE_04_P2PIDENTITY_PRIVKEY
-NODE_05_P2PIDENTITYPRIVATEKEY=$NODE_05_P2PIDENTITYPRIVATEKEY
+NODE_05_P2PIDENTITY_PRIVKEY=$NODE_05_P2PIDENTITY_PRIVKEY
${ARGS[@]:2} deploy/ansible/"${2:-deploy.yml}"
From 5092fceba41215cfd294004daeca088c63abb9ed Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 31 Oct 2023 08:26:40 +0100
Subject: [PATCH 22/29] Fix start condition for inx-validator.
---
.../iota-core-node/templates/docker-compose-iota-core.yml.j2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2 b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
index 5fb4ee16f..f8a9f58a4 100644
--- a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
+++ b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
@@ -127,7 +127,7 @@ services:
restart: unless-stopped
depends_on:
iota-core:
- condition: service_healthy
+ condition: service_started
networks:
- iota-core
environment:
From 840f30d0e7a18224c5186ac165685517091a5cc4 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 31 Oct 2023 12:17:14 +0100
Subject: [PATCH 23/29] Fix ports
---
tools/docker-network/docker-compose.yml | 46 ++++++++++++-------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/tools/docker-network/docker-compose.yml b/tools/docker-network/docker-compose.yml
index c0c4a2401..a16297065 100644
--- a/tools/docker-network/docker-compose.yml
+++ b/tools/docker-network/docker-compose.yml
@@ -20,10 +20,10 @@ services:
networks:
- iota-core
ports:
- - "8010:14265/tcp" # REST-API
- - "8011:8081/tcp" # Dashboard
- - "6011:6061/tcp" # pprof
- - "9019:9029/tcp" # INX
+ - "8050:14265/tcp" # REST-API
+ - "8051:8081/tcp" # Dashboard
+ - "6051:6061/tcp" # pprof
+ - "9059:9029/tcp" # INX
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
@@ -45,10 +45,10 @@ services:
networks:
- iota-core
ports:
- - "8020:14265/tcp" # REST-API
- - "8021:8081/tcp" # Dashboard
- - "6021:6061/tcp" # pprof
- - "9029:9029/tcp" # INX
+ - "8060:14265/tcp" # REST-API
+ - "8061:8081/tcp" # Dashboard
+ - "6061:6061/tcp" # pprof
+ - "9069:9029/tcp" # INX
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
@@ -70,10 +70,10 @@ services:
networks:
- iota-core
ports:
- - "8030:14265/tcp" # REST-API
- - "8031:8081/tcp" # Dashboard
- - "6031:6061/tcp" # pprof
- - "9039:9029/tcp" # INX
+ - "8070:14265/tcp" # REST-API
+ - "8071:8081/tcp" # Dashboard
+ - "6071:6061/tcp" # pprof
+ - "9079:9029/tcp" # INX
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
@@ -95,10 +95,10 @@ services:
networks:
- iota-core
ports:
- - "8040:14265/tcp" # REST-API
- - "8041:8081/tcp" # Dashboard
- - "6041:6061/tcp" # pprof
- - "9049:9029/tcp" # INX
+ - "8080:14265/tcp" # REST-API
+ - "8081:8081/tcp" # Dashboard
+ - "6081:6061/tcp" # pprof
+ - "9089:9029/tcp" # INX
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
@@ -120,10 +120,10 @@ services:
networks:
- iota-core
ports:
- - "8050:14265/tcp" # REST-API
- - "8051:8081/tcp" # Dashboard
- - "6051:6061/tcp" # pprof
- - "9059:9029/tcp" # INX
+ - "8090:14265/tcp" # REST-API
+ - "8091:8081/tcp" # Dashboard
+ - "6091:6061/tcp" # pprof
+ - "9099:9029/tcp" # INX
volumes:
- ./docker-network.snapshot:/app/data/snapshot.bin
- ./config.json:/app/config.json:ro
@@ -236,7 +236,7 @@ services:
--faucet.rateLimit.enabled=false
inx-validator-1:
- image: iotaledger/inx-validator:latest
+ image: iotaledger/inx-validator:1.0-alpha
stop_grace_period: 1m
restart: unless-stopped
depends_on:
@@ -253,7 +253,7 @@ services:
--validator.accountAddress=rms1pzg8cqhfxqhq7pt37y8cs4v5u4kcc48lquy2k73ehsdhf5ukhya3y5rx2w6
inx-validator-2:
- image: iotaledger/inx-validator:latest
+ image: iotaledger/inx-validator:1.0-alpha
stop_grace_period: 1m
restart: unless-stopped
depends_on:
@@ -269,7 +269,7 @@ services:
--validator.accountAddress=rms1pqm4xk8e9ny5w5rxjkvtp249tfhlwvcshyr3pc0665jvp7g3hc875k538hl
inx-validator-3:
- image: iotaledger/inx-validator:latest
+ image: iotaledger/inx-validator:1.0-alpha
stop_grace_period: 1m
restart: unless-stopped
depends_on:
From 799032842a52e4f257fa026308aee39216952c8e Mon Sep 17 00:00:00 2001
From: Andrea V <1577639+karimodm@users.noreply.github.com>
Date: Tue, 31 Oct 2023 12:39:09 +0100
Subject: [PATCH 24/29] run.sh fix
---
deploy/ansible/run.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deploy/ansible/run.sh b/deploy/ansible/run.sh
index eb97ecfd7..537af5676 100755
--- a/deploy/ansible/run.sh
+++ b/deploy/ansible/run.sh
@@ -34,6 +34,6 @@ NODE_04_BLOCKISSUER_PRIVKEY=$NODE_04_BLOCKISSUER_PRIVKEY
NODE_04_FAUCET_PRIVKEY=$NODE_04_FAUCET_PRIVKEY
NODE_04_P2PIDENTITY_PRIVKEY=$NODE_04_P2PIDENTITY_PRIVKEY
-NODE_05_P2PIDENTITY_PRIVKEY=$NODE_05_P2PIDENTITY_PRIVKEY
+NODE_05_P2PIDENTITY_PRIVKEY=$NODE_05_P2PIDENTITY_PRIVKEY" \
${ARGS[@]:2} deploy/ansible/"${2:-deploy.yml}"
From 1e7ef7d2426d5a51243fd009c357c6738913cdaa Mon Sep 17 00:00:00 2001
From: Andrea V <1577639+karimodm@users.noreply.github.com>
Date: Tue, 31 Oct 2023 13:02:04 +0100
Subject: [PATCH 25/29] More syntax issues
---
deploy/ansible/hosts/feature.yml | 6 +++---
deploy/ansible/run.sh | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/deploy/ansible/hosts/feature.yml b/deploy/ansible/hosts/feature.yml
index 7048e1507..0dd0ade47 100644
--- a/deploy/ansible/hosts/feature.yml
+++ b/deploy/ansible/hosts/feature.yml
@@ -7,15 +7,15 @@ cores:
internal_nodes:
hosts:
node-01.feature.shimmer.iota.cafe:
- validatorAccountAddress:"{{ NODE_01_VALIDATOR_ACCOUNTADDRESS }}"
+ validatorAccountAddress: "{{ NODE_01_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_01_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_01_P2PIDENTITYPRIVATEKEY }}"
node-02.feature.shimmer.iota.cafe:
- validatorAccountAddress:"{{ NODE_02_VALIDATOR_ACCOUNTADDRESS }}"
+ validatorAccountAddress: "{{ NODE_02_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_02_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_02_P2PIDENTITYPRIVATEKEY }}"
node-03.feature.shimmer.iota.cafe:
- validatorAccountAddress:"{{ NODE_03_VALIDATOR_ACCOUNTADDRESS }}"
+ validatorAccountAddress: "{{ NODE_03_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_03_VALIDATOR_PRIVKEY }}"
p2pIdentityPrvKey: "{{ NODE_03_P2PIDENTITYPRIVATEKEY }}"
node-04.feature.shimmer.iota.cafe:
diff --git a/deploy/ansible/run.sh b/deploy/ansible/run.sh
index 537af5676..f2bbf73b0 100755
--- a/deploy/ansible/run.sh
+++ b/deploy/ansible/run.sh
@@ -4,6 +4,8 @@ export ANSIBLE_STRATEGY=free
export ANSIBLE_PIPELINING=true
export ANSIBLE_PERSISTENT_CONTROL_PATH_DIR="/tmp/"
+set -x
+
ARGS=("$@")
ansible-playbook -u root -i deploy/ansible/hosts/"${1:-feature.yml}" \
--forks 20 --ssh-common-args "-o ControlMaster=auto -o ControlPersist=5m" \
@@ -35,5 +37,4 @@ NODE_04_FAUCET_PRIVKEY=$NODE_04_FAUCET_PRIVKEY
NODE_04_P2PIDENTITY_PRIVKEY=$NODE_04_P2PIDENTITY_PRIVKEY
NODE_05_P2PIDENTITY_PRIVKEY=$NODE_05_P2PIDENTITY_PRIVKEY" \
-
${ARGS[@]:2} deploy/ansible/"${2:-deploy.yml}"
From 754b4e7e1793c8a5b97597969ab56b61206c9493 Mon Sep 17 00:00:00 2001
From: Andrea V <1577639+karimodm@users.noreply.github.com>
Date: Tue, 31 Oct 2023 13:14:11 +0100
Subject: [PATCH 26/29] More fixes
---
deploy/ansible/hosts/feature.yml | 10 +++++-----
deploy/ansible/run.sh | 2 --
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/deploy/ansible/hosts/feature.yml b/deploy/ansible/hosts/feature.yml
index 0dd0ade47..66e7b10ee 100644
--- a/deploy/ansible/hosts/feature.yml
+++ b/deploy/ansible/hosts/feature.yml
@@ -9,17 +9,17 @@ cores:
node-01.feature.shimmer.iota.cafe:
validatorAccountAddress: "{{ NODE_01_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_01_VALIDATOR_PRIVKEY }}"
- p2pIdentityPrvKey: "{{ NODE_01_P2PIDENTITYPRIVATEKEY }}"
+ p2pIdentityPrvKey: "{{ NODE_01_P2PIDENTITY_PRIVKEY }}"
node-02.feature.shimmer.iota.cafe:
validatorAccountAddress: "{{ NODE_02_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_02_VALIDATOR_PRIVKEY }}"
- p2pIdentityPrvKey: "{{ NODE_02_P2PIDENTITYPRIVATEKEY }}"
+ p2pIdentityPrvKey: "{{ NODE_02_P2PIDENTITY_PRIVKEY }}"
node-03.feature.shimmer.iota.cafe:
validatorAccountAddress: "{{ NODE_03_VALIDATOR_ACCOUNTADDRESS }}"
validatorPrvKey: "{{ NODE_03_VALIDATOR_PRIVKEY }}"
- p2pIdentityPrvKey: "{{ NODE_03_P2PIDENTITYPRIVATEKEY }}"
+ p2pIdentityPrvKey: "{{ NODE_03_P2PIDENTITY_PRIVKEY }}"
node-04.feature.shimmer.iota.cafe:
- p2pIdentityPrvKey: "{{ NODE_04_P2PIDENTITYPRIVATEKEY }}"
+ p2pIdentityPrvKey: "{{ NODE_04_P2PIDENTITY_PRIVKEY }}"
node-05.feature.shimmer.iota.cafe:
- p2pIdentityPrvKey: "{{ NODE_05_P2PIDENTITYPRIVATEKEY }}"
+ p2pIdentityPrvKey: "{{ NODE_05_P2PIDENTITY_PRIVKEY }}"
vars:
diff --git a/deploy/ansible/run.sh b/deploy/ansible/run.sh
index f2bbf73b0..62ee4840f 100755
--- a/deploy/ansible/run.sh
+++ b/deploy/ansible/run.sh
@@ -4,8 +4,6 @@ export ANSIBLE_STRATEGY=free
export ANSIBLE_PIPELINING=true
export ANSIBLE_PERSISTENT_CONTROL_PATH_DIR="/tmp/"
-set -x
-
ARGS=("$@")
ansible-playbook -u root -i deploy/ansible/hosts/"${1:-feature.yml}" \
--forks 20 --ssh-common-args "-o ControlMaster=auto -o ControlPersist=5m" \
From e37183697c8216e6ea8ddf53390fecf620baee59 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 31 Oct 2023 15:15:30 +0100
Subject: [PATCH 27/29] Fix deployment name.
---
.../iota-core-node/templates/docker-compose-iota-core.yml.j2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2 b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
index f8a9f58a4..2c18d1c6c 100644
--- a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
+++ b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
@@ -14,7 +14,7 @@ services:
# IOTA-CORE Nodes #
###################
- iota_core:
+ iota-core:
image: {{iota_core_docker_image_repo}}:{{iota_core_docker_image_tag}}
container_name: iota-core
stop_grace_period: 1m
From 151137215d6014b734609e73b65531930c4a4a92 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 31 Oct 2023 15:26:04 +0100
Subject: [PATCH 28/29] Fix iota-core deployment template.
---
.../iota-core-node/templates/docker-compose-iota-core.yml.j2 | 5 -----
1 file changed, 5 deletions(-)
diff --git a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2 b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
index 2c18d1c6c..40beab818 100644
--- a/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
+++ b/deploy/ansible/roles/iota-core-node/templates/docker-compose-iota-core.yml.j2
@@ -108,8 +108,6 @@ services:
condition: service_started
inx-blockissuer:
condition: service_started
- networks:
- - iota-core
ports:
- "8091:8091/tcp" # Faucet Frontend
environment:
@@ -128,12 +126,9 @@ services:
depends_on:
iota-core:
condition: service_started
- networks:
- - iota-core
environment:
- "VALIDATOR_PRV_KEY={{validatorPrvKey}}"
command: >
- --logger.level=debug
--inx.address=iota-core:9029
{% if 'node-01' in inventory_hostname %}
--validator.ignoreBootstrapped=true
From 8ed294dfd3624419a1e5526eb0bded22edce97c8 Mon Sep 17 00:00:00 2001
From: Piotr Macek <4007944+piotrm50@users.noreply.github.com>
Date: Tue, 31 Oct 2023 16:25:11 +0100
Subject: [PATCH 29/29] Update default snapshot for feature network
---
.github/workflows/feature-network-deploy.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/feature-network-deploy.yml b/.github/workflows/feature-network-deploy.yml
index c4c71e425..812411683 100644
--- a/.github/workflows/feature-network-deploy.yml
+++ b/.github/workflows/feature-network-deploy.yml
@@ -70,7 +70,7 @@ jobs:
- name: Ansible deploy
env:
CUSTOM_SNAPSHOT_URL: '${{ github.event.inputs.snapshotUrl }}'
- DEFAULT_SNAPSHOT_URL: 'https://0x0.st/HJXh.bin'
+ DEFAULT_SNAPSHOT_URL: 'https://0x0.st/HywH.bin'
NETWORK_ENVIRONMENT: '${{ secrets.NETWORK_ENVIRONMENT }}'
IOTA_CORE_DOCKER_IMAGE_REPO: 'iotaledger/iota-core'
IOTA_CORE_DOCKER_IMAGE_TAG: 'feature'