Commit Graph

465 Commits

Author SHA1 Message Date
Hendrik Hofstadt c0228415f8 Fix devnet
Change-Id: I1d62e6323cc2169cce43581f9aeefb537bc84a76
2021-07-20 23:34:37 +02:00
Reisen 6ea55f8c25 Upgrade Contract Changes + Test
Change-Id: Iafa06cd7df6dddd514cd2032b7693188d8202c46
2021-07-20 20:56:38 +00:00
Hendrik Hofstadt d7b6281492 Fix governance action ids in Solana
Change-Id: I7e540ae7447ad9ff428fdd8215c21e9f394329af
2021-07-20 20:52:47 +00:00
Hendrik Hofstadt 80244ae0f3 Drop persistence options on Solana
Change-Id: Ia96672f3f80ec5daa0cce71ffbb69e2c059b3494
2021-07-20 21:00:42 +02:00
Hendrik Hofstadt b97a32df37 Fix formatting
Change-Id: I4aaa4ab6bb72d7645a12f0a28a99db71a183ad87
2021-07-20 19:47:42 +02:00
Hendrik Hofstadt 18134cce96 Fix compilation errors
Change-Id: I9d6f25b078a819331d498f918b972db64f17cbe6
2021-07-20 19:47:23 +02:00
Hendrik Hofstadt f9f461d78d Add upgrade authority command to cli
Change-Id: I58d617cbf19a8300a0915f317e63469c73e64c0f
2021-07-20 17:41:27 +00:00
Hendrik Hofstadt 953ca87162 Double hashing in Solana
Change-Id: I86769ae07cb28b38e00025b2f0bcf01919262c98
2021-07-20 17:37:16 +00:00
Reisen 99c3e40968 Fix Governance Headers
Change-Id: If2026ff4a6107327f69c5d0675a736e6ab87f1bd
2021-07-20 17:37:08 +00:00
Stan Drozd 54aadf5f5a pyth2wormhole-client: Fix warnings and the client feature
Change-Id: Ia74685f5e8e448c30678a4445c38f39f2f324a89
2021-07-20 17:06:02 +02:00
Stan Drozd b5463572be pyth2wormhole: Add Pyth data parsing with unit tests
Change-Id: I17e830f5a96342d3a520cc997529b5b865e36597
2021-07-20 17:06:02 +02:00
Stan Drozd 4fcc4f5674 pyth2wormhole: Add client with working initialize
Change-Id: Ie8d99373c4b7d91d1445f9697714493c32d2bd5a
2021-07-20 15:05:00 +00:00
Stan Drozd 2f4517e45a Initial pyth2wormhole skeleton with access verification
Change-Id: I5a9d73144797a2f8e091e91ded744fff7d4e370b
2021-07-20 15:05:00 +00:00
Reisen 1cc90e54db Deserialize only the discriminant in the entrypoint.
It would seem that Borsh, when deserializing an enum will consume a
large amount of stack space proportional to the number of discriminants.
This causes the entrypoint to trigger stack frame access violations
during the initial deserialization.

This change uses an enum represented by a u8 instead, and removes the
association between the discriminant and the data. Deserializing the
associated data is now pushed down to within the entrypoint match arms
instead.

Change-Id: I2dcb466bf7820b3344e175ad92988bb89f30cb15
2021-07-20 11:11:28 +00:00
Hendrik Hofstadt fb3d267a50 Correct governance header module
Change-Id: Ib2ebfeedab0bf40c466def0a58a6f3971db81dfc
2021-07-19 12:17:56 +00:00
Hendrik Hofstadt 8f4ed821ab Correct decimal data type
This was already correct in terra and eth but wrong in the design doc and solana

Change-Id: I6e3fcf710d81f3cb56868ff7ab73fb3aba1d95bf
2021-07-19 10:46:40 +00:00
Hendrik Hofstadt af4e29978d Add commitment level to VAAs
This allows requesting attestations for various commitment/confirmation levels. This is helpful for low-latency applications like Pyth.

Change-Id: Ib49ace163365106b227613d2f66b787b3e5f5461
2021-07-19 07:11:45 +00:00
Stanislaw Drozd 844a303b5b Revert "Solitaire: Extend Peel to support CPI re-wrapping"
Revert submission 693

Reason for revert: Moving away from CPI abstraction
Reverted Changes:
I8c252e137:bridge, token_bridge: Use Many<T>
I6a721e8a8:Solitaire: Add an explicit Many<T> type for nested...
Ibdc94b4c6:Solitaire: Serialize CPI accounts as an AccountMet...
Iefa59f5d4:Solitaire: Extend Peel to support CPI re-wrapping

Change-Id: Iab567aea6dca5be1a7bf7efd4b86e0be05d2753c
2021-07-15 13:22:50 +00:00
Stanislaw Drozd cbc5ae3ed1 Revert "Solitaire: Serialize CPI accounts as an AccountMeta vect..."
Revert submission 693

Reason for revert: Moving away from CPI abstraction
Reverted Changes:
I8c252e137:bridge, token_bridge: Use Many<T>
I6a721e8a8:Solitaire: Add an explicit Many<T> type for nested...
Ibdc94b4c6:Solitaire: Serialize CPI accounts as an AccountMet...
Iefa59f5d4:Solitaire: Extend Peel to support CPI re-wrapping

Change-Id: I01733d16862aeac79ad76dff4f58386641488b3e
2021-07-15 13:22:50 +00:00
Stanislaw Drozd f2490339de Revert "Solitaire: Add an explicit Many<T> type for nested structs"
Revert submission 693

