Commit Graph

691 Commits

Author SHA1 Message Date
Leo 00a92b0278 README.md: add mini FAQ
Change-Id: Id0379f56f1fcdaea3a58cf719d8593e799ddd55a
2021-06-04 14:42:50 +02:00
jschuldt 0e602ed91d Add explorer web app and web proto codegen
- update buf to latest to support ts-proto plugin

- add NodeJS dev dependency for web-proto codegen

Change-Id: I881f9da7461d5d4ff28a64304a2adc33037598d1
2021-06-02 16:05:16 +00:00
Justin Schuldt 3b294c586a Use full import path in proto's go_package
Change-Id: I1f3592512804ad92506914eda67d9ce59effdc0e
2021-06-01 19:04:49 +00:00
Leo 4f306fdb8b solana/agent: always submit signature verify transactions
The first transaction acquires a pseudo-lock by setting
initial_creation = true, which will fail if a signature account
already exists. However, this is unsafe since the operation
consists of multiple operations and is not atomic - if the first
validator fails to submit a full set of signature transactions,
other guardians will not retry submitting signature verification txs.

We disable this mechanism to never set initial_creation, which
causes guardians to spend more fees in exchange for fault tolerance.

Instead of failing with an AlreadyExists error, duplicate transactions
will now succeed as a no-op and all nodes will attempt to submit
the full series of signature transactions.

Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
Change-Id: I0c418497f19cc97c9ae7a11b206035d6e70c1b66
2021-05-31 13:33:47 +00:00
Leo 79cc6a9f46 bridge: allow specifying skip_preflight in debug VAA submission
This allows forcibly submitting a failing VAA on-chain in cases where
the preflight check would hinder debugging.

It does not change behavior of guardiand.

Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
Change-Id: I63df22049ad27f659dc0638190edd20628b7a338
2021-05-31 13:33:43 +00:00
Leo c1c2c7ae49 solana/agent: add extra context to SubmitVAA errors
Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
Change-Id: I5e2b9120e0626ba4e5021f3012802e2d3978584e
2021-05-31 13:33:40 +00:00
Leo a2ff5ca73c bridge/debug: add post-vaa-solana command
Co-authored-by: Hendrik Hofstadt <hendrik@nexantic.com>
Change-Id: I482487f39eae1a3aebd1c7fdbe10e5b9c2dd44ad
2021-05-31 13:33:36 +00:00
Leo 45639b18fb bridge/pkg/solana: fix package name and remove unused lockChan
Increase VAA submission timeout.
Change-Id: I5e774f2930e2f0d865d733eee2f0bb01da1b82f3
2021-05-31 13:33:32 +00:00
Leo b04dd1cc2f bridge/debug: refactor
Move the debug command out of vaa.go in preparation for adding
additional comments.
Change-Id: Id387eace5d488952331f5d7f16c43b235676df24
2021-05-31 13:27:34 +00:00
valentin c3fa835196 ethereum generalized messaging & governance
Change-Id: I412111a10749050ca095458f2fcfe81ce0fe189c
2021-05-27 16:01:49 +02:00
Alwin 2025efd50a switch terra contracts over to using governance packet structure
Change-Id: I10b53cb0cfdb86ca2aa57cab20ec375a26fd252e
2021-06-01 17:10:34 -04:00
Alwin 08ca466a40 clean up error messages, duplicated files, fix bug where asset can be attested multiple times
Change-Id: I95655968d3582e837a28eddc34d15d4ca55a488b
2021-05-31 18:04:12 -04:00
Alwin 16cc520187 initial terra contracts for wormhole v2
Change-Id: Ie28f1e7ce381fcbf33de609bc6c8465679cd2a43
2021-05-31 09:13:59 -04:00
Stan Drozd e1c2f73e29 Implement Wrap for solitaire::Sysvar<...>
Change-Id: I066e425d1e1549ea296a4b54ef019872064a8acd
2021-06-16 12:09:06 +02:00
Hendrik Hofstadt 834b26b773 Implement Derivation context
Change-Id: I18d69b60e23aa262efc2f182bdad5770a5c3de60
2021-06-14 18:58:12 +02:00
Stan Drozd e51503b4f7 solitaire, macros.rs: stop panicking in dispatch()
Change-Id: I12df1318c56799209821ad92d491e55810fe820f
2021-06-14 15:16:09 +02:00
Hendrik Hofstadt b3b083b08a Implement account persistence
Accounts with data will now be persisted at the end of the program execution

