* state getters and setters, change Move.toml dependency to sui/integration_v2
* finish state.move
* add new line to pyth
* use deployer cap pattern for state module
* sui pyth
* update price feeds, dynamic object fields, Sui object PriceInfoObject
* register price info object with pyth state after creation
* sui governance
* some newlines
* error codes
* update and comment
* unit tests for pyth.move, add UpgradeCap to Pyth State (will be used for contract upgrades)
* updates
* test_get_update_fee test passes
* fix test_get_update_fee and test_update_price_feeds_corrupt_vaa
* test_update_price_feeds_invalid_data_source
* test_create_and_update_price_feeds
* test_create_and_update_price_feeds_success and test_create_and_update_price_feeds_price_info_object_not_found_failure
* test_update_cache
* update
* test_update_cache_old_update
* update_price_feeds_if_fresh
* comment
* contract upgrades start
* contract upgradeability
* update clock stuff
* edits
* use clone of sui/integration_v2 for stability
* make contract_upgrade::execute a public(friend) fun, remove clock arg
* E_INCORRECT_IDENTIFIER_LENGTH
* comment and edit
* add a single comment
This PR adds the support WormholeMerkle accumulator message to the ethereum contract while still supporting the old message format. The code is not optimized yet and with more optimizations we can achieve a better gas usage. Currently based on the gas benchmark below it has a 18% improvement with a single price feed. Although the cost of updating 5 feeds in the same batch is higher than the current approach but in reality the chances that all 5 feeds be in the same batch is very low.
* state getters and setters, change Move.toml dependency to sui/integration_v2
* finish state.move
* add new line to pyth
* use deployer cap pattern for state module
* sui pyth
* update price feeds, dynamic object fields, Sui object PriceInfoObject
* register price info object with pyth state after creation
* sui governance
* some newlines
* error codes
* update and comment
* unit tests for pyth.move, add UpgradeCap to Pyth State (will be used for contract upgrades)
* updates
* test_get_update_fee test passes
* fix test_get_update_fee and test_update_price_feeds_corrupt_vaa
* test_update_price_feeds_invalid_data_source
* test_create_and_update_price_feeds
* test_create_and_update_price_feeds_success and test_create_and_update_price_feeds_price_info_object_not_found_failure
* test_update_cache
* update
* test_update_cache_old_update
* update_price_feeds_if_fresh
* comment
* state getters and setters, change Move.toml dependency to sui/integration_v2
* finish state.move
* add new line to pyth
* use deployer cap pattern for state module
* sui pyth
* update price feeds, dynamic object fields, Sui object PriceInfoObject
* register price info object with pyth state after creation
* sui governance
* some newlines
* error codes
* update and comment
* state getters and setters, change Move.toml dependency to sui/integration_v2
* finish state.move
* add new line to pyth
* use deployer cap pattern for state module
* sui pyth
* update price feeds, dynamic object fields, Sui object PriceInfoObject
* register price info object with pyth state after creation
* sui governance
* some newlines
* fix(message-buffer): address PR feedback from 779, update tests
Add new unit test for reading with cursor, update test setup
* refactor(message-buffer): refactor test methods, add big endian doc on MessageBuffer
* message_buffer: Add Dockerfile with caching
This dockerfile ensures as little cache invalidation as possible
through layer-caching and BuildKit cache mounts.
* dockerignowe -> dockerignore
* message_buffer/Dockerfile: Fix the final cached target move
* refactor(message-buffer): rename accumulator-input to message-buffer
refactor any names with accumulator to message
* refactor(message-buffer): change accumulator seed to message
* feat(accumulator-updater): add funding account for AccumulatorInput creation
* feat(accumulator-updater): add ix for testing cpi max size
add steps to notes.md on how to test against solana-test-validator with features deactivated
* test(accumulator-updater): fix max num of msgs to send
* refactor(accumulator-updater): address PR feedback from 771
update fund pda seeds, update consts, cleanup
* feat(accumulator-updater): address PR comments
Update cpi max test ix to take vec of msg sizes, clean up commented out code
* Format p2p.go
* Pass Wormhole arguments from command line or env. vars
* Remove forget calls and let memory be freed (also remove confusing comment)
* Use proper types on command line arguments
* feat(accumulator-updater): write accumulator messages into one account
* chore(accumulator-updater): clean up commented out code
* chore(accumulator-updater): remove unused feature for cargo
* chore(accumulator-updater): minor comment fix
* feat(accumulator-updater): update implementation of AccumulatorInput header
Removed InputIndex in header, updated to use end_offsets & include header_len
* feat(accumulator-updater): add MessageHeader to all PriceMessages and include in serialization
* fix(accumulator-updater): fix AccumulatorInput size & unit tests
* feat(accumulator-updater): update put_all to write as much data as possible
put_all will write up to the limit of the accumulator_input.data.len(). this ix must not fail even
when the data being written exceeds the size of the account. in this situation, we will write as
many *COMPLETE* messages as possible
* docs(accumulator-updater): update put_all ix documentation
* chore(accumulator-updater): addressed PR feedback
fixed comments, added test, renamed accumulatorInput.data to messages
* fix(accumulator-updater): fix ts test
* [hermes] Improve latest feeds rest api
This change adds verbose and binary option to latest_price_feeds
endpoint. Unfortunately it exposes many internal information which
required touching different components to expose batch_vaa specific
information. The code is now coupled to batch_vaa and we need to
refactor it when we add other proof types (and eventually remove it when
it get deprecated).
* Update hermes/src/network/rpc/rest.rs
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
* Update hermes/src/network/rpc/rest.rs
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
* Fix merge
---------
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
* [hermes] Add more rest api methods
Add many of the price service apis. Per David suggestion, we do
validation in parsing instead of doing it later. I didn't find
any suitable library to deserialize our hex format so I created
a macro to implement it because we use it in a couple of places.
I tried making a generic HexInput but couldn't make it working
(and I need other crates like generic_array for it which makes
the code more complex)
* Address feedbacks
* [eth] Add Canto mainnet
This deployment also enables contract rewards on canto. Since the
changed code is only specific to the Canto network and is used only
in initialization, only the diff is added as a file.
* Remove ds store
* Add some doc to deploying.md