Hendrik Hofstadt
6c7d44ca85
ci: Fix flaky solana tests and improve CI time ( #2148 )
...
* solana: remove sync from tests
Change-Id: I8c123ea87e78732541e5040e8653bc114ce95404
* ci: cache more rust build artifacts
Change-Id: I436f27de38651cdb2a9c73b58f20d44b4392c336
2022-12-21 14:24:50 +01:00
Chirantan Ekbote
0f0ea48fdc
solana: Fix clippy warnings
2022-09-20 23:00:47 +09:00
Chirantan Ekbote
e377a75e2b
solana: run `cargo fmt`
2022-09-20 23:00:47 +09:00
Chirantan Ekbote
25dde0b614
solana: bridge: Fix unused variable warning
2022-09-20 23:00:47 +09:00
Stan Drozd
18eac4e3d3
solana: bump: Rust nightly-2022-07-12, SOL SDK v1.10.31, rust container 1.60
...
solana: use prebuild docker image for 1.10.31
solana: use the right rust version
from https://github.com/solana-labs/solana/blob/v1.10.31/ci/rust-version.sh
nft_bridge: TransportError -> BanksClientError
solana/Dockerfile.wasm: Use rust-toolchain instead of rustup
2022-08-17 15:30:01 +01:00
Csongor Kiss
be38cf5d7e
solana: Update last_lamports after transfer_fees
2022-06-28 13:08:13 +01:00
Hendrik Hofstadt
f1dba4adfe
Allow account reuse for message posting ( #1077 )
...
* Implement message posting with account reuse
Change-Id: I195f493f6816048f5f8f76e1f0f6e561fa0fe692
* Use different magic for unreliable messages
* guardiand: Ignore solana instructions with empty data
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
2022-06-27 09:57:25 +01:00
Csongor Kiss
2e220a6f76
Solana fix warnings ( #1226 )
...
* solana: fix all rustc warnings
* solana: fix clippy warnings
* Remove manual memcpy + other warning suppressions
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
2022-06-10 17:59:15 +01:00
Chirantan Ekbote
24dd6ed48b
solana: bridge: Fix tests
...
Fix all the tests for the solana bridge program so that we can start
running it in CI.
Use the `solana-program-test` crate as the test framework. Previously,
running the tests required spinning up a test validator and manually
deploying the program there. Now developers can just do `cargo test-bpf`
to run the tests without needing any additional setup (beyond installing
the solana tools). This also lets us split out the tests so that they
can be run separately rather than having to run everything sequentially
in a single integration test.
2022-05-10 00:58:43 +09:00
Hendrik Hofstadt
c04d25e704
Fix solana integration tests & add test for account creation
...
Change-Id: I222744f194f952d03bfbd3ba4469bce59c310fc0
2022-04-11 21:29:39 -04:00
Reisen
20386593ed
solana/bridge: fix tests to use bool sigcheck
...
Change-Id: I8d59016ae926e9cdcdc6114db8c640889fc5c9ee
2021-09-13 10:29:29 +00:00
Hendrik Hofstadt
add04e8755
Create different accounts for message posting and VAA posting
...
Change-Id: I88a3f74301aeecc16bb51ba693ea9523dc16b612
2021-08-09 13:51:25 +02: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
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
b97a32df37
Fix formatting
...
Change-Id: I4aaa4ab6bb72d7645a12f0a28a99db71a183ad87
2021-07-20 19:47:42 +02: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
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
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
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
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
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
cc08a9753c
reformat and fix client
...
Change-Id: Ie99d2b7cc2ed9890432c38661f1035a473cc5ac1
2021-07-02 11:48:48 +00: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
30e8419f93
Update tests to use initial guardian set.
...
Change-Id: I11cd5d5bc518ce69e12a289211f21b992eef9ffe
2021-07-01 09:34:59 +00:00