Skip to content

Commit 8e13822

Browse files
authored
chore(deps): gouroboros 0.116.0 (#402)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 672cfa3 commit 8e13822

File tree

6 files changed

+27
-28
lines changed

6 files changed

+27
-28
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.24.1
77
require (
88
github.com/SundaeSwap-finance/kugo v1.1.0
99
github.com/SundaeSwap-finance/ogmigo v0.9.0
10-
github.com/blinklabs-io/gouroboros v0.115.2
10+
github.com/blinklabs-io/gouroboros v0.116.0
1111
github.com/btcsuite/btcd/btcutil v1.1.6
1212
github.com/gen2brain/beeep v0.0.0-20240516210008-9c006672e7f4
1313
github.com/gin-gonic/gin v1.10.0
@@ -37,7 +37,7 @@ require (
3737
github.com/cloudwego/base64x v0.1.4 // indirect
3838
github.com/cloudwego/iasm v0.2.0 // indirect
3939
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
40-
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
40+
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
4141
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
4242
github.com/gin-contrib/sse v0.1.0 // indirect
4343
github.com/go-openapi/jsonpointer v0.20.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ github.com/SundaeSwap-finance/ogmigo v0.9.0/go.mod h1:io/H+NvaSomJKmh4mbhjgT0RX4
1111
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
1212
github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk=
1313
github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
14-
github.com/blinklabs-io/gouroboros v0.115.2 h1:qG6uu8yDQpJ4VYmiARdkOpfjvKw3r0MG4B6dFaZ8Rzc=
15-
github.com/blinklabs-io/gouroboros v0.115.2/go.mod h1:E43ihaCCqNYMsTtdGbTv6Un0QVYcSXb3E/SbADJNBIM=
14+
github.com/blinklabs-io/gouroboros v0.116.0 h1:B+2HUCdMgu1TRlME1Y1ds+nhzmgKLuJwdq7nfSJta08=
15+
github.com/blinklabs-io/gouroboros v0.116.0/go.mod h1:g4e4aqLWcsRCgwk1KLq49CJF4uNq/ZXAp4Z63BbSo4o=
1616
github.com/blinklabs-io/ouroboros-mock v0.3.7 h1:86FvD591XhdGk2BqQweRKfwc6Y6ll5Lunmo/RUehJ6o=
1717
github.com/blinklabs-io/ouroboros-mock v0.3.7/go.mod h1:611xZgdWCxZsSaS5tjgxqjmWIkSpsM9eKuQAKozw+sk=
1818
github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=
@@ -59,8 +59,8 @@ github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeC
5959
github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=
6060
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
6161
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
62-
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
63-
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
62+
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
63+
github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
6464
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
6565
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
6666
github.com/gen2brain/beeep v0.0.0-20240516210008-9c006672e7f4 h1:ygs9POGDQpQGLJPlq4+0LBUmMBNox1N4JSpw+OETcvI=

input/chainsync/block.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewBlockEvent(block ledger.Block, includeCbor bool) BlockEvent {
5757
evt := BlockEvent{
5858
Block: block,
5959
BlockBodySize: block.BlockBodySize(),
60-
BlockHash: block.Hash(),
60+
BlockHash: block.Hash().String(),
6161
IssuerVkey: block.IssuerVkey().Hash().String(),
6262
TransactionCount: uint64(len(block.Transactions())),
6363
}

input/chainsync/block_test.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ func (m MockIssuerVkey) Hash() []byte {
2121

2222
// MockBlockHeader implements BlockHeader interface
2323
type MockBlockHeader struct {
24-
hash string
25-
prevHash string
24+
hash common.Blake2b256
25+
prevHash common.Blake2b256
2626
blockNumber uint64
2727
slotNumber uint64
2828
issuerVkey common.IssuerVkey
@@ -31,11 +31,11 @@ type MockBlockHeader struct {
3131
cborBytes []byte
3232
}
3333

34-
func (m MockBlockHeader) Hash() string {
34+
func (m MockBlockHeader) Hash() common.Blake2b256 {
3535
return m.hash
3636
}
3737

38-
func (m MockBlockHeader) PrevHash() string {
38+
func (m MockBlockHeader) PrevHash() common.Blake2b256 {
3939
return m.prevHash
4040
}
4141

@@ -127,8 +127,8 @@ func TestNewBlockContext(t *testing.T) {
127127
era: common.Era{
128128
Name: "Shelley",
129129
},
130-
hash: "sample-hash-shelley",
131-
prevHash: "prev-hash-shelley",
130+
hash: common.NewBlake2b256([]byte("sample-hash-shelley")),
131+
prevHash: common.NewBlake2b256([]byte("prev-hash-shelley")),
132132
blockBodySize: 1024,
133133
cborBytes: []byte{0x01, 0x02, 0x03},
134134
},
@@ -148,8 +148,8 @@ func TestNewBlockContext(t *testing.T) {
148148
era: common.Era{
149149
Name: "Allegra",
150150
},
151-
hash: "another-hash-allegra",
152-
prevHash: "prev-hash-allegra",
151+
hash: common.NewBlake2b256([]byte("another-hash-allegra")),
152+
prevHash: common.NewBlake2b256([]byte("prev-hash-allegra")),
153153
blockBodySize: 2048,
154154
cborBytes: []byte{0x04, 0x05, 0x06},
155155
},
@@ -169,8 +169,8 @@ func TestNewBlockContext(t *testing.T) {
169169
era: common.Era{
170170
Name: "Mary",
171171
},
172-
hash: "mary-block-hash",
173-
prevHash: "prev-hash-mary",
172+
hash: common.NewBlake2b256([]byte("mary-block-hash")),
173+
prevHash: common.NewBlake2b256([]byte("prev-hash-mary")),
174174
blockBodySize: 4096,
175175
cborBytes: []byte{0x07, 0x08, 0x09},
176176
},
@@ -230,8 +230,8 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
230230
era: common.Era{
231231
Name: "",
232232
},
233-
hash: "",
234-
prevHash: "",
233+
hash: common.Blake2b256{},
234+
prevHash: common.Blake2b256{},
235235
blockBodySize: 0,
236236
cborBytes: []byte{},
237237
},
@@ -249,8 +249,8 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
249249
era: common.Era{
250250
Name: "Alonzo",
251251
},
252-
hash: "max-block-hash",
253-
prevHash: "max-prev-hash",
252+
hash: common.NewBlake2b256([]byte("max-block-hash")),
253+
prevHash: common.NewBlake2b256([]byte("max-prev-hash")),
254254
blockBodySize: ^uint64(0),
255255
cborBytes: []byte{0x0A, 0x0B, 0x0C},
256256
},

input/chainsync/chainsync.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,10 @@ func (c *ChainSync) handleRollForward(
327327
case ledger.Block:
328328
evt := event.New("chainsync.block", time.Now(), NewBlockContext(v, c.networkMagic), NewBlockEvent(v, c.includeCbor))
329329
c.eventChan <- evt
330-
c.updateStatus(v.SlotNumber(), v.BlockNumber(), v.Hash(), tip.Point.Slot, hex.EncodeToString(tip.Point.Hash))
330+
c.updateStatus(v.SlotNumber(), v.BlockNumber(), v.Hash().String(), tip.Point.Slot, hex.EncodeToString(tip.Point.Hash))
331331
case ledger.BlockHeader:
332332
blockSlot := v.SlotNumber()
333-
blockHash, _ := hex.DecodeString(v.Hash())
334-
block, err := c.oConn.BlockFetch().Client.GetBlock(ocommon.Point{Slot: blockSlot, Hash: blockHash})
333+
block, err := c.oConn.BlockFetch().Client.GetBlock(ocommon.Point{Slot: blockSlot, Hash: v.Hash().Bytes()})
335334
if err != nil {
336335
return err
337336
}
@@ -352,7 +351,7 @@ func (c *ChainSync) handleRollForward(
352351
NewTransactionEvent(block, transaction, c.includeCbor, resolvedInputs))
353352
c.eventChan <- txEvt
354353
}
355-
c.updateStatus(v.SlotNumber(), v.BlockNumber(), v.Hash(), tip.Point.Slot, hex.EncodeToString(tip.Point.Hash))
354+
c.updateStatus(v.SlotNumber(), v.BlockNumber(), v.Hash().String(), tip.Point.Slot, hex.EncodeToString(tip.Point.Hash))
356355
}
357356
return nil
358357
}
@@ -398,7 +397,7 @@ func (c *ChainSync) handleBlockFetchBlock(
398397
c.updateStatus(
399398
block.SlotNumber(),
400399
block.BlockNumber(),
401-
block.Hash(),
400+
block.Hash().String(),
402401
c.bulkRangeEnd.Slot,
403402
hex.EncodeToString(c.bulkRangeEnd.Hash),
404403
)

input/chainsync/tx.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewTransactionContext(
5151
ctx := TransactionContext{
5252
BlockNumber: block.BlockNumber(),
5353
SlotNumber: block.SlotNumber(),
54-
TransactionHash: tx.Hash(),
54+
TransactionHash: tx.Hash().String(),
5555
TransactionIdx: index,
5656
NetworkMagic: networkMagic,
5757
}
@@ -66,7 +66,7 @@ func NewTransactionEvent(
6666
) TransactionEvent {
6767
evt := TransactionEvent{
6868
Transaction: tx,
69-
BlockHash: block.Hash(),
69+
BlockHash: block.Hash().String(),
7070
Inputs: tx.Inputs(),
7171
Outputs: tx.Outputs(),
7272
Fee: tx.Fee(),

0 commit comments

Comments
 (0)