Commit Graph

224 Commits

Author SHA1 Message Date
Dmitry Holodov
adfb0fa602 Test cleanup (#135)
* version independent monerod path with localhost-only binding

* fixed lint target and install script

* created 3rd ETH key constant to avoid race condition in tests

* updated run-integration-tests.sh with the same changes made to run-unit-tests.sh

* new design for paritioning out 2 unique keys to test packages

* restored accidentally deleted tests/alice.key

* removed websocket connection leaks from tests

* made file paths unique between tests with better file cleanup

* fix for the websocket connection leak commit

* reverted increase of GenerateBlocks (didn't mean to commit that)

* fixed maker/taker key that I had reversed

* fixed incorrect zero-balance check

* fixed comment on ClaimOrRefund

* added back sample script for installing go in /usr/local/go

* etchclient creation cleanup using t.Cleanup()

* minor cleanup to ganache_test_keys code

* initial dynamic monero-wallet-rpc implementation for tests

* converted monero tests to use dynamic monero-wallet-rpc services

* unit tests all using dynamic monero-wallet-rpc services

* fixed 2 tests that failed after moving to dynamic monero-wallet-rpc services

* fixed low balance issues in TestSwapState_NotifyClaimed

Co-authored-by: noot <36753753+noot@users.noreply.github.com>
v0.1.0
2022-06-29 13:36:03 -04:00
noot
68f17665af fixes for stagenet swap and UI (#137) 2022-06-23 16:15:20 -04:00
Thibaut Sardan
7ae4dcbbbe Metamask store cleanup and bring back success message (#129) 2022-06-14 23:05:21 -04:00
noot
cca0b6c771 allow for multiple ongoing swaps (#128) 2022-06-13 20:50:10 -04:00
noot
11e3b27c2e ui: metamask integration, swapd: implement external sender for front-end integration (#126) 2022-06-07 18:06:24 -04:00
noot
0eb4f73dcc refactor: create protocol backend, rename protocol packages to xmrmaker/xmrtaker (#123) 2022-06-02 22:08:20 -04:00
Matthew Di Ferrante
961ceea463 Optimize gas usage through less reads (#122)
* rework contracts to use less gas by storing just swap hash when creating a swap

* prevent overriding of existing swaps

* ensure swap exists when trying to refund

* update bindings script and go contract bindings

* update swapfactory go tests

* updating protocol, compiles

* update recoverer, everything builds

* fix cmd/recover tests

* fix recover tests

* lint

* fix checkContractCode

* fix protocol/ tests

* inherit secp256k1 instead of using library to prevent double deployment

* rerun abigen and hardcode runtime bin for now

* add nolint to long hardcoded runtime bin line

* cleanup commented out stuff

Co-authored-by: noot <elizabethjbinks@gmail.com>
2022-05-28 22:36:01 +02:00
noot
5384d707a5 add joining stagenet and recovery module documentation (#117) 2022-05-24 20:37:27 -04:00
noot
db1572a74e check that contract code is valid before swapping (#116) 2022-05-19 22:20:53 -04:00
noot
4931e012db fix: add nil check for shutdown err (#115) 2022-05-16 21:52:10 -04:00
noot
55ae59046c add more unit tests + errors clean up (#114) 2022-05-15 23:36:03 -04:00
noot
2b631d2d36 automated tester improvements and fixes (#111) 2022-05-09 21:30:07 -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
a7907ecd12 ui: display multiple peers (#110) 2022-04-04 17:38:22 -04:00
noot
8bb6499a90 check that XMR amount peer will send is same as expected (#105) 2022-03-24 10:55:21 -04:00
noot
5da8a30630 update donations section of readme (#104) 2022-03-21 20:49:25 -04:00
noot
65d64544d7 implement unhappy path and error case integration tests (#102) 2022-03-21 15:54:41 -04:00
noot
d24eb78434 create separate integration test CI job, implement net_makeOfferAndSubscribe, swap_getOffers, implement happy path integration test (#101) 2022-03-15 22:50:05 -04:00
noot
f0021ce118 implement websocket client, net_takeOfferAndSubscribe (#100) 2022-03-07 22:05:27 -05:00
Thibaut Sardan
cd4de3c01e ui: devnet setup script and show errors in the UI (#99) 2022-03-05 17:58:07 -05:00
noot
e81de8cd57 implement websockets server and swap_subscribeSwap (#96) 2022-02-26 17:58:38 -05:00
Thibaut Sardan
7710b52cba ui: check user input eth value, add waiting for swap module (#91) 2022-02-24 10:13:26 -05:00
noot
f98ba1f902 implement swap_getStage (#95) 2022-02-12 20:46:42 -05:00
noot
8a8bc8a943 implement swap_refund endpoint (#94) 2022-02-12 20:07:36 -05:00
noot
718092a6f3 implement net_takeOfferSync (#92) 2022-02-11 00:15:52 -05:00
noot
5d225ac41d add code coverage to unit tests step, add lots of unit tests (#79) 2022-02-05 23:07:29 -05:00
Thibaut Sardan
a44c956415 Some UI to get started (#87) 2022-02-05 22:29:53 -05:00
noot
d62765a1ff implement SwapFactory.sol and integrate into codebase (#85) 2022-01-26 19:27:29 -05:00
noot
b0b6cb5286 implement swap_ rpc service to allow for fetching of current/past swap statuses (#82) 2022-01-22 22:24:43 -05:00
noot
15c094c513 add CORS support (#81) 2022-01-21 17:15:16 -05:00
Thibaut Sardan
8b271bac79 readme and gitignore update (#80) 2022-01-20 21:40:30 -05:00
noot
e961f4dd2e add json-rpc documentation (#78) 2022-01-17 22:21:04 -05:00
noot
c472ba4d94 cleanup ethereum tests (#77) 2022-01-17 10:56:43 -05:00
noot
988b514cf1 cleanup codebase (#72)
* remove unused code, move some funcs around

* move monero/crypto to crypto/monero

* cleanup alice swap_state.go, move funcs

* move rpcclient and types package to common
2022-01-16 23:34:29 -05:00
noot
651b3060a3 reimplement ecrecover hack for secp256k1 ecmul; change license to LGPL (#76) 2022-01-16 23:24:43 -05:00
noot
5eed62ee4f add hardhat test step to ci (#70) 2022-01-15 14:13:44 -05:00
noot
39e6cc0bcd integrate DLEq into protocol (#67)
* update contract to use secp256k1 curve verification

* update go contract bindings script and bindings

* cleanup rust code, move to its own folder

* remove commented out stuff

* go fmt

* add go wrapper around farcaster-dleq

* add unit tests for farcaster-dleq wrapper

* add dleq unit test for keys

* add swap.go claim test, worksgit status

* add swap.go refund tests

* lint

* update SendKeysMessage to include DLEqProof, update alice/bob generateKeys

* add dleq proof verification to alice/bob handlers

* move alice and bob to protocol package

* add common protocol funcs for generating/verifying dleq proof

* lint

* update alice to store secp256k1 pubkey commitments in contract, update alice/bob to use dleq secret when calling contract

* update alice unit tests

* fix bob unit tests

* update network msg size

* add build-dleq makefile step

* cleanup

* attempt to fix test

* skip inconsistent test on CI
2022-01-15 13:41:27 -05:00
noot
242cb82d92 implement recovery in case program crashes during swap (#65) 2022-01-11 23:40:46 -05:00
noot
5033587a4a refactor: allow for Bob to explicitly make offers and Alice to take them (#66)
* begin refactor of make/take offer

* implement ability to make offer, advertise new offers, lint, etc

* implement personal rpc service

* update readme instructions

* add check that taker of offer provides correct amount
2022-01-04 21:13:33 -05:00
noot
bcbb77d8f6 add private key proof to SendKeyMessage, verify on receipt (#62) 2021-12-11 20:54:21 -05:00
noot
d6aba125e4 improve linter and lint code (#58) 2021-12-11 11:26:06 -05:00
noot
3ce14925ec add acknowledgement to protocol doc (#59) 2021-12-09 23:24:01 -05:00
noot
78752a9088 implement refund path for Bob on unexpected stream closure, add contract checks (#56) 2021-12-06 23:18:30 -05:00
noot
acee21ce19 add --gas-price, --gas-limit flags, net_setGasPrice RPC (#55) 2021-12-06 22:00:55 -05:00
noot
d9bd457465 ci: split integration tests and unit tests (#57)
* split integration tests and unit tests

* add script
2021-12-06 21:40:27 -05:00
noot
0c41b794e7 add more unit tests, add integration tests (#53) 2021-12-01 23:54:39 -05:00
noot
7fc25772e8 add disclaimer (#51) 2021-11-29 13:20:52 -05:00
noot
d703279d9b update units passed by cli/RPC to be standard unts, not smallest denomination (#50)
* update units for cmd line/RPC to be ether and monero

* fix log

* cleanup

* lint
2021-11-28 16:57:56 -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