Git Product home page Git Product logo

wormhole-foundation / wormhole Goto Github PK

View Code? Open in Web Editor NEW
1.6K 79.0 610.0 157.33 MB

A reference implementation for the Wormhole blockchain interoperability protocol.

Home Page: https://wormhole.com

License: Other

JavaScript 1.63% Shell 0.98% Dockerfile 0.12% Rust 11.23% Starlark 0.19% Go 19.38% HTML 0.01% TypeScript 54.18% Solidity 4.52% Makefile 0.18% Python 1.85% Move 5.73%
solidity golang blockchain rust

wormhole's Introduction

Banner

This monorepo contains the reference implementation of the Wormhole protocol.

To learn about how to use and build on Wormhole read the docs.


See Live Contracts for current testnet and mainnet deployments of the Wormhole smart contracts.

See DEVELOP.md for instructions on how to set up a local devnet, CONTRIBUTING.md for instructions on how to contribute to this project, and SECURITY.md for more information about our security audits and bug bounty program.

See docs/operations.md for node operator instructions.

โš  This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Or plainly spoken - this is a very complex piece of software which targets a bleeding-edge, experimental smart contract runtime. Mistakes happen, and no matter how hard you try and whether you pay someone to audit it, it may eat your tokens, set your printer on fire or startle your cat. Cryptocurrencies are a high-risk investment, no matter how fancy.

wormhole's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wormhole's Issues

Build reproducibility and pinning

  • We need to make sure that all external dependencies we pull in are pinned to exact version such that it doesn't randomly start failing or become compromised.
  • If it's easy to do, builds should be byte-by-byte reproducible.

Include SPL token identifier in ERC20 name

All ERC20 tokens are currently called WWT, which might confuse the heck out of block explorers, wallets, and users.

The reason for this is that SPL tokens do not have names on-chain, but we can do the next best thing and include the truncated SPL token address to make them easier to distinguish.

Fees on Solana (ETH relay fees)

We'll need to charge fees for ETH relayers (gas fees).

Challenges:

  • How to determine who relayed the tx (successfully)?
  • How much to charge?

Support ERC-721