Reason for revert: Moving away from CPI abstraction
Reverted Changes:
I8c252e137:bridge, token_bridge: Use Many<T>
I6a721e8a8:Solitaire: Add an explicit Many<T> type for nested...
Ibdc94b4c6:Solitaire: Serialize CPI accounts as an AccountMet...
Iefa59f5d4:Solitaire: Extend Peel to support CPI re-wrapping

Change-Id: I4455479e4a19007893d4cdaac06eece70abfa797
2021-07-15 13:22:50 +00:00
Stanislaw Drozd 24e3896582 Revert "bridge, token_bridge: Use Many<T>"
Revert submission 693

Reason for revert: Moving away from CPI abstraction
Reverted Changes:
I8c252e137:bridge, token_bridge: Use Many<T>
I6a721e8a8:Solitaire: Add an explicit Many<T> type for nested...
Ibdc94b4c6:Solitaire: Serialize CPI accounts as an AccountMet...
Iefa59f5d4:Solitaire: Extend Peel to support CPI re-wrapping

Change-Id: I94dc6f66b631f25fecf2c3b3a8b72302a706f0a2
2021-07-15 13:22:50 +00:00
Stan Drozd 0891d9e433 bridge, token_bridge: Use Many<T>
Change-Id: I8c252e137cd092144ec8af2c2a857c7b1247dbfc
2021-07-14 17:58:17 +02:00
Stan Drozd 6868cc7177 Solitaire: Add an explicit Many<T> type for nested structs
Change-Id: I6a721e8a88652f807f2317cfe4d82be9d629a849
2021-07-14 17:49:56 +02:00
Stan Drozd ee96b6b793 Solitaire: Serialize CPI accounts as an AccountMeta vector from Iter
Change-Id: Ibdc94b4c6359ffef78d3e2313bfee12eef93acc7
2021-07-14 17:41:19 +02:00
Stan Drozd 5827ba7b30 Solitaire: Extend Peel to support CPI re-wrapping
Change-Id: Iefa59f5d4fe36c9f9e2cd0fa997490eba0a1bb44
2021-07-14 17:41:08 +02:00
Reisen 18a6f429cb Move errors to their own file.
Change-Id: If76fc6096f2788e13dad15ea088202159793fb0b
2021-07-12 09:39:03 +00:00
Reisen 35bdef1f8b Check minimum rent exemption balance for transfers
Change-Id: I52b87ea601e9593763a22bc97fe4f4d475a1315f
2021-07-09 14:29:47 +00:00
Reisen 52b17b007a Check foreign message chain state is as expected
Change-Id: Idfdabe1aad843a58c38d8fcc52470058bf5b6b6b
2021-07-09 12:56:52 +00:00
Reisen 7aec992481 Guardian set change with invalid emitter fails
Change-Id: I5668c705c214b72c1b7b21f949b888fb4a2ce5cc
2021-07-09 12:56:51 +00:00
Reisen 69cdccc457 Check guardian set change succeeds at valid message signing
Change-Id: I72ff378d1b263d62fc0bd8fb3c0bc5b4d1280172
2021-07-09 12:56:51 +00:00
Reisen e69c464ba4 Check on chain state for message tests.
Change-Id: I82ca799431ba7bd9b5bb9e5d907c396c67b3d42a
2021-07-09 12:56:51 +00:00
Reisen 95decec044 Transferring larger than balance does nothing
Change-Id: I51d4954357e90a65ba09dc76bc3cf1bd1623606a
2021-07-09 12:40:50 +00:00
Reisen 2769fa2739 Transfer Governance action fails without correct emitter
Change-Id: I86ecbf57ae5b6e8cecd452c4f7a63a6177a460fe
2021-07-09 12:40:50 +00:00
Reisen b676339555 Bridge should still function when fees are free.
Change-Id: Ia0999299cdacab4df8ef3935b1c9f387f26c4ffa
2021-07-09 12:40:50 +00:00
Reisen 8770bf7997 Fees without governance key should fail
Change-Id: I0185db0e8f2c36c08973ca368b9a8ee176534117
2021-07-09 12:40:50 +00:00
Hendrik Hofstadt 2bfdc2fdc9 Add missing derivation checks
Change-Id: I615c5fc4fd737cdeb9bb4a118cdbfb8ef7abc5db
2021-07-08 19:50:56 +02:00
Reisen 3730ce30e3 Check the on-chain state for paid fees test
Change-Id: I85def349ba9888edb8d9e4264c7eb593c0e7c766
2021-07-07 11:46:46 +00:00
Reisen 4f5047f799 Check Duplicate messages fail to persist
Change-Id: Iefbb40ea9e703208d8192571d15630d28cb042f8
2021-07-07 11:46:46 +00:00
Reisen 704e8d6911 Confirm intentionally not signing emitter fails
Change-Id: I0e33303b3105321675295040d027d1b0df57f030
2021-07-07 11:46:46 +00:00
Reisen fc1a104ceb Test Persistent Messages
Change-Id: Ib956b4154d27a1aad5b32ad730783b2480050958
2021-07-07 11:46:46 +00:00
Reisen 0d637482d4 Add Sequence tracker and test initialize
Change-Id: I2ecb360f498fe056332690937c0556448bb286f1
2021-07-07 11:46:46 +00:00
Reisen 007098aaec Allow different commitment level through utilities
Change-Id: I7269e5c64c82dceaf1d70c74fbdfe6e44c247ec5
2021-07-07 11:46:46 +00:00
Reisen 768f768001 Use clock time for bridge initialization timestamp
Change-Id: I6121e7546f4c0590dff830572a843384a0470972
2021-07-07 11:46:46 +00:00
Reisen 7ab5a93b21 Verify emitter in all governance actions
Change-Id: Ib1fdbe9dc553e22a0e61d6f119eb45325d15861c
2021-07-07 11:46:46 +00:00
Reisen 387fcc48c0 Add Mut layer to accounts in bridge program.
Change-Id: I78dfb4568eaec4f597a6d0e1ac10a0f698bb5a61
2021-07-06 12:08:25 +00:00
Reisen 76066c8cc6 Add peel mutability checks for accounts.
Change-Id: Ic6a6fadd13a2b41d60a0c98f3b5d80d23ac263a6
2021-07-06 11:40:13 +00:00
Reisen 72951531f6 Add test for messages from foreign chains
Change-Id: Ic02554f74a84a002f1a211a7cf519394cae1f36a
2021-07-06 09:05:56 +00:00
Reisen 7b030aa59a Add governance transfer_fee tests
Change-Id: I55fe0ccad1447ee7c70b1cc5de6f88cf1a2dfd8a
2021-07-06 09:05:53 +00:00
Hendrik Hofstadt 7784e74725 Align behaviour of persistent message fees
Change-Id: Ic9c6c40dbac2399e0eaf3a861dff33254a828a18
2021-07-05 18:02:04 +00:00
Hendrik Hofstadt d9fde6d7cc Implement optional persistence in Solana wormhole
Also reformatted the token_bridge

