Refactor the solana Dockerfile so that the solana release installation
is a separate stage and have the builder stage derive from it. Add a
new "ci_tests" stage that also derives from the solana stage but runs
the integration tests instead.
Invoke the solana ci_tests stage from the Tiltfile when ci_tests are
enabled.
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.
Merge all the separate solana crates into a single workspace. This is
the same thing we do for terra and will make it easier to check / lint /
test all the crates together.
The type of the `ix_data` binding withing the solitaire! macro expansion
is explicitly annotated with its type, which comes from the macro's
pattern binding `$kind`. However, this type annotation is entirely
optional, since `ix_data` is passed in as an argument to `$fn`, whose
type forecs `ix_data` anyway, and rust will happily infer that from the
application. So we remove the explicit annotation which makes the entry
point macro easier to use.
commit-id:d428306c
* ethereum: p2w contract -> p2w emitter, fill in essential envs
Change-Id: I6fa9364a96738d2cc02ec829a31fedba0586d8e8
commit-id:0a56f1f8
* Add p2w-relay, a p2w-sdk integration test
commit-id:6bfab639
* p2w-sdk: Expand README
Change-Id: I17cb547d6aaddc240588923561c26d11a787df2e
commit-id:6ebd6a22
* p2w-sdk: don't build ETH contracts, only the types
Change-Id: I7cbd18328227700635d7688aa24a9671e8919fcd
commit-id:adf079f7
* p2w: configurability and sane envs
commit-id:f10fd90e
* Solitaire: Implement Option<T> support in structs
commit-id:31aa12d6
* bridge/governance.rs: Stop pestering about EMITTER_ADDRESS
commit-id:d5bd7234
* p2w-attest: price batching
This commit introduces support for multiple Pyth product/price pairs
per call. The initial maximum batch size is 5 and is enforced using a
`P2W_MAX_BATCH_SIZE` constant.
solana/pyth2wormhole/program:
* On-chain batching logic
* Batch message parsing logic
solana/pyth2wormhole/client:
* Off-chain batching logic - divides any number of symbols into
largest possible batches
* Use a multi-symbol config file instead of CLI arguments
third_party/pyth/p2w-sdk:
* Expose batch parsing logic
third_party/pyth/p2w-relay:
* Comment out target chain calls until ETH contract supports batching
* Test the batch parsing function
third_party/pyth/p2w_autoattest.py:
* Generate and use the symbol config file with pyth2wormhole-client
third_party/pyth/pyth_publisher.py:
* Add a configurable number of mock Pyth symbols
* Adjust HTTP endpoint for multiple symbols
commit-id:73787a61
* p2w-attest: mention attestation size in batch
This commit ensures that no matter the attestation format, a batch
will never contain attestations of different sizes. This guarantee
enables forward compatibility by adding new constant-size fields at
the end of a batch at all times. An older implementation will simply
not consume the remaining newer values while respecting the stated
batch member alignment.
commit-id:210da230
* pyth2wormhole-client: use fresh blockhashes, harden batch errors
This commit makes sure we don't have to deal with expired transactions
due to stale blockhashes. The problem existed with larger symbol
configs as well as on Solana mainnet. Additionally, the attestation logic
now treats transaction errors as non-critical - a failure for a batch
does not prevent attestation attempts for batches farther in the queue
commit-id:5e704f8b
wasm-bindgen 0.2.74 generates JavaScript bindings for SystemInstruction
exported from solana-program 1.9.4. The generated JavaScript references
a non-existent function (wasm.__wbg_systeminstruction_free) that
leads to an attempted import error when importing the wasm packed for
bundler. SystemInstruction isn't used in the sdk, so we remove the non-existent
function reference as a workaround.
The current lifetimes 'a/'b restrict the &data and &program_id lifetimes which makes the
entrypoint unusable in solana_test_program's processor!() harness, which expects the more
relaxed (but equivelent for us) type of:
fn processor<'a, 'b: 'a, 'c, 'd>(
program_id: &'c Pubkey,
accounts: &'a [AccountInfo<'b>],
data: &'d [u8]
)
It has no effect on our current programs.
Change-Id: Ia657462141165064c629fdff02b5ec451aab50f0
- Add network switcher.
- Explorer landing page with light stats:
- summary of recent messages per chain.
- shows most recent messages, polls for updates.
- chain-details view.
- super basic message details view: json.
- runs in devnet.
- add network switcher to guardian-list page.
- links to native explorers (etherscan, etc.)
- polygon support
- animations when data updates
Change-Id: I26616afab551a7555421a45dee9f016beecbf93e
Revert submission 1325
Reason for revert: not supporting external mints
Reverted Changes:
I2bf59ecd3:solana/token_bridge: calculate diff from original ...
I598373740:solana/token_bridge: check balance and truncation
I67c7a1c7a:solana/token_bridge: test wrapped asset transfers
Change-Id: I00d3c23c16fbb985457d841139fea25c5697dab1
Revert submission 1325
Reason for revert: not supporting external mints
Reverted Changes:
I2bf59ecd3:solana/token_bridge: calculate diff from original ...
I598373740:solana/token_bridge: check balance and truncation
I67c7a1c7a:solana/token_bridge: test wrapped asset transfers
Change-Id: I05a950e3142e0386351a67fc7d051000f3481c8b
Revert submission 1325
Reason for revert: not supporting external mints
Reverted Changes:
I2bf59ecd3:solana/token_bridge: calculate diff from original ...
I598373740:solana/token_bridge: check balance and truncation
I67c7a1c7a:solana/token_bridge: test wrapped asset transfers
Change-Id: I655694508774e40a489b810d7b4f9c17824ab5a3
This commit takes the selected Pyth Price struct account and after
serialization places them inside a PostMessage cross-program
call to Wormhole.
Change-Id: If04123705290f4749de318c0dfaa8f1d840ed349