cardano-foundation / cardano-ibc-incubator

Apache License 2.0
23 stars 5 forks source link

chore(deps): update to github.com/blinklabs-io/gouroboros v0.89.1 #55

Closed wolf31o2 closed 3 months ago

wolf31o2 commented 4 months ago

Several of the functions related to gOuroboros from this repository are now available within gOuroboros upstream. As such, this updates the dependency to the correct upstream version and removes the migrated code.

dale-smartosc commented 4 months ago

Thank you very much to the Gouroboros team. I will conduct a local test to verify the functionality of the code. At first look, it appears that the code simply relocates functions into the Gouroboros library. If possible, could you please review this file: https://github.com/cardano-foundation/cardano-ibc-incubator/blob/d4d8ec9b933b1fcd57f2a82c488e9da6ec625f81/relayer/relayer/chains/cardano/types.go#L16 The unmarshal function from Gorobouros works well, but the marshaling part kind of doesn't work for me. I have cloned the structs and modified some properties in those structs.

wolf31o2 commented 4 months ago

The code is moved to gOuroboros nearly verbatim (only a couple variable changes and some nil pointers avoidance by error checking and failing fast). Here, I only changed a couple functions to take UTxOs as an argument so it could consume the gOuroboros objects. I'll take a look at the relayer code, too.

wolf31o2 commented 4 months ago

Thank you very much to the Gouroboros team. I will conduct a local test to verify the functionality of the code. At first look, it appears that the code simply relocates functions into the Gouroboros library. If possible, could you please review this file:

https://github.com/cardano-foundation/cardano-ibc-incubator/blob/d4d8ec9b933b1fcd57f2a82c488e9da6ec625f81/relayer/relayer/chains/cardano/types.go#L16

The unmarshal function from Gorobouros works well, but the marshaling part kind of doesn't work for me. I have cloned the structs and modified some properties in those structs.

I passed this along to the team and we will make it a priority to test marshal and unmarshal on the objects going forward. We will take these changes and put them into a future gOuroboros release and will submit a PR here for those changes once it's resolved.

wolf31o2 commented 4 months ago

I updated this against the latest changes and resolved the conflict.

wolf31o2 commented 3 months ago

OK. I merged your PR, then resolved the conflicts that occurred in here. After that, I merged main after syncing with your upstream main here. Finally, I updated gOuroboros to the latest release.

wolf31o2 commented 3 months ago

Note: we've updated the various types, such as BabbageTransaction so they should serialize correctly now... also, I added PaymentKeyHash and StakeKeyHash functions to ledger.Address which returns a Blake2b224 (so you can .String() it) which should be able to replace the echovl/cardano-go functionality in the relayer's func (cc *CardanoProvider) MsgTransfer