Change-Id: I195d7e2e13295c8b28e2a0b63620e3d306dc07e6
2021-07-05 18:02:04 +00:00
Reisen 366a045dd4 Add governance set_fees test
Change-Id: I13cda0ff055daa0fcfd9f0f2993f8e32d2670181
2021-07-05 12:27:46 +00:00
Reisen fd7b53a2a5 Add method to inspect account data in tests
Change-Id: I23ee5b351bcd1cb6fb998384ff87f7bfaf61b885
2021-07-05 12:27:20 +00:00
Reisen 6aa5788354 Confirm guardian set fails for non-gov emitter
Change-Id: Idc49a19be551d4a3c4ae7cafe735995fa4ced0be
2021-07-05 12:27:18 +00:00
Reisen da0ebfee2c Add failing guardian set change test
Change-Id: I4cd5b6360060a76671390ccc196b993d6c72f083
2021-07-05 12:22:39 +00:00
Reisen 20af0ae03a Expose errors from test utilities
Change-Id: I9dbe732bcff004dc85b79a8fe6e9226848de468f
2021-07-05 12:22:39 +00:00
Reisen b4d7265342 Split Integration Tests
Change-Id: Ib75bfbb54647dcda8ba37a08bef2083021ac8418
2021-07-05 12:22:37 +00:00
Hendrik Hofstadt 049177db37 use sequence as seed for persisted VAAs from foreign chains
Without the additional seed, messages with identical (emitter_chain, emitter_address, nonce, payload) but different sequence could fail to be persisted.

Change-Id: I6786f7be33bcc6da7289f54fc62c7a5b10821594
2021-07-02 16:51:26 +00:00
Hendrik Hofstadt b85cbacd3b fix message attestation for Solana
Change-Id: Iaf79984980affe64f268c2eed9f61d5058cea0dd
2021-07-02 16:05:06 +00:00
Hendrik Hofstadt cc08a9753c reformat and fix client
Change-Id: Ie99d2b7cc2ed9890432c38661f1035a473cc5ac1
2021-07-02 11:48:48 +00:00
Hendrik Hofstadt 3c5deee7ee Fix devnet for new contracts
Change-Id: I5b7536884ce3d1bdf39a21a8b71b6a848ad0380f
2021-07-02 13:02:35 +02:00
Reisen 62f5cb1986 Do message payment within same instruction
Change-Id: Id1e3ac10bcdc7e91c649f5e75caf8a98e27be0c6
2021-07-01 09:35:03 +00:00
Reisen cdcf6f5d14 Add tracing to PostMessage.
Change-Id: I13005cef8cc5a07021066e5182b5ad818b3be30e
2021-07-01 09:35:03 +00:00
Reisen af00a3c02a Use trace! inside solitaire
Change-Id: Ic26fcabbb6d6000b306d190aab306307ab9cda7f
2021-07-01 09:35:03 +00:00
Reisen 18e52aafe6 Add tracing log macro that defaults to noop
Change-Id: I5ae1cf9e539a08aa9d820e3bf643a311b2f9080e
2021-07-01 09:35:03 +00:00
Reisen 2e4279c964 Generate Keypairs for guardians during test.
Change-Id: Ide5f0347ee40189aecfe5dca4ba8f4ef3f0756d9
2021-07-01 09:35:03 +00:00
Reisen 889895bc91 Use multiple signatures in tests
Change-Id: Ibcd2cfbd59d3eb3e0d4486252ae93a5f38c3b457
2021-07-01 09:35:03 +00:00
Reisen 4a08dbf73e Fix calculation for quorum size.
Change-Id: I2240e4a395576cbdbe11f38883f418647d92ce50
2021-07-01 09:35:03 +00:00
Reisen 30e8419f93 Update tests to use initial guardian set.
Change-Id: I11cd5d5bc518ce69e12a289211f21b992eef9ffe
2021-07-01 09:34:59 +00:00
Reisen 44384e635f Expose Governance types/functions
Change-Id: I10fb14fa5d9d283cf831ea3d8585141e834e40b5
2021-07-01 06:16:59 +00:00
Reisen 21c7399d55 Return errors in Data peeling
Change-Id: I3e0ae581e83ebbcf0d343b758dff033ddc9b362e
2021-07-01 06:16:59 +00:00
Reisen e6317449d5 Pass in initial Guardians in Initialize
Change-Id: Iabc803d85ef89142a27e924a81ddddecb41e96dc
2021-07-01 06:16:59 +00:00
Hendrik Hofstadt f97bbccdae Fix agent bridge import
Change-Id: I88098157710dc51bcbb6a3cd412cdfd68be1c3fc
2021-06-30 18:56:54 +02:00
Hendrik Hofstadt 6d1b3d2651 Adapt solana agent for v2
Change-Id: I81fc8b959f33a157371d1c59b1d5323dfc11f1ce
2021-06-30 06:46:56 +00:00
Stan Drozd 5e7e4d4e48 Solitaire: Enforce the "client" feature in dependees
Change-Id: I55da10bde41f84e91c5754a89eb4239967117e67
2021-06-29 15:35:14 +00:00
Stan Drozd 79d82d1226 Solitaire: use "client" as superset of "no-entrypoint", logging
Change-Id: Ie846b9abd783fe041f2cfa9aeda962003ffe1441
2021-06-28 13:01:43 +02:00
Stan Drozd 60a1acf351 solitaire: Wrap for Info, auto Wrap for data_wrapper()
Change-Id: I5cc0ba7870e140a2acf77b8fc8814ee953f56b51
2021-06-28 13:00:41 +02:00
Reisen 118bc13bcb Fix all warnings in the bridge program.
- Allowed non snake case globals for const generic names.
- Left feature warning on as these are valuable to others during cargo
  build, where you might want to spot what projects are using unstable
  features when pulling dependencies.

