diff --git a/components/protocol/component.go b/components/protocol/component.go index 792985d26..e9b9144ae 100644 --- a/components/protocol/component.go +++ b/components/protocol/component.go @@ -2,6 +2,7 @@ package protocol import ( "context" + "os" "time" "github.com/labstack/gommon/bytes" @@ -58,11 +59,45 @@ type dependencies struct { Protocol *protocol.Protocol } +type jsonProtocolParameters struct { + ProtocolParameters []iotago.ProtocolParameters `serix:"0,mapKey=protocolParameters"` +} + +func readProtocolParameters() []iotago.ProtocolParameters { + fileBytes, err := os.ReadFile(ParamsProtocol.ProtocolParametersPath) + if err != nil { + Component.LogInfof("No protocol parameters file (%s) found, skipping import: %s", ParamsProtocol.ProtocolParametersPath, err) + return nil + } + + parsedParams := &jsonProtocolParameters{} + if err := iotago.CommonSerixAPI().JSONDecode(context.Background(), fileBytes, parsedParams); err != nil { + Component.LogWarnf("Error parsing protocol parameters file (%s): %s", ParamsProtocol.ProtocolParametersPath, err) + return nil + } + + return parsedParams.ProtocolParameters +} + +func resetProtocolParameters() { + bytesToWrite, err := iotago.CommonSerixAPI().JSONEncode(context.Background(), jsonProtocolParameters{}) + if err != nil { + Component.LogInfof("Error writing protocol parameters file (%s): %s", ParamsProtocol.ProtocolParametersPath, err) + return + } + + if err := os.WriteFile(ParamsProtocol.ProtocolParametersPath, bytesToWrite, 0600); err != nil { + Component.LogInfof("Error writing protocol parameters file (%s): %s", ParamsProtocol.ProtocolParametersPath, err) + return + } +} + func initConfigParams(c *dig.Container) error { type cfgResult struct { dig.Out - DatabaseEngine hivedb.Engine `name:"databaseEngine"` - BaseToken *BaseToken + DatabaseEngine hivedb.Engine `name:"databaseEngine"` + BaseToken *BaseToken + ProtocolParameters []iotago.ProtocolParameters } if err := c.Provide(func() cfgResult { @@ -72,8 +107,9 @@ func initConfigParams(c *dig.Container) error { } return cfgResult{ - DatabaseEngine: dbEngine, - BaseToken: &ParamsProtocol.BaseToken, + DatabaseEngine: dbEngine, + BaseToken: &ParamsProtocol.BaseToken, + ProtocolParameters: readProtocolParameters(), } }); err != nil { Component.LogPanic(err) @@ -86,8 +122,9 @@ func provide(c *dig.Container) error { type protocolDeps struct { dig.In - DatabaseEngine hivedb.Engine `name:"databaseEngine"` - P2PManager *p2p.Manager + DatabaseEngine hivedb.Engine `name:"databaseEngine"` + ProtocolParameters []iotago.ProtocolParameters + P2PManager *p2p.Manager } return c.Provide(func(deps protocolDeps) *protocol.Protocol { @@ -132,8 +169,9 @@ func provide(c *dig.Container) error { blockfilter.WithMaxAllowedWallClockDrift(ParamsProtocol.Filter.MaxAllowedClockDrift), ), ), - // TODO: here we should pass the protocol parameters from the config. - protocol.WithUpgradeOrchestratorProvider(signalingupgradeorchestrator.NewProvider()), + protocol.WithUpgradeOrchestratorProvider( + signalingupgradeorchestrator.NewProvider(signalingupgradeorchestrator.WithProtocolParameters(deps.ProtocolParameters...)), + ), ) }) } @@ -277,6 +315,10 @@ func run() error { Component.LogErrorfAndExit("Error running the Protocol: %s", err.Error()) } } + + //nolint:contextcheck // context might be canceled + resetProtocolParameters() + Component.LogInfo("Gracefully shutting down the Protocol...") }, daemon.PriorityProtocol) } diff --git a/components/protocol/params.go b/components/protocol/params.go index 4f825998b..596a83a16 100644 --- a/components/protocol/params.go +++ b/components/protocol/params.go @@ -21,6 +21,8 @@ type ParametersProtocol struct { MaxAllowedClockDrift time.Duration `default:"5s" usage:"the maximum drift our wall clock can have to future blocks being received from the network"` } + ProtocolParametersPath string `default:"testnet/protocol_parameters.json" usage:"the path of the protocol parameters file"` + BaseToken BaseToken } diff --git a/config_defaults.json b/config_defaults.json index 7ebf7eb0d..bfdfcf3c8 100644 --- a/config_defaults.json +++ b/config_defaults.json @@ -108,6 +108,7 @@ "filter": { "maxAllowedClockDrift": "5s" }, + "protocolParametersPath": "testnet/protocol_parameters.json", "baseToken": { "name": "Shimmer", "tickerSymbol": "SMR", diff --git a/documentation/docs/references/configuration.md b/documentation/docs/references/configuration.md index 07a4b44fa..df3d0e2a2 100644 --- a/documentation/docs/references/configuration.md +++ b/documentation/docs/references/configuration.md @@ -324,11 +324,12 @@ Example: ## 9. Protocol -| Name | Description | Type | Default value | -| -------------------------------- | --------------------------- | ------ | ------------- | -| [snapshot](#protocol_snapshot) | Configuration for snapshot | object | | -| [filter](#protocol_filter) | Configuration for filter | object | | -| [baseToken](#protocol_basetoken) | Configuration for baseToken | object | | +| Name | Description | Type | Default value | +| -------------------------------- | ---------------------------------------- | ------ | ---------------------------------- | +| [snapshot](#protocol_snapshot) | Configuration for snapshot | object | | +| [filter](#protocol_filter) | Configuration for filter | object | | +| protocolParametersPath | The path of the protocol parameters file | string | "testnet/protocol_parameters.json" | +| [baseToken](#protocol_basetoken) | Configuration for baseToken | object | | ### Snapshot @@ -366,6 +367,7 @@ Example: "filter": { "maxAllowedClockDrift": "5s" }, + "protocolParametersPath": "testnet/protocol_parameters.json", "baseToken": { "name": "Shimmer", "tickerSymbol": "SMR", diff --git a/go.mod b/go.mod index 419791b3c..0197801fe 100644 --- a/go.mod +++ b/go.mod @@ -9,26 +9,26 @@ require ( github.com/google/uuid v1.3.1 github.com/gorilla/websocket v1.5.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 + github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b - github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 + github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 - github.com/libp2p/go-libp2p-kad-dht v0.25.0 + github.com/libp2p/go-libp2p-kad-dht v0.25.1 github.com/multiformats/go-multiaddr v0.11.0 github.com/multiformats/go-varint v0.0.7 github.com/orcaman/writerseeker v0.0.0-20200621085525-1d3f536ff85e @@ -58,7 +58,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect github.com/elastic/gosigar v0.14.2 // indirect - github.com/ethereum/go-ethereum v1.12.2 // indirect + github.com/ethereum/go-ethereum v1.13.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/fjl/memsize v0.0.2 // indirect @@ -83,7 +83,7 @@ require ( github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/holiman/uint256 v1.2.3 // indirect - github.com/huin/goupnp v1.2.0 // indirect + 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/ipfs/boxo v0.10.0 // indirect @@ -106,6 +106,7 @@ require ( github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect github.com/libp2p/go-nat v0.2.0 // indirect github.com/libp2p/go-netroute v0.2.1 // indirect diff --git a/go.sum b/go.sum index f8956510c..731b9f063 100644 --- a/go.sum +++ b/go.sum @@ -96,8 +96,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.12.2 h1:eGHJ4ij7oyVqUQn48LBz3B7pvQ8sV0wGJiIE6gDq/6Y= -github.com/ethereum/go-ethereum v1.12.2/go.mod h1:1cRAEV+rp/xX0zraSCBnu9Py3HQ+geRMj3HdR+k0wfI= +github.com/ethereum/go-ethereum v1.13.0 h1:dZALM0PlDTtNITTECPiqSrFo0iEYVDfby+mSVc0LxIs= +github.com/ethereum/go-ethereum v1.13.0/go.mod h1:0TDsBNJ7j8jR01vKpk4j2zfVKyAbQuKzy6wLwb5ZMuU= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -270,45 +270,45 @@ github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2 github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= -github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY= -github.com/huin/goupnp v1.2.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= 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-20230912002851-de46b7eb1272 h1:8dZqe4bnHNhwwPRi/SC/LWDdziZB/tD8xusv0vRm4wU= -github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 h1:1QqOt3NKPTagZxPuNqfjQhTsSkwvFvCsgGjgqeE784k= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 h1:e4JydqeUSOD0XF3LEXtaARuJXHV+oxFrT24muNyllw0= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 h1:iJsFL+p/hjdypxRKdaDkIbVvrnPtaGWLdrhCzegTkfE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 h1:oqmp24gUuSRmhhUGBHG2IstBRsUv2W2sbaXc8fInWqQ= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 h1:ac84RMbrGrdFaJRwh1ve2GVOA3Z9FmXKEEo933ASexI= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 h1:fLgtC1oswHLnKBRPyTgjNC/4I8vQyZVQw1kM0OmFpg4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 h1:F7Q1Hw9syVZ7+6YW563xOcAaOAN1E8iSf+EPl4/WZPI= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 h1:KCAxk173D21tRqC4FqrTRHYhBBz+qhPrCxlrS8Z5h/I= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 h1:EofN3DqV8yHU7kvPNvpQj9ea/SL6Qvo4NXLs4c6mlaE= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 h1:Oh4B2gbNGsXeFPD4x9HHMzJ2yn1/0PDAegDuWh85pSA= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 h1:T98ib6oj63bHdUbEQB4SK8Q1HvnMYaWU5ST/mVDkToI= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 h1:njt9RKg0RehDi+AveZLNV6gWPnPv5ufGKfl050Mx54Q= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 h1:XyiPWn0CQmjmPUuHhnDjBqAuoWRCETu3pE3Z3KHPcxo= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 h1:B1XC0lIs+Yz79HgytXN/y9qVDsbhp6N424GRE9W0YqE= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 h1:/GDTCmFXcjDabg8HwfYL78BsN0cfGyd2onhRPWqDY20= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 h1:5vyVnYnC6j1kvRrWrcgq2oLaBYomFvFHUq7R/7mC4Ns= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 h1:Rnor/2Bcy8luSAFO+HBRxoLzPtxJzpLZjRle4OSyjBA= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 h1:HIYMX4qEA8IqM02eOI2ZYVyn01zhCCvJ6YpMzf+P/RM= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 h1:N4Qpd7vCNhuFQ+Wg8k9gInVpHjqLlNrEfEVgYuC/aDs= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 h1:2sY4S+HbBTb3JiIz1jW11bQ74iR2VqL+/mvEiP7iiSs= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 h1:OhsjldIlatxskIfpEXDyodi1RpV9w9aXUEit9uVLBs8= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 h1:qiCT8nQ1R67YUsp5Xmp0aK1/ggXehdu5VQ//9OYmCNQ= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 h1:XxDIaa6kzWxoQ1Hd22AQJpqhV6ySXO5ysGeI7QjVDCg= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 h1:VFBVUIvYn78TjG8Rjxvovud9KZjfVaS4qmfqAaTzJdI= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 h1:BkDuQxUYo9aZ4XYuh8EbXWtZBdh7WvL7oh2unWNUFMo= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14/go.mod h1:ADBXzdHXTldP0NB2Vf+KbhDxkYciGRjzQVXT6Rdne1g= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b h1:EPB/+iWeSx/WgJlzaXl8yjinxuD8CCOdi2ZPMLeeMVY= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 h1:10hGLm62uQ2V2HgqCR6FV0fvgpXo5GqlL/SIJ/t4VmY= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1/go.mod h1:MM3RLtTEsfT6Wh0EhpgmzVO/HM0/NOw+E7+mnGTnyA0= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 h1:0j8ljlBmo/f5Gxva83mLWqZLB/xSO9PgJFMPfJ7tyRY= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= @@ -385,12 +385,14 @@ github.com/libp2p/go-libp2p v0.30.0 h1:9EZwFtJPFBcs/yJTnP90TpN1hgrT/EsFfM+OZuwV8 github.com/libp2p/go-libp2p v0.30.0/go.mod h1:nr2g5V7lfftwgiJ78/HrID+pwvayLyqKCEirT2Y3Byg= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= -github.com/libp2p/go-libp2p-kad-dht v0.25.0 h1:T2SXQ/VlXTQVLChWY/+OyOsmGMRJvB5kiR+eJt7jtvI= -github.com/libp2p/go-libp2p-kad-dht v0.25.0/go.mod h1:P6fz+J+u4tPigvS5J0kxQ1isksqAhmXiS/pNaEw/nFI= +github.com/libp2p/go-libp2p-kad-dht v0.25.1 h1:ofFNrf6MMEy4vi3R1VbJ7LOcTn3Csh0cDcaWHTxtWNA= +github.com/libp2p/go-libp2p-kad-dht v0.25.1/go.mod h1:6za56ncRHYXX4Nc2vn8z7CZK0P4QiMcrn77acKLM2Oo= github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= github.com/libp2p/go-libp2p-kbucket v0.6.3/go.mod h1:RCseT7AH6eJWxxk2ol03xtP9pEHetYSPXOaJnOiD8i0= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= +github.com/libp2p/go-libp2p-routing-helpers v0.7.2 h1:xJMFyhQ3Iuqnk9Q2dYE1eUTzsah7NLw3Qs2zjUV78T0= +github.com/libp2p/go-libp2p-routing-helpers v0.7.2/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= diff --git a/pkg/protocol/engine/booker/inmemorybooker/booker.go b/pkg/protocol/engine/booker/inmemorybooker/booker.go index a3e895379..5028e20fe 100644 --- a/pkg/protocol/engine/booker/inmemorybooker/booker.go +++ b/pkg/protocol/engine/booker/inmemorybooker/booker.go @@ -88,7 +88,7 @@ func New(workers *workerpool.Group, apiProvider api.Provider, blockCache *blocks b.book, b.markInvalid, (*blocks.Block).Parents, - causalorder.WithReferenceValidator[iotago.SlotIndex, iotago.BlockID](isReferenceValid), + causalorder.WithReferenceValidator[iotago.SlotIndex, iotago.BlockID](b.isReferenceValid), ) blockCache.Evict.Hook(b.evict) @@ -149,7 +149,6 @@ func (b *Booker) book(block *blocks.Block) error { func (b *Booker) markInvalid(block *blocks.Block, err error) { if block.SetInvalid() { - b.retainBlockFailure(block.ID(), apimodels.BlockFailureBookingFailure) b.events.BlockInvalid.Trigger(block, ierrors.Wrap(err, "block marked as invalid in Booker")) } } @@ -161,6 +160,7 @@ func (b *Booker) inheritConflicts(block *blocks.Block) (conflictIDs ds.Set[iotag for _, parent := range block.ParentsWithType() { parentBlock, exists := b.blockCache.Block(parent.ID) if !exists { + b.retainBlockFailure(block.ID(), apimodels.BlockFailureParentNotFound) return nil, ierrors.Errorf("parent %s does not exist", parent.ID) } @@ -195,8 +195,9 @@ func (b *Booker) inheritConflicts(block *blocks.Block) (conflictIDs ds.Set[iotag } // isReferenceValid checks if the reference between the child and its parent is valid. -func isReferenceValid(child *blocks.Block, parent *blocks.Block) (err error) { +func (b *Booker) isReferenceValid(child *blocks.Block, parent *blocks.Block) (err error) { if parent.IsInvalid() { + b.retainBlockFailure(child.ID(), apimodels.BlockFailureParentInvalid) return ierrors.Errorf("parent %s of child %s is marked as invalid", parent.ID(), child.ID()) } diff --git a/pkg/protocol/engine/engine.go b/pkg/protocol/engine/engine.go index d2230c823..5c7222e41 100644 --- a/pkg/protocol/engine/engine.go +++ b/pkg/protocol/engine/engine.go @@ -168,6 +168,14 @@ func New( (*Engine).setupPruning, (*Engine).acceptanceHandler, (*Engine).TriggerConstructed, + func(e *Engine) { + // Make sure that we have the protocol parameters for the latest supported iota.go protocol version of the software. + // If not the user needs to update the protocol parameters file. + // This can only happen after a user updated the node version and the new protocol version is not yet active. + if _, err := e.APIForVersion(iotago.LatestProtocolVersion()); err != nil { + panic(ierrors.Wrap(err, "no protocol parameters for latest protocol version found")) + } + }, func(e *Engine) { // Import the rest of the snapshot if needed. if importSnapshot { diff --git a/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go b/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go index 6c99e955a..01b6a295f 100644 --- a/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go +++ b/pkg/protocol/engine/upgrade/signalingupgradeorchestrator/orchestrator.go @@ -90,11 +90,13 @@ func NewProvider(opts ...options.Option[Orchestrator]) module.Provider[*engine.E for _, protocolParams := range o.optsProtocolParameters { storedProtocolParams := e.Storage.Settings().APIProvider().ProtocolParameters(protocolParams.Version()) if storedProtocolParams != nil { - if lo.PanicOnErr(storedProtocolParams.Hash()) == lo.PanicOnErr(protocolParams.Hash()) { - continue + if lo.PanicOnErr(storedProtocolParams.Hash()) != lo.PanicOnErr(protocolParams.Hash()) { + panic(ierrors.Errorf("protocol parameters for version %d already exist with different hash", protocolParams.Version())) } - panic(ierrors.Errorf("protocol parameters for version %d already exist with different hash", protocolParams.Version())) + if !storedProtocolParams.Equals(protocolParams) { + panic(ierrors.Errorf("protocol parameters for version %d already exist but are not equal", protocolParams.Version())) + } } if err := e.Storage.Settings().StoreProtocolParameters(protocolParams); err != nil { diff --git a/pkg/protocol/engine/utxoledger/output_test.go b/pkg/protocol/engine/utxoledger/output_test.go index 29faf4de3..19aa816c5 100644 --- a/pkg/protocol/engine/utxoledger/output_test.go +++ b/pkg/protocol/engine/utxoledger/output_test.go @@ -124,7 +124,13 @@ func TestExtendedOutputOnEd25519WithoutSpendConstraintsSerialization(t *testing. slotCreated := utils.RandSlotIndex() iotaOutput := &iotago.BasicOutput{ - Amount: amount, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, + Conditions: iotago.BasicOutputUnlockConditions{ + &iotago.AddressUnlockCondition{ + Address: address, + }, + }, Features: iotago.BasicOutputFeatures{ &iotago.SenderFeature{ Address: senderAddress, @@ -133,11 +139,6 @@ func TestExtendedOutputOnEd25519WithoutSpendConstraintsSerialization(t *testing. Tag: tag, }, }, - Conditions: iotago.BasicOutputUnlockConditions{ - &iotago.AddressUnlockCondition{ - Address: address, - }, - }, } output := CreateOutputAndAssertSerialization(t, blockID, index, slotCreated, outputID, iotaOutput) @@ -158,12 +159,8 @@ func TestExtendedOutputOnEd25519WithSpendConstraintsSerialization(t *testing.T) timeLockUnlockSlot := utils.RandSlotIndex() iotaOutput := &iotago.BasicOutput{ - Amount: amount, - Features: iotago.BasicOutputFeatures{ - &iotago.SenderFeature{ - Address: senderAddress, - }, - }, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{ Address: address, @@ -172,6 +169,11 @@ func TestExtendedOutputOnEd25519WithSpendConstraintsSerialization(t *testing.T) SlotIndex: timeLockUnlockSlot, }, }, + Features: iotago.BasicOutputFeatures{ + &iotago.SenderFeature{ + Address: senderAddress, + }, + }, } output := CreateOutputAndAssertSerialization(t, blockID, index, slotCreated, outputID, iotaOutput) @@ -191,18 +193,20 @@ func TestNFTOutputSerialization(t *testing.T) { slotCreated := utils.RandSlotIndex() iotaOutput := &iotago.NFTOutput{ - Amount: amount, - NFTID: nftID, - ImmutableFeatures: iotago.NFTOutputImmFeatures{ - &iotago.MetadataFeature{ - Data: utils.RandBytes(12), - }, - }, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, + NFTID: nftID, Conditions: iotago.NFTOutputUnlockConditions{ &iotago.AddressUnlockCondition{ Address: address, }, }, + Features: iotago.NFTOutputFeatures{}, + ImmutableFeatures: iotago.NFTOutputImmFeatures{ + &iotago.MetadataFeature{ + Data: utils.RandBytes(12), + }, + }, } output := CreateOutputAndAssertSerialization(t, blockID, index, slotCreated, outputID, iotaOutput) @@ -224,16 +228,9 @@ func TestNFTOutputWithSpendConstraintsSerialization(t *testing.T) { expirationUnlockSlot := utils.RandSlotIndex() iotaOutput := &iotago.NFTOutput{ - Amount: amount, - NFTID: nftID, - ImmutableFeatures: iotago.NFTOutputImmFeatures{ - &iotago.MetadataFeature{ - Data: utils.RandBytes(12), - }, - &iotago.IssuerFeature{ - Address: issuerAddress, - }, - }, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, + NFTID: nftID, Conditions: iotago.NFTOutputUnlockConditions{ &iotago.AddressUnlockCondition{ Address: address.ToAddress(), @@ -243,6 +240,15 @@ func TestNFTOutputWithSpendConstraintsSerialization(t *testing.T) { ReturnAddress: issuerAddress, }, }, + Features: iotago.NFTOutputFeatures{}, + ImmutableFeatures: iotago.NFTOutputImmFeatures{ + &iotago.MetadataFeature{ + Data: utils.RandBytes(12), + }, + &iotago.IssuerFeature{ + Address: issuerAddress, + }, + }, } output := CreateOutputAndAssertSerialization(t, blockID, index, slotCreated, outputID, iotaOutput) @@ -265,8 +271,17 @@ func TestAccountOutputSerialization(t *testing.T) { slotCreated := utils.RandSlotIndex() iotaOutput := &iotago.AccountOutput{ - Amount: amount, - AccountID: aliasID, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, + AccountID: aliasID, + Conditions: iotago.AccountOutputUnlockConditions{ + &iotago.StateControllerAddressUnlockCondition{ + Address: stateController.ToAddress(), + }, + &iotago.GovernorAddressUnlockCondition{ + Address: governor, + }, + }, Features: iotago.AccountOutputFeatures{ &iotago.SenderFeature{ Address: sender.ToAddress(), @@ -277,14 +292,6 @@ func TestAccountOutputSerialization(t *testing.T) { Address: issuer.ToAddress(), }, }, - Conditions: iotago.AccountOutputUnlockConditions{ - &iotago.StateControllerAddressUnlockCondition{ - Address: stateController.ToAddress(), - }, - &iotago.GovernorAddressUnlockCondition{ - Address: governor, - }, - }, } output := CreateOutputAndAssertSerialization(t, blockID, index, slotCreated, outputID, iotaOutput) @@ -305,6 +312,7 @@ func TestFoundryOutputSerialization(t *testing.T) { iotaOutput := &iotago.FoundryOutput{ Amount: amount, + NativeTokens: iotago.NativeTokens{}, SerialNumber: utils.RandUint32(math.MaxUint32), TokenScheme: &iotago.SimpleTokenScheme{ MintedTokens: supply, @@ -316,6 +324,8 @@ func TestFoundryOutputSerialization(t *testing.T) { Address: aliasID.ToAddress().(*iotago.AccountAddress), }, }, + Features: iotago.FoundryOutputFeatures{}, + ImmutableFeatures: iotago.FoundryOutputImmFeatures{}, } output := CreateOutputAndAssertSerialization(t, blockID, index, slotCreated, outputID, iotaOutput) diff --git a/pkg/protocol/engine/utxoledger/slot_diff_test.go b/pkg/protocol/engine/utxoledger/slot_diff_test.go index ee96f8fed..85b721943 100644 --- a/pkg/protocol/engine/utxoledger/slot_diff_test.go +++ b/pkg/protocol/engine/utxoledger/slot_diff_test.go @@ -28,12 +28,14 @@ func TestSimpleSlotDiffSerialization(t *testing.T) { address := utils.RandAddress(iotago.AddressEd25519) amount := iotago.BaseToken(832493) iotaOutput := &iotago.BasicOutput{ - Amount: amount, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{ Address: address, }, }, + Features: iotago.BasicOutputFeatures{}, } output := utxoledger.CreateOutput(api.SingleVersionProvider(iotago_tpkg.TestAPI), outputID, blockID, indexBooked, slotCreated, iotaOutput) diff --git a/pkg/protocol/snapshotcreator/snapshotcreator.go b/pkg/protocol/snapshotcreator/snapshotcreator.go index c2e4d4a71..e12ce74cd 100644 --- a/pkg/protocol/snapshotcreator/snapshotcreator.go +++ b/pkg/protocol/snapshotcreator/snapshotcreator.go @@ -176,9 +176,10 @@ func createOutput(address iotago.Address, tokenAmount iotago.BaseToken) (output func createAccount(accountID iotago.AccountID, address iotago.Address, tokenAmount iotago.BaseToken, mana iotago.Mana, blockIssuerKey iotago.BlockIssuerKey, expirySlot iotago.SlotIndex, stakedAmount iotago.BaseToken, stakeEndEpoch iotago.EpochIndex, stakeFixedCost iotago.Mana) (output iotago.Output) { accountOutput := &iotago.AccountOutput{ - AccountID: accountID, - Amount: tokenAmount, - Mana: mana, + Amount: tokenAmount, + Mana: mana, + NativeTokens: iotago.NativeTokens{}, + AccountID: accountID, Conditions: iotago.AccountOutputUnlockConditions{ &iotago.StateControllerAddressUnlockCondition{Address: address}, &iotago.GovernorAddressUnlockCondition{Address: address}, @@ -189,6 +190,7 @@ func createAccount(accountID iotago.AccountID, address iotago.Address, tokenAmou ExpirySlot: expirySlot, }, }, + ImmutableFeatures: iotago.AccountOutputImmFeatures{}, } // The Staking feature is only added if both StakedAmount and StakeEndEpoch have non-zero values, diff --git a/pkg/storage/options.go b/pkg/storage/options.go index 15e6703d2..21751e106 100644 --- a/pkg/storage/options.go +++ b/pkg/storage/options.go @@ -5,6 +5,7 @@ import ( hivedb "github.com/iotaledger/hive.go/kvstore/database" "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/iota-core/pkg/storage/permanent" "github.com/iotaledger/iota-core/pkg/storage/prunable" iotago "github.com/iotaledger/iota.go/v4" ) @@ -56,3 +57,9 @@ func WithPruningSizeCooldownTime(cooldown time.Duration) options.Option[Storage] p.optsPruningSizeCooldownTime = cooldown } } + +func WithPermanentOptions(opts ...options.Option[permanent.Permanent]) options.Option[Storage] { + return func(s *Storage) { + s.optsPermanent = append(s.optsPermanent, opts...) + } +} diff --git a/pkg/storage/permanent/options.go b/pkg/storage/permanent/options.go new file mode 100644 index 000000000..300615baa --- /dev/null +++ b/pkg/storage/permanent/options.go @@ -0,0 +1,12 @@ +package permanent + +import ( + "github.com/iotaledger/hive.go/runtime/options" + "github.com/iotaledger/iota.go/v4/api" +) + +func WithEpochBasedProviderOptions(opts ...options.Option[api.EpochBasedProvider]) options.Option[Permanent] { + return func(p *Permanent) { + p.optsEpochBasedProvider = append(p.optsEpochBasedProvider, opts...) + } +} diff --git a/pkg/storage/permanent/permanent.go b/pkg/storage/permanent/permanent.go index 72ce83a9f..1d81d4399 100644 --- a/pkg/storage/permanent/permanent.go +++ b/pkg/storage/permanent/permanent.go @@ -9,6 +9,7 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine/utxoledger" "github.com/iotaledger/iota-core/pkg/storage/database" iotago "github.com/iotaledger/iota.go/v4" + "github.com/iotaledger/iota.go/v4/api" ) const ( @@ -30,6 +31,8 @@ type Permanent struct { utxoLedger *utxoledger.Manager accounts kvstore.KVStore latestNonEmptySlot kvstore.KVStore + + optsEpochBasedProvider []options.Option[api.EpochBasedProvider] } // New returns a new permanent storage instance. @@ -39,7 +42,7 @@ func New(dbConfig database.Config, errorHandler func(error), opts ...options.Opt dbConfig: dbConfig, }, opts, func(p *Permanent) { p.store = database.NewDBInstance(p.dbConfig) - p.settings = NewSettings(lo.PanicOnErr(p.store.KVStore().WithExtendedRealm(kvstore.Realm{settingsPrefix}))) + p.settings = NewSettings(lo.PanicOnErr(p.store.KVStore().WithExtendedRealm(kvstore.Realm{settingsPrefix})), p.optsEpochBasedProvider...) p.commitments = NewCommitments(lo.PanicOnErr(p.store.KVStore().WithExtendedRealm(kvstore.Realm{commitmentsPrefix})), p.settings.APIProvider()) p.utxoLedger = utxoledger.New(lo.PanicOnErr(p.store.KVStore().WithExtendedRealm(kvstore.Realm{ledgerPrefix})), p.settings.APIProvider()) p.accounts = lo.PanicOnErr(p.store.KVStore().WithExtendedRealm(kvstore.Realm{accountsPrefix})) diff --git a/pkg/storage/permanent/settings.go b/pkg/storage/permanent/settings.go index def431988..94f81603e 100644 --- a/pkg/storage/permanent/settings.go +++ b/pkg/storage/permanent/settings.go @@ -4,9 +4,11 @@ import ( "fmt" "io" + "github.com/iotaledger/hive.go/ds/types" "github.com/iotaledger/hive.go/ierrors" "github.com/iotaledger/hive.go/kvstore" "github.com/iotaledger/hive.go/lo" + "github.com/iotaledger/hive.go/runtime/options" "github.com/iotaledger/hive.go/runtime/syncutils" "github.com/iotaledger/hive.go/serializer/v2/byteutils" "github.com/iotaledger/hive.go/serializer/v2/stream" @@ -26,21 +28,100 @@ const ( ) type Settings struct { - mutex syncutils.RWMutex - store kvstore.KVStore + mutex syncutils.RWMutex + store kvstore.KVStore + storeSnapshotImported *kvstore.TypedValue[bool] + storeLatestCommitment *kvstore.TypedValue[*model.Commitment] + storeLatestFinalizedSlot *kvstore.TypedValue[iotago.SlotIndex] + storeProtocolVersionEpochMapping *kvstore.TypedStore[iotago.Version, iotago.EpochIndex] + storeFutureProtocolParameters *kvstore.TypedStore[iotago.Version, *types.Tuple[iotago.EpochIndex, iotago.Identifier]] + storeProtocolParameters *kvstore.TypedStore[iotago.Version, iotago.ProtocolParameters] apiProvider *api.EpochBasedProvider } -func NewSettings(store kvstore.KVStore) (settings *Settings) { +func NewSettings(store kvstore.KVStore, opts ...options.Option[api.EpochBasedProvider]) (settings *Settings) { + apiProvider := api.NewEpochBasedProvider(opts...) + s := &Settings{ store: store, - apiProvider: api.NewEpochBasedProvider(), + apiProvider: apiProvider, + storeSnapshotImported: kvstore.NewTypedValue( + store, + []byte{snapshotImportedKey}, + func(v bool) ([]byte, error) { + return []byte{lo.Cond[byte](v, 1, 0)}, nil + }, + func(b []byte) (bool, int, error) { + if len(b) != 1 { + return false, 0, ierrors.Errorf("expected 1 byte, but got %d", len(b)) + } + + return b[0] == 1, 1, nil + }, + ), + storeLatestCommitment: kvstore.NewTypedValue( + store, + []byte{latestCommitmentKey}, + func(commitment *model.Commitment) ([]byte, error) { + return commitment.Data(), nil + }, + func(bytes []byte) (*model.Commitment, int, error) { + commitment, err := model.CommitmentFromBytes(bytes, apiProvider) + if err != nil { + return nil, 0, err + } + + return commitment, len(bytes), nil + }, + ), + storeLatestFinalizedSlot: kvstore.NewTypedValue( + store, + []byte{latestFinalizedSlotKey}, + iotago.SlotIndex.Bytes, + iotago.SlotIndexFromBytes, + ), + + storeProtocolVersionEpochMapping: kvstore.NewTypedStore( + lo.PanicOnErr(store.WithExtendedRealm([]byte{protocolVersionEpochMappingKey})), + iotago.Version.Bytes, + iotago.VersionFromBytes, + iotago.EpochIndex.Bytes, + iotago.EpochIndexFromBytes, + ), + storeFutureProtocolParameters: kvstore.NewTypedStore( + lo.PanicOnErr(store.WithExtendedRealm([]byte{futureProtocolParametersKey})), + iotago.Version.Bytes, + iotago.VersionFromBytes, + func(t *types.Tuple[iotago.EpochIndex, iotago.Identifier]) ([]byte, error) { + return byteutils.ConcatBytes(t.A.MustBytes(), lo.PanicOnErr(t.B.Bytes())), nil + }, + func(b []byte) (*types.Tuple[iotago.EpochIndex, iotago.Identifier], int, error) { + epoch, consumedBytes, err := iotago.EpochIndexFromBytes(b) + if err != nil { + return nil, 0, ierrors.Wrap(err, "failed to parse epoch index") + } + + hash, consumedBytes2, err := iotago.IdentifierFromBytes(b[consumedBytes:]) + if err != nil { + return nil, 0, ierrors.Wrap(err, "failed to parse identifier") + } + + return types.NewTuple(epoch, hash), consumedBytes + consumedBytes2, nil + }, + ), + storeProtocolParameters: kvstore.NewTypedStore( + lo.PanicOnErr(store.WithExtendedRealm([]byte{protocolParametersKey})), + iotago.Version.Bytes, + iotago.VersionFromBytes, + iotago.ProtocolParameters.Bytes, + iotago.ProtocolParametersFromBytes, + ), } - s.loadProtocolParametersEpochMappings() - s.loadFutureProtocolParameters() s.loadProtocolParameters() + s.loadFutureProtocolParameters() + s.loadProtocolParametersEpochMappings() if s.IsSnapshotImported() { s.apiProvider.SetCurrentSlot(s.latestCommitment().Index()) } @@ -52,17 +133,7 @@ func (s *Settings) loadProtocolParametersEpochMappings() { s.mutex.Lock() defer s.mutex.Unlock() - if err := s.store.Iterate([]byte{protocolVersionEpochMappingKey}, func(key kvstore.Key, value kvstore.Value) bool { - version, _, err := iotago.VersionFromBytes(key[1:]) - if err != nil { - panic(err) - } - - epoch, _, err := iotago.EpochIndexFromBytes(value) - if err != nil { - panic(err) - } - + if err := s.storeProtocolVersionEpochMapping.Iterate(kvstore.EmptyPrefix, func(version iotago.Version, epoch iotago.EpochIndex) bool { s.apiProvider.AddVersion(version, epoch) return true @@ -75,12 +146,7 @@ func (s *Settings) loadProtocolParameters() { s.mutex.Lock() defer s.mutex.Unlock() - if err := s.store.Iterate([]byte{protocolParametersKey}, func(key kvstore.Key, value kvstore.Value) bool { - protocolParams, _, err := iotago.ProtocolParametersFromBytes(value) - if err != nil { - return true // skip over invalid protocol parameters - } - + if err := s.storeProtocolParameters.Iterate(kvstore.EmptyPrefix, func(version iotago.Version, protocolParams iotago.ProtocolParameters) bool { s.apiProvider.AddProtocolParameters(protocolParams) return true @@ -93,23 +159,8 @@ func (s *Settings) loadFutureProtocolParameters() { s.mutex.Lock() defer s.mutex.Unlock() - if err := s.store.Iterate([]byte{futureProtocolParametersKey}, func(key kvstore.Key, value kvstore.Value) bool { - version, _, err := iotago.VersionFromBytes(key[1:]) - if err != nil { - panic(err) - } - - epoch, read, err := iotago.EpochIndexFromBytes(value) - if err != nil { - panic(err) - } - - hash, _, err := iotago.IdentifierFromBytes(value[read:]) - if err != nil { - panic(err) - } - - s.apiProvider.AddFutureVersion(version, hash, epoch) + if err := s.storeFutureProtocolParameters.Iterate(kvstore.EmptyPrefix, func(version iotago.Version, tuple *types.Tuple[iotago.EpochIndex, iotago.Identifier]) bool { + s.apiProvider.AddFutureVersion(version, tuple.B, tuple.A) return true }); err != nil { @@ -122,31 +173,27 @@ func (s *Settings) APIProvider() *api.EpochBasedProvider { } func (s *Settings) StoreProtocolParametersForStartEpoch(params iotago.ProtocolParameters, startEpoch iotago.EpochIndex) error { + if err := s.StoreProtocolParameters(params); err != nil { + return ierrors.Wrap(err, "failed to store protocol parameters") + } + if err := s.storeProtocolParametersEpochMapping(params.Version(), startEpoch); err != nil { - return err + return ierrors.Wrap(err, "failed to store protocol version epoch mapping") } - return s.StoreProtocolParameters(params) + return nil } func (s *Settings) StoreProtocolParameters(params iotago.ProtocolParameters) error { s.mutex.Lock() defer s.mutex.Unlock() - bytes, err := params.Bytes() - if err != nil { - return err - } - - if err := s.store.Set([]byte{protocolParametersKey, byte(params.Version())}, bytes); err != nil { - return err + if err := s.storeProtocolParameters.Set(params.Version(), params); err != nil { + return ierrors.Wrap(err, "failed to store protocol parameters") } s.apiProvider.AddProtocolParameters(params) - // Delete the old future protocol parameters if they exist. - _ = s.store.Delete([]byte{futureProtocolParametersKey, byte(params.Version())}) - return nil } @@ -154,13 +201,8 @@ func (s *Settings) storeProtocolParametersEpochMapping(version iotago.Version, e s.mutex.Lock() defer s.mutex.Unlock() - epochBytes, err := epoch.Bytes() - if err != nil { - return err - } - - if err := s.store.Set([]byte{protocolVersionEpochMappingKey, byte(version)}, epochBytes); err != nil { - return err + if err := s.storeProtocolVersionEpochMapping.Set(version, epoch); err != nil { + return ierrors.Wrap(err, "failed to store protocol version epoch mapping") } s.apiProvider.AddVersion(version, epoch) @@ -172,18 +214,12 @@ func (s *Settings) StoreFutureProtocolParametersHash(version iotago.Version, has s.mutex.Lock() defer s.mutex.Unlock() - epochBytes, err := epoch.Bytes() - if err != nil { - return err - } - - hashBytes, err := hash.Bytes() - if err != nil { - return err + if err := s.storeFutureProtocolParameters.Set(version, types.NewTuple(epoch, hash)); err != nil { + return ierrors.Wrap(err, "failed to store future protocol parameters") } - if err := s.store.Set([]byte{futureProtocolParametersKey, byte(version)}, byteutils.ConcatBytes(epochBytes, hashBytes)); err != nil { - return err + if err := s.storeProtocolVersionEpochMapping.Set(version, epoch); err != nil { + return ierrors.Wrap(err, "failed to store protocol version epoch mapping") } s.apiProvider.AddFutureVersion(version, hash, epoch) @@ -195,14 +231,14 @@ func (s *Settings) IsSnapshotImported() bool { s.mutex.RLock() defer s.mutex.RUnlock() - return lo.PanicOnErr(s.store.Has([]byte{snapshotImportedKey})) + return lo.PanicOnErr(s.storeSnapshotImported.Has()) } func (s *Settings) SetSnapshotImported() (err error) { s.mutex.Lock() defer s.mutex.Unlock() - return s.store.Set([]byte{snapshotImportedKey}, []byte{1}) + return s.storeSnapshotImported.Set(true) } func (s *Settings) LatestCommitment() *model.Commitment { @@ -218,11 +254,14 @@ func (s *Settings) SetLatestCommitment(latestCommitment *model.Commitment) (err s.apiProvider.SetCurrentSlot(latestCommitment.Index()) - return s.store.Set([]byte{latestCommitmentKey}, latestCommitment.Data()) + // Delete the old future protocol parameters if they exist. + _ = s.storeFutureProtocolParameters.Delete(s.apiProvider.VersionForSlot(latestCommitment.Index())) + + return s.storeLatestCommitment.Set(latestCommitment) } func (s *Settings) latestCommitment() *model.Commitment { - bytes, err := s.store.Get([]byte{latestCommitmentKey}) + commitment, err := s.storeLatestCommitment.Get() if err != nil { if ierrors.Is(err, kvstore.ErrKeyNotFound) { @@ -231,7 +270,7 @@ func (s *Settings) latestCommitment() *model.Commitment { panic(err) } - return lo.PanicOnErr(model.CommitmentFromBytes(bytes, s.apiProvider)) + return commitment } func (s *Settings) LatestFinalizedSlot() iotago.SlotIndex { @@ -245,23 +284,19 @@ func (s *Settings) SetLatestFinalizedSlot(index iotago.SlotIndex) (err error) { s.mutex.Lock() defer s.mutex.Unlock() - return s.store.Set([]byte{latestFinalizedSlotKey}, index.MustBytes()) + return s.storeLatestFinalizedSlot.Set(index) } func (s *Settings) latestFinalizedSlot() iotago.SlotIndex { - bytes, err := s.store.Get([]byte{latestFinalizedSlotKey}) + latestFinalizedSlot, err := s.storeLatestFinalizedSlot.Get() if err != nil { if ierrors.Is(err, kvstore.ErrKeyNotFound) { return 0 } panic(err) } - i, _, err := iotago.SlotIndexFromBytes(bytes) - if err != nil { - panic(err) - } - return i + return latestFinalizedSlot } func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commitment) error { @@ -285,31 +320,20 @@ func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commit return ierrors.Wrap(err, "failed to write latest finalized slot") } + s.mutex.RLock() + defer s.mutex.RUnlock() + // Export protocol versions if err := stream.WriteCollection(writer, func() (uint64, error) { - s.mutex.RLock() - defer s.mutex.RUnlock() - var count uint64 var innerErr error - if err := s.store.Iterate([]byte{protocolVersionEpochMappingKey}, func(key kvstore.Key, value kvstore.Value) bool { - version, _, err := iotago.VersionFromBytes(key[1:]) - if err != nil { - innerErr = ierrors.Wrap(err, "failed to read version") - return false - } + if err := s.storeProtocolVersionEpochMapping.Iterate(kvstore.EmptyPrefix, func(version iotago.Version, epoch iotago.EpochIndex) bool { if err := stream.Write(writer, version); err != nil { innerErr = ierrors.Wrap(err, "failed to encode version") return false } - epoch, _, err := iotago.EpochIndexFromBytes(value) - if err != nil { - innerErr = ierrors.Wrap(err, "failed to encode epoch") - return false - } - if err := stream.Write(writer, epoch); err != nil { innerErr = ierrors.Wrap(err, "failed to encode epoch") return false @@ -321,6 +345,7 @@ func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commit }); err != nil { return 0, ierrors.Wrap(err, "failed to iterate over protocol version epoch mapping") } + if innerErr != nil { return 0, ierrors.Wrap(innerErr, "failed to write protocol version epoch mapping") } @@ -332,41 +357,21 @@ func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commit // Export future protocol parameters if err := stream.WriteCollection(writer, func() (uint64, error) { - s.mutex.RLock() - defer s.mutex.RUnlock() - var count uint64 var innerErr error - if err := s.store.Iterate([]byte{futureProtocolParametersKey}, func(key kvstore.Key, value kvstore.Value) bool { - version, _, err := iotago.VersionFromBytes(key[1:]) - if err != nil { - innerErr = ierrors.Wrap(err, "failed to read version") - return false - } + if err := s.storeFutureProtocolParameters.Iterate(kvstore.EmptyPrefix, func(version iotago.Version, tuple *types.Tuple[iotago.EpochIndex, iotago.Identifier]) bool { if err := stream.Write(writer, version); err != nil { innerErr = ierrors.Wrap(err, "failed to encode version") return false } - epoch, read, err := iotago.EpochIndexFromBytes(value) - if err != nil { - innerErr = ierrors.Wrap(err, "failed to encode epoch") - return false - } - - if err := stream.Write(writer, epoch); err != nil { + if err := stream.Write(writer, tuple.A); err != nil { innerErr = ierrors.Wrap(err, "failed to encode epoch") return false } - hash, _, err := iotago.IdentifierFromBytes(value[read:]) - if err != nil { - innerErr = ierrors.Wrap(err, "failed to read hash") - return false - } - - if err := stream.Write(writer, hash); err != nil { + if err := stream.Write(writer, tuple.B); err != nil { innerErr = ierrors.Wrap(err, "failed to encode hash") return false } @@ -377,6 +382,7 @@ func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commit }); err != nil { return 0, ierrors.Wrap(err, "failed to iterate over future protocol parameters") } + if innerErr != nil { return 0, ierrors.Wrap(innerErr, "failed to write future protocol parameters") } @@ -386,14 +392,23 @@ func (s *Settings) Export(writer io.WriteSeeker, targetCommitment *iotago.Commit return ierrors.Wrap(err, "failed to stream write future protocol parameters") } - // Export protocol parameters + // Export protocol parameters: we only export the parameters up until the current active ones. if err := stream.WriteCollection(writer, func() (uint64, error) { - s.mutex.RLock() - defer s.mutex.RUnlock() - var paramsCount uint64 var innerErr error - if err := s.store.Iterate([]byte{protocolParametersKey}, func(_ kvstore.Key, value kvstore.Value) bool { + + if err := s.storeProtocolParameters.KVStore().Iterate(kvstore.EmptyPrefix, func(key kvstore.Key, value kvstore.Value) bool { + version, _, err := iotago.VersionFromBytes(key) + if err != nil { + innerErr = ierrors.Wrap(err, "failed to read version") + return false + } + + if s.apiProvider.IsFutureVersion(version) { + // We don't export future protocol parameters, just skip to the next ones. + return true + } + if err := stream.WriteBlob(writer, value); err != nil { innerErr = err return false @@ -517,15 +532,11 @@ func (s *Settings) String() string { defer s.mutex.RUnlock() builder := stringify.NewStructBuilder("Settings") - builder.AddField(stringify.NewStructField("IsSnapshotImported", lo.PanicOnErr(s.store.Has([]byte{snapshotImportedKey})))) + builder.AddField(stringify.NewStructField("IsSnapshotImported", lo.PanicOnErr(s.storeSnapshotImported.Has()))) builder.AddField(stringify.NewStructField("LatestCommitment", s.latestCommitment())) builder.AddField(stringify.NewStructField("LatestFinalizedSlot", s.latestFinalizedSlot())) - if err := s.store.Iterate([]byte{protocolParametersKey}, func(key kvstore.Key, value kvstore.Value) bool { - params, _, err := iotago.ProtocolParametersFromBytes(value) - if err != nil { - panic(err) - } - builder.AddField(stringify.NewStructField(fmt.Sprintf("ProtocolParameters(%d)", key[1]), params)) + if err := s.storeProtocolParameters.Iterate(kvstore.EmptyPrefix, func(version iotago.Version, protocolParams iotago.ProtocolParameters) bool { + builder.AddField(stringify.NewStructField(fmt.Sprintf("ProtocolParameters(%d)", version), protocolParams)) return true }); err != nil { diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index ee220e88c..ddbfa90af 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -48,6 +48,7 @@ type Storage struct { optsPruningSizeReductionPercentage float64 optsBucketManagerOptions []options.Option[prunable.BucketManager] optsPruningSizeCooldownTime time.Duration + optsPermanent []options.Option[permanent.Permanent] } // New creates a new storage instance with the named database version in the given directory. @@ -71,7 +72,7 @@ func New(directory string, dbVersion byte, errorHandler func(error), opts ...opt PrefixHealth: []byte{storePrefixHealth}, } - s.permanent = permanent.New(dbConfig, errorHandler) + s.permanent = permanent.New(dbConfig, errorHandler, s.optsPermanent...) s.prunable = prunable.New(dbConfig.WithDirectory(s.dir.PathWithCreate(prunableDirName)), s.Settings().APIProvider(), s.errorHandler, s.optsBucketManagerOptions...) }) } diff --git a/pkg/storage/testframework_test.go b/pkg/storage/testframework_test.go index b684efb96..86cd2ff7c 100644 --- a/pkg/storage/testframework_test.go +++ b/pkg/storage/testframework_test.go @@ -79,7 +79,7 @@ func (t *TestFramework) RestoreFromDisk() { func (t *TestFramework) SetLatestFinalizedEpoch(epoch iotago.EpochIndex) { // We make sure that the given epoch is seen as finalized by setting the latest finalized slot to the start slot of the next epoch. - startSlotNextEpoch := t.Instance.Settings().APIProvider().CurrentAPI().TimeProvider().EpochStart(epoch + 1) + startSlotNextEpoch := t.Instance.Settings().APIProvider().LatestAPI().TimeProvider().EpochStart(epoch + 1) require.NoError(t.t, t.Instance.Settings().SetLatestFinalizedSlot(startSlotNextEpoch)) } diff --git a/pkg/tests/upgrade_signaling_test.go b/pkg/tests/upgrade_signaling_test.go index 3b5fb1510..2bed94bd4 100644 --- a/pkg/tests/upgrade_signaling_test.go +++ b/pkg/tests/upgrade_signaling_test.go @@ -18,10 +18,13 @@ import ( "github.com/iotaledger/iota-core/pkg/protocol/engine" "github.com/iotaledger/iota-core/pkg/protocol/engine/accounts" "github.com/iotaledger/iota-core/pkg/protocol/engine/blocks" + "github.com/iotaledger/iota-core/pkg/protocol/engine/upgrade/signalingupgradeorchestrator" "github.com/iotaledger/iota-core/pkg/protocol/snapshotcreator" "github.com/iotaledger/iota-core/pkg/storage" + "github.com/iotaledger/iota-core/pkg/storage/permanent" "github.com/iotaledger/iota-core/pkg/testsuite" iotago "github.com/iotaledger/iota.go/v4" + "github.com/iotaledger/iota.go/v4/api" ) func Test_Upgrade_Signaling(t *testing.T) { @@ -44,6 +47,13 @@ func Test_Upgrade_Signaling(t *testing.T) { ), protocol.WithStorageOptions( storage.WithPruningDelay(20), + storage.WithPermanentOptions( + permanent.WithEpochBasedProviderOptions( + api.WithAPIForMissingVersionCallback(func(version iotago.Version) (iotago.API, error) { + return ts.API, nil + }), + ), + ), ), } @@ -65,7 +75,16 @@ func Test_Upgrade_Signaling(t *testing.T) { ts.Wait() - hash1 := iotago.Identifier{1} + v5ProtocolParameters := iotago.NewV3ProtocolParameters( + iotago.WithVersion(5), + iotago.WithTimeProviderOptions( + ts.API.TimeProvider().GenesisUnixTime(), + uint8(ts.API.TimeProvider().SlotDurationSeconds()), + uint8(math.Log2(float64(ts.API.TimeProvider().EpochDurationSlots()))), + ), + ) + + hash1 := lo.PanicOnErr(v5ProtocolParameters.Hash()) hash2 := iotago.Identifier{2} ts.AssertAccountData(&accounts.AccountData{ @@ -190,7 +209,7 @@ func Test_Upgrade_Signaling(t *testing.T) { nodeE.Shutdown() ts.RemoveNode("nodeE") - nodeE1 := ts.AddNode("nodeE.1") + nodeE1 := ts.AddNode("nodeE1") nodeE1.CopyIdentityFromNode(nodeE) nodeE1.Initialize(true, append(nodeOptions, @@ -226,50 +245,123 @@ func Test_Upgrade_Signaling(t *testing.T) { // TODO: would be great to dynamically add accounts for later nodes. // Can't issue on nodeG as its account is not known. - ts.IssueBlocksAtSlots("", []iotago.SlotIndex{45, 46, 47}, 4, "44.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeE.1"), true, nil) + ts.IssueBlocksAtSlots("", []iotago.SlotIndex{45, 46, 47}, 4, "44.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeE1"), true, nil) - ts.IssueBlocksAtEpoch("", 6, 4, "47.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeE.1"), true, nil) - ts.IssueBlocksAtEpoch("", 7, 4, "55.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeE.1"), true, nil) + ts.IssueBlocksAtEpoch("", 6, 4, "47.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeE1"), true, nil) + ts.IssueBlocksAtEpoch("", 7, 4, "55.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeE1"), true, nil) - ts.AssertEpochVersions(map[iotago.Version]iotago.EpochIndex{ - 3: 0, - 5: 13, - }, ts.Nodes()...) + // Restart node (and add protocol parameters) and add another node from snapshot (also with protocol parameters already set). + { + var expectedRootBlocks []*blocks.Block + for _, slot := range []iotago.SlotIndex{59, 60, 61} { + expectedRootBlocks = append(expectedRootBlocks, ts.BlocksWithPrefix(fmt.Sprintf("%d.3-", slot))...) + } - ts.AssertVersionAndProtocolParameters(map[iotago.Version]iotago.ProtocolParameters{ - 3: ts.API.ProtocolParameters(), - 5: nil, - }, ts.Nodes()...) + ts.AssertNodeState(ts.Nodes(), + testsuite.WithLatestCommitmentSlotIndex(61), + testsuite.WithActiveRootBlocks(expectedRootBlocks), + ) - ts.AssertVersionAndProtocolParametersHashes(map[iotago.Version]iotago.Identifier{ - 3: lo.PanicOnErr(ts.API.ProtocolParameters().Hash()), - 5: hash1, - }, ts.Nodes()...) + // Shutdown nodeE1 and restart it from disk as nodeE2. Verify state. + { + nodeE1 := ts.Node("nodeE1") + nodeE1.Shutdown() + ts.RemoveNode("nodeE1") - // check account data at the end of the test - ts.AssertAccountData(&accounts.AccountData{ - ID: ts.Node("nodeA").AccountID, - Credits: &accounts.BlockIssuanceCredits{Value: math.MaxInt64, UpdateTime: 0}, - ExpirySlot: math.MaxUint64, - OutputID: iotago.OutputIDFromTransactionIDAndIndex(snapshotcreator.GenesisTransactionID, 1), - BlockIssuerKeys: ds.NewSet[iotago.BlockIssuerKey](iotago.BlockIssuerKeyEd25519FromPublicKey(ed25519.PublicKey(ts.Node("nodeA").PubKey))), - ValidatorStake: testsuite.MinValidatorAccountAmount, - DelegationStake: 0, - FixedCost: 0, - StakeEndEpoch: math.MaxUint64, - LatestSupportedProtocolVersionAndHash: model.VersionAndHash{Version: 5, Hash: hash1}, - }, ts.Nodes()...) + nodeE2 := ts.AddNode("nodeE2") + nodeE2.CopyIdentityFromNode(nodeE1) + nodeE2.Initialize(true, + append(nodeOptions, + protocol.WithBaseDirectory(ts.Directory.Path("nodeE")), + protocol.WithUpgradeOrchestratorProvider( + signalingupgradeorchestrator.NewProvider(signalingupgradeorchestrator.WithProtocolParameters(v5ProtocolParameters)), + ), + )..., + ) + ts.Wait() + } - ts.AssertAccountData(&accounts.AccountData{ - ID: ts.Node("nodeD").AccountID, - Credits: &accounts.BlockIssuanceCredits{Value: math.MaxInt64, UpdateTime: 0}, - ExpirySlot: math.MaxUint64, - OutputID: iotago.OutputIDFromTransactionIDAndIndex(snapshotcreator.GenesisTransactionID, 4), - BlockIssuerKeys: ds.NewSet[iotago.BlockIssuerKey](iotago.BlockIssuerKeyEd25519FromPublicKey(ed25519.PublicKey(ts.Node("nodeD").PubKey))), - ValidatorStake: testsuite.MinValidatorAccountAmount, - DelegationStake: 0, - FixedCost: 0, - StakeEndEpoch: math.MaxUint64, - LatestSupportedProtocolVersionAndHash: model.VersionAndHash{Version: 5, Hash: hash2}, - }, ts.Nodes()...) + // Create snapshot and start new nodeH from it. + { + snapshotPath := ts.Directory.Path(fmt.Sprintf("%d_snapshot", time.Now().Unix())) + require.NoError(t, ts.Node("nodeE2").Protocol.MainEngineInstance().WriteSnapshot(snapshotPath)) + + nodeG := ts.AddNode("nodeH") + nodeG.Initialize(true, + append(nodeOptions, + protocol.WithSnapshotPath(snapshotPath), + protocol.WithBaseDirectory(ts.Directory.PathWithCreate(nodeG.Name)), + protocol.WithUpgradeOrchestratorProvider( + signalingupgradeorchestrator.NewProvider(signalingupgradeorchestrator.WithProtocolParameters(v5ProtocolParameters)), + ), + )..., + ) + ts.Wait() + } + + ts.AssertNodeState(ts.Nodes(), + testsuite.WithLatestCommitmentSlotIndex(61), + testsuite.WithEqualStoredCommitmentAtIndex(61), + + testsuite.WithActiveRootBlocks(expectedRootBlocks), + ) + } + + // Verify final state of all nodes. + { + ts.AssertEpochVersions(map[iotago.Version]iotago.EpochIndex{ + 3: 0, + 5: 13, + }, ts.Nodes()...) + + ts.AssertVersionAndProtocolParameters(map[iotago.Version]iotago.ProtocolParameters{ + 3: ts.API.ProtocolParameters(), + 5: nil, + }, ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF", "nodeG")...) + + // We've started nodeH with the v5 protocol parameters set. Therefore, they should be available. + ts.AssertVersionAndProtocolParameters(map[iotago.Version]iotago.ProtocolParameters{ + 3: ts.API.ProtocolParameters(), + 5: v5ProtocolParameters, + }, ts.Nodes("nodeE2", "nodeH")...) + + ts.AssertVersionAndProtocolParametersHashes(map[iotago.Version]iotago.Identifier{ + 3: lo.PanicOnErr(ts.API.ProtocolParameters().Hash()), + 5: hash1, + }, ts.Nodes()...) + + // check account data at the end of the test + ts.AssertAccountData(&accounts.AccountData{ + ID: ts.Node("nodeA").AccountID, + Credits: &accounts.BlockIssuanceCredits{Value: math.MaxInt64, UpdateTime: 0}, + ExpirySlot: math.MaxUint64, + OutputID: iotago.OutputIDFromTransactionIDAndIndex(snapshotcreator.GenesisTransactionID, 1), + BlockIssuerKeys: ds.NewSet[iotago.BlockIssuerKey](iotago.BlockIssuerKeyEd25519FromPublicKey(ed25519.PublicKey(ts.Node("nodeA").PubKey))), + ValidatorStake: testsuite.MinValidatorAccountAmount, + DelegationStake: 0, + FixedCost: 0, + StakeEndEpoch: math.MaxUint64, + LatestSupportedProtocolVersionAndHash: model.VersionAndHash{Version: 5, Hash: hash1}, + }, ts.Nodes()...) + + ts.AssertAccountData(&accounts.AccountData{ + ID: ts.Node("nodeD").AccountID, + Credits: &accounts.BlockIssuanceCredits{Value: math.MaxInt64, UpdateTime: 0}, + ExpirySlot: math.MaxUint64, + OutputID: iotago.OutputIDFromTransactionIDAndIndex(snapshotcreator.GenesisTransactionID, 4), + BlockIssuerKeys: ds.NewSet[iotago.BlockIssuerKey](iotago.BlockIssuerKeyEd25519FromPublicKey(ed25519.PublicKey(ts.Node("nodeD").PubKey))), + ValidatorStake: testsuite.MinValidatorAccountAmount, + DelegationStake: 0, + FixedCost: 0, + StakeEndEpoch: math.MaxUint64, + LatestSupportedProtocolVersionAndHash: model.VersionAndHash{Version: 5, Hash: hash2}, + }, ts.Nodes()...) + } + + // Check that issuing still produces the same commitments + ts.IssueBlocksAtEpoch("", 8, 4, "63.3", ts.Nodes("nodeA", "nodeB", "nodeC", "nodeD", "nodeF"), true, nil) + ts.AssertNodeState(ts.Nodes(), + testsuite.WithLatestCommitmentSlotIndex(69), + testsuite.WithEqualStoredCommitmentAtIndex(69), + ) } diff --git a/pkg/testsuite/transactions_framework.go b/pkg/testsuite/transactions_framework.go index a854970fd..a306231e7 100644 --- a/pkg/testsuite/transactions_framework.go +++ b/pkg/testsuite/transactions_framework.go @@ -127,11 +127,13 @@ func (t *TransactionFramework) CreateBasicOutputsEqually(outputCount int, inputA remainderMana -= manaAmount outputStates = append(outputStates, &iotago.BasicOutput{ - Amount: tokenAmount, + Amount: tokenAmount, + Mana: manaAmount, + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{Address: t.DefaultAddress()}, }, - Mana: manaAmount, + Features: iotago.BasicOutputFeatures{}, }) } @@ -161,11 +163,13 @@ func (t *TransactionFramework) CreateBasicOutputs(amountDistribution []iotago.Ba outputStates := make(iotago.Outputs[iotago.Output], 0, len(amountDistribution)) for idx, outputAmount := range amountDistribution { outputStates = append(outputStates, &iotago.BasicOutput{ - Amount: outputAmount, + Amount: outputAmount, + Mana: manaDistribution[idx], + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{Address: t.DefaultAddress()}, }, - Mana: manaDistribution[idx], + Features: iotago.BasicOutputFeatures{}, }) } @@ -176,12 +180,15 @@ func (t *TransactionFramework) CreateAccountFromInput(inputAlias string, opts .. input := t.Output(inputAlias) accountOutput := options.Apply(&iotago.AccountOutput{ - Amount: input.BaseTokenAmount(), - Mana: input.StoredMana(), + Amount: input.BaseTokenAmount(), + Mana: input.StoredMana(), + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.AccountOutputUnlockConditions{ &iotago.StateControllerAddressUnlockCondition{Address: t.DefaultAddress()}, &iotago.GovernorAddressUnlockCondition{Address: t.DefaultAddress()}, }, + Features: iotago.AccountOutputFeatures{}, + ImmutableFeatures: iotago.AccountOutputImmFeatures{}, }, opts) outputStates := iotago.Outputs[iotago.Output]{accountOutput} @@ -189,11 +196,13 @@ func (t *TransactionFramework) CreateAccountFromInput(inputAlias string, opts .. // if amount was set by options, a remainder output needs to be created if accountOutput.Amount != input.BaseTokenAmount() { outputStates = append(outputStates, &iotago.BasicOutput{ - Amount: input.BaseTokenAmount() - accountOutput.Amount, + Amount: input.BaseTokenAmount() - accountOutput.Amount, + Mana: input.StoredMana() - accountOutput.Mana, + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{Address: t.DefaultAddress()}, }, - Mana: input.StoredMana() - accountOutput.Mana, + Features: iotago.BasicOutputFeatures{}, }) } @@ -229,11 +238,13 @@ func (t *TransactionFramework) CreateDelegationFromInput(inputAlias string, opts // if options set an Amount, a remainder output needs to be created if delegationOutput.Amount != input.BaseTokenAmount() { outputStates = append(outputStates, &iotago.BasicOutput{ - Amount: input.BaseTokenAmount() - delegationOutput.Amount, + Amount: input.BaseTokenAmount() - delegationOutput.Amount, + Mana: input.StoredMana(), + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{Address: t.DefaultAddress()}, }, - Mana: input.StoredMana(), + Features: iotago.BasicOutputFeatures{}, }) } @@ -264,11 +275,13 @@ func (t *TransactionFramework) DestroyAccount(alias string) (consumedInputs *utx output := t.Output(alias) outputStates := iotago.Outputs[iotago.Output]{&iotago.BasicOutput{ - Amount: output.BaseTokenAmount(), + Amount: output.BaseTokenAmount(), + Mana: output.StoredMana(), + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{Address: t.DefaultAddress()}, }, - Mana: output.StoredMana(), + Features: iotago.BasicOutputFeatures{}, }} return output, outputStates, []*mock.HDWallet{t.wallet} diff --git a/pkg/testsuite/upgrades.go b/pkg/testsuite/upgrades.go index 00fdfb424..cb79bfa36 100644 --- a/pkg/testsuite/upgrades.go +++ b/pkg/testsuite/upgrades.go @@ -50,6 +50,10 @@ func (t *TestSuite) AssertVersionAndProtocolParameters(versionsAndProtocolParame return ierrors.Errorf("AssertVersionAndProtocolParameters: %s: for version %d protocol parameters not equal. expected %s, got nil", node.Name, version, lo.PanicOnErr(expectedProtocolParameters.Hash())) } + if !expectedProtocolParameters.Equals(protocolParameters) { + return ierrors.Errorf("AssertVersionAndProtocolParameters: %s: for version %d protocol parameters not equal. expected %v, got %v", node.Name, version, expectedProtocolParameters, protocolParameters) + } + if lo.PanicOnErr(expectedProtocolParameters.Hash()) != lo.PanicOnErr(protocolParameters.Hash()) { return ierrors.Errorf("AssertVersionAndProtocolParameters: %s: for version %d protocol parameters not equal. expected %s, got %s", node.Name, version, lo.PanicOnErr(expectedProtocolParameters.Hash()), lo.PanicOnErr(protocolParameters.Hash())) } diff --git a/pkg/utils/rand.go b/pkg/utils/rand.go index a9a55e6d3..356b66193 100644 --- a/pkg/utils/rand.go +++ b/pkg/utils/rand.go @@ -171,18 +171,21 @@ func RandOutputOnAddressWithAmount(outputType iotago.OutputType, address iotago. case iotago.OutputBasic: //nolint:forcetypeassert // we already checked the type iotaOutput = &iotago.BasicOutput{ - Amount: amount, + Amount: amount, + NativeTokens: iotago.NativeTokens{}, Conditions: iotago.BasicOutputUnlockConditions{ &iotago.AddressUnlockCondition{ Address: address, }, }, + Features: iotago.BasicOutputFeatures{}, } case iotago.OutputAccount: //nolint:forcetypeassert // we already checked the type iotaOutput = &iotago.AccountOutput{ - Amount: amount, - AccountID: RandAccountID(), + Amount: amount, + NativeTokens: iotago.NativeTokens{}, + AccountID: RandAccountID(), Conditions: iotago.AccountOutputUnlockConditions{ &iotago.StateControllerAddressUnlockCondition{ Address: address, @@ -191,6 +194,8 @@ func RandOutputOnAddressWithAmount(outputType iotago.OutputType, address iotago. Address: address, }, }, + Features: iotago.AccountOutputFeatures{}, + ImmutableFeatures: iotago.AccountOutputImmFeatures{}, } case iotago.OutputFoundry: if address.Type() != iotago.AddressAccount { @@ -201,6 +206,7 @@ func RandOutputOnAddressWithAmount(outputType iotago.OutputType, address iotago. //nolint:forcetypeassert // we already checked the type iotaOutput = &iotago.FoundryOutput{ Amount: amount, + NativeTokens: iotago.NativeTokens{}, SerialNumber: 0, TokenScheme: &iotago.SimpleTokenScheme{ MintedTokens: supply, @@ -212,17 +218,22 @@ func RandOutputOnAddressWithAmount(outputType iotago.OutputType, address iotago. Address: address.(*iotago.AccountAddress), }, }, + Features: iotago.FoundryOutputFeatures{}, + ImmutableFeatures: iotago.FoundryOutputImmFeatures{}, } case iotago.OutputNFT: //nolint:forcetypeassert // we already checked the type iotaOutput = &iotago.NFTOutput{ - Amount: amount, - NFTID: RandNFTID(), + Amount: amount, + NativeTokens: iotago.NativeTokens{}, + NFTID: RandNFTID(), Conditions: iotago.NFTOutputUnlockConditions{ &iotago.AddressUnlockCondition{ Address: address, }, }, + Features: iotago.NFTOutputFeatures{}, + ImmutableFeatures: iotago.NFTOutputImmFeatures{}, } default: panic("unhandled output type") diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index 59bdcc743..f7212fcfd 100644 --- a/tools/evil-spammer/go.mod +++ b/tools/evil-spammer/go.mod @@ -8,16 +8,16 @@ replace github.com/iotaledger/iota-core/tools/genesis-snapshot => ../genesis-sna require ( github.com/AlecAivazis/survey/v2 v2.3.7 - github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 + github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 github.com/iotaledger/iota-core/tools/genesis-snapshot v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 + github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) @@ -28,7 +28,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect - github.com/ethereum/go-ethereum v1.12.2 // indirect + github.com/ethereum/go-ethereum v1.13.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -37,12 +37,12 @@ require ( github.com/holiman/uint256 v1.2.3 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect - github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index aeff98cc3..e8b1dd7d5 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -62,8 +62,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.12.2 h1:eGHJ4ij7oyVqUQn48LBz3B7pvQ8sV0wGJiIE6gDq/6Y= -github.com/ethereum/go-ethereum v1.12.2/go.mod h1:1cRAEV+rp/xX0zraSCBnu9Py3HQ+geRMj3HdR+k0wfI= +github.com/ethereum/go-ethereum v1.13.0 h1:dZALM0PlDTtNITTECPiqSrFo0iEYVDfby+mSVc0LxIs= +github.com/ethereum/go-ethereum v1.13.0/go.mod h1:0TDsBNJ7j8jR01vKpk4j2zfVKyAbQuKzy6wLwb5ZMuU= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -171,34 +171,34 @@ 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-20230912002851-de46b7eb1272 h1:8dZqe4bnHNhwwPRi/SC/LWDdziZB/tD8xusv0vRm4wU= -github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 h1:1QqOt3NKPTagZxPuNqfjQhTsSkwvFvCsgGjgqeE784k= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 h1:e4JydqeUSOD0XF3LEXtaARuJXHV+oxFrT24muNyllw0= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 h1:iJsFL+p/hjdypxRKdaDkIbVvrnPtaGWLdrhCzegTkfE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 h1:oqmp24gUuSRmhhUGBHG2IstBRsUv2W2sbaXc8fInWqQ= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 h1:ac84RMbrGrdFaJRwh1ve2GVOA3Z9FmXKEEo933ASexI= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 h1:fLgtC1oswHLnKBRPyTgjNC/4I8vQyZVQw1kM0OmFpg4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 h1:F7Q1Hw9syVZ7+6YW563xOcAaOAN1E8iSf+EPl4/WZPI= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 h1:KCAxk173D21tRqC4FqrTRHYhBBz+qhPrCxlrS8Z5h/I= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 h1:EofN3DqV8yHU7kvPNvpQj9ea/SL6Qvo4NXLs4c6mlaE= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 h1:Oh4B2gbNGsXeFPD4x9HHMzJ2yn1/0PDAegDuWh85pSA= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 h1:T98ib6oj63bHdUbEQB4SK8Q1HvnMYaWU5ST/mVDkToI= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 h1:njt9RKg0RehDi+AveZLNV6gWPnPv5ufGKfl050Mx54Q= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 h1:10hGLm62uQ2V2HgqCR6FV0fvgpXo5GqlL/SIJ/t4VmY= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1/go.mod h1:MM3RLtTEsfT6Wh0EhpgmzVO/HM0/NOw+E7+mnGTnyA0= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 h1:XyiPWn0CQmjmPUuHhnDjBqAuoWRCETu3pE3Z3KHPcxo= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 h1:B1XC0lIs+Yz79HgytXN/y9qVDsbhp6N424GRE9W0YqE= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 h1:/GDTCmFXcjDabg8HwfYL78BsN0cfGyd2onhRPWqDY20= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 h1:5vyVnYnC6j1kvRrWrcgq2oLaBYomFvFHUq7R/7mC4Ns= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 h1:Rnor/2Bcy8luSAFO+HBRxoLzPtxJzpLZjRle4OSyjBA= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 h1:HIYMX4qEA8IqM02eOI2ZYVyn01zhCCvJ6YpMzf+P/RM= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 h1:N4Qpd7vCNhuFQ+Wg8k9gInVpHjqLlNrEfEVgYuC/aDs= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 h1:2sY4S+HbBTb3JiIz1jW11bQ74iR2VqL+/mvEiP7iiSs= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 h1:OhsjldIlatxskIfpEXDyodi1RpV9w9aXUEit9uVLBs8= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 h1:qiCT8nQ1R67YUsp5Xmp0aK1/ggXehdu5VQ//9OYmCNQ= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 h1:XxDIaa6kzWxoQ1Hd22AQJpqhV6ySXO5ysGeI7QjVDCg= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 h1:VFBVUIvYn78TjG8Rjxvovud9KZjfVaS4qmfqAaTzJdI= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 h1:0j8ljlBmo/f5Gxva83mLWqZLB/xSO9PgJFMPfJ7tyRY= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 59288f0f9..d17e8b090 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-20230912002851-de46b7eb1272 + github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 ) @@ -24,7 +24,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect github.com/elastic/gosigar v0.14.2 // indirect - github.com/ethereum/go-ethereum v1.12.2 // indirect + github.com/ethereum/go-ethereum v1.13.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/fbiville/markdown-table-formatter v0.3.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect @@ -54,24 +54,24 @@ require ( github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/holiman/uint256 v1.2.3 // indirect - github.com/huin/goupnp v1.2.0 // indirect + 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-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 // indirect github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 // indirect github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 // indirect github.com/ipfs/boxo v0.10.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/ipfs/go-datastore v0.6.0 // indirect @@ -93,9 +93,10 @@ require ( github.com/libp2p/go-flow-metrics v0.1.0 // indirect github.com/libp2p/go-libp2p v0.30.0 // indirect github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect - github.com/libp2p/go-libp2p-kad-dht v0.25.0 // indirect + github.com/libp2p/go-libp2p-kad-dht v0.25.1 // indirect github.com/libp2p/go-libp2p-kbucket v0.6.3 // indirect github.com/libp2p/go-libp2p-record v0.2.0 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.7.2 // indirect github.com/libp2p/go-msgio v0.3.0 // indirect github.com/libp2p/go-nat v0.2.0 // indirect github.com/libp2p/go-netroute v0.2.1 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 60462f13a..6406e9333 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -96,8 +96,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.12.2 h1:eGHJ4ij7oyVqUQn48LBz3B7pvQ8sV0wGJiIE6gDq/6Y= -github.com/ethereum/go-ethereum v1.12.2/go.mod h1:1cRAEV+rp/xX0zraSCBnu9Py3HQ+geRMj3HdR+k0wfI= +github.com/ethereum/go-ethereum v1.13.0 h1:dZALM0PlDTtNITTECPiqSrFo0iEYVDfby+mSVc0LxIs= +github.com/ethereum/go-ethereum v1.13.0/go.mod h1:0TDsBNJ7j8jR01vKpk4j2zfVKyAbQuKzy6wLwb5ZMuU= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -272,47 +272,47 @@ github.com/hjson/hjson-go/v4 v4.0.0 h1:wlm6IYYqHjOdXH1gHev4VoXCaW20HdQAGCxdOEEg2 github.com/hjson/hjson-go/v4 v4.0.0/go.mod h1:KaYt3bTw3zhBjYqnXkYywcYctk0A2nxeEFTse3rH13E= github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= -github.com/huin/goupnp v1.2.0 h1:uOKW26NG1hsSSbXIZ1IR7XP9Gjd1U8pnLaCMgntmkmY= -github.com/huin/goupnp v1.2.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= 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-20230912002851-de46b7eb1272 h1:8dZqe4bnHNhwwPRi/SC/LWDdziZB/tD8xusv0vRm4wU= -github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 h1:1QqOt3NKPTagZxPuNqfjQhTsSkwvFvCsgGjgqeE784k= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 h1:XyiPWn0CQmjmPUuHhnDjBqAuoWRCETu3pE3Z3KHPcxo= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 h1:B1XC0lIs+Yz79HgytXN/y9qVDsbhp6N424GRE9W0YqE= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= 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-20230912002851-de46b7eb1272 h1:e4JydqeUSOD0XF3LEXtaARuJXHV+oxFrT24muNyllw0= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 h1:iJsFL+p/hjdypxRKdaDkIbVvrnPtaGWLdrhCzegTkfE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 h1:oqmp24gUuSRmhhUGBHG2IstBRsUv2W2sbaXc8fInWqQ= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 h1:ac84RMbrGrdFaJRwh1ve2GVOA3Z9FmXKEEo933ASexI= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 h1:fLgtC1oswHLnKBRPyTgjNC/4I8vQyZVQw1kM0OmFpg4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 h1:F7Q1Hw9syVZ7+6YW563xOcAaOAN1E8iSf+EPl4/WZPI= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 h1:KCAxk173D21tRqC4FqrTRHYhBBz+qhPrCxlrS8Z5h/I= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 h1:EofN3DqV8yHU7kvPNvpQj9ea/SL6Qvo4NXLs4c6mlaE= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 h1:Oh4B2gbNGsXeFPD4x9HHMzJ2yn1/0PDAegDuWh85pSA= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 h1:T98ib6oj63bHdUbEQB4SK8Q1HvnMYaWU5ST/mVDkToI= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 h1:njt9RKg0RehDi+AveZLNV6gWPnPv5ufGKfl050Mx54Q= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 h1:/GDTCmFXcjDabg8HwfYL78BsN0cfGyd2onhRPWqDY20= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 h1:5vyVnYnC6j1kvRrWrcgq2oLaBYomFvFHUq7R/7mC4Ns= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 h1:Rnor/2Bcy8luSAFO+HBRxoLzPtxJzpLZjRle4OSyjBA= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 h1:HIYMX4qEA8IqM02eOI2ZYVyn01zhCCvJ6YpMzf+P/RM= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 h1:N4Qpd7vCNhuFQ+Wg8k9gInVpHjqLlNrEfEVgYuC/aDs= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 h1:2sY4S+HbBTb3JiIz1jW11bQ74iR2VqL+/mvEiP7iiSs= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 h1:OhsjldIlatxskIfpEXDyodi1RpV9w9aXUEit9uVLBs8= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 h1:qiCT8nQ1R67YUsp5Xmp0aK1/ggXehdu5VQ//9OYmCNQ= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 h1:XxDIaa6kzWxoQ1Hd22AQJpqhV6ySXO5ysGeI7QjVDCg= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 h1:VFBVUIvYn78TjG8Rjxvovud9KZjfVaS4qmfqAaTzJdI= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14 h1:BkDuQxUYo9aZ4XYuh8EbXWtZBdh7WvL7oh2unWNUFMo= github.com/iotaledger/inx-app v1.0.0-rc.3.0.20230829161228-3f4eb50a4d14/go.mod h1:ADBXzdHXTldP0NB2Vf+KbhDxkYciGRjzQVXT6Rdne1g= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b h1:EPB/+iWeSx/WgJlzaXl8yjinxuD8CCOdi2ZPMLeeMVY= github.com/iotaledger/inx/go v1.0.0-rc.2.0.20230829160617-69b96c7c9f9b/go.mod h1:B7gyJP6GshCSlEmY3CxEk5TZdsMs3UNz5U92hkFDdMs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 h1:10hGLm62uQ2V2HgqCR6FV0fvgpXo5GqlL/SIJ/t4VmY= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1/go.mod h1:MM3RLtTEsfT6Wh0EhpgmzVO/HM0/NOw+E7+mnGTnyA0= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 h1:0j8ljlBmo/f5Gxva83mLWqZLB/xSO9PgJFMPfJ7tyRY= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= github.com/ipfs/boxo v0.10.0/go.mod h1:Fg+BnfxZ0RPzR0nOodzdIq3A7KgoWAOWsEIImrIQdBM= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= @@ -389,12 +389,14 @@ github.com/libp2p/go-libp2p v0.30.0 h1:9EZwFtJPFBcs/yJTnP90TpN1hgrT/EsFfM+OZuwV8 github.com/libp2p/go-libp2p v0.30.0/go.mod h1:nr2g5V7lfftwgiJ78/HrID+pwvayLyqKCEirT2Y3Byg= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= -github.com/libp2p/go-libp2p-kad-dht v0.25.0 h1:T2SXQ/VlXTQVLChWY/+OyOsmGMRJvB5kiR+eJt7jtvI= -github.com/libp2p/go-libp2p-kad-dht v0.25.0/go.mod h1:P6fz+J+u4tPigvS5J0kxQ1isksqAhmXiS/pNaEw/nFI= +github.com/libp2p/go-libp2p-kad-dht v0.25.1 h1:ofFNrf6MMEy4vi3R1VbJ7LOcTn3Csh0cDcaWHTxtWNA= +github.com/libp2p/go-libp2p-kad-dht v0.25.1/go.mod h1:6za56ncRHYXX4Nc2vn8z7CZK0P4QiMcrn77acKLM2Oo= github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= github.com/libp2p/go-libp2p-kbucket v0.6.3/go.mod h1:RCseT7AH6eJWxxk2ol03xtP9pEHetYSPXOaJnOiD8i0= github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= +github.com/libp2p/go-libp2p-routing-helpers v0.7.2 h1:xJMFyhQ3Iuqnk9Q2dYE1eUTzsah7NLw3Qs2zjUV78T0= +github.com/libp2p/go-libp2p-routing-helpers v0.7.2/go.mod h1:cN4mJAD/7zfPKXBcs9ze31JGYAZgzdABEm+q/hkswb8= github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index 4165e0356..338f5ecb4 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,12 +5,12 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 - github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 + github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 + github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 + github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 golang.org/x/crypto v0.13.0 @@ -21,7 +21,7 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/ethereum/go-ethereum v1.12.2 // indirect + github.com/ethereum/go-ethereum v1.13.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -29,15 +29,15 @@ require ( github.com/holiman/uint256 v1.2.3 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect - github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 // indirect + github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/knadh/koanf v1.5.0 // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index 4afe130e0..6d157bad0 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -54,8 +54,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum/go-ethereum v1.12.2 h1:eGHJ4ij7oyVqUQn48LBz3B7pvQ8sV0wGJiIE6gDq/6Y= -github.com/ethereum/go-ethereum v1.12.2/go.mod h1:1cRAEV+rp/xX0zraSCBnu9Py3HQ+geRMj3HdR+k0wfI= +github.com/ethereum/go-ethereum v1.13.0 h1:dZALM0PlDTtNITTECPiqSrFo0iEYVDfby+mSVc0LxIs= +github.com/ethereum/go-ethereum v1.13.0/go.mod h1:0TDsBNJ7j8jR01vKpk4j2zfVKyAbQuKzy6wLwb5ZMuU= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -157,34 +157,34 @@ 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-20230912002851-de46b7eb1272 h1:8dZqe4bnHNhwwPRi/SC/LWDdziZB/tD8xusv0vRm4wU= -github.com/iotaledger/hive.go/ads v0.0.0-20230912002851-de46b7eb1272/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272 h1:1QqOt3NKPTagZxPuNqfjQhTsSkwvFvCsgGjgqeE784k= -github.com/iotaledger/hive.go/app v0.0.0-20230912002851-de46b7eb1272/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272 h1:e4JydqeUSOD0XF3LEXtaARuJXHV+oxFrT24muNyllw0= -github.com/iotaledger/hive.go/constraints v0.0.0-20230912002851-de46b7eb1272/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272 h1:iJsFL+p/hjdypxRKdaDkIbVvrnPtaGWLdrhCzegTkfE= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912002851-de46b7eb1272/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272 h1:oqmp24gUuSRmhhUGBHG2IstBRsUv2W2sbaXc8fInWqQ= -github.com/iotaledger/hive.go/crypto v0.0.0-20230912002851-de46b7eb1272/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272 h1:ac84RMbrGrdFaJRwh1ve2GVOA3Z9FmXKEEo933ASexI= -github.com/iotaledger/hive.go/ds v0.0.0-20230912002851-de46b7eb1272/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272 h1:fLgtC1oswHLnKBRPyTgjNC/4I8vQyZVQw1kM0OmFpg4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230912002851-de46b7eb1272/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272 h1:F7Q1Hw9syVZ7+6YW563xOcAaOAN1E8iSf+EPl4/WZPI= -github.com/iotaledger/hive.go/kvstore v0.0.0-20230912002851-de46b7eb1272/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272 h1:KCAxk173D21tRqC4FqrTRHYhBBz+qhPrCxlrS8Z5h/I= -github.com/iotaledger/hive.go/lo v0.0.0-20230912002851-de46b7eb1272/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272 h1:EofN3DqV8yHU7kvPNvpQj9ea/SL6Qvo4NXLs4c6mlaE= -github.com/iotaledger/hive.go/logger v0.0.0-20230912002851-de46b7eb1272/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272 h1:Oh4B2gbNGsXeFPD4x9HHMzJ2yn1/0PDAegDuWh85pSA= -github.com/iotaledger/hive.go/runtime v0.0.0-20230912002851-de46b7eb1272/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272 h1:T98ib6oj63bHdUbEQB4SK8Q1HvnMYaWU5ST/mVDkToI= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912002851-de46b7eb1272/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272 h1:njt9RKg0RehDi+AveZLNV6gWPnPv5ufGKfl050Mx54Q= -github.com/iotaledger/hive.go/stringify v0.0.0-20230912002851-de46b7eb1272/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1 h1:10hGLm62uQ2V2HgqCR6FV0fvgpXo5GqlL/SIJ/t4VmY= -github.com/iotaledger/iota.go/v4 v4.0.0-20230829160021-46cad51e89d1/go.mod h1:MM3RLtTEsfT6Wh0EhpgmzVO/HM0/NOw+E7+mnGTnyA0= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140 h1:XyiPWn0CQmjmPUuHhnDjBqAuoWRCETu3pE3Z3KHPcxo= +github.com/iotaledger/hive.go/ads v0.0.0-20230912172434-dc477e1f5140/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140 h1:B1XC0lIs+Yz79HgytXN/y9qVDsbhp6N424GRE9W0YqE= +github.com/iotaledger/hive.go/app v0.0.0-20230912172434-dc477e1f5140/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140 h1:/GDTCmFXcjDabg8HwfYL78BsN0cfGyd2onhRPWqDY20= +github.com/iotaledger/hive.go/constraints v0.0.0-20230912172434-dc477e1f5140/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140 h1:5vyVnYnC6j1kvRrWrcgq2oLaBYomFvFHUq7R/7mC4Ns= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230912172434-dc477e1f5140/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140 h1:Rnor/2Bcy8luSAFO+HBRxoLzPtxJzpLZjRle4OSyjBA= +github.com/iotaledger/hive.go/crypto v0.0.0-20230912172434-dc477e1f5140/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140 h1:HIYMX4qEA8IqM02eOI2ZYVyn01zhCCvJ6YpMzf+P/RM= +github.com/iotaledger/hive.go/ds v0.0.0-20230912172434-dc477e1f5140/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140 h1:N4Qpd7vCNhuFQ+Wg8k9gInVpHjqLlNrEfEVgYuC/aDs= +github.com/iotaledger/hive.go/ierrors v0.0.0-20230912172434-dc477e1f5140/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140 h1:2sY4S+HbBTb3JiIz1jW11bQ74iR2VqL+/mvEiP7iiSs= +github.com/iotaledger/hive.go/kvstore v0.0.0-20230912172434-dc477e1f5140/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140 h1:OhsjldIlatxskIfpEXDyodi1RpV9w9aXUEit9uVLBs8= +github.com/iotaledger/hive.go/lo v0.0.0-20230912172434-dc477e1f5140/go.mod h1:/LERu5vqcessCqr40Wxmbx4x0bbymsK7GuL+TK/ckKo= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140 h1:qiCT8nQ1R67YUsp5Xmp0aK1/ggXehdu5VQ//9OYmCNQ= +github.com/iotaledger/hive.go/logger v0.0.0-20230912172434-dc477e1f5140/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140 h1:XxDIaa6kzWxoQ1Hd22AQJpqhV6ySXO5ysGeI7QjVDCg= +github.com/iotaledger/hive.go/runtime v0.0.0-20230912172434-dc477e1f5140/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140 h1:VFBVUIvYn78TjG8Rjxvovud9KZjfVaS4qmfqAaTzJdI= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230912172434-dc477e1f5140/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140 h1:ZGeNsbWhWzJMmomjX8UqZJ4493nZ7B4kN/wWUdnyltM= +github.com/iotaledger/hive.go/stringify v0.0.0-20230912172434-dc477e1f5140/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265 h1:0j8ljlBmo/f5Gxva83mLWqZLB/xSO9PgJFMPfJ7tyRY= +github.com/iotaledger/iota.go/v4 v4.0.0-20230912141328-810f7e83d265/go.mod h1:DWCa+mXRTGWBV0EHVuvToUxAEcICe2Pab9hBlxBamKo= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=