This is a placeholder ticket for ERC-721 NFT wrapping support. Our team is not planning to implement this, but the project is open to contributions that add such support. If you plan to work on this, please reach out first (like by commenting on this issue or the #wormhole channel on the Solana Discord server).

Rough outline on what is needed:

  • A stable and generally accepted ERC-721 equivalent on Solana.
  • Wrapper contracts on Ethereum and Solana.
  • A new VAA message type and implementations in the Eth and Solana contracts.
  • Bridge node support for the new message type.
  • Auditing the changes.

Depending on what mainnet upgrade paths will look like, it may also require a separate bridge contract on Ethereum (#13).

Implement eviction methods

In order to reduce fees on Solana and reduce the storage usage of the bridge system, temporary accounts can be evicted.

Accounts that can be evicted:

  • ClaimedVAA
  • TransferOutProposal (Lockup)

The ClaimedVAA is created and paid for by the guardians, the TransferOutProposal is paid for by the user locking the tokens.

Account Size (byte) Rent Rent USD (3.4 $/SOL)
TransferOutProposal 1140 0.009 SOL 0.03$
ClaimedVAA 37 0.001 SOL 0.004$

In order to incentivize guardians and cover their SOL costs, all "rent refunds" go to the bridge program. The balance of the bridge is used to subsidize the creation of ClaimedVAAs (to reduce the cost that guardians have to cover). If there is any excess balance on the bridge, we can consider paying it out to the guardians.

To still guarantee data-availability and prevent replay attacks, we need to make sure that the ClaimedVAA and TransferOutProposal accounts live for at least the VAA validity period.

Remove VAA timeout

VAAs need to stay valid while the guardian set is valid to allow users to resubmit dropped VAAs.

terra: devnet improvements

The Terra devnet needs some improvements to bring it up to the level of the Eth & Solana integrations:

  • Remove the big ConfigMap blob from the k8s YAML and use a layered Dockerfile instead (optional, not required)
  • Deterministic generation of addresses/key.
  • Containerize devnet setup steps and run them automatically as a sidecar container, remove outside deps.
  • Initial guardian set needs to be submitted in checkDevModeGuardianSetUpdate.
  • terrad spams errors: terra-terrad โ”‚ E[2020-11-19|01:26:22.936] Failed to save AddrBook to file module=p2p book=/root/.terrad/config/addrbook.json file=/root/.terrad/config/addrbook.json err="open /root/.terrad/config/write-file-atomic-05346018749820359876: read-only file system"

Determinism and automated setup is required to run automated tests for the Terra integration.

End-to-end functionality tests

  • Native tokens locked on Solana
    • ...to Ethereum
    • ...to Solana
    • ...to Terra
    • ...to invalid chain
  • Native tokens locked on Eth
    • ...to Ethereum
    • ...to Solana
    • ...to Terra
    • ...to invalid destination
  • Wrapped tokens locked on Solana
    • ...to Ethereum
    • ...to Solana
    • ...to Terra
    • ...to invalid chain
  • Wrapped tokens locked on Eth
    • ...to Ethereum
    • ...to Solana
    • ...to Terra
    • ...to invalid destination
  • Repeated guardian set updates
    • on Ethereum
    • on Solana
    • on Terra
  • Large guardian set updates
    • on Ethereum
    • on Solana
    • on Terra
  • Retrying lockups after a gossip network outage
    • on Ethereum
    • on Solana
    • on Terra
  • Guardian set expiration
    • on Ethereum (tested via unit test)
    • on Solana
    • on Terra (tested via unit test)
  • VAAs cannot be executed twice (including across guardian set updates and in different consensus rounds)
    • on Ethereum
    • on Solana
    • on Terra
  • Retrieve VAA from Solana to submit to Eth
  • Dust refund
  • Transaction fee refund
  • Quorum on all chains
  • Contract upgrades on Solana
  • Guardian set updates with full subsidizer pool

Supervisor backoff going negative

http://phab/T756 (internal SignOS task) showed up when my overnight test run crashed:

2020-08-20T22:54:23.460Z        ERROR    wormhole-guardian-1.supervisor  Runnable died   {"dn": "root.ethwatch", "error": "returned error when NODE_STATE_NEW: panic: hash is required to be exactly 32 bytes (31), stacktrace: goroutine 90 [running]:\nruntime/debug.Stack(0xc000144ab0, 0x10acc40, 0xc000227330)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0x9d\ngithub.com/certusone/wormhole/bridge/pkg/supervisor.(*supervisor).processSchedule.func1.1(0xc0005b4f80, 0xc0002d2330)\n\t/app/pkg/supervisor/supervisor_processor.go:140 +0x6e\npanic(0x10acc40, 0xc000227330)\n\t/usr/local/go/src/runtime/panic.go:969 +0x166\nmain.ethLockupProce
ssor.func1(0x15a5c80, 0xc0005b5100, 0x10c9120, 0xc0000ff380)\n\t/app/cmd/guardiand/ethwatch.go:136 +0x4d24\ngithub.com/certusone/wormhole/bridge/pkg/supervisor.(*supervisor).processSchedule.func1(0xc0005b4f80, 0xc0002d2330, 0xc00001b2d0)\n\t/app/pkg/supervisor/supervisor_processor.go:147 +0x6a\ncreated by github.com/certusone/wormhole/bridge/pkg/supervisor.(*supervisor).processSchedule\n\t/app/pkg/supervisor/supervisor_processor.go:133 +0xae\n"}                                                                                                                                                                                             2020-08-20T22:54:23.462Z        INFO     wormhole-guardian-1.supervisor  rescheduling supervised node    {"dn": "root.ethwatch", "backoff": -0.000000001}

2/3+ majority

The spec says 2/3+, implementation is 2/3. Fix this and align across all components.

More of a formality due to how our consensus works.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.