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