Commit Graph

50 Commits

Author SHA1 Message Date
Dmitry Holodov
bd1e502cec go version 1.21, libp2p and other updates, linter update (#507) 2023-12-13 21:18:08 -07:00
Dmitry Holodov
f7c6a1dd0f maintenance updates (#503) 2023-08-16 19:28:51 -05:00
Dmitry Holodov
7619b9a6af updates for cross-chain bootnodes (#486) 2023-06-19 14:47:27 -05:00
Dmitry Holodov
753b998740 fix TestXMRTakerCancelOrRefundAfterKeyExchange (#480) 2023-06-04 09:07:39 -05:00
Dmitry Holodov
53a5c97c4f added a bootnode to the daemon tests (#469) 2023-05-12 19:40:16 -05:00
noot
fb95751dda feat: update SwapCreater.sol claimRelayer to no longer use forwarder (#449)
Co-authored-by: Dmitry Holodov <dimalinux@protonmail.com>
2023-05-01 19:23:17 -04:00
Dmitry Holodov
caa5251e59 move to gsnforwarder that is bytecode identical on mainnet and dev (#427) 2023-04-26 13:55:00 -05:00
Dmitry Holodov
59c10d8d03 upgraded go version and dependencies (#390)
Co-authored-by: noot <36753753+noot@users.noreply.github.com>
2023-04-19 10:49:39 -04:00
noot
d7a03494a4 update go-relayer and go-dleq deps (#362) 2023-03-28 23:39:29 -05:00
Dmitry Holodov
528715b602 swapd daemon setup/start decoupled from CLI parsing (#354) 2023-03-25 19:18:51 -05:00
Dmitry Holodov
0e80eee4dc integrated relayer into swapd (#342) 2023-03-17 14:22:16 -05:00
Dmitry Holodov
3d92587e21 added address QR code feature to swapcli (#313) 2023-02-20 22:20:13 -06:00
Dmitry Holodov
b157adc28b JSON validation (#309)
Integrates the go-playground validator library into our codebase for objects that are serialized/deserialized.
2023-02-18 18:37:52 -06:00
Dmitry Holodov
c5dacd1b59 fixes mock generation and attempts to fix TestDaemon_PersistOffers (#303)
* fixes mock generation
* ensures mock generation is working in CI for future PRs
* attempts to fix TestDaemon_PersistOffers failures deleting its temporary data directory
* updates some library dependencies
2023-02-09 07:53:14 -06:00
noot
ba9f0298c9 fix: minor log fixes (#289) 2023-01-26 00:47:47 -05:00
noot
ea43b6a86c feat: implement swap relayer cmd package (#282) 2023-01-25 01:17:55 -05:00
Dmitry Holodov
2905d1b1f9 Fixed Point Math (#269)
Updates our code to use the fixed point match library apd.Decimal.
2023-01-10 16:03:22 -06:00
noot
5068dab46a remove previous net/* contents, move net/swapnet/* to net/ (#270) 2023-01-09 17:09:11 -05:00
noot
8433b2307c bump go-dleq version (#266) 2023-01-02 16:47:53 -05:00
Dmitry Holodov
ed15ed9c82 libp2p QUIC and NAT traversal features (#251)
Enables additional libp2p NAT traversal features and enables nodes to communicate using UDP/QUIC in addition to TCP. Switches to using libp2p's "routed host". Most commands that previously accepted multiaddress values now accept a Peer IDs instead.
2022-12-19 18:25:24 -06:00
noot
5a4ccb332f bump go-dleq version (#264) 2022-12-19 16:53:37 -05:00
noot
6cdffdbebf add go-dleq; remove all rust dependencies (#242) 2022-11-28 19:31:41 -05:00
Dmitry Holodov
ec89cd684a misc fixes (#232)
* Relayer now runs as a dedicated binary in integration tests
* Binaries are now in `bin/` folder
* Removed warnings in our github actions
* Libp2p libs updated
* Signal handling improvements
* xmrmaker instance locking fix added
2022-11-18 16:47:16 -06:00
noot
7e44d6e7b9 add FakeDLEq; add pure go + darwin build commands (#225) 2022-11-14 16:14:10 -05:00
noot
36518eae87 persist swap info to disk (#213) 2022-11-07 14:42:35 -05:00
Dmitry Holodov
ab82a5bc0e relay updates (#220)
* Updates to the latest go-relayer version which can be terminated by canceling the context 
* Swapd's RPC server context handling was improved
* Reformats the contracts with prettier-plugin-solidity@1.0.0-rc.1
* Adds test helper for checking/updating the goerli contract
2022-11-03 23:32:19 -05:00
Dmitry Holodov
ec325f2cf7 add linting and formatting support for solidity (#217)
* Added new `format-solidity` and `lint-solidity` Makefile targets
* Updated documentation on how to install the new tools dependencies
* Formatted the solidity code, updated expected byte code and deployed stagenet contract
* Updated go.mod to go 1.19
* Updated Github actions for go 1.19 and we now use all formatters/linters in the actions checks
2022-11-01 23:01:59 -05:00
Dmitry Holodov
cdcd4db15d monero transaction checks (#207)
* Bob now waits for his XMR transfer to the A+B wallet to have 10 confirmations before notifying Alice that the XMR is locked.
* Alice now rejects the locked Monero if there is more than one block left before she can spend the funds (1 block freedom is in case of network latency on Alice's side). This eliminates Bob's ability to double spend and allows Alice to sweep funds to her primary wallet from the A+B wallet in a reasonable time frame.
* Sweeping received XMR to the primary wallet is now the default behavior.
* A+B swap wallets are created with a restore height set for quick wallet creation in production where the blockchain is big.
* Fixes SleepWithContext moving it into the common package and having it return an error when the sleep is interrupted by the context being canceled.
* Fixed timeout and context handling in integration tests
* Added new GetChainHeight method that queries monerod instead of monero-wallet-rpc
2022-10-31 00:26:25 -05:00
noot
0bdb6f6f2a add relayer support for claim contract function (#204) 2022-10-26 23:39:20 -04:00
noot
a51ea4e731 implement database; persist offers to disk and reload on startup (#200) 2022-10-11 15:44:37 -04:00
Dmitry Holodov
ecd91f624c monero-wallet-rpc now embedded (#192)
* Embeds monero-wallet-rpc instead of having the user start it separately.
* Location of all the files standardized and documented in docs/default-file-locations.md.
* Ethereum and Monero wallets will be created if they do not exist.
* New RPC API  personal_balances added including swapcli support.
2022-10-07 22:18:46 -05:00
Dmitry Holodov
58d1346023 fixes for base58 encoding/decoding (#190)
* Removes the `paxosglobal/moneroutil` base58 codec
* github.com/btcsuite/btcd/btcutil/base58 now provides the base base58 codec and we layer monero specifics on top of it
* Renames `EncodeMoneroBase58`/`DecodeMoneroBase58` to `MoneroAddrBytesToBase58`/`MoneroAddrBase58ToBytes`
* Removes `github.com/ebfe/keccak"` dependency in favor of go-ethereum's Keccak256
2022-09-17 20:42:55 -05:00
Dmitry Holodov
476bc69b82 CLI cleanups (#185)
* Switches to current v2 version of urfave CLI
* Fixes incorrect port values in the help
* Provides defaults directly to urfave for clear `--help` messaging
* `--base-path` flag renamed to `--data-dir`. This matches `monerod`'s' `--data-dir` and almost matches the `geth` flag `--datadir`
* Bootnodes and contract address are provided for stagenet testing
* Bootnodes can be provided individually by repeating the `--bootnodes`/`--bn` flag, or as a comma separated block (original behavior), or even a combination of both. (Makes adding/removing bootnodes a lot easier.)
* More precise error messaging when XMR maker/taker values are off
* Fixes bug in the peer finder where XMR was hardcoded as the provides coin
* `cleanup-test-processes.sh` displays which processes are being killed
2022-09-07 19:45:01 -05:00
noot
38b079cb96 persist peerstore to disk (#173) 2022-08-24 20:34:40 -04:00
Dmitry Holodov
b2c8641087 rename module (#156) 2022-08-19 20:31:50 -04:00
Dmitry Holodov
49a4ff12f3 Full API Monero RPC client (#154)
Switches from our partial Monero RPC client implementation to a full-API client to help with testing, reliability, debugging and future features. Other changes:
* GenerateBlocks written for better results when called by multiple parties simultaneously
* monero.Client interface renamed to monero.WalletClient to be orthogonal with monero.DaemonClient interface
* monero.NewClient(...) renamed to monero.NewWalletClient(...) to be orthogonal with monero.NewDaemonClient(...)
* monero.CreateMoneroWallet(...) simplified to monero.CreateWallet(...) (package prefix already states wallet type)
* monero/clent.go, monero/daemon.go renamed to monero/wallet_client.go, monero/daemon_client.go
* monero/rpc.go removed with code consolidated into monero/wallet_client.go and monero/daemon_client.go
2022-08-18 23:58:14 -05:00
Dmitry Holodov
3d48bd9e9e upgraded libp2p dependencies (#151)
Updates our libp2p dependencies to the latest stable versions.
2022-08-14 16:14:10 -05:00
Dmitry Holodov
36bfb03831 Update go ethereum (#149)
* Updated go-ethereum dep to 1.10.21
* Code now installs/uses an abigen that automatically matches the version of our go-ethereum in the go.mod
* solc was updated to 0.8.16 (in the docs, we don't install it, but anyone wanting to generate identical output needs it).
* Minimum go version is now 1.18
* golangci-lint updated to v1.48.0 (was needed to play nicely with go 1.18 and the new generated code)
* dleq/cgo-dleq submodule updated to latest version
2022-08-11 13:52:47 -05:00
noot
1d0482a7fc update dleq library (#142) 2022-08-01 21:54:32 -04:00
noot
0eb4f73dcc refactor: create protocol backend, rename protocol packages to xmrmaker/xmrtaker (#123) 2022-06-02 22:08:20 -04:00
noot
6d82cba9b1 migrate to dleq-rs library (#112)
* implement CGODLEq prove/verify

* migrate fully to cgo dleq

* bump monero version
2022-05-01 18:09:00 -04:00
noot
968dd75fbd fixes for stagenet, log cleanup, add automated stagenet tester binary (#108) 2022-04-11 18:56:53 -04:00
noot
15c094c513 add CORS support (#81) 2022-01-21 17:15:16 -05:00
noot
e2cffc980a implement swapcli (#47)
* add lock to swapState

* cli created w discover, query, and initiate

* add bold logging

* update readme
2021-11-25 23:15:06 -05:00
noot
5da175b471 utilize t0 and t1 logic in protocol code for Alice and Bob (#30) 2021-11-21 21:10:34 -05:00
noot
10749646df implement rpc server for daemon process, refactor codebase to be controlled via rpc calls (#23) 2021-11-14 18:48:07 -05:00
noot
c8644792ec add discovery and advertisement; update WantMessage to be ProvidesMessage (#21) 2021-11-13 19:18:01 -05:00
noot
fc415117f1 start network messaging 2021-10-23 11:41:15 -04:00
noot
67fd190e64 begin p2p net 2021-10-23 10:12:37 -04:00
noot
741be865a5 add monero package, able to generate monero keys 2021-10-22 16:53:42 -04:00