diff --git a/components/dashboard/explorer_routes.go b/components/dashboard/explorer_routes.go index 703e8db62..fb9c6ef6e 100644 --- a/components/dashboard/explorer_routes.go +++ b/components/dashboard/explorer_routes.go @@ -57,7 +57,7 @@ func setupExplorerRoutes(routeGroup *echo.Group) { search := c.Param("search") result := &SearchResult{} - blockID, err := iotago.SlotIdentifierFromHexString(search) + blockID, err := iotago.BlockIDFromHexString(search) if err != nil { return ierrors.Wrapf(ErrInvalidParameter, "search ID %s", search) } diff --git a/components/debugapi/blocks.go b/components/debugapi/blocks.go index 165ef6c22..f04fce315 100644 --- a/components/debugapi/blocks.go +++ b/components/debugapi/blocks.go @@ -16,7 +16,7 @@ func getSlotBlockIDs(index iotago.SlotIndex) (*BlockChangesResponse, error) { } includedBlocks := make([]string, 0) - tangleTree := ads.NewSet(mapdb.NewMapDB(), iotago.SlotIdentifier.Bytes, iotago.SlotIdentifierFromBytes) + tangleTree := ads.NewSet(mapdb.NewMapDB(), iotago.BlockID.Bytes, iotago.BlockIDFromBytes) _ = blocksForSlot.StreamKeys(func(blockID iotago.BlockID) error { includedBlocks = append(includedBlocks, blockID.String()) diff --git a/components/restapi/core/transaction.go b/components/restapi/core/transaction.go index 5c3fdbe4a..0ee22c7d4 100644 --- a/components/restapi/core/transaction.go +++ b/components/restapi/core/transaction.go @@ -14,7 +14,7 @@ import ( func blockIDByTransactionID(c echo.Context) (iotago.BlockID, error) { txID, err := httpserver.ParseTransactionIDParam(c, restapipkg.ParameterTransactionID) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(err, "failed to parse transaction ID: %s", c.Param(restapipkg.ParameterTransactionID)) + return iotago.EmptyBlockID, ierrors.Wrapf(err, "failed to parse transaction ID: %s", c.Param(restapipkg.ParameterTransactionID)) } return blockIDFromTransactionID(txID) @@ -27,7 +27,7 @@ func blockIDFromTransactionID(transactionID iotago.TransactionID) (iotago.BlockI output, err := deps.Protocol.MainEngineInstance().Ledger.Output(outputID) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(err, "failed to get output: %s", outputID.String()) + return iotago.EmptyBlockID, ierrors.Wrapf(err, "failed to get output: %s", outputID.String()) } return output.BlockID(), nil diff --git a/go.mod b/go.mod index e15fa25e3..aa05739c2 100644 --- a/go.mod +++ b/go.mod @@ -12,21 +12,21 @@ require ( 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-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d + github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e - github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 + github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231005192108-08a985c2e217 + github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231005191759-16a3636128c4 + github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c github.com/labstack/echo/v4 v4.11.1 github.com/labstack/gommon v0.4.0 github.com/libp2p/go-libp2p v0.30.0 @@ -41,7 +41,7 @@ require ( github.com/zyedidia/generic v1.2.1 go.uber.org/atomic v1.11.0 go.uber.org/dig v1.17.0 - golang.org/x/crypto v0.13.0 + golang.org/x/crypto v0.14.0 google.golang.org/grpc v1.58.2 google.golang.org/protobuf v1.31.0 ) @@ -174,7 +174,7 @@ require ( golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect diff --git a/go.sum b/go.sum index a899ff5e2..35e2e042d 100644 --- a/go.sum +++ b/go.sum @@ -277,36 +277,36 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 h1:HHxgNhbtD6WDCwSQBbPrQe8c4ZNjNi0KcgCJo0nm9bY= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729 h1:rBADf+IZDKkDOuZznwIdonxF9jcOSQJU/qOYSNInX84= -github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d h1:bZXrxulDoDBsNg0wtXowrAyltjfgZahiGYuAoS5GKU4= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d h1:pRcB0wfWAlfDJ10ZZ6LK1ukRXcPaL299LLU/zbYWnsQ= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d h1:Vn8BY/hLTcKJWh8LCw6PDTbCK2562wq93MPynV1pHjE= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 h1:hHdIZn95+HdP1JdjV8TAsuL5kU4eb4gncehyjXo/feQ= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d h1:tmaZvkBCP/OrQrwC728AEFtRAW8YUHBVNE8IXxtd4C4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b h1:OQ/4K7+2YMMuc2V7oTTpErHYWAwBw7exkQ1UdQUNH1U= +github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b h1:8FdKoB755PjCL1aHTi+2rPt9lCUS4B2wg2fNKykw5dc= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b h1:gQ+Wqg8h/LRpgX3CsmaOZYdMIBVL4fAPIrZbmA6Wn3Q= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b h1:F91AhJfeVN/XdvzUObUXa5mA38VezBZ9GHhdfQw4fVg= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b h1:KBactiBVwAvuStyE08lSFVWqMWea6wo5hOny9r3N9HA= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b h1:D07ocbgOyj2d/AGjrIuAxIaQC5SQDndiKp9UaaQwLas= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 h1:XCYvP8XwETTXF5LNz8q9X3EajDut7+UwTwqJ2TQ0TJo= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d h1:qNmg1DUvge8zPvygQEoulQjLG7gFzWKqPMJ3r7ZESm0= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= -github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729 h1:FOQetJY2scpCtCGrZQWGw3RwB3lRIDdyu+M6P1NACM4= -github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d h1:mn2Gax95UuUpuzEi4osLk+1IBjv5q56LwcxF/lAxk38= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d h1:1839CFkegKrSvTfWkgYHpH1pudehOXxX05Mzy1KSR7I= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d h1:ekHWRypoaiCXgrJVUQS7rCewsK3FuG1gTbPxu5jYn9c= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e h1:Mwoe7M6gI2DAjJIXmIskgnI8KdxCY1LyEEhtJCNYBsU= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e/go.mod h1:jhzexR5X8m6qcmrwt5OX477O/ZwT7Ak9sPT83ByPkAo= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 h1:qUf1W0fE1IyZzVy3Exv0Kj+SKECXG3S26c9m2ETb07U= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951/go.mod h1:c5778OnWpLq108YE+Eb2m8Ri/t/4ydV0TvI/Sy5YivQ= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 h1:6fuDHswgN9zTwsMuKRKNClnT+rJCojvWf3Hk8f03cvc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b h1:UnWVwiVj/BceDDL9J/nCAVRlUDVnbTsCf7PI4lWrdfU= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= +github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b h1:fYJ2yrb9cYyoLzlEIxLsdPSSufxh0Xw/AoawlGdpdU8= +github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b h1:skHzoSAI2TNmoJwgW7/aq/Il3JZ5Fa9D5d9U41oWKYg= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b h1:6anjtWbaCszD5h43psnE8lsgIM0etpjr62ZlN59t0H8= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b h1:cc9VsDzLxPAaC8fj96EA1bJxbmrEZndJV+3SmG+HHOs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231005192108-08a985c2e217 h1:DdrsW+J04ne2j6bjU1yVu+4C4CjpjGFYDEVMtmg0zyA= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231005192108-08a985c2e217/go.mod h1:OWZGwG4q2Ypd/D6LJicgdPXtw9yYkhaZEvJFhkIm2Ck= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231005191759-16a3636128c4 h1:uI+sZeZnGzAkM34JDbZBfyRIXrkkd1L0w8qVJ5rGy3E= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231005191759-16a3636128c4/go.mod h1:w+DK7WqSka5dzqztfA/l50owI4VhoxcmMAypJq6jf/M= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c h1:3gWmDG+XNtTcT4FxcID6hijCUVs3kRGhAfhdv3FiWJs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c/go.mod h1:l5yEhEf90+V0sv8kgWINTsM/O6W75bgEDHxWrIlC4AY= 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= @@ -715,8 +715,8 @@ golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= @@ -830,8 +830,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= diff --git a/pkg/blockhandler/account.go b/pkg/blockhandler/account.go index 20d33c0ee..5d71cb86b 100644 --- a/pkg/blockhandler/account.go +++ b/pkg/blockhandler/account.go @@ -57,7 +57,7 @@ func (e *Ed25519Account) PrivateKey() ed25519.PrivateKey { } func AccountFromParams(accountHex, privateKey string) Account { - accountID, err := iotago.IdentifierFromHexString(accountHex) + accountID, err := iotago.AccountIDFromHexString(accountHex) if err != nil { panic(fmt.Sprintln("invalid accountID hex string", err)) } diff --git a/pkg/blockhandler/blockissuer.go b/pkg/blockhandler/blockissuer.go index 45452d9ab..ed6c99f01 100644 --- a/pkg/blockhandler/blockissuer.go +++ b/pkg/blockhandler/blockissuer.go @@ -97,11 +97,11 @@ func (i *BlockHandler) SubmitBlockAndAwaitEvent(ctx context.Context, block *mode func (i *BlockHandler) AttachBlock(ctx context.Context, iotaBlock *iotago.ProtocolBlock) (iotago.BlockID, error) { modelBlock, err := model.BlockFromBlock(iotaBlock) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrap(err, "error serializing block to model block") + return iotago.EmptyBlockID, ierrors.Wrap(err, "error serializing block to model block") } if err = i.SubmitBlockAndAwaitEvent(ctx, modelBlock, i.protocol.Events.Engine.BlockDAG.BlockAttached); err != nil { - return iotago.EmptyBlockID(), ierrors.Wrap(err, "error issuing model block") + return iotago.EmptyBlockID, ierrors.Wrap(err, "error issuing model block") } return modelBlock.ID(), nil diff --git a/pkg/network/protocols/core/warp_sync.go b/pkg/network/protocols/core/warp_sync.go index 95f66798f..3c9648bfc 100644 --- a/pkg/network/protocols/core/warp_sync.go +++ b/pkg/network/protocols/core/warp_sync.go @@ -33,7 +33,7 @@ func (p *Protocol) SendWarpSyncResponse(id iotago.CommitmentID, blockIDs iotago. func (p *Protocol) handleWarpSyncRequest(commitmentIDBytes []byte, id peer.ID) { p.workerPool.Submit(func() { - commitmentID, _, err := iotago.SlotIdentifierFromBytes(commitmentIDBytes) + commitmentID, _, err := iotago.CommitmentIDFromBytes(commitmentIDBytes) if err != nil { p.Events.Error.Trigger(ierrors.Wrap(err, "failed to deserialize commitmentID in warp sync request"), id) @@ -46,7 +46,7 @@ func (p *Protocol) handleWarpSyncRequest(commitmentIDBytes []byte, id peer.ID) { func (p *Protocol) handleWarpSyncResponse(commitmentIDBytes []byte, blockIDsBytes []byte, merkleProofBytes []byte, id peer.ID) { p.workerPool.Submit(func() { - commitmentID, _, err := iotago.SlotIdentifierFromBytes(commitmentIDBytes) + commitmentID, _, err := iotago.CommitmentIDFromBytes(commitmentIDBytes) if err != nil { p.Events.Error.Trigger(ierrors.Wrap(err, "failed to deserialize commitmentID in warp sync response"), id) diff --git a/pkg/protocol/block_dispatcher.go b/pkg/protocol/block_dispatcher.go index a1c1bfac8..b09694b9b 100644 --- a/pkg/protocol/block_dispatcher.go +++ b/pkg/protocol/block_dispatcher.go @@ -205,7 +205,7 @@ func (b *BlockDispatcher) processWarpSyncResponse(commitmentID iotago.Commitment return ierrors.Errorf("failed to get target engine for %s", commitmentID) } - acceptedBlocks := ads.NewSet[iotago.BlockID](mapdb.NewMapDB(), iotago.BlockID.Bytes, iotago.SlotIdentifierFromBytes) + acceptedBlocks := ads.NewSet[iotago.BlockID](mapdb.NewMapDB(), iotago.BlockID.Bytes, iotago.BlockIDFromBytes) for _, blockID := range blockIDs { _ = acceptedBlocks.Add(blockID) // a mapdb can newer return an error } diff --git a/pkg/protocol/chainmanager/manager_test.go b/pkg/protocol/chainmanager/manager_test.go index ca47d5e31..21d24c997 100644 --- a/pkg/protocol/chainmanager/manager_test.go +++ b/pkg/protocol/chainmanager/manager_test.go @@ -199,7 +199,7 @@ func TestManager(t *testing.T) { } { - require.Nil(t, tf.Instance.Chain(iotago.SlotIdentifierRepresentingData(1, []byte{255, 255}))) + require.Nil(t, tf.Instance.Chain(iotago.CommitmentIDRepresentingData(1, []byte{255, 255}))) } require.Eventually(t, func() bool { @@ -279,7 +279,7 @@ func TestManagerForkDetectedAgain(t *testing.T) { } { - require.Nil(t, tf.Instance.Chain(iotago.SlotIdentifierRepresentingData(1, []byte{255, 255}))) + require.Nil(t, tf.Instance.Chain(iotago.CommitmentIDRepresentingData(1, []byte{255, 255}))) } // We now evict at 7 so that we forget about the fork we had before @@ -368,7 +368,7 @@ func TestManagerForkDetectedReorgChains(t *testing.T) { } func TestEvaluateAgainstRootCommitment(t *testing.T) { - rootCommitment := iotago.NewCommitment(tpkg.TestAPI.Version(), 1, iotago.SlotIdentifierRepresentingData(1, []byte{9}), iotago.Identifier{}, 0, 0) + rootCommitment := iotago.NewCommitment(tpkg.TestAPI.Version(), 1, iotago.CommitmentIDRepresentingData(1, []byte{9}), iotago.Identifier{}, 0, 0) modelRootCommitment, err := model.CommitmentFromCommitment(rootCommitment, tpkg.TestAPI) require.NoError(t, err) @@ -379,7 +379,7 @@ func TestEvaluateAgainstRootCommitment(t *testing.T) { m.rootCommitment.PublishCommitment(modelRootCommitment) - isBelow, isRootCommitment := m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 0, iotago.SlotIdentifierRepresentingData(0, []byte{}), iotago.Identifier{}, 0, 0)) + isBelow, isRootCommitment := m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 0, iotago.CommitmentIDRepresentingData(0, []byte{}), iotago.Identifier{}, 0, 0)) require.True(t, isBelow, "commitment with index 0 should be below root commitment") require.False(t, isRootCommitment, "commitment with index 0 should not be the root commitment") @@ -387,15 +387,15 @@ func TestEvaluateAgainstRootCommitment(t *testing.T) { require.True(t, isBelow, "commitment with index 1 should be below root commitment") require.True(t, isRootCommitment, "commitment with index 1 should be the root commitment") - isBelow, isRootCommitment = m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 1, iotago.SlotIdentifierRepresentingData(1, []byte{1}), iotago.Identifier{}, 0, 0)) + isBelow, isRootCommitment = m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 1, iotago.CommitmentIDRepresentingData(1, []byte{1}), iotago.Identifier{}, 0, 0)) require.True(t, isBelow, "commitment with index 1 should be below root commitment") require.False(t, isRootCommitment, "commitment with index 1 should be the root commitment") - isBelow, isRootCommitment = m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 1, iotago.SlotIdentifierRepresentingData(1, []byte{9}), iotago.Identifier{}, 0, 0)) + isBelow, isRootCommitment = m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 1, iotago.CommitmentIDRepresentingData(1, []byte{9}), iotago.Identifier{}, 0, 0)) require.True(t, isBelow, "commitment with index 1 should be below root commitment") require.True(t, isRootCommitment, "commitment with index 1 should be the root commitment") - isBelow, isRootCommitment = m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 2, iotago.SlotIdentifierRepresentingData(2, []byte{}), iotago.Identifier{}, 0, 0)) + isBelow, isRootCommitment = m.evaluateAgainstRootCommitment(iotago.NewCommitment(tpkg.TestAPI.Version(), 2, iotago.CommitmentIDRepresentingData(2, []byte{}), iotago.Identifier{}, 0, 0)) require.False(t, isBelow, "commitment with index 2 should not be below root commitment") require.False(t, isRootCommitment, "commitment with index 2 should not be the root commitment") } diff --git a/pkg/protocol/commitment_verifier.go b/pkg/protocol/commitment_verifier.go index f324f6373..5295a0927 100644 --- a/pkg/protocol/commitment_verifier.go +++ b/pkg/protocol/commitment_verifier.go @@ -33,8 +33,8 @@ func NewCommitmentVerifier(mainEngine *engine.Engine, lastCommonCommitmentBefore func (c *CommitmentVerifier) verifyCommitment(commitment *model.Commitment, attestations []*iotago.Attestation, merkleProof *merklehasher.Proof[iotago.Identifier]) (blockIDsFromAttestations iotago.BlockIDs, cumulativeWeight uint64, err error) { // 1. Verify that the provided attestations are indeed the ones that were included in the commitment. tree := ads.NewMap(mapdb.NewMapDB(), - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, func(attestation *iotago.Attestation) ([]byte, error) { apiForVersion, err := c.engine.APIForVersion(attestation.ProtocolVersion) if err != nil { diff --git a/pkg/protocol/engine/accounts/accountsledger/manager.go b/pkg/protocol/engine/accounts/accountsledger/manager.go index ca2f5ba8b..558ed462b 100644 --- a/pkg/protocol/engine/accounts/accountsledger/manager.go +++ b/pkg/protocol/engine/accounts/accountsledger/manager.go @@ -60,8 +60,8 @@ func New( blockBurns: shrinkingmap.New[iotago.SlotIndex, ds.Set[iotago.BlockID]](), latestSupportedVersionSignals: memstorage.NewIndexedStorage[iotago.SlotIndex, iotago.AccountID, *model.SignaledBlock](), accountsTree: ads.NewMap(accountsStore, - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, (*accounts.AccountData).Bytes, func(bytes []byte) (object *accounts.AccountData, consumed int, err error) { a := new(accounts.AccountData) diff --git a/pkg/protocol/engine/attestation/slotattestation/storage.go b/pkg/protocol/engine/attestation/slotattestation/storage.go index 75fc82b07..b14e24cd7 100644 --- a/pkg/protocol/engine/attestation/slotattestation/storage.go +++ b/pkg/protocol/engine/attestation/slotattestation/storage.go @@ -75,8 +75,8 @@ func (m *Manager) trackerStorage(index iotago.SlotIndex) (*kvstore.TypedStore[io api := m.apiProvider.APIForSlot(index) return kvstore.NewTypedStore[iotago.AccountID, *iotago.Attestation](trackerStorage, - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, func(v *iotago.Attestation) ([]byte, error) { return api.Encode(v) }, @@ -100,8 +100,8 @@ func (m *Manager) attestationsForSlot(index iotago.SlotIndex) (ads.Map[iotago.Ac } return ads.NewMap(attestationsStorage, - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, (*iotago.Attestation).Bytes, iotago.AttestationFromBytes(m.apiProvider), ), nil diff --git a/pkg/protocol/engine/attestation/slotattestation/testframework_test.go b/pkg/protocol/engine/attestation/slotattestation/testframework_test.go index 638458175..d2afee479 100644 --- a/pkg/protocol/engine/attestation/slotattestation/testframework_test.go +++ b/pkg/protocol/engine/attestation/slotattestation/testframework_test.go @@ -149,8 +149,8 @@ func (t *TestFramework) AssertCommit(slot iotago.SlotIndex, expectedCW uint64, e require.EqualValues(t.test, expectedCW, cw) expectedTree := ads.NewMap(mapdb.NewMapDB(), - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, (*iotago.Attestation).Bytes, iotago.AttestationFromBytes(t.apiProvider), ) diff --git a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go index ab301e272..134fa19af 100644 --- a/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go +++ b/pkg/protocol/engine/commitmentfilter/accountsfilter/commitmentfilter_test.go @@ -93,7 +93,7 @@ func (t *TestFramework) processBlock(alias string, block *iotago.ProtocolBlock) t.CommitmentFilter.ProcessPreFilteredBlock(blocks.NewBlock(modelBlock)) } -func (t *TestFramework) IssueSignedBlockAtSlot(alias string, slot iotago.SlotIndex, commitmentID iotago.SlotIdentifier, keyPair ed25519.KeyPair) { +func (t *TestFramework) IssueSignedBlockAtSlot(alias string, slot iotago.SlotIndex, commitmentID iotago.CommitmentID, keyPair ed25519.KeyPair) { apiForSlot := t.apiProvider.APIForSlot(slot) addr := iotago.Ed25519AddressFromPubKey(keyPair.PublicKey[:]) @@ -108,7 +108,7 @@ func (t *TestFramework) IssueSignedBlockAtSlot(alias string, slot iotago.SlotInd t.processBlock(alias, block) } -func (t *TestFramework) IssueSignedBlockAtSlotWithBurnedMana(alias string, slot iotago.SlotIndex, commitmentID iotago.SlotIdentifier, keyPair ed25519.KeyPair, burnedMana iotago.Mana) { +func (t *TestFramework) IssueSignedBlockAtSlotWithBurnedMana(alias string, slot iotago.SlotIndex, commitmentID iotago.CommitmentID, keyPair ed25519.KeyPair, burnedMana iotago.Mana) { apiForSlot := t.apiProvider.APIForSlot(slot) addr := iotago.Ed25519AddressFromPubKey(keyPair.PublicKey[:]) diff --git a/pkg/protocol/engine/consensus/blockgadget/testframework_test.go b/pkg/protocol/engine/consensus/blockgadget/testframework_test.go index a9e29c200..dacce645a 100644 --- a/pkg/protocol/engine/consensus/blockgadget/testframework_test.go +++ b/pkg/protocol/engine/consensus/blockgadget/testframework_test.go @@ -45,10 +45,10 @@ func NewTestFramework(test *testing.T) *TestFramework { evictionState := eviction.NewState(mapdb.NewMapDB(), func(slot iotago.SlotIndex) (*slotstore.Store[iotago.BlockID, iotago.CommitmentID], error) { return slotstore.NewStore(slot, mapdb.NewMapDB(), - iotago.SlotIdentifier.Bytes, - iotago.SlotIdentifierFromBytes, - iotago.SlotIdentifier.Bytes, - iotago.SlotIdentifierFromBytes, + iotago.BlockID.Bytes, + iotago.BlockIDFromBytes, + iotago.CommitmentID.Bytes, + iotago.CommitmentIDFromBytes, ), nil }) @@ -57,7 +57,7 @@ func NewTestFramework(test *testing.T) *TestFramework { t.Events = instance.Events() t.Instance = instance - genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID(), iotago.NewEmptyCommitment(tpkg.TestAPI.Version()).MustID(), time.Unix(tpkg.TestAPI.ProtocolParameters().TimeProvider().GenesisUnixTime(), 0)) + genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID, iotago.NewEmptyCommitment(tpkg.TestAPI.Version()).MustID(), time.Unix(tpkg.TestAPI.ProtocolParameters().TimeProvider().GenesisUnixTime(), 0)) t.blocks.Set("Genesis", genesisBlock) genesisBlock.ID().RegisterAlias("Genesis") evictionState.AddRootBlock(genesisBlock.ID(), genesisBlock.SlotCommitmentID()) diff --git a/pkg/protocol/engine/eviction/state.go b/pkg/protocol/engine/eviction/state.go index be5c3afda..104af2c3e 100644 --- a/pkg/protocol/engine/eviction/state.go +++ b/pkg/protocol/engine/eviction/state.go @@ -167,7 +167,7 @@ func (s *State) RootBlockCommitmentID(id iotago.BlockID) (commitmentID iotago.Co func (s *State) LatestRootBlocks() iotago.BlockIDs { rootBlocks := s.latestRootBlocks.ToSlice() if len(rootBlocks) == 0 { - return iotago.BlockIDs{iotago.EmptyBlockID()} + return iotago.BlockIDs{iotago.EmptyBlockID} } return rootBlocks @@ -237,7 +237,7 @@ func (s *State) Import(reader io.ReadSeeker) error { return ierrors.Wrapf(err, "failed to read root block id %d", i) } - rootBlockID, _, err := iotago.SlotIdentifierFromBytes(blockIDBytes) + rootBlockID, _, err := iotago.BlockIDFromBytes(blockIDBytes) if err != nil { return ierrors.Wrapf(err, "failed to parse root block id %d", i) } @@ -247,7 +247,7 @@ func (s *State) Import(reader io.ReadSeeker) error { return ierrors.Wrapf(err, "failed to read root block's %s commitment id", rootBlockID) } - commitmentID, _, err := iotago.SlotIdentifierFromBytes(commitmentIDBytes) + commitmentID, _, err := iotago.CommitmentIDFromBytes(commitmentIDBytes) if err != nil { return ierrors.Wrapf(err, "failed to parse root block's %s commitment id", rootBlockID) } diff --git a/pkg/protocol/engine/eviction/testframework_test.go b/pkg/protocol/engine/eviction/testframework_test.go index eb7b2b344..00b70e598 100644 --- a/pkg/protocol/engine/eviction/testframework_test.go +++ b/pkg/protocol/engine/eviction/testframework_test.go @@ -42,7 +42,7 @@ func (t *TestFramework) CreateAndAddRootBlock(alias string, slot iotago.SlotInde id := iotago.Identifier{} binary.LittleEndian.PutUint64(id[:], t.idCounter) - blockID := iotago.NewSlotIdentifier(slot, id) + blockID := iotago.NewBlockID(slot, id) blockID.RegisterAlias(alias) if !t.rootBlockIDs.Set(alias, blockID) { diff --git a/pkg/protocol/engine/ledger/ledger/ledger.go b/pkg/protocol/engine/ledger/ledger/ledger.go index bddd760d4..b54e385c3 100644 --- a/pkg/protocol/engine/ledger/ledger/ledger.go +++ b/pkg/protocol/engine/ledger/ledger/ledger.go @@ -42,7 +42,7 @@ type Ledger struct { commitmentLoader func(iotago.SlotIndex) (*model.Commitment, error) memPool mempool.MemPool[ledger.BlockVoteRank] conflictDAG conflictdag.ConflictDAG[iotago.TransactionID, mempool.StateID, ledger.BlockVoteRank] - retainTransactionFailure func(iotago.SlotIdentifier, error) + retainTransactionFailure func(iotago.BlockID, error) errorHandler func(error) module.Module @@ -79,9 +79,9 @@ func NewProvider() module.Provider[*engine.Engine, ledger.Ledger] { e.Events.BlockGadget.BlockPreAccepted.Hook(l.blockPreAccepted) // TODO: CHECK IF STILL NECESSARY - //e.Events.Notarization.SlotCommitted.Hook(func(scd *notarization.SlotCommittedDetails) { + // e.Events.Notarization.SlotCommitted.Hook(func(scd *notarization.SlotCommittedDetails) { // l.memPool.PublishRequestedState(scd.Commitment.Commitment()) - //}) + // }) l.TriggerConstructed() l.TriggerInitialized() @@ -114,7 +114,7 @@ func New( } } -func (l *Ledger) setRetainTransactionFailureFunc(retainTransactionFailure func(iotago.SlotIdentifier, error)) { +func (l *Ledger) setRetainTransactionFailureFunc(retainTransactionFailure func(iotago.BlockID, error)) { l.retainTransactionFailure = retainTransactionFailure } diff --git a/pkg/protocol/engine/ledger/ledger/vm.go b/pkg/protocol/engine/ledger/ledger/vm.go index 720deaeb6..fadb61a45 100644 --- a/pkg/protocol/engine/ledger/ledger/vm.go +++ b/pkg/protocol/engine/ledger/ledger/vm.go @@ -173,7 +173,7 @@ func (v *VM) Execute(executionContext context.Context, transaction mempool.Trans outputs = append(outputs, utxoledger.CreateOutput( v.ledger.apiProvider, iotago.OutputIDFromTransactionIDAndIndex(transactionID, uint16(index)), - iotago.EmptyBlockID(), + iotago.EmptyBlockID, 0, output, )) diff --git a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go b/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go index a1a0b6d96..d92132a19 100644 --- a/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go +++ b/pkg/protocol/engine/mempool/conflictdag/conflictdagv1/sorted_conflicts_test.go @@ -1,6 +1,7 @@ package conflictdagv1 import ( + "fmt" "math/rand" "strconv" "sync" @@ -207,7 +208,7 @@ func assertSortedConflictsOrder(t *testing.T, sortedConflicts SortedConflictSet, currentAlias := aliases[0] aliases = aliases[1:] - require.Equal(t, currentAlias, c.ID.String()) + require.Equal(t, fmt.Sprintf("TransactionID(%s)", currentAlias), c.ID.String()) return nil }, true)) diff --git a/pkg/protocol/engine/mempool/conflictdag/tests/accounts_framework.go b/pkg/protocol/engine/mempool/conflictdag/tests/accounts_framework.go index 6699c2661..bc54c0fc8 100644 --- a/pkg/protocol/engine/mempool/conflictdag/tests/accounts_framework.go +++ b/pkg/protocol/engine/mempool/conflictdag/tests/accounts_framework.go @@ -71,7 +71,7 @@ func (f *AccountsTestFramework) CreateID(alias string) iotago.AccountID { } hashedAlias := blake2b.Sum256([]byte(alias)) - validatorID := iotago.IdentifierFromData(hashedAlias[:]) + validatorID := iotago.AccountIDFromData(hashedAlias[:]) validatorID.RegisterAlias(alias) f.Instance.Set(validatorID, &account.Pool{}) // we don't care about pools when doing PoA diff --git a/pkg/protocol/engine/mempool/tests/testframework.go b/pkg/protocol/engine/mempool/tests/testframework.go index 71976e432..b929cf4c1 100644 --- a/pkg/protocol/engine/mempool/tests/testframework.go +++ b/pkg/protocol/engine/mempool/tests/testframework.go @@ -132,7 +132,7 @@ func (t *TestFramework) AttachTransaction(signedTransactionAlias, transactionAli transaction, transactionExists := t.transactionByAlias[transactionAlias] require.True(t.test, transactionExists, "transaction with alias '%s' does not exist", transactionAlias) - t.blockIDsByAlias[blockAlias] = iotago.SlotIdentifierRepresentingData(slot, []byte(blockAlias)) + t.blockIDsByAlias[blockAlias] = iotago.BlockIDRepresentingData(slot, []byte(blockAlias)) t.blockIDsByAlias[blockAlias].RegisterAlias(blockAlias) if _, err := t.Instance.AttachSignedTransaction(signedTransaction, transaction, t.blockIDsByAlias[blockAlias]); err != nil { diff --git a/pkg/protocol/engine/mempool/v1/transaction_metadata_test.go b/pkg/protocol/engine/mempool/v1/transaction_metadata_test.go index 988bbb42f..ce592069d 100644 --- a/pkg/protocol/engine/mempool/v1/transaction_metadata_test.go +++ b/pkg/protocol/engine/mempool/v1/transaction_metadata_test.go @@ -11,8 +11,8 @@ import ( func TestAttachments(t *testing.T) { blockIDs := map[string]iotago.BlockID{ - "1": iotago.SlotIdentifierRepresentingData(1, []byte("block1")), - "2": iotago.SlotIdentifierRepresentingData(2, []byte("block2")), + "1": iotago.BlockIDRepresentingData(1, []byte("block1")), + "2": iotago.BlockIDRepresentingData(2, []byte("block2")), } transactionMetadata, err := NewTransactionMetadata(mempooltests.NewTransaction(2), nil) diff --git a/pkg/protocol/engine/notarization/slotnotarization/slotmutations.go b/pkg/protocol/engine/notarization/slotnotarization/slotmutations.go index 0ea422731..cc667add0 100644 --- a/pkg/protocol/engine/notarization/slotnotarization/slotmutations.go +++ b/pkg/protocol/engine/notarization/slotnotarization/slotmutations.go @@ -75,8 +75,8 @@ func (m *SlotMutations) Reset(index iotago.SlotIndex) { // AcceptedBlocks returns the set of accepted blocks for the given slot. func (m *SlotMutations) AcceptedBlocks(index iotago.SlotIndex, createIfMissing ...bool) ads.Set[iotago.BlockID] { if len(createIfMissing) > 0 && createIfMissing[0] { - return lo.Return1(m.acceptedBlocksBySlot.GetOrCreate(index, func() ads.Set[iotago.SlotIdentifier] { - return ads.NewSet(mapdb.NewMapDB(), iotago.SlotIdentifier.Bytes, iotago.SlotIdentifierFromBytes) + return lo.Return1(m.acceptedBlocksBySlot.GetOrCreate(index, func() ads.Set[iotago.BlockID] { + return ads.NewSet(mapdb.NewMapDB(), iotago.BlockID.Bytes, iotago.BlockIDFromBytes) })) } diff --git a/pkg/protocol/engine/tipmanager/tests/testframework.go b/pkg/protocol/engine/tipmanager/tests/testframework.go index 8f6a74118..7b67a1524 100644 --- a/pkg/protocol/engine/tipmanager/tests/testframework.go +++ b/pkg/protocol/engine/tipmanager/tests/testframework.go @@ -37,7 +37,7 @@ func NewTestFramework(test *testing.T) *TestFramework { API: tpkg.TestAPI, } - t.blockIDsByAlias["Genesis"] = iotago.EmptyBlockID() + t.blockIDsByAlias["Genesis"] = iotago.EmptyBlockID t.Instance = tipmanagerv1.New(func(blockID iotago.BlockID) (block *blocks.Block, exists bool) { block, exists = t.blocksByID[blockID] diff --git a/pkg/protocol/engine/tipselection/v1/test_framework_test.go b/pkg/protocol/engine/tipselection/v1/test_framework_test.go index 1e42f8cf6..12f9f4725 100644 --- a/pkg/protocol/engine/tipselection/v1/test_framework_test.go +++ b/pkg/protocol/engine/tipselection/v1/test_framework_test.go @@ -42,7 +42,7 @@ func NewTestFramework(test *testing.T, opts ...options.Option[TestFramework]) *T } rootBlocksRetriever := func() iotago.BlockIDs { - return iotago.BlockIDs{iotago.EmptyBlockID()} + return iotago.BlockIDs{iotago.EmptyBlockID} } t.TipManager = tipmanagertests.NewTestFramework(test) diff --git a/pkg/protocol/engine/utxoledger/marshalutils_helper.go b/pkg/protocol/engine/utxoledger/marshalutils_helper.go index f322b2f67..b19e747fc 100644 --- a/pkg/protocol/engine/utxoledger/marshalutils_helper.go +++ b/pkg/protocol/engine/utxoledger/marshalutils_helper.go @@ -9,16 +9,16 @@ import ( func ParseOutputID(ms *marshalutil.MarshalUtil) (iotago.OutputID, error) { bytes, err := ms.ReadBytes(iotago.OutputIDLength) if err != nil { - return iotago.OutputID{}, err + return iotago.EmptyOutputID, err } return iotago.OutputID(bytes), nil } func parseTransactionID(ms *marshalutil.MarshalUtil) (iotago.TransactionID, error) { - bytes, err := ms.ReadBytes(iotago.SlotIdentifierLength) + bytes, err := ms.ReadBytes(iotago.TransactionIDLength) if err != nil { - return iotago.TransactionID{}, err + return iotago.EmptyTransactionID, err } return iotago.TransactionID(bytes), nil @@ -27,7 +27,7 @@ func parseTransactionID(ms *marshalutil.MarshalUtil) (iotago.TransactionID, erro func ParseBlockID(ms *marshalutil.MarshalUtil) (iotago.BlockID, error) { bytes, err := ms.ReadBytes(iotago.BlockIDLength) if err != nil { - return iotago.EmptyBlockID(), err + return iotago.EmptyBlockID, err } return iotago.BlockID(bytes), nil diff --git a/pkg/protocol/engine/utxoledger/output.go b/pkg/protocol/engine/utxoledger/output.go index 285daf29c..b26ff1f22 100644 --- a/pkg/protocol/engine/utxoledger/output.go +++ b/pkg/protocol/engine/utxoledger/output.go @@ -171,7 +171,7 @@ func (o *Output) KVStorableKey() (key []byte) { func (o *Output) KVStorableValue() (value []byte) { ms := marshalutil.New() - ms.WriteBytes(o.blockID[:]) // SlotIdentifierLength bytes + ms.WriteBytes(o.blockID[:]) // BlockIDLength bytes ms.WriteBytes(o.slotBooked.MustBytes()) // 4 bytes ms.WriteBytes(o.encodedOutput) diff --git a/pkg/protocol/engine/utxoledger/output_test.go b/pkg/protocol/engine/utxoledger/output_test.go index 46fd99ab6..e423180c3 100644 --- a/pkg/protocol/engine/utxoledger/output_test.go +++ b/pkg/protocol/engine/utxoledger/output_test.go @@ -86,9 +86,9 @@ func CreateOutputAndAssertSerialization(t *testing.T, blockID iotago.BlockID, in require.Equal(t, byteutils.ConcatBytes([]byte{utxoledger.StoreKeyPrefixOutput}, outputID[:]), output.KVStorableKey()) value := output.KVStorableValue() - require.Equal(t, blockID[:], value[:iotago.SlotIdentifierLength]) - require.Equal(t, indexBooked, lo.PanicOnErr(lo.DropCount(iotago.SlotIndexFromBytes(value[iotago.SlotIdentifierLength:iotago.SlotIdentifierLength+iotago.SlotIndexLength])))) - require.Equal(t, outputBytes, value[iotago.SlotIdentifierLength+iotago.SlotIndexLength:]) + require.Equal(t, blockID[:], value[:iotago.BlockIDLength]) + require.Equal(t, indexBooked, lo.PanicOnErr(lo.DropCount(iotago.SlotIndexFromBytes(value[iotago.BlockIDLength:iotago.BlockIDLength+iotago.SlotIndexLength])))) + require.Equal(t, outputBytes, value[iotago.BlockIDLength+iotago.SlotIndexLength:]) return output } diff --git a/pkg/protocol/engine/utxoledger/snapshot_test.go b/pkg/protocol/engine/utxoledger/snapshot_test.go index 935860ef5..46875cfa3 100644 --- a/pkg/protocol/engine/utxoledger/snapshot_test.go +++ b/pkg/protocol/engine/utxoledger/snapshot_test.go @@ -32,10 +32,10 @@ func TestOutput_SnapshotBytes(t *testing.T) { snapshotBytes := output.SnapshotBytes() require.Equal(t, outputID[:], snapshotBytes[:iotago.OutputIDLength], "outputID not equal") - require.Equal(t, blockID[:], snapshotBytes[iotago.OutputIDLength:iotago.OutputIDLength+iotago.SlotIdentifierLength], "blockID not equal") - require.Equal(t, slotBooked, lo.Return1(iotago.SlotIndexFromBytes(snapshotBytes[iotago.OutputIDLength+iotago.SlotIdentifierLength:iotago.OutputIDLength+iotago.SlotIdentifierLength+iotago.SlotIndexLength])), "slotBooked not equal") - require.Equal(t, uint32(len(iotaOutputBytes)), binary.LittleEndian.Uint32(snapshotBytes[iotago.OutputIDLength+iotago.SlotIdentifierLength+iotago.SlotIndexLength:iotago.OutputIDLength+iotago.SlotIdentifierLength+iotago.SlotIndexLength+4]), "output bytes length") - require.Equal(t, iotaOutputBytes, snapshotBytes[iotago.OutputIDLength+iotago.SlotIdentifierLength+iotago.SlotIndexLength+4:], "output bytes not equal") + require.Equal(t, blockID[:], snapshotBytes[iotago.OutputIDLength:iotago.OutputIDLength+iotago.BlockIDLength], "blockID not equal") + require.Equal(t, slotBooked, lo.Return1(iotago.SlotIndexFromBytes(snapshotBytes[iotago.OutputIDLength+iotago.BlockIDLength:iotago.OutputIDLength+iotago.BlockIDLength+iotago.SlotIndexLength])), "slotBooked not equal") + require.Equal(t, uint32(len(iotaOutputBytes)), binary.LittleEndian.Uint32(snapshotBytes[iotago.OutputIDLength+iotago.BlockIDLength+iotago.SlotIndexLength:iotago.OutputIDLength+iotago.BlockIDLength+iotago.SlotIndexLength+4]), "output bytes length") + require.Equal(t, iotaOutputBytes, snapshotBytes[iotago.OutputIDLength+iotago.BlockIDLength+iotago.SlotIndexLength+4:], "output bytes not equal") } func TestOutputFromSnapshotReader(t *testing.T) { diff --git a/pkg/protocol/engine/utxoledger/spent.go b/pkg/protocol/engine/utxoledger/spent.go index 5db9dceff..dfdc0086d 100644 --- a/pkg/protocol/engine/utxoledger/spent.go +++ b/pkg/protocol/engine/utxoledger/spent.go @@ -96,8 +96,8 @@ func (s *Spent) KVStorableKey() (key []byte) { } func (s *Spent) KVStorableValue() (value []byte) { - ms := marshalutil.New(iotago.SlotIdentifierLength + iotago.SlotIndexLength) - ms.WriteBytes(s.transactionIDSpent[:]) // iotago.SlotIdentifierLength bytes + ms := marshalutil.New(iotago.TransactionIDLength + iotago.SlotIndexLength) + ms.WriteBytes(s.transactionIDSpent[:]) // iotago.TransactionIDLength bytes ms.WriteBytes(s.slotSpent.MustBytes()) // iotago.SlotIndexLength bytes return ms.Bytes() diff --git a/pkg/protocol/snapshotcreator/snapshotcreator.go b/pkg/protocol/snapshotcreator/snapshotcreator.go index e470bed35..f391ad8de 100644 --- a/pkg/protocol/snapshotcreator/snapshotcreator.go +++ b/pkg/protocol/snapshotcreator/snapshotcreator.go @@ -140,7 +140,7 @@ func createGenesisOutput(genesisTokenAmount iotago.BaseToken, genesisSeed []byte } // Genesis output is on Genesis TX index 0 - if err := engineInstance.Ledger.AddGenesisUnspentOutput(utxoledger.CreateOutput(engineInstance, iotago.OutputIDFromTransactionIDAndIndex(GenesisTransactionID, 0), iotago.EmptyBlockID(), 0, output)); err != nil { + if err := engineInstance.Ledger.AddGenesisUnspentOutput(utxoledger.CreateOutput(engineInstance, iotago.OutputIDFromTransactionIDAndIndex(GenesisTransactionID, 0), iotago.EmptyBlockID, 0, output)); err != nil { return err } } @@ -157,7 +157,7 @@ func createGenesisAccounts(accounts []AccountDetails, engineInstance *engine.Eng return ierrors.Wrapf(err, "min rent not covered by account output with index %d", idx+1) } - accountOutput := utxoledger.CreateOutput(engineInstance, iotago.OutputIDFromTransactionIDAndIndex(GenesisTransactionID, uint16(idx+1)), iotago.EmptyBlockID(), 0, output) + accountOutput := utxoledger.CreateOutput(engineInstance, iotago.OutputIDFromTransactionIDAndIndex(GenesisTransactionID, uint16(idx+1)), iotago.EmptyBlockID, 0, output) if err := engineInstance.Ledger.AddGenesisUnspentOutput(accountOutput); err != nil { return err } diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go index 87e0bdb29..287fa5ec1 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/rewards.go @@ -195,8 +195,8 @@ func (t *Tracker) rewardsMap(epoch iotago.EpochIndex) (ads.Map[iotago.AccountID, } return ads.NewMap(kv, - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, (*model.PoolRewards).Bytes, model.PoolRewardsFromBytes, ), nil diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go index 9bc144690..16d5dfa63 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/performance/testsuite_test.go @@ -59,8 +59,8 @@ func (t *TestSuite) InitPerformanceTracker() { } p := slotstore.NewStore(slot, prunableStores[slot], - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, func(s *model.ValidatorPerformance) ([]byte, error) { return s.Bytes(t.api) }, diff --git a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go index 8d7b310e0..3c9c1af8b 100644 --- a/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go +++ b/pkg/protocol/sybilprotection/sybilprotectionv1/sybilprotection.go @@ -195,15 +195,15 @@ func (o *SybilProtection) committeeRoot(targetCommitteeEpoch iotago.EpochIndex) return iotago.Identifier{}, ierrors.Wrapf(err, "committee for a finished epoch %d not found", targetCommitteeEpoch) } - comitteeTree := ads.NewSet( + committeeTree := ads.NewSet( mapdb.NewMapDB(), iotago.AccountID.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountIDFromBytes, ) var innerErr error committee.ForEach(func(accountID iotago.AccountID, _ *account.Pool) bool { - if err := comitteeTree.Add(accountID); err != nil { + if err := committeeTree.Add(accountID); err != nil { innerErr = ierrors.Wrapf(err, "failed to add account %s to committee tree", accountID) return false } @@ -214,7 +214,7 @@ func (o *SybilProtection) committeeRoot(targetCommitteeEpoch iotago.EpochIndex) return iotago.Identifier{}, innerErr } - return iotago.Identifier(comitteeTree.Root()), nil + return iotago.Identifier(committeeTree.Root()), nil } func (o *SybilProtection) SeatManager() seatmanager.SeatManager { diff --git a/pkg/storage/prunable/prunable_slot.go b/pkg/storage/prunable/prunable_slot.go index 337c7f1b4..9bf7870a6 100644 --- a/pkg/storage/prunable/prunable_slot.go +++ b/pkg/storage/prunable/prunable_slot.go @@ -44,9 +44,10 @@ func (p *Prunable) RootBlocks(slot iotago.SlotIndex) (*slotstore.Store[iotago.Bl } return slotstore.NewStore(slot, kv, - iotago.SlotIdentifier.Bytes, - iotago.SlotIdentifierFromBytes, - iotago.SlotIdentifier.Bytes, iotago.SlotIdentifierFromBytes, + iotago.BlockID.Bytes, + iotago.BlockIDFromBytes, + iotago.CommitmentID.Bytes, + iotago.CommitmentIDFromBytes, ), nil } @@ -72,8 +73,8 @@ func (p *Prunable) ValidatorPerformances(slot iotago.SlotIndex) (*slotstore.Stor apiForSlot := p.apiProvider.APIForSlot(slot) return slotstore.NewStore(slot, kv, - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, func(s *model.ValidatorPerformance) ([]byte, error) { return s.Bytes(apiForSlot) }, @@ -121,7 +122,7 @@ func (p *Prunable) Roots(slot iotago.SlotIndex) (*slotstore.Store[iotago.Commitm return slotstore.NewStore(slot, kv, iotago.CommitmentID.Bytes, - iotago.SlotIdentifierFromBytes, + iotago.CommitmentIDFromBytes, rootsBytes, rootsFromBytes, ), nil diff --git a/pkg/storage/prunable/slotstore/accountdiffs.go b/pkg/storage/prunable/slotstore/accountdiffs.go index 8ad401b69..8aa889fa4 100644 --- a/pkg/storage/prunable/slotstore/accountdiffs.go +++ b/pkg/storage/prunable/slotstore/accountdiffs.go @@ -28,8 +28,8 @@ func NewAccountDiffs(slot iotago.SlotIndex, store kvstore.KVStore, api iotago.AP api: api, slot: slot, diffChangeStore: kvstore.NewTypedStore[iotago.AccountID, *model.AccountDiff](lo.PanicOnErr(store.WithExtendedRealm(kvstore.Realm{diffChangePrefix})), - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, (*model.AccountDiff).Bytes, func(bytes []byte) (object *model.AccountDiff, consumed int, err error) { diff := new(model.AccountDiff) @@ -38,8 +38,8 @@ func NewAccountDiffs(slot iotago.SlotIndex, store kvstore.KVStore, api iotago.AP return diff, n, err }), destroyedAccounts: kvstore.NewTypedStore[iotago.AccountID, types.Empty](lo.PanicOnErr(store.WithExtendedRealm(kvstore.Realm{destroyedAccountsPrefix})), - iotago.Identifier.Bytes, - iotago.IdentifierFromBytes, + iotago.AccountID.Bytes, + iotago.AccountIDFromBytes, types.Empty.Bytes, func(bytes []byte) (object types.Empty, consumed int, err error) { return types.Void, 0, nil diff --git a/pkg/storage/prunable/slotstore/blocks.go b/pkg/storage/prunable/slotstore/blocks.go index f752742a5..caa53218c 100644 --- a/pkg/storage/prunable/slotstore/blocks.go +++ b/pkg/storage/prunable/slotstore/blocks.go @@ -49,7 +49,7 @@ func (b *Blocks) StreamKeys(consumer func(blockID iotago.BlockID) error) error { var innerErr error if err := b.store.IterateKeys(kvstore.EmptyPrefix, func(key kvstore.Key) bool { var blockID iotago.BlockID - blockID, _, innerErr = iotago.SlotIdentifierFromBytes(key) + blockID, _, innerErr = iotago.BlockIDFromBytes(key) if innerErr != nil { return false } @@ -70,7 +70,7 @@ func (b *Blocks) ForEachBlockInSlot(consumer func(block *model.Block) error) err var innerErr error if err := b.store.Iterate(kvstore.EmptyPrefix, func(key kvstore.Key, value kvstore.Value) bool { var id iotago.BlockID - id, _, innerErr = iotago.SlotIdentifierFromBytes(key) + id, _, innerErr = iotago.BlockIDFromBytes(key) var block *model.Block block, innerErr = model.BlockFromIDAndBytes(id, value, b.apiForSlot) diff --git a/pkg/storage/prunable/slotstore/retainer.go b/pkg/storage/prunable/slotstore/retainer.go index 89572f4fd..27a46c5d3 100644 --- a/pkg/storage/prunable/slotstore/retainer.go +++ b/pkg/storage/prunable/slotstore/retainer.go @@ -85,8 +85,8 @@ func NewRetainer(slot iotago.SlotIndex, store kvstore.KVStore) (newRetainer *Ret return &Retainer{ slot: slot, blockStore: kvstore.NewTypedStore(lo.PanicOnErr(store.WithExtendedRealm(kvstore.Realm{blockStorePrefix})), - iotago.SlotIdentifier.Bytes, - iotago.SlotIdentifierFromBytes, + iotago.BlockID.Bytes, + iotago.BlockIDFromBytes, (*BlockRetainerData).Bytes, func(bytes []byte) (*BlockRetainerData, int, error) { b := new(BlockRetainerData) @@ -96,8 +96,8 @@ func NewRetainer(slot iotago.SlotIndex, store kvstore.KVStore) (newRetainer *Ret }, ), transactionStore: kvstore.NewTypedStore(lo.PanicOnErr(store.WithExtendedRealm(kvstore.Realm{transactionStorePrefix})), - iotago.SlotIdentifier.Bytes, - iotago.SlotIdentifierFromBytes, + iotago.BlockID.Bytes, + iotago.BlockIDFromBytes, (*TransactionRetainerData).Bytes, func(bytes []byte) (*TransactionRetainerData, int, error) { t := new(TransactionRetainerData) diff --git a/pkg/storage/testframework_test.go b/pkg/storage/testframework_test.go index e6eea9d8f..c88a32ff2 100644 --- a/pkg/storage/testframework_test.go +++ b/pkg/storage/testframework_test.go @@ -107,7 +107,7 @@ func (t *TestFramework) GeneratePrunableData(epoch iotago.EpochIndex, size int64 require.NoError(t.t, err) createdBytes += int64(len(modelBlock.Data())) - createdBytes += iotago.SlotIdentifierLength + createdBytes += iotago.BlockIDLength } t.Instance.Flush() diff --git a/pkg/testsuite/blocks.go b/pkg/testsuite/blocks.go index 5f80a46a3..2d5c3d817 100644 --- a/pkg/testsuite/blocks.go +++ b/pkg/testsuite/blocks.go @@ -39,7 +39,7 @@ func (t *TestSuite) AssertBlocksExist(blocks []*blocks.Block, expectedExist bool for _, node := range nodes { for _, block := range blocks { - if block.ID() == iotago.EmptyBlockID() { + if block.ID() == iotago.EmptyBlockID { continue } diff --git a/pkg/testsuite/mock/account.go b/pkg/testsuite/mock/account.go index aac2de2a1..7e716eb27 100644 --- a/pkg/testsuite/mock/account.go +++ b/pkg/testsuite/mock/account.go @@ -57,7 +57,7 @@ func (e *Ed25519Account) PrivateKey() ed25519.PrivateKey { } func AccountFromParams(accountHex, privateKey string) Account { - accountID, err := iotago.IdentifierFromHexString(accountHex) + accountID, err := iotago.AccountIDFromHexString(accountHex) if err != nil { panic(fmt.Sprintln("invalid accountID hex string", err)) } diff --git a/pkg/testsuite/mock/blockissuer.go b/pkg/testsuite/mock/blockissuer.go index 86a48a75c..4e284eb22 100644 --- a/pkg/testsuite/mock/blockissuer.go +++ b/pkg/testsuite/mock/blockissuer.go @@ -325,7 +325,7 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco apiForVesion, err := node.Protocol.APIForVersion(iotaBlock.ProtocolVersion) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(ErrBlockAttacherInvalidBlock, "protocolVersion invalid: %d", iotaBlock.ProtocolVersion) + return iotago.EmptyBlockID, ierrors.Wrapf(ErrBlockAttacherInvalidBlock, "protocolVersion invalid: %d", iotaBlock.ProtocolVersion) } protoParams := apiForVesion.ProtocolParameters() @@ -346,14 +346,14 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco switch payload := innerBlock.Payload.(type) { case *iotago.SignedTransaction: if payload.Transaction.NetworkID != protoParams.NetworkID() { - return iotago.EmptyBlockID(), ierrors.Wrapf(ErrBlockAttacherInvalidBlock, "invalid payload, error: wrong networkID: %d", payload.Transaction.NetworkID) + return iotago.EmptyBlockID, ierrors.Wrapf(ErrBlockAttacherInvalidBlock, "invalid payload, error: wrong networkID: %d", payload.Transaction.NetworkID) } } if len(iotaBlock.Parents()) == 0 { references, referencesErr := i.getReferences(ctx, innerBlock.Payload, node) if referencesErr != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(ErrBlockAttacherAttachingNotPossible, "tipselection failed, error: %w", referencesErr) + return iotago.EmptyBlockID, ierrors.Wrapf(ErrBlockAttacherAttachingNotPossible, "tipselection failed, error: %w", referencesErr) } innerBlock.StrongParents = references[iotago.StrongParentType] @@ -379,7 +379,7 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco } if err = i.validateReferences(iotaBlock.IssuingTime, iotaBlock.SlotCommitmentID.Slot(), references, node); err != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(ErrBlockAttacherAttachingNotPossible, "invalid block references, error: %w", err) + return iotago.EmptyBlockID, ierrors.Wrapf(ErrBlockAttacherAttachingNotPossible, "invalid block references, error: %w", err) } if basicBlock, isBasicBlock := iotaBlock.Block.(*iotago.BasicBlock); isBasicBlock && basicBlock.MaxBurnedMana == 0 { @@ -389,13 +389,13 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco } rmc, err := node.Protocol.MainEngineInstance().Ledger.RMCManager().RMC(rmcSlot) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(err, "error loading commitment of slot %d from storage to get RMC", rmcSlot) + return iotago.EmptyBlockID, ierrors.Wrapf(err, "error loading commitment of slot %d from storage to get RMC", rmcSlot) } // only set the burned Mana as the last step before signing, so workscore calculation is correct. basicBlock.MaxBurnedMana, err = basicBlock.ManaCost(rmc, apiForVesion.ProtocolParameters().WorkScoreStructure()) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(err, "could not calculate Mana cost for block") + return iotago.EmptyBlockID, ierrors.Wrapf(err, "could not calculate Mana cost for block") } resign = true } @@ -407,30 +407,30 @@ func (i *BlockIssuer) AttachBlock(ctx context.Context, iotaBlock *iotago.Protoco signature, signatureErr := iotaBlock.Sign(iotago.NewAddressKeysForEd25519Address(issuerAccount.Address().(*iotago.Ed25519Address), issuerAccount.PrivateKey())) if signatureErr != nil { - return iotago.EmptyBlockID(), ierrors.Wrapf(ErrBlockAttacherInvalidBlock, "%w", signatureErr) + return iotago.EmptyBlockID, ierrors.Wrapf(ErrBlockAttacherInvalidBlock, "%w", signatureErr) } edSig, isEdSig := signature.(*iotago.Ed25519Signature) if !isEdSig { - return iotago.EmptyBlockID(), ierrors.Wrap(ErrBlockAttacherInvalidBlock, "unsupported signature type") + return iotago.EmptyBlockID, ierrors.Wrap(ErrBlockAttacherInvalidBlock, "unsupported signature type") } iotaBlock.Signature = edSig } else { - return iotago.EmptyBlockID(), ierrors.Wrap(ErrBlockAttacherIncompleteBlockNotAllowed, "signature needed") + return iotago.EmptyBlockID, ierrors.Wrap(ErrBlockAttacherIncompleteBlockNotAllowed, "signature needed") } } modelBlock, err := model.BlockFromBlock(iotaBlock) if err != nil { - return iotago.EmptyBlockID(), ierrors.Wrap(err, "error serializing block to model block") + return iotago.EmptyBlockID, ierrors.Wrap(err, "error serializing block to model block") } if !i.optsRateSetterEnabled || node.Protocol.MainEngineInstance().Scheduler.IsBlockIssuerReady(modelBlock.ProtocolBlock().IssuerID) { i.events.BlockConstructed.Trigger(modelBlock) if err = i.IssueBlockAndAwaitEvent(ctx, modelBlock, node, node.Protocol.Events.Engine.BlockDAG.BlockAttached); err != nil { - return iotago.EmptyBlockID(), ierrors.Wrap(err, "error issuing model block") + return iotago.EmptyBlockID, ierrors.Wrap(err, "error issuing model block") } } diff --git a/pkg/testsuite/testsuite.go b/pkg/testsuite/testsuite.go index 5b61e8afb..5e50bef92 100644 --- a/pkg/testsuite/testsuite.go +++ b/pkg/testsuite/testsuite.go @@ -144,7 +144,7 @@ func NewTestSuite(testingT *testing.T, opts ...options.Option[TestSuite]) *TestS ), ) - genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID(), iotago.NewEmptyCommitment(t.API.ProtocolParameters().Version()).MustID(), time.Unix(t.API.ProtocolParameters().TimeProvider().GenesisUnixTime(), 0)) + genesisBlock := blocks.NewRootBlock(iotago.EmptyBlockID, iotago.NewEmptyCommitment(t.API.ProtocolParameters().Version()).MustID(), time.Unix(t.API.ProtocolParameters().TimeProvider().GenesisUnixTime(), 0)) t.RegisterBlock("Genesis", genesisBlock) t.snapshotPath = t.Directory.Path("genesis_snapshot.bin") @@ -153,7 +153,7 @@ func NewTestSuite(testingT *testing.T, opts ...options.Option[TestSuite]) *TestS snapshotcreator.WithFilePath(t.snapshotPath), snapshotcreator.WithProtocolParameters(t.API.ProtocolParameters()), snapshotcreator.WithRootBlocks(map[iotago.BlockID]iotago.CommitmentID{ - iotago.EmptyBlockID(): iotago.NewEmptyCommitment(t.API.ProtocolParameters().Version()).MustID(), + iotago.EmptyBlockID: iotago.NewEmptyCommitment(t.API.ProtocolParameters().Version()).MustID(), }), } t.optsSnapshotOptions = append(defaultSnapshotOptions, t.optsSnapshotOptions...) diff --git a/pkg/testsuite/transactions_framework.go b/pkg/testsuite/transactions_framework.go index e917e7d33..920912741 100644 --- a/pkg/testsuite/transactions_framework.go +++ b/pkg/testsuite/transactions_framework.go @@ -63,12 +63,12 @@ func (t *TransactionFramework) RegisterTransaction(alias string, transaction *io clonedOutput := output.Clone() actualOutputID := iotago.OutputIDFromTransactionIDAndIndex(lo.PanicOnErr(transaction.ID()), outputID.Index()) if clonedOutput.Type() == iotago.OutputAccount { - if accountOutput, ok := clonedOutput.(*iotago.AccountOutput); ok && accountOutput.AccountID == iotago.EmptyAccountID() { + if accountOutput, ok := clonedOutput.(*iotago.AccountOutput); ok && accountOutput.AccountID == iotago.EmptyAccountID { accountOutput.AccountID = iotago.AccountIDFromOutputID(actualOutputID) } } - t.states[fmt.Sprintf("%s:%d", alias, outputID.Index())] = utxoledger.CreateOutput(t.apiProvider, actualOutputID, iotago.EmptyBlockID(), currentAPI.TimeProvider().SlotFromTime(time.Now()), clonedOutput) + t.states[fmt.Sprintf("%s:%d", alias, outputID.Index())] = utxoledger.CreateOutput(t.apiProvider, actualOutputID, iotago.EmptyBlockID, currentAPI.TimeProvider().SlotFromTime(time.Now()), clonedOutput) } } @@ -242,7 +242,7 @@ func (t *TransactionFramework) CreateDelegationFromInput(inputAlias string, opts DelegatedAmount(input.BaseTokenAmount()), opts).MustBuild() - if delegationOutput.ValidatorAddress.AccountID() == iotago.EmptyAccountID() || + if delegationOutput.ValidatorAddress.AccountID() == iotago.EmptyAccountID || delegationOutput.DelegatedAmount == 0 || delegationOutput.StartEpoch == 0 { panic(fmt.Sprintf("delegation output created incorrectly %+v", delegationOutput)) diff --git a/pkg/utils/rand.go b/pkg/utils/rand.go index e374513b8..5c8743982 100644 --- a/pkg/utils/rand.go +++ b/pkg/utils/rand.go @@ -79,12 +79,12 @@ func RandOutputID(index ...uint16) iotago.OutputID { } var outputID iotago.OutputID - _, err := RandomRead(outputID[:iotago.SlotIdentifierLength]) + _, err := RandomRead(outputID[:iotago.TransactionIDLength]) if err != nil { panic(err) } - binary.LittleEndian.PutUint16(outputID[iotago.SlotIdentifierLength:], idx) + binary.LittleEndian.PutUint16(outputID[iotago.TransactionIDLength:], idx) return outputID } @@ -98,7 +98,7 @@ func RandBlockID() iotago.BlockID { func RandTransactionID() iotago.TransactionID { transactionID := iotago.TransactionID{} - copy(transactionID[:], RandBytes(iotago.SlotIdentifierLength)) + copy(transactionID[:], RandBytes(iotago.TransactionIDLength)) return transactionID } diff --git a/tools/evil-spammer/basic.go b/tools/evil-spammer/basic.go index f04af73a7..222af823c 100644 --- a/tools/evil-spammer/basic.go +++ b/tools/evil-spammer/basic.go @@ -29,7 +29,7 @@ type CustomSpamParams struct { func CustomSpam(params *CustomSpamParams) { outputID := iotago.OutputIDFromTransactionIDAndIndex(snapshotcreator.GenesisTransactionID, 0) if params.config.LastFaucetUnspentOutputID != "" { - outputID, _ = iotago.OutputIDFromHex(params.config.LastFaucetUnspentOutputID) + outputID, _ = iotago.OutputIDFromHexString(params.config.LastFaucetUnspentOutputID) } w := wallet.NewEvilWallet(wallet.WithClients(params.ClientURLs...), wallet.WithFaucetOutputID(outputID)) diff --git a/tools/evil-spammer/go.mod b/tools/evil-spammer/go.mod index b4678fb13..08e5d1d90 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-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729 - github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d + github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b 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-20231003181920-a3245ad7a737 + github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c github.com/mr-tron/base58 v1.2.0 go.uber.org/atomic v1.11.0 ) @@ -38,11 +38,11 @@ require ( github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b // 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 @@ -79,12 +79,12 @@ require ( github.com/zyedidia/generic v1.2.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/tools/evil-spammer/go.sum b/tools/evil-spammer/go.sum index 97376751f..9bbd459ce 100644 --- a/tools/evil-spammer/go.sum +++ b/tools/evil-spammer/go.sum @@ -171,32 +171,32 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 h1:HHxgNhbtD6WDCwSQBbPrQe8c4ZNjNi0KcgCJo0nm9bY= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729 h1:rBADf+IZDKkDOuZznwIdonxF9jcOSQJU/qOYSNInX84= -github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d h1:bZXrxulDoDBsNg0wtXowrAyltjfgZahiGYuAoS5GKU4= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d h1:pRcB0wfWAlfDJ10ZZ6LK1ukRXcPaL299LLU/zbYWnsQ= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d h1:Vn8BY/hLTcKJWh8LCw6PDTbCK2562wq93MPynV1pHjE= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 h1:hHdIZn95+HdP1JdjV8TAsuL5kU4eb4gncehyjXo/feQ= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d h1:tmaZvkBCP/OrQrwC728AEFtRAW8YUHBVNE8IXxtd4C4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b h1:OQ/4K7+2YMMuc2V7oTTpErHYWAwBw7exkQ1UdQUNH1U= +github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b h1:8FdKoB755PjCL1aHTi+2rPt9lCUS4B2wg2fNKykw5dc= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b h1:gQ+Wqg8h/LRpgX3CsmaOZYdMIBVL4fAPIrZbmA6Wn3Q= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b h1:F91AhJfeVN/XdvzUObUXa5mA38VezBZ9GHhdfQw4fVg= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b h1:KBactiBVwAvuStyE08lSFVWqMWea6wo5hOny9r3N9HA= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b h1:D07ocbgOyj2d/AGjrIuAxIaQC5SQDndiKp9UaaQwLas= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 h1:XCYvP8XwETTXF5LNz8q9X3EajDut7+UwTwqJ2TQ0TJo= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d h1:qNmg1DUvge8zPvygQEoulQjLG7gFzWKqPMJ3r7ZESm0= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= -github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729 h1:FOQetJY2scpCtCGrZQWGw3RwB3lRIDdyu+M6P1NACM4= -github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d h1:mn2Gax95UuUpuzEi4osLk+1IBjv5q56LwcxF/lAxk38= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d h1:1839CFkegKrSvTfWkgYHpH1pudehOXxX05Mzy1KSR7I= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d h1:ekHWRypoaiCXgrJVUQS7rCewsK3FuG1gTbPxu5jYn9c= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 h1:6fuDHswgN9zTwsMuKRKNClnT+rJCojvWf3Hk8f03cvc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b h1:UnWVwiVj/BceDDL9J/nCAVRlUDVnbTsCf7PI4lWrdfU= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= +github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b h1:fYJ2yrb9cYyoLzlEIxLsdPSSufxh0Xw/AoawlGdpdU8= +github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b h1:skHzoSAI2TNmoJwgW7/aq/Il3JZ5Fa9D5d9U41oWKYg= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b h1:6anjtWbaCszD5h43psnE8lsgIM0etpjr62ZlN59t0H8= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b h1:cc9VsDzLxPAaC8fj96EA1bJxbmrEZndJV+3SmG+HHOs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c h1:3gWmDG+XNtTcT4FxcID6hijCUVs3kRGhAfhdv3FiWJs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c/go.mod h1:l5yEhEf90+V0sv8kgWINTsM/O6W75bgEDHxWrIlC4AY= 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= @@ -397,8 +397,8 @@ golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= @@ -483,12 +483,12 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= diff --git a/tools/evil-spammer/wallet/connector.go b/tools/evil-spammer/wallet/connector.go index e0a008ef6..88447959b 100644 --- a/tools/evil-spammer/wallet/connector.go +++ b/tools/evil-spammer/wallet/connector.go @@ -228,7 +228,7 @@ func (c *WebClient) PostTransaction(tx *iotago.SignedTransaction) (blockID iotag blk, err := blockBuilder.Build() if err != nil { - return iotago.EmptyBlockID(), err + return iotago.EmptyBlockID, err } id, err := c.client.SubmitBlock(context.Background(), blk) @@ -250,7 +250,7 @@ func (c *WebClient) PostData(data []byte) (blkID string, err error) { blk, err := blockBuilder.Build() if err != nil { - return iotago.EmptyBlockID().ToHex(), err + return iotago.EmptyBlockID.ToHex(), err } id, err := c.client.SubmitBlock(context.Background(), blk) diff --git a/tools/gendoc/go.mod b/tools/gendoc/go.mod index 60253b09e..3d6a97cb4 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-20230928074706-d58e32f86729 + github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b github.com/iotaledger/hive.go/apputils v0.0.0-20230829152614-7afc7a4d89b3 github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 ) @@ -59,20 +59,20 @@ require ( github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e // indirect - github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 // indirect - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 // indirect + github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231005192108-08a985c2e217 // indirect + github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231005191759-16a3636128c4 // indirect + github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c // 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 @@ -165,13 +165,13 @@ require ( go.uber.org/fx v1.20.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.13.0 // indirect + golang.org/x/crypto v0.14.0 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/image v0.11.0 // indirect golang.org/x/mod v0.12.0 // indirect golang.org/x/net v0.15.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 // indirect diff --git a/tools/gendoc/go.sum b/tools/gendoc/go.sum index 5e0a9c086..8383833c9 100644 --- a/tools/gendoc/go.sum +++ b/tools/gendoc/go.sum @@ -281,39 +281,38 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 h1:HHxgNhbtD6WDCwSQBbPrQe8c4ZNjNi0KcgCJo0nm9bY= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729 h1:rBADf+IZDKkDOuZznwIdonxF9jcOSQJU/qOYSNInX84= -github.com/iotaledger/hive.go/app v0.0.0-20230928074706-d58e32f86729/go.mod h1:eiZgbcwTDZ7d9hEait2EAwAhixWhceW4MXmuVk2EcEw= +github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b h1:OQ/4K7+2YMMuc2V7oTTpErHYWAwBw7exkQ1UdQUNH1U= +github.com/iotaledger/hive.go/app v0.0.0-20231005142627-86973b2edb3b/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-20230929122509-67f34bfed40d h1:bZXrxulDoDBsNg0wtXowrAyltjfgZahiGYuAoS5GKU4= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d h1:pRcB0wfWAlfDJ10ZZ6LK1ukRXcPaL299LLU/zbYWnsQ= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d h1:Vn8BY/hLTcKJWh8LCw6PDTbCK2562wq93MPynV1pHjE= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 h1:hHdIZn95+HdP1JdjV8TAsuL5kU4eb4gncehyjXo/feQ= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d h1:tmaZvkBCP/OrQrwC728AEFtRAW8YUHBVNE8IXxtd4C4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b h1:8FdKoB755PjCL1aHTi+2rPt9lCUS4B2wg2fNKykw5dc= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b h1:gQ+Wqg8h/LRpgX3CsmaOZYdMIBVL4fAPIrZbmA6Wn3Q= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b h1:F91AhJfeVN/XdvzUObUXa5mA38VezBZ9GHhdfQw4fVg= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b h1:KBactiBVwAvuStyE08lSFVWqMWea6wo5hOny9r3N9HA= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b h1:D07ocbgOyj2d/AGjrIuAxIaQC5SQDndiKp9UaaQwLas= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 h1:XCYvP8XwETTXF5LNz8q9X3EajDut7+UwTwqJ2TQ0TJo= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d h1:qNmg1DUvge8zPvygQEoulQjLG7gFzWKqPMJ3r7ZESm0= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= -github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729 h1:FOQetJY2scpCtCGrZQWGw3RwB3lRIDdyu+M6P1NACM4= -github.com/iotaledger/hive.go/logger v0.0.0-20230928074706-d58e32f86729/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d h1:mn2Gax95UuUpuzEi4osLk+1IBjv5q56LwcxF/lAxk38= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d h1:1839CFkegKrSvTfWkgYHpH1pudehOXxX05Mzy1KSR7I= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d h1:ekHWRypoaiCXgrJVUQS7rCewsK3FuG1gTbPxu5jYn9c= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e h1:Mwoe7M6gI2DAjJIXmIskgnI8KdxCY1LyEEhtJCNYBsU= -github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231001095511-32be422a567e/go.mod h1:jhzexR5X8m6qcmrwt5OX477O/ZwT7Ak9sPT83ByPkAo= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951 h1:qUf1W0fE1IyZzVy3Exv0Kj+SKECXG3S26c9m2ETb07U= -github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231001095356-923e8f138951/go.mod h1:c5778OnWpLq108YE+Eb2m8Ri/t/4ydV0TvI/Sy5YivQ= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003162632-bf50df95b5f0 h1:6G9oUOnhhK5oktcsl0BImbrPlgp6tdGskKsAmaMNw8Q= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003162632-bf50df95b5f0/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b h1:UnWVwiVj/BceDDL9J/nCAVRlUDVnbTsCf7PI4lWrdfU= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= +github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b h1:fYJ2yrb9cYyoLzlEIxLsdPSSufxh0Xw/AoawlGdpdU8= +github.com/iotaledger/hive.go/logger v0.0.0-20231005142627-86973b2edb3b/go.mod h1:sxqWRdZ1OOxwkxVczuGcW034Mpt2vFh5ebJHO++ZYeI= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b h1:skHzoSAI2TNmoJwgW7/aq/Il3JZ5Fa9D5d9U41oWKYg= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b h1:6anjtWbaCszD5h43psnE8lsgIM0etpjr62ZlN59t0H8= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b h1:cc9VsDzLxPAaC8fj96EA1bJxbmrEZndJV+3SmG+HHOs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231005192108-08a985c2e217 h1:DdrsW+J04ne2j6bjU1yVu+4C4CjpjGFYDEVMtmg0zyA= +github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231005192108-08a985c2e217/go.mod h1:OWZGwG4q2Ypd/D6LJicgdPXtw9yYkhaZEvJFhkIm2Ck= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231005191759-16a3636128c4 h1:uI+sZeZnGzAkM34JDbZBfyRIXrkkd1L0w8qVJ5rGy3E= +github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231005191759-16a3636128c4/go.mod h1:w+DK7WqSka5dzqztfA/l50owI4VhoxcmMAypJq6jf/M= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c h1:3gWmDG+XNtTcT4FxcID6hijCUVs3kRGhAfhdv3FiWJs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c/go.mod h1:l5yEhEf90+V0sv8kgWINTsM/O6W75bgEDHxWrIlC4AY= 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= @@ -718,8 +717,8 @@ golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= @@ -833,8 +832,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= diff --git a/tools/genesis-snapshot/go.mod b/tools/genesis-snapshot/go.mod index ba29c06b3..72a019bb7 100644 --- a/tools/genesis-snapshot/go.mod +++ b/tools/genesis-snapshot/go.mod @@ -5,15 +5,15 @@ go 1.21 replace github.com/iotaledger/iota-core => ../../ require ( - github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d - github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d + github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b + github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b github.com/iotaledger/iota-core v0.0.0-00010101000000-000000000000 - github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 + github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c github.com/mr-tron/base58 v1.2.0 github.com/spf13/pflag v1.0.5 - golang.org/x/crypto v0.13.0 + golang.org/x/crypto v0.14.0 ) require ( @@ -28,12 +28,12 @@ require ( github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 // indirect github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 // indirect + github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b // indirect github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 // indirect - github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d // indirect - github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d // indirect + github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b // indirect + github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b // indirect github.com/ipfs/go-cid v0.4.1 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/text v0.2.0 // indirect @@ -60,7 +60,7 @@ require ( github.com/zyedidia/generic v1.2.1 // indirect go.uber.org/atomic v1.11.0 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.2.1 // indirect diff --git a/tools/genesis-snapshot/go.sum b/tools/genesis-snapshot/go.sum index c69dca49d..2f45945f8 100644 --- a/tools/genesis-snapshot/go.sum +++ b/tools/genesis-snapshot/go.sum @@ -30,28 +30,28 @@ github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PT github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729 h1:HHxgNhbtD6WDCwSQBbPrQe8c4ZNjNi0KcgCJo0nm9bY= github.com/iotaledger/hive.go/ads v0.0.0-20230928074706-d58e32f86729/go.mod h1:IAWZ/5It5P8B41mWyJXJVcG0vuikVRaTFKQnr2D2q+c= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d h1:bZXrxulDoDBsNg0wtXowrAyltjfgZahiGYuAoS5GKU4= -github.com/iotaledger/hive.go/constraints v0.0.0-20230929122509-67f34bfed40d/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d h1:pRcB0wfWAlfDJ10ZZ6LK1ukRXcPaL299LLU/zbYWnsQ= -github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230929122509-67f34bfed40d/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d h1:Vn8BY/hLTcKJWh8LCw6PDTbCK2562wq93MPynV1pHjE= -github.com/iotaledger/hive.go/crypto v0.0.0-20230929122509-67f34bfed40d/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729 h1:hHdIZn95+HdP1JdjV8TAsuL5kU4eb4gncehyjXo/feQ= -github.com/iotaledger/hive.go/ds v0.0.0-20230928074706-d58e32f86729/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d h1:tmaZvkBCP/OrQrwC728AEFtRAW8YUHBVNE8IXxtd4C4= -github.com/iotaledger/hive.go/ierrors v0.0.0-20230929122509-67f34bfed40d/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b h1:8FdKoB755PjCL1aHTi+2rPt9lCUS4B2wg2fNKykw5dc= +github.com/iotaledger/hive.go/constraints v0.0.0-20231005142627-86973b2edb3b/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b h1:gQ+Wqg8h/LRpgX3CsmaOZYdMIBVL4fAPIrZbmA6Wn3Q= +github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231005142627-86973b2edb3b/go.mod h1:jn3TNmiNRIiQm/rS4VD+7wFHI2+UXABHvCA3PbQxBqI= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b h1:F91AhJfeVN/XdvzUObUXa5mA38VezBZ9GHhdfQw4fVg= +github.com/iotaledger/hive.go/crypto v0.0.0-20231005142627-86973b2edb3b/go.mod h1:jP68na941d9uq7RtnA8aQ/FtIGRGz/51cU4uXrInQFU= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b h1:KBactiBVwAvuStyE08lSFVWqMWea6wo5hOny9r3N9HA= +github.com/iotaledger/hive.go/ds v0.0.0-20231005142627-86973b2edb3b/go.mod h1:ZrqsjIJS2QCgGp7Ki+l4hWJQgzfBObUCemb5Upwlx18= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b h1:D07ocbgOyj2d/AGjrIuAxIaQC5SQDndiKp9UaaQwLas= +github.com/iotaledger/hive.go/ierrors v0.0.0-20231005142627-86973b2edb3b/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729 h1:XCYvP8XwETTXF5LNz8q9X3EajDut7+UwTwqJ2TQ0TJo= github.com/iotaledger/hive.go/kvstore v0.0.0-20230928074706-d58e32f86729/go.mod h1:DeP4JF4N995LteD0+/o7NsW1bO5IXURIJ27A69Ca5+Y= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d h1:qNmg1DUvge8zPvygQEoulQjLG7gFzWKqPMJ3r7ZESm0= -github.com/iotaledger/hive.go/lo v0.0.0-20230929122509-67f34bfed40d/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d h1:mn2Gax95UuUpuzEi4osLk+1IBjv5q56LwcxF/lAxk38= -github.com/iotaledger/hive.go/runtime v0.0.0-20230929122509-67f34bfed40d/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d h1:1839CFkegKrSvTfWkgYHpH1pudehOXxX05Mzy1KSR7I= -github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230929122509-67f34bfed40d/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d h1:ekHWRypoaiCXgrJVUQS7rCewsK3FuG1gTbPxu5jYn9c= -github.com/iotaledger/hive.go/stringify v0.0.0-20230929122509-67f34bfed40d/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737 h1:6fuDHswgN9zTwsMuKRKNClnT+rJCojvWf3Hk8f03cvc= -github.com/iotaledger/iota.go/v4 v4.0.0-20231003181920-a3245ad7a737/go.mod h1:+e3bsJFDr9HxmUMe+eQOLNut5wfcB/ivhJdouOJgOnE= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b h1:UnWVwiVj/BceDDL9J/nCAVRlUDVnbTsCf7PI4lWrdfU= +github.com/iotaledger/hive.go/lo v0.0.0-20231005142627-86973b2edb3b/go.mod h1:4oKCdMEhHMLCudBz79kuvJmgSY/DhfVePNIyJhew/80= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b h1:skHzoSAI2TNmoJwgW7/aq/Il3JZ5Fa9D5d9U41oWKYg= +github.com/iotaledger/hive.go/runtime v0.0.0-20231005142627-86973b2edb3b/go.mod h1:fXVyQ1MAwxe/EmjAnG8WcQqbzGk9EW/FsJ/n16H/f/w= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b h1:6anjtWbaCszD5h43psnE8lsgIM0etpjr62ZlN59t0H8= +github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231005142627-86973b2edb3b/go.mod h1:IJgaaxbgKCsNat18jlJJEAxCY2oVYR3F30B+M4vJ89I= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b h1:cc9VsDzLxPAaC8fj96EA1bJxbmrEZndJV+3SmG+HHOs= +github.com/iotaledger/hive.go/stringify v0.0.0-20231005142627-86973b2edb3b/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c h1:3gWmDG+XNtTcT4FxcID6hijCUVs3kRGhAfhdv3FiWJs= +github.com/iotaledger/iota.go/v4 v4.0.0-20231005184534-62e6761a7b7c/go.mod h1:l5yEhEf90+V0sv8kgWINTsM/O6W75bgEDHxWrIlC4AY= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= @@ -120,13 +120,13 @@ github.com/zyedidia/generic v1.2.1 h1:Zv5KS/N2m0XZZiuLS82qheRG4X1o5gsWreGb0hR7XD github.com/zyedidia/generic v1.2.1/go.mod h1:ly2RBz4mnz1yeuVbQA/VFwGjK3mnHGRj1JuoG336Bis= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= diff --git a/tools/genesis-snapshot/presets/presets.go b/tools/genesis-snapshot/presets/presets.go index e39a86667..ab7b68bb2 100644 --- a/tools/genesis-snapshot/presets/presets.go +++ b/tools/genesis-snapshot/presets/presets.go @@ -30,7 +30,7 @@ var Base = []options.Option[snapshotcreator.Options]{ ), ), snapshotcreator.WithRootBlocks(map[iotago.BlockID]iotago.CommitmentID{ - iotago.EmptyBlockID(): iotago.NewEmptyCommitment(3).MustID(), + iotago.EmptyBlockID: iotago.NewEmptyCommitment(3).MustID(), }), }