Change-Id: I1dd29f521f5c659ced5758203acf532b645f3b44
2021-06-11 17:14:21 +02:00
Hendrik Hofstadt c3829b9266 Fix seed derivation and implement proper dependency system
Seeds currently did not account for the requirements of PDAs not being on the curve. This change
uses the `find_program_address` method to also be able to derive "bumped seeds" from types implementing
the Seeded trait. This is now also used for account creation.

Also the way we originally planned to pass through dependencies in Peel is not compatible with the client as some
of the context is not given there. I introduced a new method named "deps" with the same "chaining mechanic" that
can provide deps that are appended to the accounts passed into the instruction.

Change-Id: I116c8a3611e54b5a7fe5285310e4bc047119d656
2021-06-11 14:01:31 +02:00
Stan Drozd 388743fa6c Implement Wrap for Data, fix solitaire version string
Change-Id: I28dcfc334995572ab2c864d045334d124aca1e31
2021-06-11 14:29:43 +02:00
Stan Drozd 70b49e3525 Fix compilation errors
This commit tackles two important problems with our contract code

- use of solana-sdk - I exile the code that relies on solana-sdk's
Keypair to a new solitaire-client crate that will conveniently handle
such client-only cases from now on

- Don't use `const-generics_defaults` - latest official release of
solana does not allow for using them and I don't find it practical to
install the experimental toolchain.

Change-Id: I3319db109de4ebcce9091e0284e756ce09264985
2021-06-08 16:50:43 +02:00
Stan Drozd c700e8847b Solitaire client implementation
Change-Id: I4d1f37082537cd24a4859802652a177400f6a205
2021-06-04 13:02:35 +02:00
Hendrik Hofstadt 2b473f1f12 Implement bridge core
Change-Id: I6d5b382702b40584f962221dad20af3d6ec50d8c
2021-06-07 09:04:12 +02:00
Hendrik Hofstadt 13c7e693c2 Improve sysvar and account state handling
Change-Id: Ic60433f921c14ce66f6039245a2964dee4f60e8f
2021-06-07 09:03:25 +02:00
Stan Drozd b7c5e08117 Add a dockerfile able to compile the v2 bridge workspace
Change-Id: I037064d38e14c0c5962998b67692c2595e170da7
2021-06-07 17:14:56 +02:00
Leo 7af24f29c4 design: update headers
Change-Id: Ice416896387645e0d650a123e9b3be447f7b07b4
2021-06-10 16:10:48 +02:00
jschuldt a3ed2fbd72 Add gRPC proxy for guardian's publicRPC interface.
Change-Id: Iafdf57536724b2eaaec1c62132717ab9019b177d
2021-05-24 19:23:18 +00:00
jschuldt 16157d339d Add publicrpc endpoint for external clients.
- Distribute raw heartbeats via new proto package publicrpc

- Manage channel subscription on client req/close.

- Expose publicprc endpoint in devnet Service.

