From ca7a399a33e466a74d9729ff90c93ef73226c180 Mon Sep 17 00:00:00 2001 From: muXxer Date: Tue, 12 Dec 2023 17:35:39 +0100 Subject: [PATCH 01/21] Use reactive logger --- components/dashboard/component.go | 2 +- components/dashboard/livefeed.go | 2 +- components/dashboard/slotfeed.go | 2 +- components/dashboard/visualizer.go | 2 +- components/dashboard/ws.go | 2 +- components/dashboard_metrics/component.go | 6 +- components/debugapi/component.go | 2 +- components/inx/component.go | 4 +- components/inx/server.go | 4 +- components/metrics/component.go | 2 +- components/metricstracker/component.go | 4 +- components/p2p/component.go | 40 ++++++------ components/protocol/component.go | 12 ++-- components/restapi/api.go | 8 +-- components/restapi/component.go | 12 ++-- components/restapi/core/component.go | 2 +- components/restapi/management/component.go | 2 +- components/restapi/management/peers.go | 4 +- config_defaults.json | 12 +--- .../templates/docker-compose-iota-core.yml.j2 | 1 - .../docs/references/configuration.md | 34 +++------- go.mod | 29 +++++---- go.sum | 59 +++++++++--------- pkg/network/autopeering/autopeering.go | 24 +++---- pkg/network/manualpeering/manualpeering.go | 16 ++--- pkg/network/p2p/manager.go | 34 +++++----- pkg/network/p2p/neighbor.go | 62 +++++++++---------- pkg/network/p2p/neighbor_test.go | 7 ++- .../performance/testsuite_test.go | 2 +- pkg/testsuite/mock/node.go | 18 +++--- .../snapshotcreator/snapshotcreator.go | 2 +- pkg/testsuite/testsuite.go | 12 ++-- pkg/testsuite/testsuite_options.go | 6 +- tools/docker-network/.env | 3 - tools/gendoc/go.mod | 29 +++++---- tools/gendoc/go.sum | 59 +++++++++--------- tools/genesis-snapshot/go.mod | 24 +++---- tools/genesis-snapshot/go.sum | 48 +++++++------- 38 files changed, 276 insertions(+), 317 deletions(-) diff --git a/components/dashboard/component.go b/components/dashboard/component.go index 7f79604e8..4afb395a9 100644 --- a/components/dashboard/component.go +++ b/components/dashboard/component.go @@ -99,7 +99,7 @@ func run() error { Component.LogInfo("Stopping Dashboard ... done") }, daemon.PriorityDashboard); err != nil { - Component.LogPanicf("failed to start worker: %s", err) + Component.LogFatalf("failed to start worker: %s", err) } return nil diff --git a/components/dashboard/livefeed.go b/components/dashboard/livefeed.go index 2821106a6..da35df4f1 100644 --- a/components/dashboard/livefeed.go +++ b/components/dashboard/livefeed.go @@ -26,6 +26,6 @@ func runLiveFeed(component *app.Component) { hook.Unhook() component.LogInfo("Stopping Dashboard[Livefeed] ... done") }, daemon.PriorityDashboard); err != nil { - component.LogPanicf("Failed to start as daemon: %s", err) + component.LogFatalf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard/slotfeed.go b/components/dashboard/slotfeed.go index a127f7eba..a9e3bbeac 100644 --- a/components/dashboard/slotfeed.go +++ b/components/dashboard/slotfeed.go @@ -25,7 +25,7 @@ func runSlotsLiveFeed(component *app.Component) { hook.Unhook() component.LogInfo("Stopping Dashboard[SlotsLiveFeed] ... done") }, daemon.PriorityDashboard); err != nil { - component.LogPanicf("Failed to start as daemon: %s", err) + component.LogFatalf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard/visualizer.go b/components/dashboard/visualizer.go index ad565cd41..05a4ef5cd 100644 --- a/components/dashboard/visualizer.go +++ b/components/dashboard/visualizer.go @@ -109,7 +109,7 @@ func runVisualizer(component *app.Component) { unhook() component.LogInfo("Stopping Dashboard[Visualizer] ... done") }, daemon.PriorityDashboard); err != nil { - component.LogPanicf("Failed to start as daemon: %s", err) + component.LogFatalf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard/ws.go b/components/dashboard/ws.go index e66e4d2d1..d4ecd7cb3 100644 --- a/components/dashboard/ws.go +++ b/components/dashboard/ws.go @@ -82,7 +82,7 @@ func runWebSocketStreams(component *app.Component) { unhook() Component.LogInfo("Stopping Dashboard[StatusUpdate] ... done") }, daemon.PriorityDashboard); err != nil { - Component.LogPanicf("Failed to start as daemon: %s", err) + Component.LogFatalf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard_metrics/component.go b/components/dashboard_metrics/component.go index c8a4cd83a..a5754c599 100644 --- a/components/dashboard_metrics/component.go +++ b/components/dashboard_metrics/component.go @@ -65,7 +65,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogPanicf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) + Component.LogFatalf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) } configureComponentCountersEvents() @@ -88,7 +88,7 @@ func configure() error { } func run() error { - Component.Logger().Infof("Starting %s ...", Component.Name) + Component.Logger().LogInfof("Starting %s ...", Component.Name) if err := Component.Daemon().BackgroundWorker("DashboardMetricsUpdater", func(ctx context.Context) { // Do not block until the Ticker is shutdown because we might want to start multiple Tickers and we can // safely ignore the last execution when shutting down. @@ -99,7 +99,7 @@ func run() error { // Wait before terminating so we get correct log blocks from the daemon regarding the shutdown order. <-ctx.Done() }, daemon.PriorityDashboardMetrics); err != nil { - Component.LogPanicf("failed to start worker: %s", err) + Component.LogFatalf("failed to start worker: %s", err) } return nil diff --git a/components/debugapi/component.go b/components/debugapi/component.go index b9b22ff58..e322fbe92 100644 --- a/components/debugapi/component.go +++ b/components/debugapi/component.go @@ -73,7 +73,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogPanic("RestAPI plugin needs to be enabled to use the DebugAPIV3 plugin") + Component.LogFatal("RestAPI plugin needs to be enabled to use the DebugAPIV3 plugin") } blocksPerSlot = shrinkingmap.New[iotago.SlotIndex, []*blocks.Block]() diff --git a/components/inx/component.go b/components/inx/component.go index 2314e7958..93abcdc9c 100644 --- a/components/inx/component.go +++ b/components/inx/component.go @@ -46,7 +46,7 @@ func provide(c *dig.Container) error { if err := c.Provide(func() *Server { return newServer() }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return nil @@ -61,7 +61,7 @@ func run() error { deps.INXServer.Stop() Component.LogInfo("Stopping INX ... done") }, daemon.PriorityINX); err != nil { - Component.LogPanicf("failed to start worker: %s", err) + Component.LogFatalf("failed to start worker: %s", err) } return nil diff --git a/components/inx/server.go b/components/inx/server.go index c88f6cf33..380ad8496 100644 --- a/components/inx/server.go +++ b/components/inx/server.go @@ -45,12 +45,12 @@ func (s *Server) Start() { go func() { listener, err := net.Listen("tcp", ParamsINX.BindAddress) if err != nil { - Component.LogFatalfAndExit("failed to listen: %v", err) + Component.LogFatalf("failed to listen: %v", err) } defer listener.Close() if err := s.grpcServer.Serve(listener); err != nil { - Component.LogFatalfAndExit("failed to serve: %v", err) + Component.LogFatalf("failed to serve: %v", err) } }() } diff --git a/components/metrics/component.go b/components/metrics/component.go index e3a1e5d8d..9c4a4b8d8 100644 --- a/components/metrics/component.go +++ b/components/metrics/component.go @@ -114,7 +114,7 @@ func run() error { //nolint:contextcheck // false positive err := server.Shutdown(shutdownCtx) if err != nil { - Component.LogWarn(err) + Component.LogWarn(err.Error()) } Component.LogInfo("Stopping Prometheus exporter ... done") diff --git a/components/metricstracker/component.go b/components/metricstracker/component.go index 9cde574c9..7dd92cea8 100644 --- a/components/metricstracker/component.go +++ b/components/metricstracker/component.go @@ -50,7 +50,7 @@ func provide(c *dig.Container) error { return m }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return nil @@ -80,7 +80,7 @@ func run() error { unhook() Component.LogInfo("Stopping Metrics Tracker ... done") }, daemon.PriorityDashboardMetrics); err != nil { - Component.LogPanicf("failed to start worker: %s", err) + Component.LogFatalf("failed to start worker: %s", err) } return nil diff --git a/components/p2p/component.go b/components/p2p/component.go index dff432bb7..5beba810c 100644 --- a/components/p2p/component.go +++ b/components/p2p/component.go @@ -72,7 +72,7 @@ func initConfigParams(c *dig.Container) error { P2PBindMultiAddresses: ParamsP2P.BindMultiAddresses, } }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return nil @@ -103,13 +103,13 @@ func provide(c *dig.Container) error { if err := c.Provide(func(deps autoPeeringDeps) *autopeering.Manager { peersMultiAddresses, err := getMultiAddrsFromString(ParamsPeers.BootstrapPeers) if err != nil { - Component.LogErrorfAndExit("Failed to parse bootstrapPeers param: %s", err) + Component.LogFatal("Failed to parse bootstrapPeers param: %s", err) } for _, multiAddr := range peersMultiAddresses { bootstrapPeer, err := network.NewPeerFromMultiAddr(multiAddr) if err != nil { - Component.LogErrorfAndExit("Failed to parse bootstrap peer multiaddress: %s", err) + Component.LogFatal("Failed to parse bootstrap peer multiaddress: %s", err) } if err := deps.PeerDB.UpdatePeer(bootstrapPeer); err != nil { @@ -132,7 +132,7 @@ func provide(c *dig.Container) error { if err := c.Provide(func() peerDatabaseResult { peerDB, peerDBKVStore, err := initPeerDB() if err != nil { - Component.LogFatalAndExit(err) + Component.LogFatal(err.Error()) } return peerDatabaseResult{ @@ -161,13 +161,13 @@ func provide(c *dig.Container) error { // peers from peering config var peers []*p2p.PeerConfig if err := deps.PeeringConfig.Unmarshal(CfgPeers, &peers); err != nil { - Component.LogPanicf("invalid peer config: %s", err) + Component.LogFatalf("invalid peer config: %s", err) } for i, p := range peers { multiAddr, err := multiaddr.NewMultiaddr(p.MultiAddress) if err != nil { - Component.LogPanicf("invalid config peer address at pos %d: %s", i, err) + Component.LogFatalf("invalid config peer address at pos %d: %s", i, err) } if err = p2pConfigManager.AddPeer(multiAddr, p.Alias); err != nil { @@ -184,7 +184,7 @@ func provide(c *dig.Container) error { peersMultiAddresses, err := getMultiAddrsFromString(ParamsPeers.Peers) if err != nil { - Component.LogErrorAndExit(err) + Component.LogFatal(err.Error()) } peerAdded := false @@ -211,7 +211,7 @@ func provide(c *dig.Container) error { return p2pConfigManager }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } type p2pDeps struct { @@ -238,7 +238,7 @@ func provide(c *dig.Container) error { // load up the previously generated identity or create a new one nodePrivateKey, newlyCreated, err := hivep2p.LoadOrCreateIdentityPrivateKey(privKeyFilePath, ParamsP2P.IdentityPrivateKey) if err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } res.NodePrivateKey = nodePrivateKey @@ -254,7 +254,7 @@ func provide(c *dig.Container) error { connmgr.WithGracePeriod(time.Minute), ) if err != nil { - Component.LogPanicf("unable to initialize connection manager: %s", err) + Component.LogFatalf("unable to initialize connection manager: %s", err) } createdHost, err := libp2p.New( @@ -270,7 +270,7 @@ func provide(c *dig.Container) error { for _, externalMultiAddress := range ParamsP2P.ExternalMultiAddresses { addr, err := multiaddr.NewMultiaddr(externalMultiAddress) if err != nil { - Component.LogPanicf("unable to parse external multi address %s: %s", externalMultiAddress, err) + Component.LogFatalf("unable to parse external multi address %s: %s", externalMultiAddress, err) } externalMultiAddrs = append(externalMultiAddrs, addr) @@ -283,7 +283,7 @@ func provide(c *dig.Container) error { }()), ) if err != nil { - Component.LogFatalfAndExit("unable to initialize libp2p host: %s", err) + Component.LogFatalf("unable to initialize libp2p host: %s", err) } res.Host = createdHost @@ -291,7 +291,7 @@ func provide(c *dig.Container) error { return res }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return c.Provide(func(host host.Host, peerDB *network.DB) *p2p.Manager { @@ -313,11 +313,11 @@ func configure() error { Component.LogInfo("Syncing p2p peer database to disk ...") if err := closeDatabases(); err != nil { - Component.LogPanicf("Syncing p2p peer database to disk ... failed: %s", err) + Component.LogFatalf("Syncing p2p peer database to disk ... failed: %s", err) } Component.LogInfo("Syncing p2p peer database to disk ... done") }, daemon.PriorityCloseDatabase); err != nil { - Component.LogPanicf("failed to start worker: %s", err) + Component.LogFatalf("failed to start worker: %s", err) } // log the p2p events @@ -336,7 +336,7 @@ func run() error { if err := Component.Daemon().BackgroundWorker(Component.Name, func(ctx context.Context) { deps.ManualPeeringMgr.Start() if err := deps.AutoPeeringMgr.Start(ctx); err != nil { - Component.LogErrorAndExit("Failed to start autopeering manager: %s", err) + Component.LogFatal("Failed to start autopeering manager: %s", err) } defer func() { @@ -348,7 +348,7 @@ func run() error { connectConfigKnownPeers() <-ctx.Done() }, daemon.PriorityManualPeering); err != nil { - Component.LogErrorfAndExit("Failed to start as daemon: %s", err) + Component.LogFatal("Failed to start as daemon: %s", err) } if err := Component.Daemon().BackgroundWorker(fmt.Sprintf("%s-P2PManager", Component.Name), func(ctx context.Context) { @@ -361,7 +361,7 @@ func run() error { <-ctx.Done() }, daemon.PriorityP2P); err != nil { - Component.LogErrorfAndExit("Failed to start as daemon: %s", err) + Component.LogFatal("Failed to start as daemon: %s", err) } return nil @@ -386,13 +386,13 @@ func connectConfigKnownPeers() { for _, p := range deps.PeeringConfigManager.Peers() { multiAddr, err := multiaddr.NewMultiaddr(p.MultiAddress) if err != nil { - Component.LogPanicf("invalid peer address: %s", err) + Component.LogFatalf("invalid peer address: %s", err) } // we try to parse the multi address and check if there is a "/p2p" part with ID _, err = peer.AddrInfoFromP2pAddr(multiAddr) if err != nil { - Component.LogPanicf("invalid peer address info: %s", err) + Component.LogFatalf("invalid peer address info: %s", err) } if err := deps.ManualPeeringMgr.AddPeers(multiAddr); err != nil { diff --git a/components/protocol/component.go b/components/protocol/component.go index 037b67025..e538c059d 100644 --- a/components/protocol/component.go +++ b/components/protocol/component.go @@ -104,7 +104,7 @@ func initConfigParams(c *dig.Container) error { if err := c.Provide(func() cfgResult { dbEngine, err := hivedb.EngineFromStringAllowed(ParamsDatabase.Engine, database.AllowedEnginesDefault) if err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return cfgResult{ @@ -113,7 +113,7 @@ func initConfigParams(c *dig.Container) error { ProtocolParameters: readProtocolParameters(), } }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return nil @@ -132,15 +132,15 @@ func provide(c *dig.Container) error { pruningSizeEnabled := ParamsDatabase.Size.Enabled pruningTargetDatabaseSizeBytes, err := bytes.Parse(ParamsDatabase.Size.TargetSize) if err != nil { - Component.LogPanicf("parameter %s invalid", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize))) + Component.LogFatalf("parameter %s invalid", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize))) } if pruningSizeEnabled && pruningTargetDatabaseSizeBytes == 0 { - Component.LogPanicf("%s has to be specified if %s is enabled", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize)), Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.Enabled))) + Component.LogFatalf("%s has to be specified if %s is enabled", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize)), Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.Enabled))) } return protocol.New( - log.NewLogger("node"), + log.NewLogger(log.WithName("node")), workerpool.NewGroup("Protocol"), deps.P2PManager, protocol.WithBaseDirectory(ParamsDatabase.Path), @@ -309,7 +309,7 @@ func run() error { return Component.Daemon().BackgroundWorker(Component.Name, func(ctx context.Context) { if err := deps.Protocol.Run(ctx); err != nil { if !ierrors.Is(err, context.Canceled) { - Component.LogErrorfAndExit("Error running the Protocol: %s", err.Error()) + Component.LogFatal("Error running the Protocol: %s", err.Error()) } } diff --git a/components/restapi/api.go b/components/restapi/api.go index c2dbc29be..441bba23d 100644 --- a/components/restapi/api.go +++ b/components/restapi/api.go @@ -13,12 +13,12 @@ func apiMiddleware() echo.MiddlewareFunc { publicRoutesRegEx, err := restapi.CompileRoutesAsRegexes(ParamsRestAPI.PublicRoutes) if err != nil { - Component.LogErrorfAndExit(err.Error()) + Component.LogFatal(err.Error()) } protectedRoutesRegEx, err := restapi.CompileRoutesAsRegexes(ParamsRestAPI.ProtectedRoutes) if err != nil { - Component.LogErrorfAndExit(err.Error()) + Component.LogFatal(err.Error()) } matchPublic := func(c echo.Context) bool { @@ -48,7 +48,7 @@ func apiMiddleware() echo.MiddlewareFunc { // configure JWT auth salt := ParamsRestAPI.JWTAuth.Salt if len(salt) == 0 { - Component.LogErrorfAndExit("'%s' should not be empty", Component.App().Config().GetParameterPath(&(ParamsRestAPI.JWTAuth.Salt))) + Component.LogFatal("'%s' should not be empty", Component.App().Config().GetParameterPath(&(ParamsRestAPI.JWTAuth.Salt))) } // API tokens do not expire. @@ -58,7 +58,7 @@ func apiMiddleware() echo.MiddlewareFunc { deps.NodePrivateKey, ) if err != nil { - Component.LogPanicf("JWT auth initialization failed: %w", err) + Component.LogFatalf("JWT auth initialization failed: %w", err) } jwtAllow := func(c echo.Context, subject string, claims *jwt.AuthClaims) bool { diff --git a/components/restapi/component.go b/components/restapi/component.go index d6dc4b470..382e62654 100644 --- a/components/restapi/component.go +++ b/components/restapi/component.go @@ -67,7 +67,7 @@ func initConfigParams(c *dig.Container) error { RestAPILimitsMaxResults: ParamsRestAPI.Limits.MaxResults, } }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return nil @@ -86,7 +86,7 @@ func provide(c *dig.Container) error { return e }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } type proxyDeps struct { @@ -97,13 +97,13 @@ func provide(c *dig.Container) error { if err := c.Provide(func(deps proxyDeps) *restapi.RestRouteManager { return restapi.NewRestRouteManager(deps.Echo) }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } if err := c.Provide(func(deps dependencies) *blockhandler.BlockHandler { return blockhandler.New(deps.Protocol) }); err != nil { - Component.LogPanic(err) + Component.LogFatal(err.Error()) } return nil @@ -144,12 +144,12 @@ func run() error { //nolint:contextcheck // false positive if err := deps.Echo.Shutdown(shutdownCtx); err != nil { - Component.LogWarn(err) + Component.LogWarn(err.Error()) } Component.LogInfo("Stopping REST-API server ... done") }, daemon.PriorityRestAPI); err != nil { - Component.LogPanicf("failed to start worker: %s", err) + Component.LogFatalf("failed to start worker: %s", err) } return nil diff --git a/components/restapi/core/component.go b/components/restapi/core/component.go index cd6104963..7950db707 100644 --- a/components/restapi/core/component.go +++ b/components/restapi/core/component.go @@ -51,7 +51,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogPanicf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) + Component.LogFatalf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) } routeGroup := deps.RestRouteManager.AddRoute(api.CorePluginName) diff --git a/components/restapi/management/component.go b/components/restapi/management/component.go index 24a3d91dd..b763931bf 100644 --- a/components/restapi/management/component.go +++ b/components/restapi/management/component.go @@ -40,7 +40,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogPanicf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) + Component.LogFatalf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) } routeGroup := deps.RestRouteManager.AddRoute(api.ManagementPluginName) diff --git a/components/restapi/management/peers.go b/components/restapi/management/peers.go index 95af092a4..db31b6e02 100644 --- a/components/restapi/management/peers.go +++ b/components/restapi/management/peers.go @@ -3,7 +3,7 @@ package management import ( "github.com/labstack/echo/v4" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/iota.go/v4/api" ) @@ -89,7 +89,7 @@ func listPeers(_ echo.Context) (*api.PeersResponse, error) { return nil, nil } -func addPeer(_ echo.Context, _ *logger.Logger) (*api.PeerInfo, error) { +func addPeer(_ echo.Context, _ log.Logger) (*api.PeerInfo, error) { /* request := &addPeerRequest{} diff --git a/config_defaults.json b/config_defaults.json index 2b6d4e5e1..f82fbde63 100644 --- a/config_defaults.json +++ b/config_defaults.json @@ -10,18 +10,12 @@ } }, "logger": { + "name": "", "level": "info", - "disableCaller": true, - "disableStacktrace": false, - "stacktraceLevel": "panic", - "encoding": "console", - "encodingConfig": { - "timeEncoder": "rfc3339" - }, + "timeFormat": "rfc3339", "outputPaths": [ "stdout" - ], - "disableEvents": true + ] }, "p2p": { "bindMultiAddresses": [ 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 f8f85afaa..b8bc00492 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 @@ -39,7 +39,6 @@ services: -c config.json --logger.level=debug - --logger.disableCaller=false --p2p.peers=/dns/node-01.feature/tcp/14666/p2p/12D3KooWCrjmh4dUCWfGVQT6ivzArieJB9Z3eKdy2mdEEN95NDPS --p2p.externalMultiAddresses={{ ips | join(',') }} --p2p.identityPrivateKey={{p2pIdentityPrvKey}} diff --git a/documentation/docs/references/configuration.md b/documentation/docs/references/configuration.md index 08782cf56..f2d16be3d 100644 --- a/documentation/docs/references/configuration.md +++ b/documentation/docs/references/configuration.md @@ -69,40 +69,24 @@ Example: ## 2. Logger -| Name | Description | Type | Default value | -| ---------------------------------------- | --------------------------------------------------------------------------- | ------- | ------------- | -| level | The minimum enabled logging level | string | "info" | -| disableCaller | Stops annotating logs with the calling function's file name and line number | boolean | true | -| disableStacktrace | Disables automatic stacktrace capturing | boolean | false | -| stacktraceLevel | The level stacktraces are captured and above | string | "panic" | -| encoding | The logger's encoding (options: "json", "console") | string | "console" | -| [encodingConfig](#logger_encodingconfig) | Configuration for encodingConfig | object | | -| outputPaths | A list of URLs, file paths or stdout/stderr to write logging output to | array | stdout | -| disableEvents | Prevents log messages from being raced as events | boolean | true | - -### EncodingConfig - -| Name | Description | Type | Default value | -| ----------- | ---------------------------------------------------------------------------------------------------------- | ------ | ------------- | -| timeEncoder | Sets the logger's timestamp encoding. (options: "nanos", "millis", "iso8601", "rfc3339" and "rfc3339nano") | string | "rfc3339" | +| Name | Description | Type | Default value | +| ----------- | -------------------------------------------------------------------------------------------------------------- | ------ | ------------- | +| name | The optional name of the logger instance. All log messages are prefixed with that name. | string | "" | +| level | The minimum enabled logging level | string | "info" | +| timeFormat | Sets the logger's timestamp format. (options: "rfc3339", "rfc3339nano", "datetime", "timeonly", and "iso8601") | string | "rfc3339" | +| outputPaths | A list of file paths or stdout/stderr to write logging output to | array | stdout | Example: ```json { "logger": { + "name": "", "level": "info", - "disableCaller": true, - "disableStacktrace": false, - "stacktraceLevel": "panic", - "encoding": "console", - "encodingConfig": { - "timeEncoder": "rfc3339" - }, + "timeFormat": "rfc3339", "outputPaths": [ "stdout" - ], - "disableEvents": true + ] } } ``` diff --git a/go.mod b/go.mod index 2295c1ea1..8ce1fb1d5 100644 --- a/go.mod +++ b/go.mod @@ -11,20 +11,19 @@ require ( github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39 - github.com/iotaledger/hive.go/app v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad + github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 - github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c - github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f + github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 github.com/labstack/echo/v4 v4.11.3 @@ -139,8 +138,8 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pokt-network/smt v0.6.1 // indirect diff --git a/go.sum b/go.sum index ea71d4d30..cafd348ad 100644 --- a/go.sum +++ b/go.sum @@ -277,34 +277,32 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39 h1:jxoBAPgC4I73pAwvEWI2IUCxiI1xN68IaFZ5WC1D3ek= github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/app v0.0.0-20231206114953-6a65a82e30ad h1:v7dkbVLSsmzgOWT2vjvv1MdKQXvqFbvIkx8mvh6VK7g= -github.com/iotaledger/hive.go/app v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:hTHKGFbZnuiW8yEgDuuL7ZjQTCnl8bXyHLmj3LPa648= -github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad h1:4XL7IIvdsWHxSKQfU+sgq3H9egN54053LF9TwMfDcTg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad h1:iNzb/Oy/nucIOXOzRcwSqqFsaeKwr2JZpZYSLp8xjlE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad/go.mod h1:CO28KMA6Pp5LJPiigPQQ276zQofES+jMod08U5pyRFA= -github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad h1:pUL2UZbF4S8FIV7uKo9p+IGfZ658K1VNorQ6rzDMRvs= -github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:7vHoF//1Pt3nu0l8nDIw7bEgv2GfbL3kSgjp7Rdqhd4= -github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad h1:adLrD6dOEkM5Xdg6AOPt9/HYqy/pQ5FrprDpW4/VqUU= -github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:NmZRIoxtL6iQdVK6n5W+JOx58K/0Yn8k7WuSvpKPQ+M= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad h1:WDl58zJKHfwbzHs+ZB8Jq3YNgVQE5Neu2NeaX3FZuyU= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 h1:T5fR1S+a79YcmKwUo7LwpS4oEsucyYtEA4PscE6wm5A= +github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:1QYclsHQMHyYEMSzVuiubdDgLmS7m8yr8FSoijw54X4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 h1:tkUHfWzom6qXfjFXgdUyLY6jBhsdgcVaiNyGxqjDsT4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 h1:7KdQsdQnQ2TPC+GC3A9twqaCqiNZK0NbTNBwB8AkqCk= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0/go.mod h1:oMyDUWmJr3QbTZRN0vAMImLAPFaTGVXs/pia+x5DPrc= +github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 h1:NJNDK1yQk0XhjsvE3ALqeyNZxxvg98CzazzNH6PHl2E= +github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:7M9kVJIT47ad6jalzIkt+ErfF0hwhivK+yJw80pVPc0= +github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 h1:h75EH2IAgrHO6Nnc01rn1LYzmtjVd38hnUWAfb03VEU= +github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ZT9qmn+/RM69TuiB/URk+EdHSCXJa+3UHH3DP8QQdJc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 h1:3xVYmoEf05KDo4WbkqVVePFluSP9FRRKDgDcQhl46Ko= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 h1:Gp2h+Els9cTVYYnYsHX3zLuixb0XggIj2okK570aKww= github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad h1:qpCsjw+InLL824QPu3lY/osck4DhucBKhCs5/E8OH+A= -github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:ETXGXymFyNcUq2t4I9e7ZK18f9bxUWYat4pjZ9W0rWc= -github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c h1:Ksts6VjPj9y0o2Nis+2tHtDGWITNJ4yju87ZlHLPuOo= -github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c/go.mod h1:Td3R6QmYw0svZI1GuZ/tN9s0VNaHassXSKLCc70aX9w= -github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad h1:fazCxogqOLDEPNDPWYDLTDpYmwgTJgIaC2Z6VN52S4M= -github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:hVaVODS+Uik0obf3SVEHFQNruUko/uqIgD/GKwhn49M= -github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad h1:HpupWK8iqFt+Sdogkh2/N8ojalmevYy+FzhjOuy7Y7E= -github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:Z9NFsByMh1Kf98f3v3ifeZRycbS2db1hjswTQG1MxnE= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad h1:c8uwbBZDqpiCNN9/9Jji7Z4lL0GdVnORp8WMouiuknk= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= -github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad h1:VC3OgdSbyngY7/gxVj66fKd/nGmN6P0/myr348nx7vA= -github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f h1:V68Ijq1A64gB9r0Rhc4ybLGH66rXqZ2Ly0L4uuaLrMg= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f/go.mod h1:Dy3Gv4Dn1zufB177x6IXETP3zTeiWQ1+HMVQR0Bt/ew= +github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 h1:IHRIVeZoLTna4WUtSiLt0lRBHAgroIEnR77gF9NPMAQ= +github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:fmjNV/R9NAtwwOSaC43lbImm//s/IxPtGKk3HqxF0f8= +github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 h1:wNg7/sumN99V+nJNx45Z9kvKj34MEnFGPk9kuGTKmFc= +github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ewepnMj9XSWld3m01HstYdx/qNJ8NGC48ffUfSqCZik= +github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 h1:dEicvruyg9oYZSswptCV9ovkBMQ83dUJjQfsw6PLqrI= +github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:tp2Had5eIa0n6TgdPS/YQ6P29ifWxt59RhD97wMhRhA= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 h1:A4pEReiEtvxw2pvdAKmN6cjim8DrCYq8WGWtfXhcgRk= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0/go.mod h1:8rlqmJhg17u6xMicCY2Nj7jqBLEAKwuRcLcYpglVKf4= +github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 h1:EXUxlTEuaVwSNhzXo6jeNl9u6UUHvB+YMu3rdBRbtDc= +github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e/go.mod h1:zEb9onVHnDUStl5SsFBj7H0HBKfIN0c/pUND8Llfqp8= github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= @@ -518,11 +516,11 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 h1:+qIP3OMrT7SN5kLnTcVEISPOMB/97RyAKTg1UWA738E= -github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -630,7 +628,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/pkg/network/autopeering/autopeering.go b/pkg/network/autopeering/autopeering.go index 8e9343254..2dc5e9aa4 100644 --- a/pkg/network/autopeering/autopeering.go +++ b/pkg/network/autopeering/autopeering.go @@ -13,7 +13,7 @@ import ( "github.com/libp2p/go-libp2p/p2p/discovery/util" "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/iota-core/pkg/network" "github.com/iotaledger/iota-core/pkg/network/p2p" ) @@ -21,7 +21,7 @@ import ( type Manager struct { networkID string p2pManager *p2p.Manager - log *logger.Logger + logger log.Logger host host.Host peerDB *network.DB startOnce sync.Once @@ -33,13 +33,13 @@ type Manager struct { } // NewManager creates a new autopeering manager. -func NewManager(networkID string, p2pManager *p2p.Manager, host host.Host, peerDB *network.DB, log *logger.Logger) *Manager { +func NewManager(networkID string, p2pManager *p2p.Manager, host host.Host, peerDB *network.DB, logger log.Logger) *Manager { return &Manager{ networkID: networkID, p2pManager: p2pManager, host: host, peerDB: peerDB, - log: log, + logger: logger, } } @@ -64,16 +64,16 @@ func (m *Manager) Start(ctx context.Context) (err error) { for _, seedPeer := range m.peerDB.SeedPeers() { addrInfo := seedPeer.ToAddrInfo() if innerErr := m.host.Connect(ctx, *addrInfo); innerErr != nil { - m.log.Infoln("Failed to connect to bootstrap node:", seedPeer, innerErr) + m.logger.LogInfof("Failed to connect to bootstrap node, peer: %s, error: %s", seedPeer, innerErr) continue } if _, innerErr := kademliaDHT.RoutingTable().TryAddPeer(addrInfo.ID, true, true); innerErr != nil { - m.log.Warnln("Failed to add bootstrap node to routing table:", innerErr) + m.logger.LogWarnf("Failed to add bootstrap node to routing table, error: %s", innerErr) continue } - m.log.Debugln("Connected to bootstrap node:", seedPeer) + m.logger.LogDebugf("Connected to bootstrap node, peer: %s", seedPeer) } m.routingDiscovery = routing.NewRoutingDiscovery(kademliaDHT) @@ -119,10 +119,10 @@ func (m *Manager) discoverAndDialPeers() { tctx, cancel := context.WithTimeout(m.ctx, 10*time.Second) defer cancel() - m.log.Debugf("Discovering peers for network ID %s", m.networkID) + m.logger.LogDebugf("Discovering peers for network ID %s", m.networkID) peerChan, err := m.routingDiscovery.FindPeers(tctx, m.networkID) if err != nil { - m.log.Warnf("Failed to find peers: %s", err) + m.logger.LogWarnf("Failed to find peers: %s", err) } for peerAddrInfo := range peerChan { @@ -131,15 +131,15 @@ func (m *Manager) discoverAndDialPeers() { continue } - m.log.Debugf("Found peer: %s", peerAddrInfo) + m.logger.LogDebugf("Found peer: %s", peerAddrInfo) peer := network.NewPeerFromAddrInfo(&peerAddrInfo) if err := m.p2pManager.DialPeer(m.ctx, peer); err != nil { if ierrors.Is(err, p2p.ErrDuplicateNeighbor) { - m.log.Debugf("Already connected to peer %s", peer) + m.logger.LogDebugf("Already connected to peer %s", peer) continue } - m.log.Warnf("Failed to dial peer %s: %s", peer, err) + m.logger.LogWarnf("Failed to dial peer %s: %s", peer, err) } } } diff --git a/pkg/network/manualpeering/manualpeering.go b/pkg/network/manualpeering/manualpeering.go index 55d4e6665..45c8f8fd9 100644 --- a/pkg/network/manualpeering/manualpeering.go +++ b/pkg/network/manualpeering/manualpeering.go @@ -10,7 +10,7 @@ import ( "github.com/multiformats/go-multiaddr" "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/hive.go/runtime/event" "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/runtime/workerpool" @@ -28,7 +28,7 @@ import ( // Manager also subscribes to the gossip events and in case the connection with a manual peer fails it will reconnect. type Manager struct { p2pm *p2p.Manager - log *logger.Logger + logger log.Logger startOnce sync.Once isStarted atomic.Bool stopOnce sync.Once @@ -44,10 +44,10 @@ type Manager struct { } // NewManager initializes a new Manager instance. -func NewManager(p2pm *p2p.Manager, workerPool *workerpool.WorkerPool, log *logger.Logger) *Manager { +func NewManager(p2pm *p2p.Manager, workerPool *workerpool.WorkerPool, logger log.Logger) *Manager { m := &Manager{ p2pm: p2pm, - log: log, + logger: logger, reconnectInterval: network.DefaultReconnectInterval, knownPeers: make(map[peer.ID]*network.Peer), workerPool: workerPool, @@ -203,7 +203,7 @@ func (m *Manager) addPeer(peerAddr multiaddr.Multiaddr) error { if _, exists := m.knownPeers[p.ID]; exists { return nil } - m.log.Infof("Adding new peer to the list of known peers in manual peering %s", p) + m.logger.LogInfof("Adding new peer to the list of known peers in manual peering %s", p) m.knownPeers[p.ID] = p go func() { defer close(p.DoneCh) @@ -237,11 +237,11 @@ func (m *Manager) keepPeerConnected(peer *network.Peer) { for { if peer.GetConnStatus() == network.ConnStatusDisconnected { - m.log.Infow("Peer is disconnected, calling gossip layer to establish the connection", "peer", peer.ID) + m.logger.LogInfof("Peer is disconnected, calling gossip layer to establish the connection, peerID: %s", peer.ID) var err error if err = m.p2pm.DialPeer(ctx, peer); err != nil && !ierrors.Is(err, p2p.ErrDuplicateNeighbor) && !ierrors.Is(err, context.Canceled) { - m.log.Errorw("Failed to connect a neighbor in the gossip layer", "peerID", peer.ID, "err", err) + m.logger.LogErrorf("Failed to connect a neighbor in the gossip layer, peerID: %s, error: %s", peer.ID, err) } } select { @@ -259,7 +259,7 @@ func (m *Manager) onGossipNeighborRemoved(neighbor *p2p.Neighbor) { func (m *Manager) onGossipNeighborAdded(neighbor *p2p.Neighbor) { m.changeNeighborStatus(neighbor, network.ConnStatusConnected) - m.log.Infow("Gossip layer successfully connected with the peer", "peer", neighbor.Peer) + m.logger.LogInfof("Gossip layer successfully connected with the peer %s", neighbor.Peer) } func (m *Manager) changeNeighborStatus(neighbor *p2p.Neighbor, connStatus network.ConnectionStatus) { diff --git a/pkg/network/p2p/manager.go b/pkg/network/p2p/manager.go index 49d8a56a9..19aab4f2e 100644 --- a/pkg/network/p2p/manager.go +++ b/pkg/network/p2p/manager.go @@ -13,7 +13,7 @@ import ( "google.golang.org/protobuf/proto" "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/iota-core/pkg/network" ) @@ -71,7 +71,7 @@ type Manager struct { libp2pHost host.Host peerDB *network.DB - log *logger.Logger + logger log.Logger shutdownMutex syncutils.RWMutex isShutdown bool @@ -84,11 +84,11 @@ type Manager struct { } // NewManager creates a new Manager. -func NewManager(libp2pHost host.Host, peerDB *network.DB, log *logger.Logger) *Manager { +func NewManager(libp2pHost host.Host, peerDB *network.DB, logger log.Logger) *Manager { m := &Manager{ libp2pHost: libp2pHost, peerDB: peerDB, - log: log, + logger: logger, Events: NewNeighborEvents(), neighbors: make(map[peer.ID]*Neighbor), } @@ -154,11 +154,7 @@ func (m *Manager) DialPeer(ctx context.Context, peer *network.Peer, opts ...Conn return ierrors.Wrapf(err, "dial %s / %s failed to send negotiation for proto %s", peer.PeerAddresses, peer.ID, protocolID) } - m.log.Debugw("outgoing stream negotiated", - "id", peer.ID, - "addr", ps.Conn().RemoteMultiaddr(), - "proto", protocolID, - ) + m.logger.LogDebugf("outgoing stream negotiated, id: %s, addr: %s, proto: %s", peer.ID, ps.Conn().RemoteMultiaddr(), protocolID) if err := m.peerDB.UpdatePeer(peer); err != nil { m.closeStream(stream) @@ -270,7 +266,7 @@ func (m *Manager) handleStream(stream p2pnetwork.Stream) { defer m.protocolHandlerMutex.RUnlock() if m.protocolHandler == nil { - m.log.Error("no protocol handler registered") + m.logger.LogError("no protocol handler registered") stream.Close() return @@ -278,7 +274,7 @@ func (m *Manager) handleStream(stream p2pnetwork.Stream) { ps := NewPacketsStream(stream, m.protocolHandler.PacketFactory) if err := ps.receiveNegotiation(); err != nil { - m.log.Errorw("failed to receive negotiation message") + m.logger.LogError("failed to receive negotiation message") m.closeStream(stream) return @@ -290,14 +286,14 @@ func (m *Manager) handleStream(stream p2pnetwork.Stream) { } peer := network.NewPeerFromAddrInfo(peerAddrInfo) if err := m.peerDB.UpdatePeer(peer); err != nil { - m.log.Errorf("failed to update peer %s in peer database: %s", peer.ID, err) + m.logger.LogErrorf("failed to update peer in peer database, peerID: %s, error: %s", peer.ID, err) m.closeStream(stream) return } if err := m.addNeighbor(peer, ps); err != nil { - m.log.Errorf("failed to add neighbor %s: %s", peer.ID, err) + m.logger.LogErrorf("failed to add neighbor, peerID: %s, error: %s", peer.ID, err) m.closeStream(stream) return @@ -306,7 +302,7 @@ func (m *Manager) handleStream(stream p2pnetwork.Stream) { func (m *Manager) closeStream(s p2pnetwork.Stream) { if err := s.Close(); err != nil { - m.log.Warnw("close error", "err", err) + m.logger.LogWarnf("close error, error: %s", err) } } @@ -337,16 +333,16 @@ func (m *Manager) addNeighbor(peer *network.Peer, ps *PacketsStream) error { } // create and add the neighbor - nbr := NewNeighbor(peer, ps, m.log, func(nbr *Neighbor, packet proto.Message) { + nbr := NewNeighbor(m.logger, peer, ps, func(nbr *Neighbor, packet proto.Message) { m.protocolHandlerMutex.RLock() defer m.protocolHandlerMutex.RUnlock() if m.protocolHandler == nil { - nbr.Log.Errorw("Can't handle packet as no protocol is registered") + nbr.logger.LogError("Can't handle packet as no protocol is registered") return } if err := m.protocolHandler.PacketHandler(nbr.ID, packet); err != nil { - nbr.Log.Debugw("Can't handle packet", "err", err) + nbr.logger.LogDebugf("Can't handle packet, error: %s", err) } }, func(nbr *Neighbor) { m.deleteNeighbor(nbr) @@ -354,14 +350,14 @@ func (m *Manager) addNeighbor(peer *network.Peer, ps *PacketsStream) error { }) if err := m.setNeighbor(nbr); err != nil { if resetErr := ps.Close(); resetErr != nil { - nbr.Log.Errorw("error closing stream", "err", resetErr) + nbr.logger.LogErrorf("error closing stream, error: %s", resetErr) } return ierrors.WithStack(err) } nbr.readLoop() nbr.writeLoop() - nbr.Log.Info("Connection established") + nbr.logger.LogInfo("Connection established") m.Events.NeighborAdded.Trigger(nbr) return nil diff --git a/pkg/network/p2p/neighbor.go b/pkg/network/p2p/neighbor.go index e1d79ddbd..f0d4a22e3 100644 --- a/pkg/network/p2p/neighbor.go +++ b/pkg/network/p2p/neighbor.go @@ -2,6 +2,7 @@ package p2p import ( "context" + "fmt" "sync" "time" @@ -9,7 +10,7 @@ import ( "google.golang.org/protobuf/proto" "github.com/iotaledger/hive.go/ierrors" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/iota-core/pkg/network" ) @@ -31,10 +32,12 @@ type ( type Neighbor struct { *network.Peer + logger log.Logger + loggerShutdown func() + packetReceivedFunc PacketReceivedFunc disconnectedFunc NeighborDisconnectedFunc - Log *logger.Logger disconnectOnce sync.Once wg sync.WaitGroup @@ -47,38 +50,28 @@ type Neighbor struct { } // NewNeighbor creates a new neighbor from the provided peer and connection. -func NewNeighbor(p *network.Peer, stream *PacketsStream, log *logger.Logger, packetReceivedCallback PacketReceivedFunc, disconnectedCallback NeighborDisconnectedFunc) *Neighbor { +func NewNeighbor(logger log.Logger, p *network.Peer, stream *PacketsStream, packetReceivedCallback PacketReceivedFunc, disconnectedCallback NeighborDisconnectedFunc) *Neighbor { + neighborLog, neighborLogShutdown := logger.NewChildLogger(fmt.Sprintf("peer_%s", p.ID.ShortString())) ctx, cancel := context.WithCancel(context.Background()) - neighbor := &Neighbor{ - Peer: p, - + return &Neighbor{ + Peer: p, + logger: neighborLog, + loggerShutdown: neighborLogShutdown, packetReceivedFunc: packetReceivedCallback, disconnectedFunc: disconnectedCallback, - - loopCtx: ctx, - loopCtxCancel: cancel, - - stream: stream, - sendQueue: make(chan *queuedPacket, NeighborsSendQueueSize), + loopCtx: ctx, + loopCtxCancel: cancel, + stream: stream, + sendQueue: make(chan *queuedPacket, NeighborsSendQueueSize), } - - conn := neighbor.stream.Conn() - - neighbor.Log = log.With( - "id", p.ID, - "localAddr", conn.LocalMultiaddr(), - "remoteAddr", conn.RemoteMultiaddr(), - ) - - return neighbor } func (n *Neighbor) Enqueue(packet proto.Message, protocolID protocol.ID) { select { case n.sendQueue <- &queuedPacket{protocolID: protocolID, packet: packet}: default: - n.Log.Warn("Dropped packet due to SendQueue being full") + n.logger.LogWarn("Dropped packet due to SendQueue being full") } } @@ -103,7 +96,7 @@ func (n *Neighbor) readLoop() { defer n.wg.Done() for { if n.loopCtx.Err() != nil { - n.Log.Infof("Exit %s readLoop due to canceled context") + n.logger.LogInfo("Exit readLoop due to canceled context") return } @@ -116,9 +109,9 @@ func (n *Neighbor) readLoop() { packet := stream.packetFactory() err := stream.ReadPacket(packet) if err != nil { - n.Log.Infow("Stream read packet error", "err", err) + n.logger.LogInfof("Stream read packet error: %s", err) if disconnectErr := n.disconnect(); disconnectErr != nil { - n.Log.Warnw("Failed to disconnect", "err", disconnectErr) + n.logger.LogWarnf("Failed to disconnect, error: %s", disconnectErr) } return @@ -135,21 +128,21 @@ func (n *Neighbor) writeLoop() { for { select { case <-n.loopCtx.Done(): - n.Log.Info("Exit writeLoop due to canceled context") + n.logger.LogInfo("Exit writeLoop due to canceled context") return case sendPacket := <-n.sendQueue: if n.stream == nil { - n.Log.Warnw("send error, no stream for protocol", "peer-id", n.ID, "protocol", sendPacket.protocolID) + n.logger.LogWarnf("send error, no stream for protocol, peerID: %s, protocol: %s", n.ID, sendPacket.protocolID) if disconnectErr := n.disconnect(); disconnectErr != nil { - n.Log.Warnw("Failed to disconnect", "err", disconnectErr) + n.logger.LogWarnf("Failed to disconnect, error: %s", disconnectErr) } return } if err := n.stream.WritePacket(sendPacket.packet); err != nil { - n.Log.Warnw("send error", "peer-id", n.ID, "err", err) + n.logger.LogWarnf("send error, peerID: %s, error: %s", n.ID, err) if disconnectErr := n.disconnect(); disconnectErr != nil { - n.Log.Warnw("Failed to disconnect", "err", disconnectErr) + n.logger.LogWarnf("Failed to disconnect, error: %s", disconnectErr) } return @@ -162,9 +155,10 @@ func (n *Neighbor) writeLoop() { // Close closes the connection with the neighbor. func (n *Neighbor) Close() { if err := n.disconnect(); err != nil { - n.Log.Errorw("Failed to disconnect the neighbor", "err", err) + n.logger.LogErrorf("Failed to disconnect the neighbor, error: %s", err) } n.wg.Wait() + n.loggerShutdown() } func (n *Neighbor) disconnect() (err error) { @@ -176,8 +170,8 @@ func (n *Neighbor) disconnect() (err error) { if streamErr := n.stream.Close(); streamErr != nil { err = ierrors.WithStack(streamErr) } - n.Log.Infow("Stream closed", "protocol", n.stream.Protocol()) - n.Log.Info("Connection closed") + n.logger.LogInfof("Stream closed, protocol: %s", n.stream.Protocol()) + n.logger.LogInfo("Connection closed") n.disconnectedFunc(n) }) diff --git a/pkg/network/p2p/neighbor_test.go b/pkg/network/p2p/neighbor_test.go index 935413d69..6738746f1 100644 --- a/pkg/network/p2p/neighbor_test.go +++ b/pkg/network/p2p/neighbor_test.go @@ -16,14 +16,15 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/protobuf/proto" - "github.com/iotaledger/hive.go/logger" + "github.com/iotaledger/hive.go/lo" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/iota-core/pkg/network" p2pproto "github.com/iotaledger/iota-core/pkg/network/p2p/proto" ) var ( testPacket1 = &p2pproto.Negotiation{} - log = logger.NewExampleLogger("p2p_test") + testLogger = log.NewLogger(log.WithName("p2p_test")) ) func TestNeighborClose(t *testing.T) { @@ -82,7 +83,7 @@ func newTestNeighbor(name string, stream p2pnetwork.Stream, packetReceivedFunc . packetReceived = func(neighbor *Neighbor, packet proto.Message) {} } - return NewNeighbor(newTestPeer(name), NewPacketsStream(stream, packetFactory), log.Named(name), packetReceived, func(neighbor *Neighbor) {}) + return NewNeighbor(lo.Return1(testLogger.NewChildLogger(name)), newTestPeer(name), NewPacketsStream(stream, packetFactory), packetReceived, func(neighbor *Neighbor) {}) } func packetFactory() proto.Message { diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go index 79423b77b..63d4af207 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go @@ -91,7 +91,7 @@ func (t *TestSuite) InitPerformanceTracker() { t.latestCommittedEpoch, iotago.SingleVersionProvider(t.api), func(err error) {}, - log.NewLogger("PerfTestsuite"), + log.NewLogger(log.WithName("PerfTestsuite")), ) } diff --git a/pkg/testsuite/mock/node.go b/pkg/testsuite/mock/node.go index 71c897207..5bdf70327 100644 --- a/pkg/testsuite/mock/node.go +++ b/pkg/testsuite/mock/node.go @@ -3,7 +3,6 @@ package mock import ( "context" "fmt" - "log/slog" "sync/atomic" "testing" "time" @@ -51,7 +50,9 @@ type InvalidSignedTransactionEvent struct { } type Node struct { - Testing *testing.T + Testing *testing.T + logger log.Logger + loggerShutdown func() Name string Validator *BlockIssuer @@ -74,7 +75,6 @@ type Node struct { candidateEngineActivatedCount atomic.Uint32 mainEngineSwitchedCount atomic.Uint32 - logHandler slog.Handler enableEngineLogging bool mutex syncutils.RWMutex @@ -84,7 +84,7 @@ type Node struct { invalidTransactionEvents map[iotago.SignedTransactionID]InvalidSignedTransactionEvent } -func NewNode(t *testing.T, net *Network, partition string, name string, validator bool, logHandler slog.Handler) *Node { +func NewNode(t *testing.T, parentLogger log.Logger, net *Network, partition string, name string, validator bool) *Node { keyManager := lo.PanicOnErr(wallet.NewKeyManagerFromRandom(wallet.DefaultIOTAPath)) priv, pub := keyManager.KeyPair() @@ -101,8 +101,12 @@ func NewNode(t *testing.T, net *Network, partition string, name string, validato validatorBlockIssuer = nil } + logger, loggerShutdown := parentLogger.NewChildLogger(name) + return &Node{ - Testing: t, + Testing: t, + logger: logger, + loggerShutdown: loggerShutdown, Name: name, @@ -115,7 +119,6 @@ func NewNode(t *testing.T, net *Network, partition string, name string, validato Endpoint: net.JoinWithEndpointID(peerID, partition), Workers: workerpool.NewGroup(name), - logHandler: logHandler, enableEngineLogging: true, attachedBlocks: make([]*blocks.Block, 0), @@ -133,7 +136,7 @@ func (n *Node) IsValidator() bool { func (n *Node) Initialize(failOnBlockFiltered bool, opts ...options.Option[protocol.Protocol]) { n.Protocol = protocol.New( - log.NewLogger(n.Name, n.logHandler), + n.logger, n.Workers.CreateGroup("Protocol"), n.Endpoint, opts..., @@ -483,6 +486,7 @@ func (n *Node) Shutdown() { } <-stopped + n.loggerShutdown() } func (n *Node) ProtocolParametersHash() iotago.Identifier { diff --git a/pkg/testsuite/snapshotcreator/snapshotcreator.go b/pkg/testsuite/snapshotcreator/snapshotcreator.go index beb9e47c4..0d57b10ef 100644 --- a/pkg/testsuite/snapshotcreator/snapshotcreator.go +++ b/pkg/testsuite/snapshotcreator/snapshotcreator.go @@ -96,7 +96,7 @@ func CreateSnapshot(opts ...options.Option[Options]) error { } engineInstance := engine.New( - log.NewLogger("snapshot-creator"), + log.NewLogger(log.WithName("snapshot-creator")), workers.CreateGroup("Engine"), s, presolidblockfilter.NewProvider(), diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index 373129411..784ba8990 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -2,8 +2,6 @@ package testsuite import ( "fmt" - "log/slog" - "os" "strings" "sync/atomic" "testing" @@ -76,7 +74,7 @@ type TestSuite struct { optsSnapshotOptions []options.Option[snapshotcreator.Options] optsWaitFor time.Duration optsTick time.Duration - optsLogHandler slog.Handler + optsLogger log.Logger uniqueBlockTimeCounter atomic.Int64 automaticTransactionIssuingCounters shrinkingmap.ShrinkingMap[string, int] @@ -98,9 +96,9 @@ func NewTestSuite(testingT *testing.T, opts ...options.Option[TestSuite]) *TestS blocks: shrinkingmap.New[string, *blocks.Block](), automaticTransactionIssuingCounters: *shrinkingmap.New[string, int](), - optsWaitFor: durationFromEnvOrDefault(5*time.Second, "CI_UNIT_TESTS_WAIT_FOR"), - optsTick: durationFromEnvOrDefault(2*time.Millisecond, "CI_UNIT_TESTS_TICK"), - optsLogHandler: log.NewTextHandler(os.Stdout), + optsWaitFor: durationFromEnvOrDefault(5*time.Second, "CI_UNIT_TESTS_WAIT_FOR"), + optsTick: durationFromEnvOrDefault(2*time.Millisecond, "CI_UNIT_TESTS_TICK"), + optsLogger: log.NewLogger(log.WithName("TestSuite")), }, opts, func(t *TestSuite) { fmt.Println("Setup TestSuite -", testingT.Name(), " @ ", time.Now()) @@ -339,7 +337,7 @@ func (t *TestSuite) addNodeToPartition(name string, partition string, validator panic(fmt.Sprintf("cannot add validator node %s to partition %s: framework already running", name, partition)) } - node := mock.NewNode(t.Testing, t.network, partition, name, validator, t.optsLogHandler) + node := mock.NewNode(t.Testing, t.optsLogger, t.network, partition, name, validator) t.nodes.Set(name, node) node.SetCurrentSlot(t.currentSlot) diff --git a/pkg/testsuite/testsuite_options.go b/pkg/testsuite/testsuite_options.go index 79b4398f3..7b9c88060 100644 --- a/pkg/testsuite/testsuite_options.go +++ b/pkg/testsuite/testsuite_options.go @@ -1,10 +1,10 @@ package testsuite import ( - "log/slog" "os" "time" + "github.com/iotaledger/hive.go/log" "github.com/iotaledger/hive.go/runtime/options" "github.com/iotaledger/iota-core/pkg/testsuite/snapshotcreator" iotago "github.com/iotaledger/iota.go/v4" @@ -40,9 +40,9 @@ func WithProtocolParametersOptions(protocolParameterOptions ...options.Option[io } } -func WithLogHandler(logHandler slog.Handler) options.Option[TestSuite] { +func WithLogger(logger log.Logger) options.Option[TestSuite] { return func(t *TestSuite) { - t.optsLogHandler = logHandler + t.optsLogger = logger } } diff --git a/tools/docker-network/.env b/tools/docker-network/.env index 443dcc0e5..2f06886cb 100644 --- a/tools/docker-network/.env +++ b/tools/docker-network/.env @@ -1,9 +1,6 @@ COMMON_CONFIG=" -c config.json --logger.level=info ---logger.disableCaller=false ---logger.disableStacktrace=false ---logger.encoding=console --logger.outputPaths=stdout --p2p.db.path=/app/data/peerdb --profiling.enabled=true diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 13874cbf0..08fcfe0c6 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-20231206114953-6a65a82e30ad + github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 ) @@ -57,19 +57,18 @@ require ( 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-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c // indirect - github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e // indirect github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 // indirect github.com/ipfs/boxo v0.13.1 // indirect @@ -130,8 +129,8 @@ require ( github.com/otiai10/copy v1.14.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pokt-network/smt v0.6.1 // indirect github.com/polydawn/refmt v0.89.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 3d2ccafdd..4e79f15ab 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -279,36 +279,34 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39 h1:jxoBAPgC4I73pAwvEWI2IUCxiI1xN68IaFZ5WC1D3ek= github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/app v0.0.0-20231206114953-6a65a82e30ad h1:v7dkbVLSsmzgOWT2vjvv1MdKQXvqFbvIkx8mvh6VK7g= -github.com/iotaledger/hive.go/app v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:hTHKGFbZnuiW8yEgDuuL7ZjQTCnl8bXyHLmj3LPa648= +github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 h1:T5fR1S+a79YcmKwUo7LwpS4oEsucyYtEA4PscE6wm5A= +github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:1QYclsHQMHyYEMSzVuiubdDgLmS7m8yr8FSoijw54X4= 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-20231206114953-6a65a82e30ad h1:4XL7IIvdsWHxSKQfU+sgq3H9egN54053LF9TwMfDcTg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad h1:iNzb/Oy/nucIOXOzRcwSqqFsaeKwr2JZpZYSLp8xjlE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad/go.mod h1:CO28KMA6Pp5LJPiigPQQ276zQofES+jMod08U5pyRFA= -github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad h1:pUL2UZbF4S8FIV7uKo9p+IGfZ658K1VNorQ6rzDMRvs= -github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:7vHoF//1Pt3nu0l8nDIw7bEgv2GfbL3kSgjp7Rdqhd4= -github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad h1:adLrD6dOEkM5Xdg6AOPt9/HYqy/pQ5FrprDpW4/VqUU= -github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:NmZRIoxtL6iQdVK6n5W+JOx58K/0Yn8k7WuSvpKPQ+M= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad h1:WDl58zJKHfwbzHs+ZB8Jq3YNgVQE5Neu2NeaX3FZuyU= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 h1:tkUHfWzom6qXfjFXgdUyLY6jBhsdgcVaiNyGxqjDsT4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 h1:7KdQsdQnQ2TPC+GC3A9twqaCqiNZK0NbTNBwB8AkqCk= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0/go.mod h1:oMyDUWmJr3QbTZRN0vAMImLAPFaTGVXs/pia+x5DPrc= +github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 h1:NJNDK1yQk0XhjsvE3ALqeyNZxxvg98CzazzNH6PHl2E= +github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:7M9kVJIT47ad6jalzIkt+ErfF0hwhivK+yJw80pVPc0= +github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 h1:h75EH2IAgrHO6Nnc01rn1LYzmtjVd38hnUWAfb03VEU= +github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ZT9qmn+/RM69TuiB/URk+EdHSCXJa+3UHH3DP8QQdJc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 h1:3xVYmoEf05KDo4WbkqVVePFluSP9FRRKDgDcQhl46Ko= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 h1:Gp2h+Els9cTVYYnYsHX3zLuixb0XggIj2okK570aKww= github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad h1:qpCsjw+InLL824QPu3lY/osck4DhucBKhCs5/E8OH+A= -github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:ETXGXymFyNcUq2t4I9e7ZK18f9bxUWYat4pjZ9W0rWc= -github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c h1:Ksts6VjPj9y0o2Nis+2tHtDGWITNJ4yju87ZlHLPuOo= -github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c/go.mod h1:Td3R6QmYw0svZI1GuZ/tN9s0VNaHassXSKLCc70aX9w= -github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad h1:fazCxogqOLDEPNDPWYDLTDpYmwgTJgIaC2Z6VN52S4M= -github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:hVaVODS+Uik0obf3SVEHFQNruUko/uqIgD/GKwhn49M= -github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad h1:HpupWK8iqFt+Sdogkh2/N8ojalmevYy+FzhjOuy7Y7E= -github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:Z9NFsByMh1Kf98f3v3ifeZRycbS2db1hjswTQG1MxnE= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad h1:c8uwbBZDqpiCNN9/9Jji7Z4lL0GdVnORp8WMouiuknk= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= -github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad h1:VC3OgdSbyngY7/gxVj66fKd/nGmN6P0/myr348nx7vA= -github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f h1:V68Ijq1A64gB9r0Rhc4ybLGH66rXqZ2Ly0L4uuaLrMg= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f/go.mod h1:Dy3Gv4Dn1zufB177x6IXETP3zTeiWQ1+HMVQR0Bt/ew= +github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 h1:IHRIVeZoLTna4WUtSiLt0lRBHAgroIEnR77gF9NPMAQ= +github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:fmjNV/R9NAtwwOSaC43lbImm//s/IxPtGKk3HqxF0f8= +github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 h1:wNg7/sumN99V+nJNx45Z9kvKj34MEnFGPk9kuGTKmFc= +github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ewepnMj9XSWld3m01HstYdx/qNJ8NGC48ffUfSqCZik= +github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 h1:dEicvruyg9oYZSswptCV9ovkBMQ83dUJjQfsw6PLqrI= +github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:tp2Had5eIa0n6TgdPS/YQ6P29ifWxt59RhD97wMhRhA= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 h1:A4pEReiEtvxw2pvdAKmN6cjim8DrCYq8WGWtfXhcgRk= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0/go.mod h1:8rlqmJhg17u6xMicCY2Nj7jqBLEAKwuRcLcYpglVKf4= +github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 h1:EXUxlTEuaVwSNhzXo6jeNl9u6UUHvB+YMu3rdBRbtDc= +github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e/go.mod h1:zEb9onVHnDUStl5SsFBj7H0HBKfIN0c/pUND8Llfqp8= github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= @@ -522,11 +520,11 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2D github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 h1:+qIP3OMrT7SN5kLnTcVEISPOMB/97RyAKTg1UWA738E= -github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -634,7 +632,6 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 756d9ce51..93b314656 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,10 +5,10 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad - github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad + github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 github.com/mr-tron/base58 v1.2.0 @@ -27,13 +27,13 @@ require ( 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-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 // 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 @@ -49,8 +49,8 @@ require ( github.com/multiformats/go-varint v0.0.7 // indirect github.com/otiai10/copy v1.14.0 // indirect github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 // indirect + github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pokt-network/smt v0.6.1 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 578c00428..9233e405c 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -30,28 +30,28 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39 h1:jxoBAPgC4I73pAwvEWI2IUCxiI1xN68IaFZ5WC1D3ek= github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad h1:4XL7IIvdsWHxSKQfU+sgq3H9egN54053LF9TwMfDcTg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad h1:iNzb/Oy/nucIOXOzRcwSqqFsaeKwr2JZpZYSLp8xjlE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad/go.mod h1:CO28KMA6Pp5LJPiigPQQ276zQofES+jMod08U5pyRFA= -github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad h1:pUL2UZbF4S8FIV7uKo9p+IGfZ658K1VNorQ6rzDMRvs= -github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:7vHoF//1Pt3nu0l8nDIw7bEgv2GfbL3kSgjp7Rdqhd4= -github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad h1:adLrD6dOEkM5Xdg6AOPt9/HYqy/pQ5FrprDpW4/VqUU= -github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:NmZRIoxtL6iQdVK6n5W+JOx58K/0Yn8k7WuSvpKPQ+M= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad h1:WDl58zJKHfwbzHs+ZB8Jq3YNgVQE5Neu2NeaX3FZuyU= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 h1:tkUHfWzom6qXfjFXgdUyLY6jBhsdgcVaiNyGxqjDsT4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 h1:7KdQsdQnQ2TPC+GC3A9twqaCqiNZK0NbTNBwB8AkqCk= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0/go.mod h1:oMyDUWmJr3QbTZRN0vAMImLAPFaTGVXs/pia+x5DPrc= +github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 h1:NJNDK1yQk0XhjsvE3ALqeyNZxxvg98CzazzNH6PHl2E= +github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:7M9kVJIT47ad6jalzIkt+ErfF0hwhivK+yJw80pVPc0= +github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 h1:h75EH2IAgrHO6Nnc01rn1LYzmtjVd38hnUWAfb03VEU= +github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ZT9qmn+/RM69TuiB/URk+EdHSCXJa+3UHH3DP8QQdJc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 h1:3xVYmoEf05KDo4WbkqVVePFluSP9FRRKDgDcQhl46Ko= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 h1:Gp2h+Els9cTVYYnYsHX3zLuixb0XggIj2okK570aKww= github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad h1:qpCsjw+InLL824QPu3lY/osck4DhucBKhCs5/E8OH+A= -github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:ETXGXymFyNcUq2t4I9e7ZK18f9bxUWYat4pjZ9W0rWc= -github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c h1:Ksts6VjPj9y0o2Nis+2tHtDGWITNJ4yju87ZlHLPuOo= -github.com/iotaledger/hive.go/log v0.0.0-20231206113509-4b4ff95ac61c/go.mod h1:Td3R6QmYw0svZI1GuZ/tN9s0VNaHassXSKLCc70aX9w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad h1:HpupWK8iqFt+Sdogkh2/N8ojalmevYy+FzhjOuy7Y7E= -github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:Z9NFsByMh1Kf98f3v3ifeZRycbS2db1hjswTQG1MxnE= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad h1:c8uwbBZDqpiCNN9/9Jji7Z4lL0GdVnORp8WMouiuknk= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad/go.mod h1:FoH3T6yKlZJp8xm8K+zsQiibSynp32v21CpWx8xkek8= -github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad h1:VC3OgdSbyngY7/gxVj66fKd/nGmN6P0/myr348nx7vA= -github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 h1:IHRIVeZoLTna4WUtSiLt0lRBHAgroIEnR77gF9NPMAQ= +github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:fmjNV/R9NAtwwOSaC43lbImm//s/IxPtGKk3HqxF0f8= +github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 h1:wNg7/sumN99V+nJNx45Z9kvKj34MEnFGPk9kuGTKmFc= +github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ewepnMj9XSWld3m01HstYdx/qNJ8NGC48ffUfSqCZik= +github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 h1:dEicvruyg9oYZSswptCV9ovkBMQ83dUJjQfsw6PLqrI= +github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:tp2Had5eIa0n6TgdPS/YQ6P29ifWxt59RhD97wMhRhA= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 h1:A4pEReiEtvxw2pvdAKmN6cjim8DrCYq8WGWtfXhcgRk= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0/go.mod h1:8rlqmJhg17u6xMicCY2Nj7jqBLEAKwuRcLcYpglVKf4= +github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 h1:EXUxlTEuaVwSNhzXo6jeNl9u6UUHvB+YMu3rdBRbtDc= +github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5/go.mod h1:tiswk1O1wSAi9GE6tD1j43+bLmWU9Je07aZLaJ0+Ha0= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= @@ -90,11 +90,11 @@ github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c h1:Gcce/r5tSQeprxswXXOwQ/RBU1bjQWVd9dB7QKoPXBE= github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c/go.mod h1:1iCZ0433JJMecYqCa+TdWA9Pax8MGl4ByuNDZ7eSnQY= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= +github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 h1:+qIP3OMrT7SN5kLnTcVEISPOMB/97RyAKTg1UWA738E= -github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pokt-network/smt v0.6.1 h1:u5yTGNNND6edXv3vMQrAcjku1Ig4osehdu+EMYSXHUU= From 537563fa80f73adf7245175f9c634986e3680c2e Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:23:04 +0100 Subject: [PATCH 02/21] Refactor: refactored fatals to panics --- components/dashboard/component.go | 2 +- components/dashboard/livefeed.go | 2 +- components/dashboard/slotfeed.go | 2 +- components/dashboard/visualizer.go | 2 +- components/dashboard/ws.go | 2 +- components/dashboard_metrics/component.go | 2 +- components/debugapi/component.go | 2 +- components/inx/component.go | 4 +- components/metricstracker/component.go | 4 +- components/p2p/component.go | 30 ++++++------- go.mod | 26 ++++++------ go.sum | 52 +++++++++++------------ tools/gendoc/go.mod | 26 ++++++------ tools/gendoc/go.sum | 52 +++++++++++------------ tools/genesis-snapshot/go.mod | 24 +++++------ tools/genesis-snapshot/go.sum | 48 ++++++++++----------- 16 files changed, 140 insertions(+), 140 deletions(-) diff --git a/components/dashboard/component.go b/components/dashboard/component.go index 4afb395a9..7f79604e8 100644 --- a/components/dashboard/component.go +++ b/components/dashboard/component.go @@ -99,7 +99,7 @@ func run() error { Component.LogInfo("Stopping Dashboard ... done") }, daemon.PriorityDashboard); err != nil { - Component.LogFatalf("failed to start worker: %s", err) + Component.LogPanicf("failed to start worker: %s", err) } return nil diff --git a/components/dashboard/livefeed.go b/components/dashboard/livefeed.go index da35df4f1..2821106a6 100644 --- a/components/dashboard/livefeed.go +++ b/components/dashboard/livefeed.go @@ -26,6 +26,6 @@ func runLiveFeed(component *app.Component) { hook.Unhook() component.LogInfo("Stopping Dashboard[Livefeed] ... done") }, daemon.PriorityDashboard); err != nil { - component.LogFatalf("Failed to start as daemon: %s", err) + component.LogPanicf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard/slotfeed.go b/components/dashboard/slotfeed.go index a9e3bbeac..a127f7eba 100644 --- a/components/dashboard/slotfeed.go +++ b/components/dashboard/slotfeed.go @@ -25,7 +25,7 @@ func runSlotsLiveFeed(component *app.Component) { hook.Unhook() component.LogInfo("Stopping Dashboard[SlotsLiveFeed] ... done") }, daemon.PriorityDashboard); err != nil { - component.LogFatalf("Failed to start as daemon: %s", err) + component.LogPanicf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard/visualizer.go b/components/dashboard/visualizer.go index 05a4ef5cd..ad565cd41 100644 --- a/components/dashboard/visualizer.go +++ b/components/dashboard/visualizer.go @@ -109,7 +109,7 @@ func runVisualizer(component *app.Component) { unhook() component.LogInfo("Stopping Dashboard[Visualizer] ... done") }, daemon.PriorityDashboard); err != nil { - component.LogFatalf("Failed to start as daemon: %s", err) + component.LogPanicf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard/ws.go b/components/dashboard/ws.go index d4ecd7cb3..e66e4d2d1 100644 --- a/components/dashboard/ws.go +++ b/components/dashboard/ws.go @@ -82,7 +82,7 @@ func runWebSocketStreams(component *app.Component) { unhook() Component.LogInfo("Stopping Dashboard[StatusUpdate] ... done") }, daemon.PriorityDashboard); err != nil { - Component.LogFatalf("Failed to start as daemon: %s", err) + Component.LogPanicf("Failed to start as daemon: %s", err) } } diff --git a/components/dashboard_metrics/component.go b/components/dashboard_metrics/component.go index a5754c599..68eef2e51 100644 --- a/components/dashboard_metrics/component.go +++ b/components/dashboard_metrics/component.go @@ -65,7 +65,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogFatalf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) + Component.LogPanicf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) } configureComponentCountersEvents() diff --git a/components/debugapi/component.go b/components/debugapi/component.go index e322fbe92..b9b22ff58 100644 --- a/components/debugapi/component.go +++ b/components/debugapi/component.go @@ -73,7 +73,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogFatal("RestAPI plugin needs to be enabled to use the DebugAPIV3 plugin") + Component.LogPanic("RestAPI plugin needs to be enabled to use the DebugAPIV3 plugin") } blocksPerSlot = shrinkingmap.New[iotago.SlotIndex, []*blocks.Block]() diff --git a/components/inx/component.go b/components/inx/component.go index 93abcdc9c..b8227897a 100644 --- a/components/inx/component.go +++ b/components/inx/component.go @@ -46,7 +46,7 @@ func provide(c *dig.Container) error { if err := c.Provide(func() *Server { return newServer() }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return nil @@ -61,7 +61,7 @@ func run() error { deps.INXServer.Stop() Component.LogInfo("Stopping INX ... done") }, daemon.PriorityINX); err != nil { - Component.LogFatalf("failed to start worker: %s", err) + Component.LogPanicf("failed to start worker: %s", err) } return nil diff --git a/components/metricstracker/component.go b/components/metricstracker/component.go index 7dd92cea8..f0adff19e 100644 --- a/components/metricstracker/component.go +++ b/components/metricstracker/component.go @@ -50,7 +50,7 @@ func provide(c *dig.Container) error { return m }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return nil @@ -80,7 +80,7 @@ func run() error { unhook() Component.LogInfo("Stopping Metrics Tracker ... done") }, daemon.PriorityDashboardMetrics); err != nil { - Component.LogFatalf("failed to start worker: %s", err) + Component.LogPanicf("failed to start worker: %s", err) } return nil diff --git a/components/p2p/component.go b/components/p2p/component.go index 5beba810c..5d5eb0726 100644 --- a/components/p2p/component.go +++ b/components/p2p/component.go @@ -72,7 +72,7 @@ func initConfigParams(c *dig.Container) error { P2PBindMultiAddresses: ParamsP2P.BindMultiAddresses, } }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return nil @@ -103,13 +103,13 @@ func provide(c *dig.Container) error { if err := c.Provide(func(deps autoPeeringDeps) *autopeering.Manager { peersMultiAddresses, err := getMultiAddrsFromString(ParamsPeers.BootstrapPeers) if err != nil { - Component.LogFatal("Failed to parse bootstrapPeers param: %s", err) + Component.LogPanic("Failed to parse bootstrapPeers param: %s", err) } for _, multiAddr := range peersMultiAddresses { bootstrapPeer, err := network.NewPeerFromMultiAddr(multiAddr) if err != nil { - Component.LogFatal("Failed to parse bootstrap peer multiaddress: %s", err) + Component.LogPanic("Failed to parse bootstrap peer multiaddress: %s", err) } if err := deps.PeerDB.UpdatePeer(bootstrapPeer); err != nil { @@ -132,7 +132,7 @@ func provide(c *dig.Container) error { if err := c.Provide(func() peerDatabaseResult { peerDB, peerDBKVStore, err := initPeerDB() if err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return peerDatabaseResult{ @@ -161,13 +161,13 @@ func provide(c *dig.Container) error { // peers from peering config var peers []*p2p.PeerConfig if err := deps.PeeringConfig.Unmarshal(CfgPeers, &peers); err != nil { - Component.LogFatalf("invalid peer config: %s", err) + Component.LogPanicf("invalid peer config: %s", err) } for i, p := range peers { multiAddr, err := multiaddr.NewMultiaddr(p.MultiAddress) if err != nil { - Component.LogFatalf("invalid config peer address at pos %d: %s", i, err) + Component.LogPanicf("invalid config peer address at pos %d: %s", i, err) } if err = p2pConfigManager.AddPeer(multiAddr, p.Alias); err != nil { @@ -211,7 +211,7 @@ func provide(c *dig.Container) error { return p2pConfigManager }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } type p2pDeps struct { @@ -238,7 +238,7 @@ func provide(c *dig.Container) error { // load up the previously generated identity or create a new one nodePrivateKey, newlyCreated, err := hivep2p.LoadOrCreateIdentityPrivateKey(privKeyFilePath, ParamsP2P.IdentityPrivateKey) if err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } res.NodePrivateKey = nodePrivateKey @@ -254,7 +254,7 @@ func provide(c *dig.Container) error { connmgr.WithGracePeriod(time.Minute), ) if err != nil { - Component.LogFatalf("unable to initialize connection manager: %s", err) + Component.LogPanicf("unable to initialize connection manager: %s", err) } createdHost, err := libp2p.New( @@ -270,7 +270,7 @@ func provide(c *dig.Container) error { for _, externalMultiAddress := range ParamsP2P.ExternalMultiAddresses { addr, err := multiaddr.NewMultiaddr(externalMultiAddress) if err != nil { - Component.LogFatalf("unable to parse external multi address %s: %s", externalMultiAddress, err) + Component.LogPanicf("unable to parse external multi address %s: %s", externalMultiAddress, err) } externalMultiAddrs = append(externalMultiAddrs, addr) @@ -291,7 +291,7 @@ func provide(c *dig.Container) error { return res }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return c.Provide(func(host host.Host, peerDB *network.DB) *p2p.Manager { @@ -313,11 +313,11 @@ func configure() error { Component.LogInfo("Syncing p2p peer database to disk ...") if err := closeDatabases(); err != nil { - Component.LogFatalf("Syncing p2p peer database to disk ... failed: %s", err) + Component.LogPanicf("Syncing p2p peer database to disk ... failed: %s", err) } Component.LogInfo("Syncing p2p peer database to disk ... done") }, daemon.PriorityCloseDatabase); err != nil { - Component.LogFatalf("failed to start worker: %s", err) + Component.LogPanicf("failed to start worker: %s", err) } // log the p2p events @@ -386,13 +386,13 @@ func connectConfigKnownPeers() { for _, p := range deps.PeeringConfigManager.Peers() { multiAddr, err := multiaddr.NewMultiaddr(p.MultiAddress) if err != nil { - Component.LogFatalf("invalid peer address: %s", err) + Component.LogPanicf("invalid peer address: %s", err) } // we try to parse the multi address and check if there is a "/p2p" part with ID _, err = peer.AddrInfoFromP2pAddr(multiAddr) if err != nil { - Component.LogFatalf("invalid peer address info: %s", err) + Component.LogPanicf("invalid peer address info: %s", err) } if err := deps.ManualPeeringMgr.AddPeers(multiAddr); err != nil { diff --git a/go.mod b/go.mod index 8ce1fb1d5..deeed2dc1 100644 --- a/go.mod +++ b/go.mod @@ -10,19 +10,19 @@ require ( github.com/google/uuid v1.4.0 github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39 - github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 - github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 diff --git a/go.sum b/go.sum index cafd348ad..66f48d20a 100644 --- a/go.sum +++ b/go.sum @@ -275,32 +275,32 @@ 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-20231205131244-472357435a39 h1:jxoBAPgC4I73pAwvEWI2IUCxiI1xN68IaFZ5WC1D3ek= -github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 h1:T5fR1S+a79YcmKwUo7LwpS4oEsucyYtEA4PscE6wm5A= -github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:1QYclsHQMHyYEMSzVuiubdDgLmS7m8yr8FSoijw54X4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 h1:tkUHfWzom6qXfjFXgdUyLY6jBhsdgcVaiNyGxqjDsT4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 h1:7KdQsdQnQ2TPC+GC3A9twqaCqiNZK0NbTNBwB8AkqCk= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0/go.mod h1:oMyDUWmJr3QbTZRN0vAMImLAPFaTGVXs/pia+x5DPrc= -github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 h1:NJNDK1yQk0XhjsvE3ALqeyNZxxvg98CzazzNH6PHl2E= -github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:7M9kVJIT47ad6jalzIkt+ErfF0hwhivK+yJw80pVPc0= -github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 h1:h75EH2IAgrHO6Nnc01rn1LYzmtjVd38hnUWAfb03VEU= -github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ZT9qmn+/RM69TuiB/URk+EdHSCXJa+3UHH3DP8QQdJc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 h1:3xVYmoEf05KDo4WbkqVVePFluSP9FRRKDgDcQhl46Ko= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 h1:Gp2h+Els9cTVYYnYsHX3zLuixb0XggIj2okK570aKww= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 h1:IHRIVeZoLTna4WUtSiLt0lRBHAgroIEnR77gF9NPMAQ= -github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:fmjNV/R9NAtwwOSaC43lbImm//s/IxPtGKk3HqxF0f8= -github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 h1:wNg7/sumN99V+nJNx45Z9kvKj34MEnFGPk9kuGTKmFc= -github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ewepnMj9XSWld3m01HstYdx/qNJ8NGC48ffUfSqCZik= -github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 h1:dEicvruyg9oYZSswptCV9ovkBMQ83dUJjQfsw6PLqrI= -github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:tp2Had5eIa0n6TgdPS/YQ6P29ifWxt59RhD97wMhRhA= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 h1:A4pEReiEtvxw2pvdAKmN6cjim8DrCYq8WGWtfXhcgRk= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0/go.mod h1:8rlqmJhg17u6xMicCY2Nj7jqBLEAKwuRcLcYpglVKf4= -github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 h1:EXUxlTEuaVwSNhzXo6jeNl9u6UUHvB+YMu3rdBRbtDc= -github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b h1:OU1JQ6/ZyljZNv0ILLnU0n7WQT82EpVD30nui36Y2mU= +github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:vgK/3gi+bzToK+e98DBHgsCHqtqYDY2IFLXjydgPra4= +github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b h1:XpcOTn9/1T+Kp20dzqadcLkHwXc5cbVuejLWMAhVIDY= +github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:s8qaCVJuvIdby4ZULL7V9ANkqqbgahNsx7ix5rbHC5w= +github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b h1:dH8KInmRMtxOjn5fV+FygQQ45u/QzVtvsSaOuZOlD/4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b h1:CXxteUE7gKhVLI7bYpCe7cCc/ipzJEIQyQtxeGAXBIk= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b/go.mod h1:Sx5tUo1o8LY19Ca5NPbwec6RfkRoESIS8cxULewON2Q= +github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b h1:ylOAcyNGClrLI4Nh5Qxdrc4bZdA2TIRNH8g/cqHMx7Q= +github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:QM5jpE+hpD11LfZo813/EjCpWCN2/CBeQFI/OnCZccE= +github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b h1:4CLPHjj5E+heMnqw3Nq+RNc7YqR1dX1ZxyXnAgu3K8o= +github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:MzIuhKtCoo2pXvZMCRU52wB354UPSiZfeaXHC3vP+is= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b h1:sCVC/sw/E4wSMWPkXc1czKZQU5YIOnuOMD0HEhEiviY= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b h1:8j+ID653JCb3W/oApaz0MLvfRX+cVeQ9RQQ7PyJKjkY= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:IzqMXH7Z60dg748uZjADA+y5TS8MNtVb/prNbZbzth8= +github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b h1:H9T1iJ8gKle9g+pjLc44Z9ikpU3nnsmWbPDCATtgZKw= +github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:b/JMksRcKmrlG+QjfdiFlc9ze1YYlkbyRktl6aaiXk8= +github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b h1:kRZIkWlaB5At8YC6wQCdiCedVQl0EdFNLYXfFKCLOvc= +github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:RKyiSN3n8jS51Akc676NsvinTVQ4zovmCHyeuraGF0w= +github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b h1:cFmO0nl9iDVx6mRsJyS8M2ra1EEvzAmpVs+bUX0hZ5w= +github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:0uX+ri0h9ob8Qpe541Vo+EUDu7g53xTUVXZH7CGGSdg= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b h1:70bdmnMfJDpADpUj4SokeZE66G4zW8ZuoZtm19R7uwA= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= +github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= +github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 08fcfe0c6..36e318f5e 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-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 ) @@ -56,18 +56,18 @@ 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-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e // indirect github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 4e79f15ab..e7177019c 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -277,34 +277,34 @@ 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-20231205131244-472357435a39 h1:jxoBAPgC4I73pAwvEWI2IUCxiI1xN68IaFZ5WC1D3ek= -github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0 h1:T5fR1S+a79YcmKwUo7LwpS4oEsucyYtEA4PscE6wm5A= -github.com/iotaledger/hive.go/app v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:1QYclsHQMHyYEMSzVuiubdDgLmS7m8yr8FSoijw54X4= +github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b h1:OU1JQ6/ZyljZNv0ILLnU0n7WQT82EpVD30nui36Y2mU= +github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:vgK/3gi+bzToK+e98DBHgsCHqtqYDY2IFLXjydgPra4= +github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b h1:XpcOTn9/1T+Kp20dzqadcLkHwXc5cbVuejLWMAhVIDY= +github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:s8qaCVJuvIdby4ZULL7V9ANkqqbgahNsx7ix5rbHC5w= 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-20231212162051-0adc25efdfc0 h1:tkUHfWzom6qXfjFXgdUyLY6jBhsdgcVaiNyGxqjDsT4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 h1:7KdQsdQnQ2TPC+GC3A9twqaCqiNZK0NbTNBwB8AkqCk= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0/go.mod h1:oMyDUWmJr3QbTZRN0vAMImLAPFaTGVXs/pia+x5DPrc= -github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 h1:NJNDK1yQk0XhjsvE3ALqeyNZxxvg98CzazzNH6PHl2E= -github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:7M9kVJIT47ad6jalzIkt+ErfF0hwhivK+yJw80pVPc0= -github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 h1:h75EH2IAgrHO6Nnc01rn1LYzmtjVd38hnUWAfb03VEU= -github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ZT9qmn+/RM69TuiB/URk+EdHSCXJa+3UHH3DP8QQdJc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 h1:3xVYmoEf05KDo4WbkqVVePFluSP9FRRKDgDcQhl46Ko= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 h1:Gp2h+Els9cTVYYnYsHX3zLuixb0XggIj2okK570aKww= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 h1:IHRIVeZoLTna4WUtSiLt0lRBHAgroIEnR77gF9NPMAQ= -github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:fmjNV/R9NAtwwOSaC43lbImm//s/IxPtGKk3HqxF0f8= -github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 h1:wNg7/sumN99V+nJNx45Z9kvKj34MEnFGPk9kuGTKmFc= -github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ewepnMj9XSWld3m01HstYdx/qNJ8NGC48ffUfSqCZik= -github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 h1:dEicvruyg9oYZSswptCV9ovkBMQ83dUJjQfsw6PLqrI= -github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:tp2Had5eIa0n6TgdPS/YQ6P29ifWxt59RhD97wMhRhA= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 h1:A4pEReiEtvxw2pvdAKmN6cjim8DrCYq8WGWtfXhcgRk= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0/go.mod h1:8rlqmJhg17u6xMicCY2Nj7jqBLEAKwuRcLcYpglVKf4= -github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 h1:EXUxlTEuaVwSNhzXo6jeNl9u6UUHvB+YMu3rdBRbtDc= -github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b h1:dH8KInmRMtxOjn5fV+FygQQ45u/QzVtvsSaOuZOlD/4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b h1:CXxteUE7gKhVLI7bYpCe7cCc/ipzJEIQyQtxeGAXBIk= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b/go.mod h1:Sx5tUo1o8LY19Ca5NPbwec6RfkRoESIS8cxULewON2Q= +github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b h1:ylOAcyNGClrLI4Nh5Qxdrc4bZdA2TIRNH8g/cqHMx7Q= +github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:QM5jpE+hpD11LfZo813/EjCpWCN2/CBeQFI/OnCZccE= +github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b h1:4CLPHjj5E+heMnqw3Nq+RNc7YqR1dX1ZxyXnAgu3K8o= +github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:MzIuhKtCoo2pXvZMCRU52wB354UPSiZfeaXHC3vP+is= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b h1:sCVC/sw/E4wSMWPkXc1czKZQU5YIOnuOMD0HEhEiviY= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b h1:8j+ID653JCb3W/oApaz0MLvfRX+cVeQ9RQQ7PyJKjkY= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:IzqMXH7Z60dg748uZjADA+y5TS8MNtVb/prNbZbzth8= +github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b h1:H9T1iJ8gKle9g+pjLc44Z9ikpU3nnsmWbPDCATtgZKw= +github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:b/JMksRcKmrlG+QjfdiFlc9ze1YYlkbyRktl6aaiXk8= +github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b h1:kRZIkWlaB5At8YC6wQCdiCedVQl0EdFNLYXfFKCLOvc= +github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:RKyiSN3n8jS51Akc676NsvinTVQ4zovmCHyeuraGF0w= +github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b h1:cFmO0nl9iDVx6mRsJyS8M2ra1EEvzAmpVs+bUX0hZ5w= +github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:0uX+ri0h9ob8Qpe541Vo+EUDu7g53xTUVXZH7CGGSdg= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b h1:70bdmnMfJDpADpUj4SokeZE66G4zW8ZuoZtm19R7uwA= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= +github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= +github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 93b314656..458932aa2 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,10 +5,10 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 - github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 + github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 github.com/mr-tron/base58 v1.2.0 @@ -26,14 +26,14 @@ require ( github.com/holiman/uint256 v1.2.4 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect - github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b // 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 9233e405c..db09702f8 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -28,30 +28,30 @@ 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-20231205131244-472357435a39 h1:jxoBAPgC4I73pAwvEWI2IUCxiI1xN68IaFZ5WC1D3ek= -github.com/iotaledger/hive.go/ads v0.0.0-20231205131244-472357435a39/go.mod h1:gbUvr01B5ha530GnNm8K2OsHXOd2BtzBYOMxyTX3iDg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0 h1:tkUHfWzom6qXfjFXgdUyLY6jBhsdgcVaiNyGxqjDsT4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0 h1:7KdQsdQnQ2TPC+GC3A9twqaCqiNZK0NbTNBwB8AkqCk= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231212162051-0adc25efdfc0/go.mod h1:oMyDUWmJr3QbTZRN0vAMImLAPFaTGVXs/pia+x5DPrc= -github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0 h1:NJNDK1yQk0XhjsvE3ALqeyNZxxvg98CzazzNH6PHl2E= -github.com/iotaledger/hive.go/crypto v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:7M9kVJIT47ad6jalzIkt+ErfF0hwhivK+yJw80pVPc0= -github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0 h1:h75EH2IAgrHO6Nnc01rn1LYzmtjVd38hnUWAfb03VEU= -github.com/iotaledger/hive.go/ds v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ZT9qmn+/RM69TuiB/URk+EdHSCXJa+3UHH3DP8QQdJc= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0 h1:3xVYmoEf05KDo4WbkqVVePFluSP9FRRKDgDcQhl46Ko= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39 h1:Gp2h+Els9cTVYYnYsHX3zLuixb0XggIj2okK570aKww= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231205131244-472357435a39/go.mod h1:ytfKoHr/nF8u0y0G4mamfG0yjFtJiJVk0kgjnPOtsSY= -github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0 h1:IHRIVeZoLTna4WUtSiLt0lRBHAgroIEnR77gF9NPMAQ= -github.com/iotaledger/hive.go/lo v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:fmjNV/R9NAtwwOSaC43lbImm//s/IxPtGKk3HqxF0f8= -github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0 h1:wNg7/sumN99V+nJNx45Z9kvKj34MEnFGPk9kuGTKmFc= -github.com/iotaledger/hive.go/log v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:ewepnMj9XSWld3m01HstYdx/qNJ8NGC48ffUfSqCZik= -github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0 h1:dEicvruyg9oYZSswptCV9ovkBMQ83dUJjQfsw6PLqrI= -github.com/iotaledger/hive.go/runtime v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:tp2Had5eIa0n6TgdPS/YQ6P29ifWxt59RhD97wMhRhA= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0 h1:A4pEReiEtvxw2pvdAKmN6cjim8DrCYq8WGWtfXhcgRk= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231212162051-0adc25efdfc0/go.mod h1:8rlqmJhg17u6xMicCY2Nj7jqBLEAKwuRcLcYpglVKf4= -github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0 h1:EXUxlTEuaVwSNhzXo6jeNl9u6UUHvB+YMu3rdBRbtDc= -github.com/iotaledger/hive.go/stringify v0.0.0-20231212162051-0adc25efdfc0/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b h1:OU1JQ6/ZyljZNv0ILLnU0n7WQT82EpVD30nui36Y2mU= +github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:vgK/3gi+bzToK+e98DBHgsCHqtqYDY2IFLXjydgPra4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b h1:dH8KInmRMtxOjn5fV+FygQQ45u/QzVtvsSaOuZOlD/4= +github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b h1:CXxteUE7gKhVLI7bYpCe7cCc/ipzJEIQyQtxeGAXBIk= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b/go.mod h1:Sx5tUo1o8LY19Ca5NPbwec6RfkRoESIS8cxULewON2Q= +github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b h1:ylOAcyNGClrLI4Nh5Qxdrc4bZdA2TIRNH8g/cqHMx7Q= +github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:QM5jpE+hpD11LfZo813/EjCpWCN2/CBeQFI/OnCZccE= +github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b h1:4CLPHjj5E+heMnqw3Nq+RNc7YqR1dX1ZxyXnAgu3K8o= +github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:MzIuhKtCoo2pXvZMCRU52wB354UPSiZfeaXHC3vP+is= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b h1:sCVC/sw/E4wSMWPkXc1czKZQU5YIOnuOMD0HEhEiviY= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b h1:8j+ID653JCb3W/oApaz0MLvfRX+cVeQ9RQQ7PyJKjkY= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:IzqMXH7Z60dg748uZjADA+y5TS8MNtVb/prNbZbzth8= +github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b h1:H9T1iJ8gKle9g+pjLc44Z9ikpU3nnsmWbPDCATtgZKw= +github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:b/JMksRcKmrlG+QjfdiFlc9ze1YYlkbyRktl6aaiXk8= +github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b h1:kRZIkWlaB5At8YC6wQCdiCedVQl0EdFNLYXfFKCLOvc= +github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:RKyiSN3n8jS51Akc676NsvinTVQ4zovmCHyeuraGF0w= +github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b h1:cFmO0nl9iDVx6mRsJyS8M2ra1EEvzAmpVs+bUX0hZ5w= +github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:0uX+ri0h9ob8Qpe541Vo+EUDu7g53xTUVXZH7CGGSdg= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b h1:70bdmnMfJDpADpUj4SokeZE66G4zW8ZuoZtm19R7uwA= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= +github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= +github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5/go.mod h1:tiswk1O1wSAi9GE6tD1j43+bLmWU9Je07aZLaJ0+Ha0= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= From d9d004b013c1c1a51ca3a06c8735a33c200d8064 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:26:20 +0100 Subject: [PATCH 03/21] Refactor: more reverts --- components/dashboard_metrics/component.go | 2 +- components/p2p/component.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/dashboard_metrics/component.go b/components/dashboard_metrics/component.go index 68eef2e51..34b2ba9c8 100644 --- a/components/dashboard_metrics/component.go +++ b/components/dashboard_metrics/component.go @@ -99,7 +99,7 @@ func run() error { // Wait before terminating so we get correct log blocks from the daemon regarding the shutdown order. <-ctx.Done() }, daemon.PriorityDashboardMetrics); err != nil { - Component.LogFatalf("failed to start worker: %s", err) + Component.LogPanicf("failed to start worker: %s", err) } return nil diff --git a/components/p2p/component.go b/components/p2p/component.go index 5d5eb0726..321478c7f 100644 --- a/components/p2p/component.go +++ b/components/p2p/component.go @@ -103,13 +103,13 @@ func provide(c *dig.Container) error { if err := c.Provide(func(deps autoPeeringDeps) *autopeering.Manager { peersMultiAddresses, err := getMultiAddrsFromString(ParamsPeers.BootstrapPeers) if err != nil { - Component.LogPanic("Failed to parse bootstrapPeers param: %s", err) + Component.LogFatalf("Failed to parse bootstrapPeers param: %s", err) } for _, multiAddr := range peersMultiAddresses { bootstrapPeer, err := network.NewPeerFromMultiAddr(multiAddr) if err != nil { - Component.LogPanic("Failed to parse bootstrap peer multiaddress: %s", err) + Component.LogFatalf("Failed to parse bootstrap peer multiaddress: %s", err) } if err := deps.PeerDB.UpdatePeer(bootstrapPeer); err != nil { @@ -132,7 +132,7 @@ func provide(c *dig.Container) error { if err := c.Provide(func() peerDatabaseResult { peerDB, peerDBKVStore, err := initPeerDB() if err != nil { - Component.LogPanic(err.Error()) + Component.LogFatalf(err.Error()) } return peerDatabaseResult{ From b8a973381efefac8f7e114f2519f1094f720a239 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:30:13 +0100 Subject: [PATCH 04/21] Refactor: more reverts --- components/protocol/component.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/protocol/component.go b/components/protocol/component.go index e538c059d..edc4c65ee 100644 --- a/components/protocol/component.go +++ b/components/protocol/component.go @@ -104,7 +104,7 @@ func initConfigParams(c *dig.Container) error { if err := c.Provide(func() cfgResult { dbEngine, err := hivedb.EngineFromStringAllowed(ParamsDatabase.Engine, database.AllowedEnginesDefault) if err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return cfgResult{ @@ -113,7 +113,7 @@ func initConfigParams(c *dig.Container) error { ProtocolParameters: readProtocolParameters(), } }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return nil @@ -132,11 +132,11 @@ func provide(c *dig.Container) error { pruningSizeEnabled := ParamsDatabase.Size.Enabled pruningTargetDatabaseSizeBytes, err := bytes.Parse(ParamsDatabase.Size.TargetSize) if err != nil { - Component.LogFatalf("parameter %s invalid", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize))) + Component.LogPanicf("parameter %s invalid", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize))) } if pruningSizeEnabled && pruningTargetDatabaseSizeBytes == 0 { - Component.LogFatalf("%s has to be specified if %s is enabled", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize)), Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.Enabled))) + Component.LogPanicf("%s has to be specified if %s is enabled", Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.TargetSize)), Component.App().Config().GetParameterPath(&(ParamsDatabase.Size.Enabled))) } return protocol.New( From 1a32308481b5fd27405469607cfadd77bc2447ff Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:44:05 +0100 Subject: [PATCH 05/21] Refactor: more changes --- components/protocol/component.go | 3 +-- components/restapi/api.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/components/protocol/component.go b/components/protocol/component.go index edc4c65ee..592f4f81e 100644 --- a/components/protocol/component.go +++ b/components/protocol/component.go @@ -13,7 +13,6 @@ import ( "github.com/iotaledger/hive.go/app" "github.com/iotaledger/hive.go/ierrors" hivedb "github.com/iotaledger/hive.go/kvstore/database" - "github.com/iotaledger/hive.go/log" "github.com/iotaledger/hive.go/runtime/workerpool" "github.com/iotaledger/iota-core/pkg/core/account" "github.com/iotaledger/iota-core/pkg/daemon" @@ -140,7 +139,7 @@ func provide(c *dig.Container) error { } return protocol.New( - log.NewLogger(log.WithName("node")), + Component.Logger(), workerpool.NewGroup("Protocol"), deps.P2PManager, protocol.WithBaseDirectory(ParamsDatabase.Path), diff --git a/components/restapi/api.go b/components/restapi/api.go index 441bba23d..d1828f273 100644 --- a/components/restapi/api.go +++ b/components/restapi/api.go @@ -58,7 +58,7 @@ func apiMiddleware() echo.MiddlewareFunc { deps.NodePrivateKey, ) if err != nil { - Component.LogFatalf("JWT auth initialization failed: %w", err) + Component.LogPanicf("JWT auth initialization failed: %w", err) } jwtAllow := func(c echo.Context, subject string, claims *jwt.AuthClaims) bool { From b5bbe45ca44d8f14dae0c35c76e63a72734f2f86 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:54:31 +0100 Subject: [PATCH 06/21] Refactor: more fixes --- components/restapi/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/restapi/api.go b/components/restapi/api.go index d1828f273..976a56404 100644 --- a/components/restapi/api.go +++ b/components/restapi/api.go @@ -48,7 +48,7 @@ func apiMiddleware() echo.MiddlewareFunc { // configure JWT auth salt := ParamsRestAPI.JWTAuth.Salt if len(salt) == 0 { - Component.LogFatal("'%s' should not be empty", Component.App().Config().GetParameterPath(&(ParamsRestAPI.JWTAuth.Salt))) + Component.LogFatalf("'%s' should not be empty", Component.App().Config().GetParameterPath(&(ParamsRestAPI.JWTAuth.Salt))) } // API tokens do not expire. From c24eb4939587fd7885b9a21431af72a16fd23f2b Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:55:41 +0100 Subject: [PATCH 07/21] Refactor: next file --- components/restapi/component.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/restapi/component.go b/components/restapi/component.go index 382e62654..9d47b9f36 100644 --- a/components/restapi/component.go +++ b/components/restapi/component.go @@ -67,7 +67,7 @@ func initConfigParams(c *dig.Container) error { RestAPILimitsMaxResults: ParamsRestAPI.Limits.MaxResults, } }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return nil @@ -86,7 +86,7 @@ func provide(c *dig.Container) error { return e }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } type proxyDeps struct { @@ -97,13 +97,13 @@ func provide(c *dig.Container) error { if err := c.Provide(func(deps proxyDeps) *restapi.RestRouteManager { return restapi.NewRestRouteManager(deps.Echo) }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } if err := c.Provide(func(deps dependencies) *blockhandler.BlockHandler { return blockhandler.New(deps.Protocol) }); err != nil { - Component.LogFatal(err.Error()) + Component.LogPanic(err.Error()) } return nil @@ -149,7 +149,7 @@ func run() error { Component.LogInfo("Stopping REST-API server ... done") }, daemon.PriorityRestAPI); err != nil { - Component.LogFatalf("failed to start worker: %s", err) + Component.LogPanicf("failed to start worker: %s", err) } return nil From 6fb1297b29e4c370b6274347e121ad9c1e6c0994 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 12:57:06 +0100 Subject: [PATCH 08/21] Refactor: more changes --- components/restapi/core/component.go | 2 +- components/restapi/management/component.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/restapi/core/component.go b/components/restapi/core/component.go index 7950db707..cd6104963 100644 --- a/components/restapi/core/component.go +++ b/components/restapi/core/component.go @@ -51,7 +51,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogFatalf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) + Component.LogPanicf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) } routeGroup := deps.RestRouteManager.AddRoute(api.CorePluginName) diff --git a/components/restapi/management/component.go b/components/restapi/management/component.go index b763931bf..24a3d91dd 100644 --- a/components/restapi/management/component.go +++ b/components/restapi/management/component.go @@ -40,7 +40,7 @@ type dependencies struct { func configure() error { // check if RestAPI plugin is disabled if !Component.App().IsComponentEnabled(restapi.Component.Identifier()) { - Component.LogFatalf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) + Component.LogPanicf("RestAPI plugin needs to be enabled to use the %s plugin", Component.Name) } routeGroup := deps.RestRouteManager.AddRoute(api.ManagementPluginName) From a94397cc5d3442bb6af51846db4bb2310fe6f402 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:08:07 +0100 Subject: [PATCH 09/21] Refactor: fixed bug --- components/p2p/component.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/p2p/component.go b/components/p2p/component.go index 321478c7f..b008bedc8 100644 --- a/components/p2p/component.go +++ b/components/p2p/component.go @@ -132,7 +132,7 @@ func provide(c *dig.Container) error { if err := c.Provide(func() peerDatabaseResult { peerDB, peerDBKVStore, err := initPeerDB() if err != nil { - Component.LogFatalf(err.Error()) + Component.LogFatal(err.Error()) } return peerDatabaseResult{ @@ -336,7 +336,7 @@ func run() error { if err := Component.Daemon().BackgroundWorker(Component.Name, func(ctx context.Context) { deps.ManualPeeringMgr.Start() if err := deps.AutoPeeringMgr.Start(ctx); err != nil { - Component.LogFatal("Failed to start autopeering manager: %s", err) + Component.LogFatalf("Failed to start autopeering manager: %s", err) } defer func() { @@ -348,20 +348,20 @@ func run() error { connectConfigKnownPeers() <-ctx.Done() }, daemon.PriorityManualPeering); err != nil { - Component.LogFatal("Failed to start as daemon: %s", err) + Component.LogFatalf("Failed to start as daemon: %s", err) } if err := Component.Daemon().BackgroundWorker(fmt.Sprintf("%s-P2PManager", Component.Name), func(ctx context.Context) { defer deps.P2PManager.Shutdown() defer func() { if err := deps.P2PManager.P2PHost().Close(); err != nil { - Component.LogWarn("Failed to close libp2p host: %+v", err) + Component.LogWarnf("Failed to close libp2p host: %+v", err) } }() <-ctx.Done() }, daemon.PriorityP2P); err != nil { - Component.LogFatal("Failed to start as daemon: %s", err) + Component.LogFatalf("Failed to start as daemon: %s", err) } return nil From 9250bf7f2e66c2a63e6d523f1591c511902974c6 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:43:28 +0100 Subject: [PATCH 10/21] Fix: fixes error message --- pkg/testsuite/storage_settings.go | 2 +- pkg/testsuite/testsuite.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/testsuite/storage_settings.go b/pkg/testsuite/storage_settings.go index 7345b1f52..b2ecfacba 100644 --- a/pkg/testsuite/storage_settings.go +++ b/pkg/testsuite/storage_settings.go @@ -40,7 +40,7 @@ func (t *TestSuite) AssertLatestCommitment(commitment *iotago.Commitment, nodes for _, node := range nodes { t.Eventually(func() error { if !commitment.Equals(node.Protocol.Engines.Main.Get().Storage.Settings().LatestCommitment().Commitment()) { - return ierrors.Errorf("AssertLatestCommitment: %s: expected %s, got %s", node.Name, commitment, node.Protocol.Engines.Main.Get().Storage.Settings().LatestCommitment()) + return ierrors.Errorf("AssertLatestCommitment: %s: expected %s, got %s", node.Name, commitment, node.Protocol.Engines.Main.Get().Storage.Settings().LatestCommitment().Commitment()) } return nil diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index 784ba8990..b513fc555 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -98,7 +98,7 @@ func NewTestSuite(testingT *testing.T, opts ...options.Option[TestSuite]) *TestS optsWaitFor: durationFromEnvOrDefault(5*time.Second, "CI_UNIT_TESTS_WAIT_FOR"), optsTick: durationFromEnvOrDefault(2*time.Millisecond, "CI_UNIT_TESTS_TICK"), - optsLogger: log.NewLogger(log.WithName("TestSuite")), + optsLogger: log.NewLogger(), }, opts, func(t *TestSuite) { fmt.Println("Setup TestSuite -", testingT.Name(), " @ ", time.Now()) From 18f016aedf59b9228bb81d3183198b114564ae54 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:09:50 +0100 Subject: [PATCH 11/21] Feat: bump iota.go --- go.mod | 6 +++--- go.sum | 8 ++++---- tools/gendoc/go.mod | 4 ++-- tools/gendoc/go.sum | 8 ++++---- tools/genesis-snapshot/go.mod | 4 ++-- tools/genesis-snapshot/go.sum | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index deeed2dc1..85fe156e1 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e - github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 + github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 github.com/labstack/echo/v4 v4.11.3 github.com/labstack/gommon v0.4.1 github.com/libp2p/go-libp2p v0.32.0 @@ -41,7 +41,6 @@ require ( go.uber.org/atomic v1.11.0 go.uber.org/dig v1.17.1 golang.org/x/crypto v0.16.0 - golang.org/x/exp v0.0.0-20231006140011-7918f672742d google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 ) @@ -88,6 +87,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/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // 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 @@ -159,7 +159,6 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect - github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect @@ -168,6 +167,7 @@ require ( go.uber.org/mock v0.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.19.0 // indirect diff --git a/go.sum b/go.sum index 66f48d20a..2d6cc4dc8 100644 --- a/go.sum +++ b/go.sum @@ -305,8 +305,10 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwj github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e/go.mod h1:zEb9onVHnDUStl5SsFBj7H0HBKfIN0c/pUND8Llfqp8= -github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5/go.mod h1:tiswk1O1wSAi9GE6tD1j43+bLmWU9Je07aZLaJ0+Ha0= +github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= +github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00/go.mod h1:gt+URx7DZu414nZME7jtGgxR4DVTSnNa1jF2trTUTZ0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 h1:2iQUEuYvuyeYtZBr6bRoM4xFLxRiQ66aBPgKuJTirh0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5/go.mod h1:jU3Jlnhwv4KWlpft84lu9/M0QkCykESl29bL4oCenKs= 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= @@ -655,8 +657,6 @@ github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSD github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= -github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 h1:i7k63xHOX2ntuHrhHewfKro67c834jug2DIk599fqAA= -github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98/go.mod h1:Knu2XMRWe8SkwTlHc/+ghP+O9DEaZRQQEyTjvLJ5Cck= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 36e318f5e..ad6d5c672 100644 --- a/tools/gendoc/go.mod +++ b/tools/gendoc/go.mod @@ -70,7 +70,8 @@ require ( github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 // indirect + github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 // 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 @@ -151,7 +152,6 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect - github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 // indirect github.com/zyedidia/generic v1.2.1 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.19.0 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index e7177019c..b4245cf41 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -309,8 +309,10 @@ github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwj github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e/go.mod h1:zEb9onVHnDUStl5SsFBj7H0HBKfIN0c/pUND8Llfqp8= -github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5/go.mod h1:tiswk1O1wSAi9GE6tD1j43+bLmWU9Je07aZLaJ0+Ha0= +github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= +github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00/go.mod h1:gt+URx7DZu414nZME7jtGgxR4DVTSnNa1jF2trTUTZ0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 h1:2iQUEuYvuyeYtZBr6bRoM4xFLxRiQ66aBPgKuJTirh0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5/go.mod h1:jU3Jlnhwv4KWlpft84lu9/M0QkCykESl29bL4oCenKs= 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= @@ -659,8 +661,6 @@ github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSD github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= -github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 h1:i7k63xHOX2ntuHrhHewfKro67c834jug2DIk599fqAA= -github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98/go.mod h1:Knu2XMRWe8SkwTlHc/+ghP+O9DEaZRQQEyTjvLJ5Cck= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 458932aa2..aee3f6b58 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-20231213110054-d23a4fe8000b github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 + github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.16.0 @@ -34,6 +34,7 @@ require ( github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b // indirect github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b // indirect github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // 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 @@ -56,7 +57,6 @@ require ( github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/stretchr/testify v1.8.4 // indirect - github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 // indirect github.com/zyedidia/generic v1.2.1 // indirect go.uber.org/atomic v1.11.0 // indirect golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index db09702f8..34f07c2cc 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -52,8 +52,10 @@ github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5 h1:0KgQFpVRnKd6CdCwXo3Kg/SL27xkeKh2SMoU5G1TkZk= -github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5/go.mod h1:tiswk1O1wSAi9GE6tD1j43+bLmWU9Je07aZLaJ0+Ha0= +github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= +github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00/go.mod h1:gt+URx7DZu414nZME7jtGgxR4DVTSnNa1jF2trTUTZ0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 h1:2iQUEuYvuyeYtZBr6bRoM4xFLxRiQ66aBPgKuJTirh0= +github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5/go.mod h1:jU3Jlnhwv4KWlpft84lu9/M0QkCykESl29bL4oCenKs= 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= @@ -116,8 +118,6 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98 h1:i7k63xHOX2ntuHrhHewfKro67c834jug2DIk599fqAA= -github.com/wollac/iota-crypto-demo v0.0.0-20221117162917-b10619eccb98/go.mod h1:Knu2XMRWe8SkwTlHc/+ghP+O9DEaZRQQEyTjvLJ5Cck= github.com/zyedidia/generic v1.2.1 h1:Zv5KS/N2m0XZZiuLS82qheRG4X1o5gsWreGb0hR7XDc= github.com/zyedidia/generic v1.2.1/go.mod h1:ly2RBz4mnz1yeuVbQA/VFwGjK3mnHGRj1JuoG336Bis= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= From 7437d4edbd481aa97b7b85599f8d9b5cfe3493c3 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:17:45 +0100 Subject: [PATCH 12/21] Refactor: remove unnecessary logger name --- .../sybilprotectionv1/performance/testsuite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go index 63d4af207..5cf4892f8 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go @@ -91,7 +91,7 @@ func (t *TestSuite) InitPerformanceTracker() { t.latestCommittedEpoch, iotago.SingleVersionProvider(t.api), func(err error) {}, - log.NewLogger(log.WithName("PerfTestsuite")), + log.NewLogger(), ) } From 0b21e9f3df80c928a5d8ff1e6557d14b977ab77e Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:01:37 +0100 Subject: [PATCH 13/21] Refactor: updated hive.go --- go.mod | 26 +++++++++--------- go.sum | 52 +++++++++++++++++------------------ pkg/network/p2p/neighbor.go | 9 ++---- tools/gendoc/go.mod | 26 +++++++++--------- tools/gendoc/go.sum | 52 +++++++++++++++++------------------ tools/genesis-snapshot/go.mod | 24 ++++++++-------- tools/genesis-snapshot/go.sum | 48 ++++++++++++++++---------------- 7 files changed, 117 insertions(+), 120 deletions(-) diff --git a/go.mod b/go.mod index 85fe156e1..bd82a1839 100644 --- a/go.mod +++ b/go.mod @@ -10,19 +10,19 @@ require ( github.com/google/uuid v1.4.0 github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b + github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b + github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 diff --git a/go.sum b/go.sum index 2d6cc4dc8..b09b7815c 100644 --- a/go.sum +++ b/go.sum @@ -275,32 +275,32 @@ 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-20231213110054-d23a4fe8000b h1:OU1JQ6/ZyljZNv0ILLnU0n7WQT82EpVD30nui36Y2mU= -github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:vgK/3gi+bzToK+e98DBHgsCHqtqYDY2IFLXjydgPra4= -github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b h1:XpcOTn9/1T+Kp20dzqadcLkHwXc5cbVuejLWMAhVIDY= -github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:s8qaCVJuvIdby4ZULL7V9ANkqqbgahNsx7ix5rbHC5w= -github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b h1:dH8KInmRMtxOjn5fV+FygQQ45u/QzVtvsSaOuZOlD/4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b h1:CXxteUE7gKhVLI7bYpCe7cCc/ipzJEIQyQtxeGAXBIk= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b/go.mod h1:Sx5tUo1o8LY19Ca5NPbwec6RfkRoESIS8cxULewON2Q= -github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b h1:ylOAcyNGClrLI4Nh5Qxdrc4bZdA2TIRNH8g/cqHMx7Q= -github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:QM5jpE+hpD11LfZo813/EjCpWCN2/CBeQFI/OnCZccE= -github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b h1:4CLPHjj5E+heMnqw3Nq+RNc7YqR1dX1ZxyXnAgu3K8o= -github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:MzIuhKtCoo2pXvZMCRU52wB354UPSiZfeaXHC3vP+is= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b h1:sCVC/sw/E4wSMWPkXc1czKZQU5YIOnuOMD0HEhEiviY= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b h1:8j+ID653JCb3W/oApaz0MLvfRX+cVeQ9RQQ7PyJKjkY= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:IzqMXH7Z60dg748uZjADA+y5TS8MNtVb/prNbZbzth8= -github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b h1:H9T1iJ8gKle9g+pjLc44Z9ikpU3nnsmWbPDCATtgZKw= -github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:b/JMksRcKmrlG+QjfdiFlc9ze1YYlkbyRktl6aaiXk8= -github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b h1:kRZIkWlaB5At8YC6wQCdiCedVQl0EdFNLYXfFKCLOvc= -github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:RKyiSN3n8jS51Akc676NsvinTVQ4zovmCHyeuraGF0w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b h1:cFmO0nl9iDVx6mRsJyS8M2ra1EEvzAmpVs+bUX0hZ5w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:0uX+ri0h9ob8Qpe541Vo+EUDu7g53xTUVXZH7CGGSdg= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b h1:70bdmnMfJDpADpUj4SokeZE66G4zW8ZuoZtm19R7uwA= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= -github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= -github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ= +github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg= +github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b h1:94ywF5sYxmpJ1NBBBMCV/RAPNCn6SvCAn03tyQPztwU= +github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b/go.mod h1:7bg06SrhFQ71OEjN4Gx5ZrT8XbzFmdM2gAh3+iZk+nw= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b h1:cfLxwa6GRtTiEAuF2QADIrW69zPXfWm9WwM2sHLVA/0= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b h1:j9Ss8AqnIMtI2PSUy0yWyQnml/BlfH/Rs/TdCodAPXE= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b/go.mod h1:1vjgS5DDKZoWOoccbKy05ebw0wGArLuIoJuKsEksQGo= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b h1:AUfT3Piip1Dlz2FvintYb9DmVrkz8n8UQAnBsx2CfB4= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b/go.mod h1:nPzCdD6zmtoqgKVMmubeeFhLJ9HlFHwcKwCRRgqH9Ms= +github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b h1:kEMnTbBcMXnK8nhIh2q/usXrNtH44Q74tzjHnJBve7Y= +github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b/go.mod h1:6/akmgtGHeLs5AsxjT62OlGUT3+o9/QCrQpPP5nSraY= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b h1:VaeM23PiUhYuBg4UI8jKXVranq3UBnyk4qFMR5uZY5U= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw= +github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b h1:MJbBhJYe7FJV1aVu3zybseWWwb9gj0+2TcdwsSQt+gU= +github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b/go.mod h1:sw9SPdK6Jl0wOQ9D/TzT9pFxglnQU54KJcp5r2+BwWc= +github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b h1:Lp0xxEQ7pco/oalCaIZjtA3gYzFWHXkqZogO3Xmt/uw= +github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b/go.mod h1:r/jMdRTQsVGvbSnFVFUJDaiAFrnZ0f3skoF0FA3HDKw= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b h1:hXPngmgc569YDA3dZJA1xxCGnFyU8BxvkLhxvFp7jt0= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b/go.mod h1:V1z5PzDqvI6obM4RKEVjwMov2Oift2M/8YteR0Q48e0= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b h1:qIltswqEpfvJf42LX0sxUiGgtxQoP62EZ8sXQUUcmms= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b/go.mod h1:Jx/bQH7XSseyTFIeGF1nhpLWSKRznzmET70/i9mylBw= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b h1:l7TPy7Socgjxc39Uk1/++qa8XCvy/t1Zp9eHeDvc848= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= diff --git a/pkg/network/p2p/neighbor.go b/pkg/network/p2p/neighbor.go index f0d4a22e3..56d952fb9 100644 --- a/pkg/network/p2p/neighbor.go +++ b/pkg/network/p2p/neighbor.go @@ -32,8 +32,7 @@ type ( type Neighbor struct { *network.Peer - logger log.Logger - loggerShutdown func() + logger log.Logger packetReceivedFunc PacketReceivedFunc disconnectedFunc NeighborDisconnectedFunc @@ -51,13 +50,11 @@ type Neighbor struct { // NewNeighbor creates a new neighbor from the provided peer and connection. func NewNeighbor(logger log.Logger, p *network.Peer, stream *PacketsStream, packetReceivedCallback PacketReceivedFunc, disconnectedCallback NeighborDisconnectedFunc) *Neighbor { - neighborLog, neighborLogShutdown := logger.NewChildLogger(fmt.Sprintf("peer_%s", p.ID.ShortString())) ctx, cancel := context.WithCancel(context.Background()) return &Neighbor{ Peer: p, - logger: neighborLog, - loggerShutdown: neighborLogShutdown, + logger: logger.NewChildLogger(fmt.Sprintf("peer_%s", p.ID.ShortString())), packetReceivedFunc: packetReceivedCallback, disconnectedFunc: disconnectedCallback, loopCtx: ctx, @@ -158,7 +155,7 @@ func (n *Neighbor) Close() { n.logger.LogErrorf("Failed to disconnect the neighbor, error: %s", err) } n.wg.Wait() - n.loggerShutdown() + n.logger.UnsubscribeFromParentLogger() } func (n *Neighbor) disconnect() (err error) { diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index ad6d5c672..7883f63b0 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-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 ) @@ -56,18 +56,18 @@ 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-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e // indirect github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index b4245cf41..8d5f88ec8 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -277,34 +277,34 @@ 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-20231213110054-d23a4fe8000b h1:OU1JQ6/ZyljZNv0ILLnU0n7WQT82EpVD30nui36Y2mU= -github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:vgK/3gi+bzToK+e98DBHgsCHqtqYDY2IFLXjydgPra4= -github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b h1:XpcOTn9/1T+Kp20dzqadcLkHwXc5cbVuejLWMAhVIDY= -github.com/iotaledger/hive.go/app v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:s8qaCVJuvIdby4ZULL7V9ANkqqbgahNsx7ix5rbHC5w= +github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ= +github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg= +github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b h1:94ywF5sYxmpJ1NBBBMCV/RAPNCn6SvCAn03tyQPztwU= +github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b/go.mod h1:7bg06SrhFQ71OEjN4Gx5ZrT8XbzFmdM2gAh3+iZk+nw= 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-20231213110054-d23a4fe8000b h1:dH8KInmRMtxOjn5fV+FygQQ45u/QzVtvsSaOuZOlD/4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b h1:CXxteUE7gKhVLI7bYpCe7cCc/ipzJEIQyQtxeGAXBIk= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b/go.mod h1:Sx5tUo1o8LY19Ca5NPbwec6RfkRoESIS8cxULewON2Q= -github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b h1:ylOAcyNGClrLI4Nh5Qxdrc4bZdA2TIRNH8g/cqHMx7Q= -github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:QM5jpE+hpD11LfZo813/EjCpWCN2/CBeQFI/OnCZccE= -github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b h1:4CLPHjj5E+heMnqw3Nq+RNc7YqR1dX1ZxyXnAgu3K8o= -github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:MzIuhKtCoo2pXvZMCRU52wB354UPSiZfeaXHC3vP+is= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b h1:sCVC/sw/E4wSMWPkXc1czKZQU5YIOnuOMD0HEhEiviY= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b h1:8j+ID653JCb3W/oApaz0MLvfRX+cVeQ9RQQ7PyJKjkY= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:IzqMXH7Z60dg748uZjADA+y5TS8MNtVb/prNbZbzth8= -github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b h1:H9T1iJ8gKle9g+pjLc44Z9ikpU3nnsmWbPDCATtgZKw= -github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:b/JMksRcKmrlG+QjfdiFlc9ze1YYlkbyRktl6aaiXk8= -github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b h1:kRZIkWlaB5At8YC6wQCdiCedVQl0EdFNLYXfFKCLOvc= -github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:RKyiSN3n8jS51Akc676NsvinTVQ4zovmCHyeuraGF0w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b h1:cFmO0nl9iDVx6mRsJyS8M2ra1EEvzAmpVs+bUX0hZ5w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:0uX+ri0h9ob8Qpe541Vo+EUDu7g53xTUVXZH7CGGSdg= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b h1:70bdmnMfJDpADpUj4SokeZE66G4zW8ZuoZtm19R7uwA= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= -github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= -github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b h1:cfLxwa6GRtTiEAuF2QADIrW69zPXfWm9WwM2sHLVA/0= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b h1:j9Ss8AqnIMtI2PSUy0yWyQnml/BlfH/Rs/TdCodAPXE= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b/go.mod h1:1vjgS5DDKZoWOoccbKy05ebw0wGArLuIoJuKsEksQGo= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b h1:AUfT3Piip1Dlz2FvintYb9DmVrkz8n8UQAnBsx2CfB4= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b/go.mod h1:nPzCdD6zmtoqgKVMmubeeFhLJ9HlFHwcKwCRRgqH9Ms= +github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b h1:kEMnTbBcMXnK8nhIh2q/usXrNtH44Q74tzjHnJBve7Y= +github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b/go.mod h1:6/akmgtGHeLs5AsxjT62OlGUT3+o9/QCrQpPP5nSraY= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b h1:VaeM23PiUhYuBg4UI8jKXVranq3UBnyk4qFMR5uZY5U= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw= +github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b h1:MJbBhJYe7FJV1aVu3zybseWWwb9gj0+2TcdwsSQt+gU= +github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b/go.mod h1:sw9SPdK6Jl0wOQ9D/TzT9pFxglnQU54KJcp5r2+BwWc= +github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b h1:Lp0xxEQ7pco/oalCaIZjtA3gYzFWHXkqZogO3Xmt/uw= +github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b/go.mod h1:r/jMdRTQsVGvbSnFVFUJDaiAFrnZ0f3skoF0FA3HDKw= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b h1:hXPngmgc569YDA3dZJA1xxCGnFyU8BxvkLhxvFp7jt0= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b/go.mod h1:V1z5PzDqvI6obM4RKEVjwMov2Oift2M/8YteR0Q48e0= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b h1:qIltswqEpfvJf42LX0sxUiGgtxQoP62EZ8sXQUUcmms= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b/go.mod h1:Jx/bQH7XSseyTFIeGF1nhpLWSKRznzmET70/i9mylBw= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b h1:l7TPy7Socgjxc39Uk1/++qa8XCvy/t1Zp9eHeDvc848= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index aee3f6b58..557907ac5 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,10 +5,10 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b - github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b + github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 github.com/mr-tron/base58 v1.2.0 @@ -26,14 +26,14 @@ require ( github.com/holiman/uint256 v1.2.4 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect - github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b // indirect github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 34f07c2cc..c24160ee9 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -28,30 +28,30 @@ 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-20231213110054-d23a4fe8000b h1:OU1JQ6/ZyljZNv0ILLnU0n7WQT82EpVD30nui36Y2mU= -github.com/iotaledger/hive.go/ads v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:vgK/3gi+bzToK+e98DBHgsCHqtqYDY2IFLXjydgPra4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b h1:dH8KInmRMtxOjn5fV+FygQQ45u/QzVtvsSaOuZOlD/4= -github.com/iotaledger/hive.go/constraints v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b h1:CXxteUE7gKhVLI7bYpCe7cCc/ipzJEIQyQtxeGAXBIk= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231213110054-d23a4fe8000b/go.mod h1:Sx5tUo1o8LY19Ca5NPbwec6RfkRoESIS8cxULewON2Q= -github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b h1:ylOAcyNGClrLI4Nh5Qxdrc4bZdA2TIRNH8g/cqHMx7Q= -github.com/iotaledger/hive.go/crypto v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:QM5jpE+hpD11LfZo813/EjCpWCN2/CBeQFI/OnCZccE= -github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b h1:4CLPHjj5E+heMnqw3Nq+RNc7YqR1dX1ZxyXnAgu3K8o= -github.com/iotaledger/hive.go/ds v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:MzIuhKtCoo2pXvZMCRU52wB354UPSiZfeaXHC3vP+is= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b h1:sCVC/sw/E4wSMWPkXc1czKZQU5YIOnuOMD0HEhEiviY= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b h1:8j+ID653JCb3W/oApaz0MLvfRX+cVeQ9RQQ7PyJKjkY= -github.com/iotaledger/hive.go/kvstore v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:IzqMXH7Z60dg748uZjADA+y5TS8MNtVb/prNbZbzth8= -github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b h1:H9T1iJ8gKle9g+pjLc44Z9ikpU3nnsmWbPDCATtgZKw= -github.com/iotaledger/hive.go/lo v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:b/JMksRcKmrlG+QjfdiFlc9ze1YYlkbyRktl6aaiXk8= -github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b h1:kRZIkWlaB5At8YC6wQCdiCedVQl0EdFNLYXfFKCLOvc= -github.com/iotaledger/hive.go/log v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:RKyiSN3n8jS51Akc676NsvinTVQ4zovmCHyeuraGF0w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b h1:cFmO0nl9iDVx6mRsJyS8M2ra1EEvzAmpVs+bUX0hZ5w= -github.com/iotaledger/hive.go/runtime v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:0uX+ri0h9ob8Qpe541Vo+EUDu7g53xTUVXZH7CGGSdg= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b h1:70bdmnMfJDpADpUj4SokeZE66G4zW8ZuoZtm19R7uwA= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231213110054-d23a4fe8000b/go.mod h1:hKgf+fskky588HbpPjxUvs9KPAqxG+ptPUOzm423RB0= -github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b h1:uyDK/pKr/ZwWRx8jwbJVKmDOWDbwF/oagRk+C7BeEVc= -github.com/iotaledger/hive.go/stringify v0.0.0-20231213110054-d23a4fe8000b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ= +github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b h1:cfLxwa6GRtTiEAuF2QADIrW69zPXfWm9WwM2sHLVA/0= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b h1:j9Ss8AqnIMtI2PSUy0yWyQnml/BlfH/Rs/TdCodAPXE= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b/go.mod h1:1vjgS5DDKZoWOoccbKy05ebw0wGArLuIoJuKsEksQGo= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b h1:AUfT3Piip1Dlz2FvintYb9DmVrkz8n8UQAnBsx2CfB4= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b/go.mod h1:nPzCdD6zmtoqgKVMmubeeFhLJ9HlFHwcKwCRRgqH9Ms= +github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b h1:kEMnTbBcMXnK8nhIh2q/usXrNtH44Q74tzjHnJBve7Y= +github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b/go.mod h1:6/akmgtGHeLs5AsxjT62OlGUT3+o9/QCrQpPP5nSraY= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b h1:VaeM23PiUhYuBg4UI8jKXVranq3UBnyk4qFMR5uZY5U= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A= +github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw= +github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b h1:MJbBhJYe7FJV1aVu3zybseWWwb9gj0+2TcdwsSQt+gU= +github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b/go.mod h1:sw9SPdK6Jl0wOQ9D/TzT9pFxglnQU54KJcp5r2+BwWc= +github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b h1:Lp0xxEQ7pco/oalCaIZjtA3gYzFWHXkqZogO3Xmt/uw= +github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b/go.mod h1:r/jMdRTQsVGvbSnFVFUJDaiAFrnZ0f3skoF0FA3HDKw= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b h1:hXPngmgc569YDA3dZJA1xxCGnFyU8BxvkLhxvFp7jt0= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b/go.mod h1:V1z5PzDqvI6obM4RKEVjwMov2Oift2M/8YteR0Q48e0= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b h1:qIltswqEpfvJf42LX0sxUiGgtxQoP62EZ8sXQUUcmms= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b/go.mod h1:Jx/bQH7XSseyTFIeGF1nhpLWSKRznzmET70/i9mylBw= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b h1:l7TPy7Socgjxc39Uk1/++qa8XCvy/t1Zp9eHeDvc848= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00/go.mod h1:gt+URx7DZu414nZME7jtGgxR4DVTSnNa1jF2trTUTZ0= github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 h1:2iQUEuYvuyeYtZBr6bRoM4xFLxRiQ66aBPgKuJTirh0= From 94f4349e3cec40e76ba6a0b49832515b32528192 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:05:35 +0100 Subject: [PATCH 14/21] Fix: merge bug --- pkg/protocol/engine/engine.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/protocol/engine/engine.go b/pkg/protocol/engine/engine.go index e399e2588..d366e4542 100644 --- a/pkg/protocol/engine/engine.go +++ b/pkg/protocol/engine/engine.go @@ -561,7 +561,7 @@ func (e *Engine) initLatestCommitment() { } func (e *Engine) initReactiveModule(parentLogger log.Logger) (reactiveModule *module.ReactiveModule) { - logger, unsubscribeFromParentLogger := parentLogger.NewEntityLogger("Engine") + logger := parentLogger.NewChildLogger("Engine", true) reactiveModule = module.NewReactiveModule(logger) e.RootCommitment.LogUpdates(reactiveModule, log.LevelTrace, "RootCommitment") @@ -570,7 +570,7 @@ func (e *Engine) initReactiveModule(parentLogger log.Logger) (reactiveModule *mo reactiveModule.Shutdown.OnTrigger(func() { reactiveModule.LogDebug("shutting down") - unsubscribeFromParentLogger() + logger.UnsubscribeFromParentLogger() // Shutdown should be performed in the reverse dataflow order. e.BlockRequester.Shutdown() From 1248e20b36f3b1f3cea4826201411c736af5fbe3 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:09:40 +0100 Subject: [PATCH 15/21] Refactor: fixed refactor bugs --- pkg/protocol/engine/notarization/slotnotarization/manager.go | 4 ++-- .../sybilprotection/sybilprotectionv1/sybilprotection.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/protocol/engine/notarization/slotnotarization/manager.go b/pkg/protocol/engine/notarization/slotnotarization/manager.go index a9a39e2c2..d776ea50d 100644 --- a/pkg/protocol/engine/notarization/slotnotarization/manager.go +++ b/pkg/protocol/engine/notarization/slotnotarization/manager.go @@ -52,10 +52,10 @@ type Manager struct { func NewProvider() module.Provider[*engine.Engine, notarization.Notarization] { return module.Provide(func(e *engine.Engine) notarization.Notarization { - logger, shutdownLogger := e.NewChildLogger("NotarizationManager") + logger := e.NewChildLogger("NotarizationManager") m := NewManager(logger, e.Workers.CreateGroup("NotarizationManager"), e.ErrorHandler("notarization")) - m.HookShutdown(shutdownLogger) + m.HookShutdown(logger.UnsubscribeFromParentLogger) m.apiProvider = e diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go index 7ca6a4a32..6643c6cb3 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go @@ -59,7 +59,7 @@ func NewProvider(opts ...options.Option[SybilProtection]) module.Provider[*engin e.Constructed.OnTrigger(func() { o.ledger = e.Ledger o.errHandler = e.ErrorHandler("SybilProtection") - logger, _ := e.NewChildLogger("PerformanceTracker") + logger := e.NewChildLogger("PerformanceTracker") latestCommittedSlot := e.Storage.Settings().LatestCommitment().Slot() latestCommittedEpoch := o.apiProvider.APIForSlot(latestCommittedSlot).TimeProvider().EpochFromSlot(latestCommittedSlot) o.performanceTracker = performance.NewTracker(e.Storage.RewardsForEpoch, e.Storage.PoolStats(), e.Storage.Committee(), e.Storage.CommitteeCandidates, e.Storage.ValidatorPerformances, latestCommittedEpoch, e, o.errHandler, logger) From 2f72bd62544b10cfb9389588bde2f3905aaa691b Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:17:02 +0100 Subject: [PATCH 16/21] Fix: fixed refactor bug --- pkg/protocol/chain.go | 4 ++-- pkg/protocol/commitment.go | 4 ++-- pkg/protocol/commitments.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/protocol/chain.go b/pkg/protocol/chain.go index 3ec93212b..e70f12be1 100644 --- a/pkg/protocol/chain.go +++ b/pkg/protocol/chain.go @@ -182,7 +182,7 @@ func (c *Chain) LatestEngine() *engine.Engine { // initLogger initializes the Logger of this chain. func (c *Chain) initLogger() (shutdown func()) { - c.Logger, shutdown = c.chains.NewEntityLogger("") + c.Logger = c.chains.NewChildLogger("", true) return lo.Batch( c.WarpSyncMode.LogUpdates(c, log.LevelTrace, "WarpSyncMode"), @@ -200,7 +200,7 @@ func (c *Chain) initLogger() (shutdown func()) { c.Engine.LogUpdates(c, log.LevelTrace, "Engine", (*engine.Engine).LogName), c.IsEvicted.LogUpdates(c, log.LevelTrace, "IsEvicted"), - shutdown, + c.Logger.UnsubscribeFromParentLogger, ) } diff --git a/pkg/protocol/commitment.go b/pkg/protocol/commitment.go index a2df4e77e..c9df921fa 100644 --- a/pkg/protocol/commitment.go +++ b/pkg/protocol/commitment.go @@ -130,7 +130,7 @@ func (c *Commitment) TargetEngine() *engine.Engine { // initLogger initializes the Logger of this Commitment. func (c *Commitment) initLogger() (shutdown func()) { - c.Logger, shutdown = c.commitments.NewEntityLogger(fmt.Sprintf("Slot%d.", c.Slot())) + c.Logger = c.commitments.NewChildLogger(fmt.Sprintf("Slot%d.", c.Slot()), true) return lo.Batch( c.Parent.LogUpdates(c, log.LevelTrace, "Parent", (*Commitment).LogName), @@ -149,7 +149,7 @@ func (c *Commitment) initLogger() (shutdown func()) { c.ReplayDroppedBlocks.LogUpdates(c, log.LevelTrace, "ReplayDroppedBlocks"), c.IsEvicted.LogUpdates(c, log.LevelTrace, "IsEvicted"), - shutdown, + c.Logger.UnsubscribeFromParentLogger, ) } diff --git a/pkg/protocol/commitments.go b/pkg/protocol/commitments.go index a53e33274..8e2caeb34 100644 --- a/pkg/protocol/commitments.go +++ b/pkg/protocol/commitments.go @@ -99,12 +99,12 @@ func (c *Commitments) API(commitmentID iotago.CommitmentID) (commitmentAPI *engi // initLogger initializes the logger for this component. func (c *Commitments) initLogger() (shutdown func()) { - c.Logger, shutdown = c.protocol.NewChildLogger("Commitments") + c.Logger = c.protocol.NewChildLogger("Commitments") return lo.Batch( c.Root.LogUpdates(c, log.LevelTrace, "Root", (*Commitment).LogName), - shutdown, + c.Logger.UnsubscribeFromParentLogger, ) } From a3b8974c6a3f8ca1949ba89834d06a68178871fd Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:22:45 +0100 Subject: [PATCH 17/21] Refactor: fixed merge issues --- pkg/protocol/chains.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/protocol/chains.go b/pkg/protocol/chains.go index 97af7125f..cff02abd1 100644 --- a/pkg/protocol/chains.go +++ b/pkg/protocol/chains.go @@ -78,7 +78,7 @@ func (c *Chains) WithInitializedEngines(callback func(chain *Chain, engine *engi } // initLogger initializes the logger for this component. -func (c *Chains) initLogger(logger log.Logger, shutdownLogger func()) (shutdown func()) { +func (c *Chains) initLogger(logger log.Logger) (shutdown func()) { c.Logger = logger return lo.Batch( @@ -87,7 +87,7 @@ func (c *Chains) initLogger(logger log.Logger, shutdownLogger func()) (shutdown c.HeaviestAttestedCandidate.LogUpdates(c, log.LevelTrace, "HeaviestAttestedCandidate", (*Chain).LogName), c.HeaviestVerifiedCandidate.LogUpdates(c, log.LevelTrace, "HeaviestVerifiedCandidate", (*Chain).LogName), - shutdownLogger, + logger.UnsubscribeFromParentLogger, ) } From 41c18ce977ef05c988bbebe061b00ceb9c4b3477 Mon Sep 17 00:00:00 2001 From: Hans Moog <3293976+hmoog@users.noreply.github.com> Date: Thu, 14 Dec 2023 04:25:21 +0100 Subject: [PATCH 18/21] Refactor: fixed more issues --- pkg/testsuite/mock/node.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkg/testsuite/mock/node.go b/pkg/testsuite/mock/node.go index 5bdf70327..2ede79265 100644 --- a/pkg/testsuite/mock/node.go +++ b/pkg/testsuite/mock/node.go @@ -50,9 +50,8 @@ type InvalidSignedTransactionEvent struct { } type Node struct { - Testing *testing.T - logger log.Logger - loggerShutdown func() + Testing *testing.T + logger log.Logger Name string Validator *BlockIssuer @@ -101,12 +100,9 @@ func NewNode(t *testing.T, parentLogger log.Logger, net *Network, partition stri validatorBlockIssuer = nil } - logger, loggerShutdown := parentLogger.NewChildLogger(name) - return &Node{ - Testing: t, - logger: logger, - loggerShutdown: loggerShutdown, + Testing: t, + logger: parentLogger.NewChildLogger(name), Name: name, @@ -486,7 +482,7 @@ func (n *Node) Shutdown() { } <-stopped - n.loggerShutdown() + n.logger.UnsubscribeFromParentLogger() } func (n *Node) ProtocolParametersHash() iotago.Identifier { From fc14d7e0ffbfeb24456322a73dfd9ff0b31e88f1 Mon Sep 17 00:00:00 2001 From: muXxer Date: Thu, 14 Dec 2023 13:28:01 +0100 Subject: [PATCH 19/21] Update inx-app --- components/dashboard_metrics/component.go | 2 +- components/p2p/component.go | 6 +-- components/protocol/component.go | 2 +- components/restapi/component.go | 2 +- components/restapi/management/component.go | 2 +- go.mod | 24 +++++------ go.sum | 48 +++++++++++----------- tools/gendoc/go.mod | 24 +++++------ tools/gendoc/go.sum | 48 +++++++++++----------- tools/genesis-snapshot/go.mod | 20 ++++----- tools/genesis-snapshot/go.sum | 40 +++++++++--------- 11 files changed, 109 insertions(+), 109 deletions(-) diff --git a/components/dashboard_metrics/component.go b/components/dashboard_metrics/component.go index 34b2ba9c8..fec40c036 100644 --- a/components/dashboard_metrics/component.go +++ b/components/dashboard_metrics/component.go @@ -88,7 +88,7 @@ func configure() error { } func run() error { - Component.Logger().LogInfof("Starting %s ...", Component.Name) + Component.Logger.LogInfof("Starting %s ...", Component.Name) if err := Component.Daemon().BackgroundWorker("DashboardMetricsUpdater", func(ctx context.Context) { // Do not block until the Ticker is shutdown because we might want to start multiple Tickers and we can // safely ignore the last execution when shutting down. diff --git a/components/p2p/component.go b/components/p2p/component.go index b008bedc8..4dbbea364 100644 --- a/components/p2p/component.go +++ b/components/p2p/component.go @@ -86,7 +86,7 @@ func provide(c *dig.Container) error { } if err := c.Provide(func(deps manualPeeringDeps) *manualpeering.Manager { - return manualpeering.NewManager(deps.P2PManager, Component.WorkerPool, Component.Logger()) + return manualpeering.NewManager(deps.P2PManager, Component.WorkerPool, Component.Logger) }); err != nil { return err } @@ -117,7 +117,7 @@ func provide(c *dig.Container) error { } } - return autopeering.NewManager(deps.Protocol.LatestAPI().ProtocolParameters().NetworkName(), deps.P2PManager, deps.Host, deps.PeerDB, Component.Logger()) + return autopeering.NewManager(deps.Protocol.LatestAPI().ProtocolParameters().NetworkName(), deps.P2PManager, deps.Host, deps.PeerDB, Component.Logger) }); err != nil { return err } @@ -295,7 +295,7 @@ func provide(c *dig.Container) error { } return c.Provide(func(host host.Host, peerDB *network.DB) *p2p.Manager { - return p2p.NewManager(host, peerDB, Component.Logger()) + return p2p.NewManager(host, peerDB, Component.Logger) }) } diff --git a/components/protocol/component.go b/components/protocol/component.go index 592f4f81e..d8b4e350a 100644 --- a/components/protocol/component.go +++ b/components/protocol/component.go @@ -139,7 +139,7 @@ func provide(c *dig.Container) error { } return protocol.New( - Component.Logger(), + Component.Logger, workerpool.NewGroup("Protocol"), deps.P2PManager, protocol.WithBaseDirectory(ParamsDatabase.Path), diff --git a/components/restapi/component.go b/components/restapi/component.go index 9d47b9f36..607c1f756 100644 --- a/components/restapi/component.go +++ b/components/restapi/component.go @@ -76,7 +76,7 @@ func initConfigParams(c *dig.Container) error { func provide(c *dig.Container) error { if err := c.Provide(func() *echo.Echo { e := httpserver.NewEcho( - Component.Logger(), + Component.Logger, nil, ParamsRestAPI.DebugRequestLoggerEnabled, ) diff --git a/components/restapi/management/component.go b/components/restapi/management/component.go index 24a3d91dd..42ad7c140 100644 --- a/components/restapi/management/component.go +++ b/components/restapi/management/component.go @@ -72,7 +72,7 @@ func configure() error { }) routeGroup.POST(api.ManagementEndpointPeers, func(c echo.Context) error { - resp, err := addPeer(c, Component.Logger()) + resp, err := addPeer(c, Component.Logger) if err != nil { return err } diff --git a/go.mod b/go.mod index bd82a1839..09b6deb18 100644 --- a/go.mod +++ b/go.mod @@ -11,19 +11,19 @@ require ( github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b - github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/app v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b - github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d + github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231214122225-f510ea9b00b5 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 github.com/labstack/echo/v4 v4.11.3 diff --git a/go.sum b/go.sum index b09b7815c..4be915ab3 100644 --- a/go.sum +++ b/go.sum @@ -277,32 +277,32 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ= github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg= -github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b h1:94ywF5sYxmpJ1NBBBMCV/RAPNCn6SvCAn03tyQPztwU= -github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b/go.mod h1:7bg06SrhFQ71OEjN4Gx5ZrT8XbzFmdM2gAh3+iZk+nw= -github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b h1:cfLxwa6GRtTiEAuF2QADIrW69zPXfWm9WwM2sHLVA/0= -github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b h1:j9Ss8AqnIMtI2PSUy0yWyQnml/BlfH/Rs/TdCodAPXE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b/go.mod h1:1vjgS5DDKZoWOoccbKy05ebw0wGArLuIoJuKsEksQGo= -github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b h1:AUfT3Piip1Dlz2FvintYb9DmVrkz8n8UQAnBsx2CfB4= -github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b/go.mod h1:nPzCdD6zmtoqgKVMmubeeFhLJ9HlFHwcKwCRRgqH9Ms= -github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b h1:kEMnTbBcMXnK8nhIh2q/usXrNtH44Q74tzjHnJBve7Y= -github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b/go.mod h1:6/akmgtGHeLs5AsxjT62OlGUT3+o9/QCrQpPP5nSraY= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b h1:VaeM23PiUhYuBg4UI8jKXVranq3UBnyk4qFMR5uZY5U= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/app v0.0.0-20231214121634-8b23c68d408d h1:zNxzb+qLM7J4O/4/OSa2z5saWC2gTL8IoozpcleM1Ds= +github.com/iotaledger/hive.go/app v0.0.0-20231214121634-8b23c68d408d/go.mod h1:sQ+iVwZB/j8OxM1c81dsIcdzuFQMsXvrFK8dCfpQLCE= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d h1:zRaPXIjAFO3pHftl9jgYN6Uy249haf2HqswTktfWS1Q= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d h1:3i3bxbdqH8t4kFYo5pFfQnBTMsEPU6hnNNfSMyzSXq8= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d/go.mod h1:f+10zIZdQcEXGx9An2Y8YGfKwtdL3i0VlY9Ct+KbZEw= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d h1:FXo3qvJeO0jEmCn7cPfiO4MAGkDGqzw8E8E1nWWCl8A= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d/go.mod h1:YUdghEQkJkAO5GxEvpcKpSWtV5PxAIuW4hXIszROA2E= +github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d h1:/rmBzhxamjARxLNjcGPujS/3vI7hEC4sL6OJ00W0UlE= +github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d/go.mod h1:lDpFB4hkoUke5YxJ8ssmNNuY/qaxWaTQtVu/9y9BhKI= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d h1:PaA8E4u6FyjYC1iYrzIAXMBgCzl7CXNciAwm1Vy4/Hc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A= github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw= -github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b h1:MJbBhJYe7FJV1aVu3zybseWWwb9gj0+2TcdwsSQt+gU= -github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b/go.mod h1:sw9SPdK6Jl0wOQ9D/TzT9pFxglnQU54KJcp5r2+BwWc= -github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b h1:Lp0xxEQ7pco/oalCaIZjtA3gYzFWHXkqZogO3Xmt/uw= -github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b/go.mod h1:r/jMdRTQsVGvbSnFVFUJDaiAFrnZ0f3skoF0FA3HDKw= -github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b h1:hXPngmgc569YDA3dZJA1xxCGnFyU8BxvkLhxvFp7jt0= -github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b/go.mod h1:V1z5PzDqvI6obM4RKEVjwMov2Oift2M/8YteR0Q48e0= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b h1:qIltswqEpfvJf42LX0sxUiGgtxQoP62EZ8sXQUUcmms= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b/go.mod h1:Jx/bQH7XSseyTFIeGF1nhpLWSKRznzmET70/i9mylBw= -github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b h1:l7TPy7Socgjxc39Uk1/++qa8XCvy/t1Zp9eHeDvc848= -github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= +github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d h1:4ElSjmSo4n6DZKtnD57CrK6oZl4uf9DSFTADIZjhtbU= +github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d/go.mod h1:kJ3T3R4oteGiO4KVlsHYoGWjl0StK2svlzqLjDPh7EQ= +github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d h1:CZa2fR0/N65GiRQ7SCWSu9ljiCL8KpoOq0zyJ2uwlR0= +github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d/go.mod h1:JQ7L06XNadFPtxCTKWOtzTtWQEgDHIt5NXAnQoPdu30= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d h1:tq7SBxBAU2Hpyj76EaeZTk1Zkb0huW5+FlNI80MZhN8= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d/go.mod h1:kpzzMz84eIcjRPjJiDv04HBp+vGjW7udXyQ2t/ixjNM= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d h1:NYOEB9jAl5XZ3+nZ1YAlicOw9Ox+Ikyb48KQc2D2pTY= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d/go.mod h1:2Gl3qEk1CV9uFPF79JM0Fn4Da39P6SZO+uIF4YMy2kk= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d h1:p/9JAK3ngwESuy4TKs7Sio49z/begA38cwvpaxl4BMs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231214122225-f510ea9b00b5 h1:AkSPs+Q32E+qO5dM8hkKbxXYtS1Bhu/1Cr9dpODyYw4= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231214122225-f510ea9b00b5/go.mod h1:sDallmfuE1wS4PNYA4LVFftkeUescTFvoBuuvd9KRyo= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e/go.mod h1:zEb9onVHnDUStl5SsFBj7H0HBKfIN0c/pUND8Llfqp8= github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 7883f63b0..a824a1468 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-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/app v0.0.0-20231214121634-8b23c68d408d github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 ) @@ -57,18 +57,18 @@ require ( 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-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231214122225-f510ea9b00b5 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e // indirect github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // indirect github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 8d5f88ec8..53d6ff3a5 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -279,34 +279,34 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ= github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg= -github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b h1:94ywF5sYxmpJ1NBBBMCV/RAPNCn6SvCAn03tyQPztwU= -github.com/iotaledger/hive.go/app v0.0.0-20231214025533-67add6c5091b/go.mod h1:7bg06SrhFQ71OEjN4Gx5ZrT8XbzFmdM2gAh3+iZk+nw= +github.com/iotaledger/hive.go/app v0.0.0-20231214121634-8b23c68d408d h1:zNxzb+qLM7J4O/4/OSa2z5saWC2gTL8IoozpcleM1Ds= +github.com/iotaledger/hive.go/app v0.0.0-20231214121634-8b23c68d408d/go.mod h1:sQ+iVwZB/j8OxM1c81dsIcdzuFQMsXvrFK8dCfpQLCE= 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-20231214025533-67add6c5091b h1:cfLxwa6GRtTiEAuF2QADIrW69zPXfWm9WwM2sHLVA/0= -github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b h1:j9Ss8AqnIMtI2PSUy0yWyQnml/BlfH/Rs/TdCodAPXE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b/go.mod h1:1vjgS5DDKZoWOoccbKy05ebw0wGArLuIoJuKsEksQGo= -github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b h1:AUfT3Piip1Dlz2FvintYb9DmVrkz8n8UQAnBsx2CfB4= -github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b/go.mod h1:nPzCdD6zmtoqgKVMmubeeFhLJ9HlFHwcKwCRRgqH9Ms= -github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b h1:kEMnTbBcMXnK8nhIh2q/usXrNtH44Q74tzjHnJBve7Y= -github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b/go.mod h1:6/akmgtGHeLs5AsxjT62OlGUT3+o9/QCrQpPP5nSraY= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b h1:VaeM23PiUhYuBg4UI8jKXVranq3UBnyk4qFMR5uZY5U= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d h1:zRaPXIjAFO3pHftl9jgYN6Uy249haf2HqswTktfWS1Q= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d h1:3i3bxbdqH8t4kFYo5pFfQnBTMsEPU6hnNNfSMyzSXq8= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d/go.mod h1:f+10zIZdQcEXGx9An2Y8YGfKwtdL3i0VlY9Ct+KbZEw= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d h1:FXo3qvJeO0jEmCn7cPfiO4MAGkDGqzw8E8E1nWWCl8A= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d/go.mod h1:YUdghEQkJkAO5GxEvpcKpSWtV5PxAIuW4hXIszROA2E= +github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d h1:/rmBzhxamjARxLNjcGPujS/3vI7hEC4sL6OJ00W0UlE= +github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d/go.mod h1:lDpFB4hkoUke5YxJ8ssmNNuY/qaxWaTQtVu/9y9BhKI= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d h1:PaA8E4u6FyjYC1iYrzIAXMBgCzl7CXNciAwm1Vy4/Hc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A= github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw= -github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b h1:MJbBhJYe7FJV1aVu3zybseWWwb9gj0+2TcdwsSQt+gU= -github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b/go.mod h1:sw9SPdK6Jl0wOQ9D/TzT9pFxglnQU54KJcp5r2+BwWc= -github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b h1:Lp0xxEQ7pco/oalCaIZjtA3gYzFWHXkqZogO3Xmt/uw= -github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b/go.mod h1:r/jMdRTQsVGvbSnFVFUJDaiAFrnZ0f3skoF0FA3HDKw= -github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b h1:hXPngmgc569YDA3dZJA1xxCGnFyU8BxvkLhxvFp7jt0= -github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b/go.mod h1:V1z5PzDqvI6obM4RKEVjwMov2Oift2M/8YteR0Q48e0= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b h1:qIltswqEpfvJf42LX0sxUiGgtxQoP62EZ8sXQUUcmms= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b/go.mod h1:Jx/bQH7XSseyTFIeGF1nhpLWSKRznzmET70/i9mylBw= -github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b h1:l7TPy7Socgjxc39Uk1/++qa8XCvy/t1Zp9eHeDvc848= -github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d h1:DwCwjJO9RvSejwtTR/qeUc/mb25jNP8AqCHBAEG0/w0= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231212163412-89a451fd5f1d/go.mod h1:3tU/AeayUGkI8hMfuy4Ol0H+eJ1PbwNg1g64MzZvMc0= +github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d h1:4ElSjmSo4n6DZKtnD57CrK6oZl4uf9DSFTADIZjhtbU= +github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d/go.mod h1:kJ3T3R4oteGiO4KVlsHYoGWjl0StK2svlzqLjDPh7EQ= +github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d h1:CZa2fR0/N65GiRQ7SCWSu9ljiCL8KpoOq0zyJ2uwlR0= +github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d/go.mod h1:JQ7L06XNadFPtxCTKWOtzTtWQEgDHIt5NXAnQoPdu30= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d h1:tq7SBxBAU2Hpyj76EaeZTk1Zkb0huW5+FlNI80MZhN8= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d/go.mod h1:kpzzMz84eIcjRPjJiDv04HBp+vGjW7udXyQ2t/ixjNM= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d h1:NYOEB9jAl5XZ3+nZ1YAlicOw9Ox+Ikyb48KQc2D2pTY= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d/go.mod h1:2Gl3qEk1CV9uFPF79JM0Fn4Da39P6SZO+uIF4YMy2kk= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d h1:p/9JAK3ngwESuy4TKs7Sio49z/begA38cwvpaxl4BMs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231214122225-f510ea9b00b5 h1:AkSPs+Q32E+qO5dM8hkKbxXYtS1Bhu/1Cr9dpODyYw4= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231214122225-f510ea9b00b5/go.mod h1:sDallmfuE1wS4PNYA4LVFftkeUescTFvoBuuvd9KRyo= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e h1:jbtiUlmTpTdGiRBW1pniPSqRcDMJaIW8fGS+uORryas= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e/go.mod h1:zEb9onVHnDUStl5SsFBj7H0HBKfIN0c/pUND8Llfqp8= github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 557907ac5..7d5afccf2 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,10 +5,10 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b - github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b + github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d + github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 github.com/mr-tron/base58 v1.2.0 @@ -27,13 +27,13 @@ require ( 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-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b // indirect + github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d // indirect github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index c24160ee9..dee249ee4 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -30,28 +30,28 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b h1:sG5H0JmbjXPQ45eHTB27fQHViSu5sDRdSDQT54whalQ= github.com/iotaledger/hive.go/ads v0.0.0-20231214025533-67add6c5091b/go.mod h1:XH4lnT4RPCTVt4b4DNL4FMoi20Ip3f4eFBkIx8WimXg= -github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b h1:cfLxwa6GRtTiEAuF2QADIrW69zPXfWm9WwM2sHLVA/0= -github.com/iotaledger/hive.go/constraints v0.0.0-20231214025533-67add6c5091b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b h1:j9Ss8AqnIMtI2PSUy0yWyQnml/BlfH/Rs/TdCodAPXE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214025533-67add6c5091b/go.mod h1:1vjgS5DDKZoWOoccbKy05ebw0wGArLuIoJuKsEksQGo= -github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b h1:AUfT3Piip1Dlz2FvintYb9DmVrkz8n8UQAnBsx2CfB4= -github.com/iotaledger/hive.go/crypto v0.0.0-20231214025533-67add6c5091b/go.mod h1:nPzCdD6zmtoqgKVMmubeeFhLJ9HlFHwcKwCRRgqH9Ms= -github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b h1:kEMnTbBcMXnK8nhIh2q/usXrNtH44Q74tzjHnJBve7Y= -github.com/iotaledger/hive.go/ds v0.0.0-20231214025533-67add6c5091b/go.mod h1:6/akmgtGHeLs5AsxjT62OlGUT3+o9/QCrQpPP5nSraY= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b h1:VaeM23PiUhYuBg4UI8jKXVranq3UBnyk4qFMR5uZY5U= -github.com/iotaledger/hive.go/ierrors v0.0.0-20231214025533-67add6c5091b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d h1:zRaPXIjAFO3pHftl9jgYN6Uy249haf2HqswTktfWS1Q= +github.com/iotaledger/hive.go/constraints v0.0.0-20231214121634-8b23c68d408d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d h1:3i3bxbdqH8t4kFYo5pFfQnBTMsEPU6hnNNfSMyzSXq8= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231214121634-8b23c68d408d/go.mod h1:f+10zIZdQcEXGx9An2Y8YGfKwtdL3i0VlY9Ct+KbZEw= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d h1:FXo3qvJeO0jEmCn7cPfiO4MAGkDGqzw8E8E1nWWCl8A= +github.com/iotaledger/hive.go/crypto v0.0.0-20231214121634-8b23c68d408d/go.mod h1:YUdghEQkJkAO5GxEvpcKpSWtV5PxAIuW4hXIszROA2E= +github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d h1:/rmBzhxamjARxLNjcGPujS/3vI7hEC4sL6OJ00W0UlE= +github.com/iotaledger/hive.go/ds v0.0.0-20231214121634-8b23c68d408d/go.mod h1:lDpFB4hkoUke5YxJ8ssmNNuY/qaxWaTQtVu/9y9BhKI= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d h1:PaA8E4u6FyjYC1iYrzIAXMBgCzl7CXNciAwm1Vy4/Hc= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231214121634-8b23c68d408d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b h1:tpZm/5y+zdOCkdTm4pcEC2cjd943EFKi+BSgNLBIA7A= github.com/iotaledger/hive.go/kvstore v0.0.0-20231214025533-67add6c5091b/go.mod h1:UjkGs5jxiEwIFyzX4wfNk01dHuqDtTOtbzsSqoJR9Pw= -github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b h1:MJbBhJYe7FJV1aVu3zybseWWwb9gj0+2TcdwsSQt+gU= -github.com/iotaledger/hive.go/lo v0.0.0-20231214025533-67add6c5091b/go.mod h1:sw9SPdK6Jl0wOQ9D/TzT9pFxglnQU54KJcp5r2+BwWc= -github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b h1:Lp0xxEQ7pco/oalCaIZjtA3gYzFWHXkqZogO3Xmt/uw= -github.com/iotaledger/hive.go/log v0.0.0-20231214025533-67add6c5091b/go.mod h1:r/jMdRTQsVGvbSnFVFUJDaiAFrnZ0f3skoF0FA3HDKw= -github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b h1:hXPngmgc569YDA3dZJA1xxCGnFyU8BxvkLhxvFp7jt0= -github.com/iotaledger/hive.go/runtime v0.0.0-20231214025533-67add6c5091b/go.mod h1:V1z5PzDqvI6obM4RKEVjwMov2Oift2M/8YteR0Q48e0= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b h1:qIltswqEpfvJf42LX0sxUiGgtxQoP62EZ8sXQUUcmms= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214025533-67add6c5091b/go.mod h1:Jx/bQH7XSseyTFIeGF1nhpLWSKRznzmET70/i9mylBw= -github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b h1:l7TPy7Socgjxc39Uk1/++qa8XCvy/t1Zp9eHeDvc848= -github.com/iotaledger/hive.go/stringify v0.0.0-20231214025533-67add6c5091b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d h1:4ElSjmSo4n6DZKtnD57CrK6oZl4uf9DSFTADIZjhtbU= +github.com/iotaledger/hive.go/lo v0.0.0-20231214121634-8b23c68d408d/go.mod h1:kJ3T3R4oteGiO4KVlsHYoGWjl0StK2svlzqLjDPh7EQ= +github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d h1:CZa2fR0/N65GiRQ7SCWSu9ljiCL8KpoOq0zyJ2uwlR0= +github.com/iotaledger/hive.go/log v0.0.0-20231214121634-8b23c68d408d/go.mod h1:JQ7L06XNadFPtxCTKWOtzTtWQEgDHIt5NXAnQoPdu30= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d h1:tq7SBxBAU2Hpyj76EaeZTk1Zkb0huW5+FlNI80MZhN8= +github.com/iotaledger/hive.go/runtime v0.0.0-20231214121634-8b23c68d408d/go.mod h1:kpzzMz84eIcjRPjJiDv04HBp+vGjW7udXyQ2t/ixjNM= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d h1:NYOEB9jAl5XZ3+nZ1YAlicOw9Ox+Ikyb48KQc2D2pTY= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231214121634-8b23c68d408d/go.mod h1:2Gl3qEk1CV9uFPF79JM0Fn4Da39P6SZO+uIF4YMy2kk= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d h1:p/9JAK3ngwESuy4TKs7Sio49z/begA38cwvpaxl4BMs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231214121634-8b23c68d408d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4= github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00/go.mod h1:gt+URx7DZu414nZME7jtGgxR4DVTSnNa1jF2trTUTZ0= github.com/iotaledger/iota.go/v4 v4.0.0-20231211160706-492c65d5e3f5 h1:2iQUEuYvuyeYtZBr6bRoM4xFLxRiQ66aBPgKuJTirh0= From 4fbaf8f1bad27b6dd71c8571873e73e1a40ecfc4 Mon Sep 17 00:00:00 2001 From: muXxer Date: Thu, 14 Dec 2023 13:41:33 +0100 Subject: [PATCH 20/21] Fix logger name for peers --- pkg/network/p2p/neighbor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/network/p2p/neighbor.go b/pkg/network/p2p/neighbor.go index 56d952fb9..4c56344f0 100644 --- a/pkg/network/p2p/neighbor.go +++ b/pkg/network/p2p/neighbor.go @@ -49,12 +49,12 @@ type Neighbor struct { } // NewNeighbor creates a new neighbor from the provided peer and connection. -func NewNeighbor(logger log.Logger, p *network.Peer, stream *PacketsStream, packetReceivedCallback PacketReceivedFunc, disconnectedCallback NeighborDisconnectedFunc) *Neighbor { +func NewNeighbor(parentLogger log.Logger, p *network.Peer, stream *PacketsStream, packetReceivedCallback PacketReceivedFunc, disconnectedCallback NeighborDisconnectedFunc) *Neighbor { ctx, cancel := context.WithCancel(context.Background()) return &Neighbor{ Peer: p, - logger: logger.NewChildLogger(fmt.Sprintf("peer_%s", p.ID.ShortString())), + logger: parentLogger.NewChildLogger(fmt.Sprintf("peers.%s", p.ID.String()[:6])), packetReceivedFunc: packetReceivedCallback, disconnectedFunc: disconnectedCallback, loopCtx: ctx, From 751c9dc8afd00fc626a85bf4a1d96754f7f5b715 Mon Sep 17 00:00:00 2001 From: muXxer Date: Thu, 14 Dec 2023 13:57:37 +0100 Subject: [PATCH 21/21] Fix neighbor log message --- pkg/network/p2p/manager.go | 2 +- pkg/network/p2p/neighbor.go | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/network/p2p/manager.go b/pkg/network/p2p/manager.go index 19aab4f2e..d6ed84420 100644 --- a/pkg/network/p2p/manager.go +++ b/pkg/network/p2p/manager.go @@ -357,7 +357,7 @@ func (m *Manager) addNeighbor(peer *network.Peer, ps *PacketsStream) error { } nbr.readLoop() nbr.writeLoop() - nbr.logger.LogInfo("Connection established") + nbr.logger.LogInfo("Connection established to %s") m.Events.NeighborAdded.Trigger(nbr) return nil diff --git a/pkg/network/p2p/neighbor.go b/pkg/network/p2p/neighbor.go index 4c56344f0..445826453 100644 --- a/pkg/network/p2p/neighbor.go +++ b/pkg/network/p2p/neighbor.go @@ -2,7 +2,6 @@ package p2p import ( "context" - "fmt" "sync" "time" @@ -52,9 +51,9 @@ type Neighbor struct { func NewNeighbor(parentLogger log.Logger, p *network.Peer, stream *PacketsStream, packetReceivedCallback PacketReceivedFunc, disconnectedCallback NeighborDisconnectedFunc) *Neighbor { ctx, cancel := context.WithCancel(context.Background()) - return &Neighbor{ + n := &Neighbor{ Peer: p, - logger: parentLogger.NewChildLogger(fmt.Sprintf("peers.%s", p.ID.String()[:6])), + logger: parentLogger.NewChildLogger("peer", true), packetReceivedFunc: packetReceivedCallback, disconnectedFunc: disconnectedCallback, loopCtx: ctx, @@ -62,6 +61,10 @@ func NewNeighbor(parentLogger log.Logger, p *network.Peer, stream *PacketsStream stream: stream, sendQueue: make(chan *queuedPacket, NeighborsSendQueueSize), } + + n.logger.LogInfo("created", "ID", n.ID) + + return n } func (n *Neighbor) Enqueue(packet proto.Message, protocolID protocol.ID) {