Commit Graph

207 Commits

Author SHA1 Message Date
Leo de8d1dee31 devnet: pin Dockerfile syntax to digest
This speeds up the build by ~1.5s by avoiding a remote lookup on
Docker Hub every time this is built (WTF).
2020-11-29 17:07:15 +01:00
Leo 114524a096 ethereum: update packages and use package-lock.json
Ran `npm update`. This resolves a ganache crash.

We can't really use `npm ci` because it's intentionally incompatible
with our incremental development workflow. We'll want to use it for
production builds, though.

ghstack-source-id: c66c5d4647
Pull Request resolved: https://github.com/certusone/wormhole/pull/89
2020-11-19 12:57:21 +01:00
Leo da768a09c4 ethereum: mine ganache blocks in the background
Fixes #75.
2020-11-18 13:56:56 +01:00
Leo 53c994b1ac ethereum: a wild node-gyp python dependency appeared
¯\_(ツ)_/¯
2020-11-16 14:09:21 +01:00
Leo 13f79a96b3 devnet: use real account and nonce for send-lockups.js
ghstack-source-id: fb233fa727
Pull Request resolved: https://github.com/certusone/wormhole/pull/61
2020-10-28 22:47:12 +01:00
Hendrik Hofstadt dadb287220
bridge: fix quorum calculation (#69) 2020-10-28 21:22:15 +01:00
Hendrik Hofstadt 8d7a35683e
bridge: fix quorum (#56) 2020-10-25 08:57:04 +01:00
Leopold Schabel a0b3b1bf0c Fix send-lockups.js to use new lockAssets ABI 2020-10-08 17:44:33 +02:00
Hendrik Hofstadt b4b0c61dfc bridge: require single step guardian set index changes 2020-08-31 09:25:41 +02:00
Hendrik Hofstadt 3e88ed023e ethereum: properly realign transfer decimals, handle decimals on ETH transfers, don't allow same-chain transfers
Co-authored-by: Valentin von Albrecht <valentinvonalbrecht@yahoo.de>
2020-08-30 19:25:31 +02:00
Hendrik Hofstadt 4871022fee ethereum: prevent invalid guardian sets or same signer signatures
Co-authored-by: valentin <valentinvonalbrecht@yahoo.de>
2020-08-30 17:30:43 +02:00
Hendrik Hofstadt a2bd5fbb11 ethereum: truncate decimals to 9 2020-08-30 11:21:45 +02:00
Hendrik Hofstadt f6750a3762 all: consider decimals on wrapped assets, fix VAA posting, fix solana account parsing 2020-08-28 15:10:42 +02:00
Hendrik Hofstadt 8e6dc495dc bridge: remove VAA timeout
Closes #35
2020-08-28 08:49:46 +02:00
Hendrik Hofstadt a9dee7da99 ethereum: use create2 for wrapped assets 2020-08-28 08:35:00 +02:00
Leo 5a72d9029a VAA guardian devnet submission 2020-08-27 17:46:40 +02:00
Hendrik Hofstadt e0533c70c5 ethereum: make sure quorum calculation is done in the right order 2020-08-22 01:11:03 +02:00
Leo b663e2dc56 Generalize token lockup processor 2020-08-21 13:00:44 +02:00
Hendrik Hofstadt 5b7b80dbe8 ethereum: add nonce to tests 2020-08-21 12:48:14 +02:00
Leo d9ede323f2 Add nonce to send-lockups.js 2020-08-20 21:05:14 +02:00
Hendrik Hofstadt 9b3f7999ba ethereum: add nonce to transfer input 2020-08-20 20:11:45 +02:00
Hendrik Hofstadt 085af1d6b7 Add reentrancy protection 2020-08-20 16:58:03 +02:00
Leo d1c86a0eaa bridge: use new eth devnet addresses and keygen 2020-08-19 17:38:55 +02:00
Hendrik Hofstadt 59449a30b3 Update VAA structure 2020-08-19 16:41:25 +02:00
Leo d6ef9c932c bridge: listen to eth lockups and aggregate signatures from all nodes
Improved devnet setup to generate deterministic node and guardian keys.

Devnet setup routine that configures a dynamic guardian set on Ethereum.

Configurable number of nodes in Tiltfile.
2020-08-19 14:24:38 +02:00
Leo 69d8125c67 ethereum: emit guardian set IDs in LogGuardianSetChanged
go-ethereum is having trouble parsing a log with structs.
2020-08-19 11:47:29 +02:00
Leo 8b34a3c534 ethereum: add getGuardianSet accessor 2020-08-18 16:19:28 +02:00
Leo 12873e5819 Add tooling to regenerate the Go ABI 2020-08-17 23:02:06 +02:00
Leo 7903402fa6 Deterministic hashes for ETH lockups
We're missing a nonce for truly unique hashes - for now, two
identical transfers will only be executed once.
2020-08-17 19:29:25 +02:00
Leo e548bbbee3 devnet: add send-lockups.js truffle script to generate test lockups 2020-08-17 16:31:48 +02:00
Leo dc7a2147b7 devnet: fix generation of deterministic contract addresses
We previously had an extra contract that was deleted, which
changed the contract addresses.

As a workaround, deploy Wormhole twice to fix the tests.
2020-08-17 12:03:16 +02:00
Leo b7512c9203 ethereum: only invalidate npm install if package.json changed
Thanks Lorenz :D
2020-08-17 11:19:14 +02:00
Hendrik Hofstadt 49d2872d9c Update devnet and Solana program 2020-08-16 13:21:39 +02:00
Leo e39469f817 ethereum: install git
Required for properly installing truffle.
2020-08-16 11:25:37 +02:00
Leo f8b313cab8 ethereum: remove unused Schnorr references from tests 2020-08-16 01:54:49 +02:00
Leo 1094c2cadb ethereum: partially fix npm run test 2020-08-16 01:47:10 +02:00
Leo 4d1610d9f0 eth-devnet deployment 2020-08-16 01:38:10 +02:00
Hendrik Hofstadt 6e5a3fa118 Update ETH smart contract for new signature schema 2020-08-15 00:09:48 +02:00
Hendrik Hofstadt 0e69aa4ddc remove requirement for half_q on pub key x
Schnorr signatures don't have the ecdsa malleability vulnerability, also we protect against malleable signatures by tracking consumed VAAs using their body hash.
The check was implemented because the author assumed that ecrecover in the EVM does not accept s < HALF_Q values for malleability protection. There were 2 misconceptions:
1. pubkey_x is passed in as r and not s, 2. the check is not enforced in the precompiled evm instruction.
2020-08-10 21:08:57 +02:00
Hendrik Hofstadt 9749044c25 make wrapped asset check public on eth 2020-08-09 21:16:18 +02:00
Hendrik Hofstadt c2673c109a prevent old guardians from updating the set 2020-08-07 11:12:46 +02:00
Hendrik Hofstadt 6aa9c874cf extend tests on contract 2020-08-06 23:41:26 +02:00
Hendrik Hofstadt 7add58bef5 clean up contract 2020-08-06 23:36:49 +02:00
Hendrik Hofstadt f52ba57eff Add source reference 2020-08-06 23:34:15 +02:00
Hendrik Hofstadt 6e0fe64937 Add smart contract tests 2020-08-06 23:32:31 +02:00
Hendrik Hofstadt 90b9d403e6 Optimize contract 2020-08-06 18:59:58 +02:00
Hendrik Hofstadt 5368c26332 Remove outdated comment 2020-08-06 16:28:28 +02:00
Hendrik Hofstadt 8f7b4917fa Support fee-charging ERC20 tokens 2020-08-06 16:26:25 +02:00
Hendrik Hofstadt c23f8103de Fix wrapped asset proxy 2020-08-06 16:17:41 +02:00
Hendrik Hofstadt b6c85217b6 Add ETH tracking 2020-08-06 15:43:45 +02:00
Hendrik Hofstadt be2a51b447 Optimize ETH contract 2020-08-06 13:38:25 +02:00
Hendrik Hofstadt bb2e3be463 Update Wormhole solidity contract 2020-08-05 22:44:28 +02:00
Leo 71c0e29dcf solana: note lack of clock reliability 2020-08-04 19:52:41 +02:00
Leo f06c4fc50d eth: fix typo 2020-08-04 19:52:41 +02:00
Hendrik Hofstadt 20a67604fd
Implement full bridge in Solidity (#5) 2020-08-03 15:09:40 +02:00
Hendrik Hofstadt ec7f7565da ethereum: remove admin key change feature
Allowing a guardian to change the admin key will enable them to cast multiple votes
2020-07-28 15:17:36 +02:00
Hendrik Hofstadt d4fab1190c chore: restructure for monorepo 2020-07-28 12:39:38 +02:00