-
Notifications
You must be signed in to change notification settings - Fork 100
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
internal: Add basic simnet xmr swap. #2885
base: master
Are you sure you want to change the base?
Conversation
815ed6c
to
7076e42
Compare
d60bc68
to
bb8eedc
Compare
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've tested the swap and it works, but the code is a bit hard to understand. I think it would be better if there were two separate clients, initiatorClient
and participantClient
each with just the functions that they perform. Then, these functions could take as arguments types such as genKeysMsg
, genLockTxMsg
, etc. which would be equivalent to the communication that would take place when the trade is being done in the dex.
kbvf, kbsf, kbvl, kbsl, vkbv *edwards.PrivateKey | ||
pkbsf, pkbs *edwards.PublicKey | ||
kaf, kal *secp256k1.PrivateKey | ||
pkal, pkaf, pkasl, pkbsl *secp256k1.PublicKey | ||
kbsfDleag, kbslDleag [libsecp256k1.ProofLen]byte |
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.
It's really hard to follow the code with these variable names. Something like ourSpendKey
, counterPartySpendKey
, etc. would make it way more understandable.
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.
Better clean these up on top of #2936? No reason to create conflicts there imo.
fc1f63d
to
d6b0917
Compare
d6b0917
to
0fce615
Compare
418bfcf
to
0101a5b
Compare
0101a5b
to
ac416c1
Compare
"github.com/haven-protocol-org/monero-go-utils/base58" | ||
) | ||
|
||
// TODO: Verification at all stages has not been implemented yet. |
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.
This TODO still valid?
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.
Yes, we are not inspecting the on-chain txn at all yet. In the end we will get a lot of the info from transactions, not straight from the other party.
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.
All good!
Add a c library that has some primitive cryptographic functions needed for working with adaptor signatures.
get transaction development details from monerod including tx lock time; which is different from 'locked'/'unlocked' which refer to when a tx has 10 confirmations. Tx locktime can be any number of blocks in the future.
- Rename monero_functions.inc -> monero_functions - Tidy extra whitespace at eol for harness.sh & monero_functions.
New monero-wallet-rpc server with no attached wallet. This is for programmatically creating/generating and using a new wallet. The wallet will be generated in "own" dir but can be named what- ever you need: "alice", "Bob", etc.
ac416c1
to
8c5276c
Compare
closes #2754