Change-Id: I595253513554c441284def7e354bb4e4e2df550e
2021-06-25 07:55:55 +00:00
Reisen 8cb2675c85 Rework integration tests around exposed instructions
Change-Id: Id796e31de90b1d59a43e9ae1cce85d84cd264558
2021-06-24 13:55:31 +00:00
Reisen e99b597ee3 Fix Signature Calculation
Change-Id: Ia0fa7f86f09360d792dbfebd8928f9a444ac3368
2021-06-24 10:02:15 +00:00
Hendrik Hofstadt ece0de4bef Fix bridge fee and implement CLI
Change-Id: Ib17b335e05359fd4baf614d0b4eaae459814b04d
2021-06-23 15:10:06 +00:00
Hendrik Hofstadt d677311d70 Fix build caching and initial devnet setup steps
Change-Id: I6df841c90f93585f0146b0de65883dd101e45bc9
2021-06-23 17:06:11 +02:00
Reisen 89ddc95a78 Add Instruction helpers to core program
Change-Id: I38d958c57aef02a5328075cd1010fb2a6a564b0b
2021-06-23 12:38:43 +00:00
Reisen 16f7e156ae Fix Derivation issues for PostVAA accounts.
Change-Id: Ia08003dc8aadfe3963598c81745813e6e09e5d3a
2021-06-23 11:02:42 +00:00
Reisen a28540de0d Test VerifySignatures.
Change-Id: I430b4676706371bbcf61368a83ff4946d9db2202
2021-06-23 11:02:42 +00:00
Reisen c2c2e7f13d Integration Test for PostVAA without working Signatures
Change-Id: Ib5c93986cdac88678657b254522422ab5231a856
2021-06-23 11:02:42 +00:00
Reisen 8173f0997a Add integration test PostVAA step
Change-Id: I44d00afc728557d2556a8a2e62f378a3f2e61db7
2021-06-23 11:02:42 +00:00
Reisen 692da33d0c Add integration test around PostMessage
Change-Id: I8c41db5f3d110ee445ed66d2599d87afb42fde7e
2021-06-23 11:02:42 +00:00
Reisen c3151728f5 Add integration test setup with Initialize filled in
Change-Id: Ie7cbb1a2a72b88e2752065b65d76da9cda9b1c0f
2021-06-23 11:02:42 +00:00
Reisen 146b368fc0 Fix accounts required for calling Initialize/PostMessage
Change-Id: Ide3fa8401bac6b1b05bc4c5ec1f552a98178ad06
2021-06-23 11:02:42 +00:00
Hendrik Hofstadt 22373b9943 Fix eth and solana deployment in tilt devnet
Change-Id: Iee032e92373c56d876e6fc1626b0f1af54046834
2021-06-22 18:17:18 +00:00
Leo c1d0f165d6 Merge branch 'main' into dev.v2
# Conflicts:
#	bridge/pkg/solana/submitter.go

Change-Id: I45b6e8f398b879915793987c5db38c839e8d1cc9
2021-06-22 18:54:15 +02:00
Hendrik Hofstadt 02d7257ff5 Implement PostedMessage fetching in the client
Change-Id: I8b59cdbfaf37212e187257cf46674086ad96d19d
2021-06-18 18:50:06 +02:00
Hendrik Hofstadt d84b61fda5 Implement token bridge
Change-Id: Ibb9cdf6ed5a18a576691bcad96b4fe6dfd72b981
2021-06-07 09:04:23 +02:00
Hendrik Hofstadt aa909c218f Restructure workspace
This will make is easier to separate modules and solitaire in the future.
We also get rid of the old bridge code.

Change-Id: I4d663c36739dfec77cd5d3f1ed6b51f422fe0c91
2021-06-21 10:24:52 +02:00
Hendrik Hofstadt 5eb7d0b7d0 Various token bridge and solitaire improvements
Derive message accounts from nonce and data vs sequence because sequence can lead to collision with parallel tx submission

