Reisen
05aece1f7c
Add Metadata to token bridge attestations
...
Change-Id: Ic1a10978c25fbd916a16bd08eab0b6937c67cd59
2021-08-06 08:24:37 +00:00
Hendrik Hofstadt
24f7780883
Always log sequence
...
Change-Id: I7847b8993f1453cc0e9943d4004a3d6bf7d3f5d7
2021-08-03 15:10:01 +00:00
Hendrik Hofstadt
361adf9920
Add token bridge CLI
...
This also automatically initializes the token bridge in the devnet
Change-Id: I473a97da1ff55e7c9a104983087951268eb7a27d
2021-08-03 15:10:01 +00:00
Leo
b02d782f1c
solana/bridge: remove agent
...
Change-Id: I8fdf4e53172a422ee5d9d4dee13faf32ced1be08
2021-07-31 11:20:24 +02:00
Hendrik Hofstadt
8ab3b669d9
Address review comments
...
Change-Id: I4036e71f3df1dc419419930cfdffba302166e28d
2021-07-30 18:21:38 +00:00
Reisen
0a669111dd
Derive Wrapped Mint/Tokens
...
Change-Id: Ic530013e1932daef382cd89b9f14d1069c4006b0
2021-07-30 13:09:44 +00:00
Reisen
108a4a2ff9
Remove InstructionContext::verify. Verify in handlers
...
Change-Id: I661308951de261bff572398b6834523563906907
2021-07-30 13:09:44 +00:00
Hendrik Hofstadt
dd5388a748
Add CPI proxy
...
Change-Id: Iba395084fe0cf5ebd4e1cd7bb3515c6c1f7e8756
2021-07-29 17:40:15 +02:00
Hendrik Hofstadt
dfdf31dcce
Implement WASM client for token bridge
...
Change-Id: I592cc0ece0553d55c50d87010783fefb7f9b5f2f
2021-07-29 17:27:54 +02:00
Hendrik Hofstadt
f9eb8a2c0a
Implement wasm client for the bridge core
...
Change-Id: I7931eef27d8b10eaeec00833ab3dc28a57257cdf
2021-07-29 17:27:45 +02:00
Hendrik Hofstadt
d33738e179
Make the token bridge work
...
Change-Id: Ic34f87c09dfaa91d7bf5793e83da9f06abd2fa3f
2021-07-29 17:21:17 +02:00
Hendrik Hofstadt
897af148fc
Implement a bridge stub for testing
...
Change-Id: Ide97a1df9d55658eeea79f7886a3a504a9108fda
2021-07-29 15:20:22 +00:00
Hendrik Hofstadt
42c3040de1
Allow user provided signature set accounts to prevent DoS
...
With derived signature set accounts, an old guardian set could frontrun the creation of the account. Since the hash is persisted in the account, we don't need to encode it in the account address.
Change-Id: I49ca46611eb587c8234ac9b2c459263a2ace4219
2021-07-29 15:14:08 +00:00
Leo
270bd78e98
solana: log sequence number
...
Untested: )
Change-Id: If6ff5b1b3b8199d6d8658aea8f3f0babc75b6989
2021-07-27 12:01:28 +00:00
Reisen
5f0707c75d
Remove persistent from Bridge tests.
...
Change-Id: Id149bf38a9b3061964cd2ac2b539ba03c9af0c29
2021-07-26 16:09:01 +00:00
Reisen
64c1d86e4d
Change serialize hierarchy for Governance
...
Change-Id: Id5581f84e9d325e1546f1690ba977b7470915491
2021-07-26 16:09:01 +00: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
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
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
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
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
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
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
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
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
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
Stan Drozd
c700e8847b
Solitaire client implementation
...
Change-Id: I4d1f37082537cd24a4859802652a177400f6a205
2021-06-04 13:02:35 +02:00
Leo
31a94eeb79
solana/bridge: review comments
...
Change-Id: Icd58a43cf14588cf4c39f5557bd2d027ef5364ef
2021-04-20 09:52:07 +00:00
Hendrik Hofstadt
fad00804e0
minor adjustments in the solana module
...
Change-Id: I5bafc475fb798fe11c67fd5511b8fe36c314ea36
2021-04-19 14:27:06 +02:00