Change-Id: Ic96d624733961aa56e00b03c3b5cff6af11523a4
2021-05-24 13:38:58 -05:00
Hendrik Hofstadt 6beb1dfca7 Message publishing and fees design doc
Change-Id: I0cb70e5bbad5e65950c7b60ae25979de6fcd10f9
2021-05-11 18:47:54 +02:00
Reisen 05ea24faf7 Solitaire Refactor
Change-Id: I48306fbb00a813d83e0411a38b15123e922f8766
2021-06-03 13:23:25 +00:00
Reisen 32b2f11def Bridge Converted to Solitaire
Change-Id: I6223c5d51d6bda7f3581339a93f9519725a337b9
2021-06-03 03:11:18 +00:00
Hendrik Hofstadt 2202a38c65 Implement wrapper helper traits
Change-Id: I4d389d18a8b55a648532062804bb28e806c93a0c
2021-06-02 12:40:31 +02:00
Hendrik Hofstadt 88a94a9129 Implement Seeded trait and account creation
Change-Id: I355b88e07b872f8b4869fa9b7fa8dcae4806527d
2021-06-02 12:40:18 +02:00
Hendrik Hofstadt e2195c9b17 Support deserialization on Pack types
Change-Id: I1eeee002b4a396f94661a938fb0dad1bf958719f
2021-06-02 12:39:47 +02:00
Hendrik Hofstadt 02ecdb691a Allow ToAccounts to be used on generic structs
Change-Id: I70939482e68946f15b744ddc8f4db01af1b7d73a
2021-06-02 12:37:18 +02:00
Stan Drozd d86dc75734 Add ToAccounts and Wrap skeleton, derive macros
Change-Id: I2ccb742cc8a49db7b170aa3a284bce003193a903
2021-06-01 14:57:28 +02:00
Stan Drozd e422bd3d8c clean up solitaire! macro
Change-Id: I208d7b71c870b5f22c802fe25b0d003fc1047c54
2021-05-31 16:55:35 +02:00
Reisen 652f4ea3b1 Initial Solitaire Base
Change-Id: I6789364464ef03ada87b7d446abb43df033d133d
2021-05-25 16:32:45 +00:00
Hendrik Hofstadt 2c8e25ec12 Add token bridge module design doc
Change-Id: I4959b3bebef6c8c181fbe485bc42812bada43b61
2021-05-25 08:06:48 +00:00
Stan Drozd e0b193b390 anchor-client with new()
This commit introduces an anchor-bridge-client crate with a partially
working new() call. Still needs proper handling of seeds for some of
the accounts.

Change-Id: I73bfc4b7e23c45643776ba8f13946f1f8c7c65ed
2021-05-18 14:55:56 +02:00
Reisen 360d0ad0b1 Anchor fails to generate Initialize without a call.
Change-Id: I226631537b06b08d757222cfc3c502b576503c6d
2021-05-05 09:56:03 +00:00
Reisen baf9614998 Generate, sign, and populate message fields.
Change-Id: Ia03b080f17fc27e34178dda0a946d46a6cb6877c
2021-05-04 05:12:32 +00:00
Reisen edfbfc93db Add account initialization for message, no seeds
Change-Id: I8fef4dd497457fc3ddbf2556e39fb57377cbb55f
2021-05-04 05:02:50 +00:00
Reisen 249fc68107 Add an unknown default for Chain type
Change-Id: I1c175c906311063dd10db4ea3ed693098592585d
2021-05-04 05:01:53 +00:00
Reisen 8effae6cb5 Add a fixed size message type, hacky for now
Change-Id: I62f3bbe6bb760c7dd3c21f6bd98de54dfb0bb00b
2021-05-04 04:13:18 +00:00
Reisen aab8efec63 Add constant time fee calculation function
Change-Id: Ifc6dcfce4066d6767bf03f79133920daea112697
2021-05-04 02:15:04 +00:00
Reisen b0e7e363c5 Get into the habit of sysvar/system accounts at the bottom
Change-Id: I124fdfc22404f6afa12180e6a7ce0afe6bc26f8d
2021-05-04 02:05:14 +00:00
Reisen edc8a91ecd Use associated account for guardian set.
Change-Id: Ic535115be997d3173c6bb891d980cb8c3e09d5d4
2021-05-04 01:57:16 +00:00
Reisen c4286b9df5 Move accounts back to lib.rs as associated breaks otherwise.
Change-Id: Ic4e7cddaaac414cbc9afb5eee4e8a9c81b2f8548
2021-05-03 23:59:02 +00:00
Reisen 569ecab2eb Add Instruction id check to signature verification
Change-Id: Ia54d5932d4d1be81b3752bac96ed2a2b555ef322
2021-05-01 01:50:15 +00:00
Reisen a63af890b6 Add Anchor error and Result wrapper.
Change-Id: I6374dc81737ea711ead1fedd9e29007dbb625500
2021-04-30 11:33:02 +00:00