Change-Id: I82d5b3a3c7fd96b5a6c74933c773a32e1c58bdd4
2021-06-18 14:34:31 +02: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
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
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
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
Reisen d169caa0fe Apply rustfmt changes to current files.
Change-Id: I9182dd8b287e5008e417d1b7fefc64cb68b9f813
2021-04-30 11:32:19 +00:00
Reisen 08ac56a6bb Add some potentially sane rustfmt options.
Change-Id: I76debba2f2caee5848f115064fd58e1d72b94308
2021-04-30 11:24:32 +00:00
Reisen 679fa92a56 Move account related verification out of API handler
Change-Id: Ice70ab8bfcf4018693f90cb5e47bea6cb9e46309
2021-04-30 11:24:32 +00:00
Reisen aab930bfab Restore index as the guardian set naming convention
Change-Id: I531413d961a3fb0068bc278f72073497746f5eee
2021-04-30 11:24:27 +00:00
Reisen c1c778d65a Add anchor accounts for PostMessage instruction.
Change-Id: I26d054479b95d9e33c8da4f8b6fca630240ffb3f
2021-04-30 02:49:47 +00:00
Reisen ab20f15904 Add message publishing skeleton
Change-Id: I18e55f4221575ba782f518d33e1b1f3abcc5d683
2021-04-29 11:33:48 +00:00
Reisen a5f285f1bd Verify Signatures should take bridge as state, and split arguments.
Bridge state is represented by the #[state] struct in the main file, and so
processor functions no longer receive it as part of context. Instead it's
passed as an arg.

Change-Id: I0492290a597e0778d5c52162447fa09f68a91a9b
2021-04-29 11:10:52 +00:00
Reisen bcf7be93d6 Implement Initialize using correct anchor decorators.
Change-Id: I5d7120f927cc0e4a9dc2882b245058fde0a65637
2021-04-29 10:57:38 +00:00
Reisen 1c9facbb75 Use Anchor state for Initialize
Change-Id: I4f61c3e74e037e873f669f240ebbc8fe26567103
2021-04-29 10:57:38 +00:00
Reisen 17bda088f1 Add bridge state to Anchor
Change-Id: I3ce0591d6810daf5fe8bd33f5bfd8d5297c0c9b5
2021-04-29 10:57:38 +00:00
Reisen 21de7a58af Split arguments to handlers for cleaner API
Change-Id: If8995bbb61775040d8e666e6af3cccae39f57919
2021-04-29 10:57:38 +00:00
Reisen 482666b3fa Replace deprecated merge_imports with imports_granularity
Change-Id: I749788a369738a5e97e7bc9009f0c28a12b2b3b9
2021-04-29 10:57:38 +00:00
Reisen a05091897f Move minimum amount of types to skeleton initialize
Change-Id: Ibfc5767de20802035a9403cd937005bdb7ab96cc
2021-04-29 10:57:38 +00:00
Reisen 888c461d73 Add Chain enum for identifying message sources
Change-Id: Iefb96f32ef929a6073b523d511b9c4033e33522f
2021-04-29 10:57:36 +00:00
Reisen ed98d9d346 Extract as much non-Anchor specifics into modules
Change-Id: I380560c6a8c240c95ee6eda93e27c7248b2cd361
2021-04-29 10:20:34 +00:00
Reisen d0fc326718 Run through rustfmt to clean up syntax.
Change-Id: I3e79bb32554d02985857b5fa7100675c9041b14c
2021-04-29 10:20:34 +00:00
Reisen 35efbbe87f Use ProgramState and stubs to enforce account owners.
Change-Id: I7c653af6abd771ceb9ceb60460dbf742fe9fe9ec
2021-04-29 10:19:59 +00:00
Stan Drozd 9dd36c6275 Port over the Solana part of secp instruction checks
Change-Id: Ic205837a3a9a9010070596cbbab2590e15332527
2021-04-26 16:02:18 +02:00
Reisen 09d2ecaaa1 Create data with AccountInfo's needed for processing signatures.
Change-Id: I19edfb56197143500fc7c932dec09d884c682a94
2021-04-23 13:50:38 +00:00
Reisen fa84f69f12 Add barebones anchor generated skeleton.
Change-Id: Ia8e77942ea31521f09fbb1586349d02a21508444
2021-04-23 10:23:32 +00:00
Leo 31a94eeb79 solana/bridge: review comments
Change-Id: Icd58a43cf14588cf4c39f5557bd2d027ef5364ef
2021-04-20 09:52:07 +00:00
Leo 33f39d30fa solana/cli: strip down to deploy_bridge
Delete all non-Wormhole commands. Users should use the official
spl_token CLI to interact with tokens.

Removes the --owner argument and defaults to the fee payer.

