-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[r2r] tendermint htlc implementation #1454
Conversation
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great work! I have mostly questions and few minor changes requests.
let msg_payload = MsgCreateHtlc { | ||
sender: self.account_id.clone(), | ||
to: to.clone(), | ||
receiver_on_other_chain: "".to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please provide more details on when these receiver/sender_on_other_chain
fields should have non-default values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's never required but it can be good for state management for swapping coins cross chains.
For example, if we swap ATOM with BTC, we can use/validate the swap addresses directly from the transaction itself using receiver/sender_on_other_chain
. At least this is how I understand it. There is no detailed information about them. I will ask IRIS team to validate if I am correct about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Just a few notes
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor note 🙂
Signed-off-by: Onur Özkan <work@onurozkan.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🔥
* create iris coin instance and execute `my_balance` Signed-off-by: Onur Özkan <work@onurozkan.dev> * save development state Signed-off-by: Onur Özkan <work@onurozkan.dev> * implement htlc for iris network Signed-off-by: Onur Özkan <work@onurozkan.dev> * implement `hash_lock` generation in p.o.c test Signed-off-by: Onur Özkan <work@onurozkan.dev> * save htlc claiming P.O.C state Signed-off-by: Onur Özkan <work@onurozkan.dev> * update target address for htlc transactions Signed-off-by: Onur Özkan <work@onurozkan.dev> * save htlc p.o.c(on IBC asset) work state Signed-off-by: Onur Özkan <work@onurozkan.dev> * add doc-comments to iris/htlc.rs Signed-off-by: Onur Özkan <work@onurozkan.dev> * save development state Signed-off-by: Onur Özkan <work@onurozkan.dev> * save development state Signed-off-by: Onur Özkan <work@onurozkan.dev> * save development state Signed-off-by: Onur Özkan <work@onurozkan.dev> * update structs privacy of iris/htlc module Signed-off-by: Onur Özkan <work@onurozkan.dev> * apply some beauty Signed-off-by: ozkanonur <work@onurozkan.dev> * Exclude p.o.c derive attributes that are no longer required Signed-off-by: ozkanonur <work@onurozkan.dev> * update annotation style Signed-off-by: ozkanonur <work@onurozkan.dev> * fix code formatting Signed-off-by: ozkanonur <work@onurozkan.dev> * fix review notes Signed-off-by: ozkanonur <work@onurozkan.dev> * make `any_to_signed_raw_tx` sync Signed-off-by: ozkanonur <work@onurozkan.dev> * drop mutability of `hash_lock_hash` Signed-off-by: Onur Özkan <work@onurozkan.dev> * fix review note Signed-off-by: Onur Özkan <work@onurozkan.dev> Signed-off-by: Onur Özkan <work@onurozkan.dev> Signed-off-by: ozkanonur <work@onurozkan.dev>
This PR aims to implement tendermint HTLC to mm2 codebase.
These are following results after running couple P.O.C's using the current implementation.
Iris native token on Mainnet: https://www.mintscan.io/iris/txs/D0004AF5468C848CC45B75B11142D7588EBF077052C1ECFA40400646C5058D41
Testnet token(nyan) on Testnet:
create: https://nyancat.iobscan.io/#/tx?txHash=0C1B46993C40722DA10D70495D887DE0B4A44D876C9F7D5DD99577B7262BFF4E
claim: https://nyancat.iobscan.io/#/tx?txHash=F189C350A1AC0C938F6320A0FBF78A47BE0E566DA0FCAE09D6EBCEAE336F4D96
IBC Asset(USDC) on Testnet:
create: https://nyancat.iobscan.io/#/tx?txHash=A3B30F6AE4205503FB2D4BCC8EEC3FE5791E891C40053F8769E3DE8754C830E1
claim: https://nyancat.iobscan.io/#/tx?txHash=C36FADE9C0592F1A3D6F0D1561E40106997A27611539DCD411B1DEB3A53F66BA
Nimda(I created this one for dev purposes) token on Testnet:
create: https://nyancat.iobscan.io/#/tx?txHash=CB54218FD0A35ECD30A0C631B5A44FCFAF8879F99C3B7EC09A1B3A23C93A718D
claim: https://nyancat.iobscan.io/#/tx?txHash=4EA194E92B831B306FF208848593DCEC0F8234063152588FE5096772025C22D3