Change-Id: I728766131cd697feff5f16ae5aa991c3d87e40cb
2021-04-20 09:51:38 +00:00
Hendrik Hofstadt fad00804e0 minor adjustments in the solana module
Change-Id: I5bafc475fb798fe11c67fd5511b8fe36c314ea36
2021-04-19 14:27:06 +02:00
Hendrik Hofstadt 1f30398e30 refactor new ix processing, remove old processors
Change-Id: I682573bf8544c5a19b2b57c6660e9e86e9b12cf9
2021-04-19 14:27:04 +02:00
Hendrik Hofstadt dfa746476f refactor message posting ix, remove old ixs
Change-Id: Idfa487a189ec2fb3ed2029ddce10fc02aef1255b
2021-04-19 14:25:28 +02:00
Hendrik Hofstadt aad19ff8f8 remove transfer specific methods
Change-Id: I017c9946aaf0f23a56cfc27b7871dbf22f19957b
2021-04-19 14:25:26 +02:00
Hendrik Hofstadt 6a6ba06c0c remove transfer state accounts, introduce posted message persistence
Change-Id: I34a8006dae5cb1a315dc0af297d9025d1e500fcb
2021-04-19 10:30:37 +00:00
Hendrik Hofstadt d09eb150e7 move governance messages to new file
Change-Id: I4b4b76974bb55b5f570c25072d5ffec59215a72c
2021-04-19 06:41:32 +00:00
Hendrik Hofstadt c0f7f3b8f9 reformat errors, remove transfer specific errors
Change-Id: Ie2827893f0fd8e5f5efbdc8f0b8ed0fa1d91abd4
2021-04-15 19:46:07 +00:00
Hendrik Hofstadt 776d774494 solana/bridge: change VAA structure
Change-Id: I8304d2573aafd2291f2ddfc2eec6e605326d0e2d
2021-04-15 19:39:00 +00:00
Hendrik Hofstadt 84c47797ed remove token / bridge related ops commands
Change-Id: Id97efe4b5e89a89fbc9d9373af906ecbd9d9f122
2021-04-15 11:36:29 +02:00
Stanisław Drozd a330c89d1a
Fix *.so copy in solana-devnet, correct crate feature for cli+agent (#198) 2021-04-08 12:47:35 +02:00
Leopold Schabel cc3482a607
Replace third_party/solana by solana-test-validator (#197)
We no longer need to carry a patch and build Solana, and can use
solana-test-validator (with sleepy PoH!) instead. This significantly reduces
build times and will make downstream testing much easier.

Also remove the remnants of do.sh and the old BPF toolchain.

Test Plan: Ran E2E tests.
2021-04-07 20:16:19 +02:00
Stanisław Drozd 6de425a990
BPF SDK hotfix and devnet startup improvement (#196)
* Tiltfile: Make the guardian k8s_resource depend on solana-devnet

This makes guardian network convergence faster as the guardian pods
don't have to suffer from increasing redeploy back-off delays. This
should impact performance neglibibly as solana-devnet is still the
heaviest build we perform (at the time of this writing saturating a
32-thread Ryzen 9 CPU on my build machine.)

* hotfix bpf-sdk: bump bpf-sdk; use cargo-build-bpf
2021-04-07 15:13:01 +02:00
Stanisław Drozd 954e868436
Updates for newest beta bpf-sdk, small do.sh refactor (#193)
* Updates for newest beta bpf-sdk

* do.sh: sed typo
2021-03-23 16:21:34 +01:00
Ryo Onodera 2ba9381066
Add/Clarify comments (#187) 2021-02-26 13:48:44 +01:00
Leo 69b7d3e99e Update to Rust 1.49 2021-02-12 13:48:44 +01:00
Hendrik Hofstadt 8478735ea7
don't subsidize guardian set creation (#172)
* don't subsidize guardian set creation

This works around https://github.com/solana-labs/solana/issues/9711 which causes issues when the guardian set creation is subsidized and another CPI call is done subsequently
2021-02-02 21:20:48 +01:00
Leo 14539de2ac Backport https://github.com/solana-labs/solana/pull/14914 2021-01-29 01:13:52 +01:00
Hendrik Hofstadt 2b30a30601
upgrade solana sdk version (#166)
* upgrade solana sdk version

Commitment levels were deprecated and the fastest confirmation level is `Processed`.

Also the upgradeable loader now requires the program to be writeable.

* Add deprecation comment

* update agent commitment level
2021-01-28 17:44:54 +01:00
Hendrik Hofstadt a5380b8ab1
Fix rent calculation and hardening (#163)
* use proper account for min balance calculation

* check bridge key in sig verify

* check bridge key in VAA processor
2021-01-25 15:11:38 +01:00
Stanisław Drozd c5d90f779c
Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules (#159)
* Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules
2021-01-23 18:20:17 +01:00
Hendrik Hofstadt fd6c54de83
bridge/pkg/solana: use polling GetProgramAccounts watcher (#156)
This mitigates https://github.com/solana-labs/solana/issues/9909 by
polling GetProgramAccounts with a server-side filter. It also removes
the agent dependency for the lockup observation logic - the agent is now
used for transaction construction only.
2021-01-21 11:31:32 +01:00
Leo 108f050c0e Clarify public keys vs public key's hashes in comments and docs 2021-01-21 00:59:50 +01:00
Yuriy Savchenko eeb560cb5c Terra integration added to e2e tests 2021-01-19 16:50:26 +01:00
Hendrik Hofstadt 82fd4293e2
Fix guardian set expiration on Solana (#155)
* fix guardian set expiration on Solana
2021-01-19 16:44:48 +01:00
Leo 9f2f609bc1 Bump Go and pin all Docker images to digests 2021-01-19 16:15:54 +01:00
Hendrik Hofstadt efa03ef73c
Implement upgradeability (#151)
* Implement contract upgrade VAA action

* naming and (╯°□°)╯︵ ┻━┻

* Carefully unflip table and replace broken cutlery ┬─┬ノ( ◕◡◕ ノ)

* fix and automate upgradeability

* document contract upgrade call

* Update comments

* Exhaustiveness check in VAA payload switch

* Fix typo

Co-authored-by: Leo <leo@certus.one>
2021-01-19 13:01:45 +01:00
Hendrik Hofstadt 274bb7c97d
Owner and sysvar check hardening (#154)
* owner and sysvar check hardening
2021-01-12 23:21:30 +01:00
Hendrik Hofstadt 12a6ae31bc
Watch slots for Solana liveness monitoring (#141)
* add slot notifications to the agent

* fix proto field naming
2021-01-11 12:43:05 +01:00
Hendrik Hofstadt 03ef5e1017
Don't evict governance VAA signatures (#137)
* don't evict governance VAA signatures

They need to persist for data availability (to be cross-submitted to other chains)
2020-12-17 11:27:46 +01:00
Leo e2f517f91c solana: fix typo in clap help 2020-12-07 11:20:27 +01:00
Leo 8b10b96362 solana: use clap for command line arguments 2020-12-06 22:45:45 +01:00
Leo f7f4f6d74b solana: add clap crate and update cargo dependencies 2020-12-06 22:15:43 +01:00
Hendrik Hofstadt bec598b41a
Fix subsidization and fees (#127)
* Revert "solana: partially revert #82 subsidization changes"

This reverts commit 2967653e

* fix subsidization

* fix deleted grpc tag dependency

* revert devnet changes

* verify system instruction action

* ┬─┬ノ(ಠ_ಠノ)
2020-11-30 11:09:08 +01:00
Leo 5997f133c3 solana: use loopback address to connect to other containers in same pod
There's a bit of a chicken-and-egg problem here - the liveness probe
cannot succeed until all containers in the pod are ready, and the
service load balancer won't work until it's ready.
2020-11-29 19:19:37 +01:00
Leo 2967653e06 solana: partially revert #82 subsidization changes
... while keeping the borrowing fixes. Please review carefully whether
any of the remaining changes should've been reverted as well.

Fails due to account ownership check for debits, new tests caught it.
2020-11-29 17:07:15 +01:00
Leo fddbd01f9d solana: update Rust and Solana to latest stable releases
Unfortunately, the new release has a much chattier message_processor,
but we cannot do anything about that without losing value debug info.
2020-11-29 17:07:15 +01:00
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 a2f48fdee3 solana/cli: fetch token account balance
The request needs to include the decimals (part of the derivation path).
2020-11-29 17:07:15 +01:00
Leo 45837241ed devnet: add readiness checks to most components 2020-11-29 17:07:15 +01:00
Leopold Schabel 8306a83833
solana/agent: listen on UNIX socket (#122)
This allows us to use UNIX filesystem permissions for access control.

Previously, any process in the network namespace could connect to it,
which is insecure for obvious reasons.

Verified that correct permissions are set:

```
# ls -lisa /run/bridge/
total 8
31996269 4 drwxrwxrwx 2 root root 4096 Nov 23 21:58 .
14676759 4 drwxr-xr-x 1 root root 4096 Nov 23 21:58 ..
31996306 0 srwx------ 1 root root    0 Nov 23 21:58 agent.sock
```

Fixes #119
2020-11-24 09:48:44 +01:00
Hendrik Hofstad 3e57f475e1 solana: fix borrow issues 2020-11-20 14:23:05 +01:00
Hendrik Hofstadt 8510140165
subsidize guardian transactions using fees (#82)
* subsidize guardian transactions using fees

* reuse transfer function

* evict signature state on inbound transfers

* fix mutability issues due to copying

* add fee refund

* unify fee calculation

* add fee documentation

* Unflip tables

* type annotation
2020-11-19 22:47:09 +01:00
Leo fdc2be10b3 solana: verify that new guardian set isn't empty
ghstack-source-id: 4fc1d94152
Pull Request resolved: https://github.com/certusone/wormhole/pull/101
2020-11-19 12:57:21 +01:00
Hendrik Hofstadt cee28540bd
Upgrade SDK; add balance rpc call (#80) 2020-11-13 14:14:56 +01:00
Leo 86fdfa859b devnet: deterministic Solana accounts and lockup generator 2020-11-10 22:53:36 +01:00
Leo f3107ebed4 solana: add uncommitted Cargo.lock files
If there's a reason they are missing, then I didn't realize :-)

Ref #29

ghstack-source-id: 9052f64e76
Pull Request resolved: https://github.com/certusone/wormhole/pull/68
2020-10-28 22:47:12 +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 cf90bbec0d cli: create_wrapped command, deterministic generation 2020-10-28 20:37:06 +01:00
Hendrik Hofstadt 8d7a35683e
bridge: fix quorum (#56) 2020-10-25 08:57:04 +01:00
Leo 187355b0c8 solana: fix devnet_setup.sh sleep 2020-10-22 13:09:05 +02:00
Leo faf9a71cef agent: return gRPC Internal error on submission failure
This allows us to distinguish between temporary and permanent failure.

Unless we check the instruction error that occured, we can't know
whether the submission error is a permanent failure and Internal
is therefore the appropriate code to use.

ghstack-source-id: aff1de9516
Pull Request resolved: https://github.com/certusone/wormhole/pull/47
2020-10-22 12:20:12 +02:00
Hendrik Hofstadt e266bf1a7c
Implement assistant & Reimplement wrapped asset precreation (#42)
* all: readd early wrapped meta creation; initial transfer wizard

* web: complete transfer assistant

* web: allow multiple accounts per wrapped mint
2020-10-14 11:49:13 +02:00
Hendrik Hofstadt ddd2c901bd solana: create sig verify account in instruction
This allows multiple guardians to submit the signatures in parallel without causing costs with all transactions because conflicting txs won't be mined.
2020-10-03 21:20:24 +02:00
Hendrik Hofstadt 25533f0264
bridge: add secp check instruction (#41)
* bridge: add secp check instruction

* solana: update to secp solana upstream

* solana: iteration on secp

* solana: fix secp instruction

serialization indices were off and secp ix data was serialized twice

* solana: optimize ix serialization

* agent: send multiple chunks of signatures

* doc: update protocol spec

* solana: store signatures in siginfo; reconstruct signed VAA in webinterface

* solana: reformat

* solana: add rustfmt config
2020-10-01 16:42:45 +02:00
Hendrik Hofstadt 4ba7885c62 solana: add retry/poking mechanism
Closes #6
2020-08-31 21:05:38 +02:00
Hendrik Hofstadt 941220bc85 bridge: optimize VAA claim derivation
Instead of hashing the body manually, we pass the body to the address derivation syscall.
2020-08-31 20:09:06 +02:00
Hendrik Hofstadt fb603d468c agent: remove keepalive routine 2020-08-31 14:20:36 +02:00
Hendrik Hofstadt 45a25e0386 bridge: prevent multiple signatures from single guardian 2020-08-31 09:26:38 +02:00
Hendrik Hofstadt b4b0c61dfc bridge: require single step guardian set index changes 2020-08-31 09:25:41 +02:00
Hendrik Hofstadt a1387dafea agent: print errors 2020-08-28 17:14:32 +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 ed0a6d4b2e bridge: use proper source address 2020-08-28 08:36:33 +02:00
Hendrik Hofstadt 042ff4a14b bridge: properly handle VAA submissions 2020-08-24 12:56:19 +02:00
Leo 206eca5ac5 Set a recipient address in devnet_setup.sh
Lockup VAAs are now accepted on ETH.
2020-08-22 11:10:13 +02:00
Hendrik Hofstadt 3d771ea41d cli: add recipient to lock command 2020-08-22 11:02:50 +02:00
Leo c65d221ab3 Run devnet_setup.sh as solana-devnet sidecar 2020-08-22 10:52:51 +02:00
Leo fbf6e17d3e Use skip_preflight for CLI transactions
The preflight bank is set to max committment level, so we
wouldn't see previous txs with single confirmation.
2020-08-22 10:43:34 +02:00
Hendrik Hofstadt 738967c8d0 bridge: fix quorum checks 2020-08-22 01:10:45 +02:00
Hendrik Hofstadt 0d5bef7366 agent: handle connection failures 2020-08-22 00:18:03 +02:00
Hendrik Hofstadt 6b113853bd solana: fix missing transfer info and cli checks 2020-08-21 23:41:54 +02:00
Hendrik Hofstadt 2cd0d38e3d Merge branch 'master' of github.com:certusone/wormhole 2020-08-21 22:56:32 +02:00
Hendrik Hofstadt e3dcc654fb bridge: simplify lockup serialization 2020-08-21 22:56:21 +02:00
Leo 4b24a74547 agent: use max commitment and fix nonce type
It appears that single confirmation level is not useful
for transactions that depend on each other.
2020-08-21 22:53:31 +02:00
Hendrik Hofstadt 0c8cf93f85 solana: wait for full confirmation 2020-08-21 21:58:43 +02:00
Leo 86ccc1c617 Solana devnet fixtures and lockup generator 2020-08-21 20:48:58 +02:00
Hendrik Hofstadt 549f7ad69c solana: track time on lockups 2020-08-21 19:51:45 +02:00
Hendrik Hofstadt 5f253415d5 cli: add airdrop call 2020-08-21 18:55:59 +02:00
Hendrik Hofstadt a8d2f36a12 agent: inject static account key 2020-08-21 18:10:54 +02:00
Hendrik Hofstadt e0c2fbf990 agent: add lockup_address 2020-08-21 17:58:35 +02:00
Hendrik Hofstadt a1e548e4b9 solana: don't rebuild solana when bridge changes 2020-08-21 16:29:44 +02:00
Hendrik Hofstadt 6070cf25eb agent: load key from disk 2020-08-21 15:53:59 +02:00
Hendrik Hofstadt 6a548e5695 bridge: use constant for max guardians 2020-08-21 15:02:02 +02:00
Hendrik Hofstadt 51ed6323b4 bridge: improve build caching 2020-08-21 14:52:38 +02:00
Hendrik Hofstadt 1d960405d1 bridge: check quorum 2020-08-21 12:45:40 +02:00
Leo f1f2d0c8b8 Solana VAA submission stub 2020-08-20 21:48:58 +02:00
Leo c6efc410cb solana: remove extra uncached build
Derp
2020-08-20 20:19:06 +02:00
Hendrik Hofstadt a4fecd36f0 solana: build token program using latest solana version 2020-08-20 20:12:44 +02:00
Hendrik Hofstadt 8f4127f781 Add slot to agent 2020-08-20 19:20:11 +02:00
Leo 894e058091 Build Solana smart contract 2020-08-20 18:56:26 +02:00
Hendrik Hofstadt 59449a30b3 Update VAA structure 2020-08-19 16:41:25 +02:00
Hendrik Hofstadt 256439b766 Fix solana agent 2020-08-19 15:14:39 +02:00
Hendrik Hofstadt 5cd3db9a14 Working solana transfers from webui 2020-08-18 22:54:18 +02:00
Hendrik Hofstadt f8e70efb0b Fixes for actual CPI usage and variable VAA size 2020-08-17 21:02:04 +02:00
Leo ca2a2d9686 Remove deleted token crate from workspace 2020-08-17 18:25:46 +02:00
Hendrik Hofstadt e040449197 Working transfer in 2020-08-17 17:06:21 +02:00
Hendrik Hofstadt 49d2872d9c Update devnet and Solana program 2020-08-16 13:21:39 +02:00