* Use a new rustfmt file
* Run cosmwasm action only when needed
* Remove pre-commit from remote-executor action
* Fix formatting
* Run precommit for all files
As previous PR was merged without pre-commit
* Add the implementation with tests and benchmark
* Refactor the contract to reduce redundancy
* Reduce optimization runs as the contract was huge
It has 177 more gas usage on some benchmark tests
* [eth]: Gas improvement: Increase optimizer runs to 1_000_000
Increasing optimizer runs will optimize the gas usage of methods more and will increase the contract size, hence the deployment cost.
Snapshot difference:
```
testBenchmarkGetUpdateFee() (gas: -101 (-0.076%))
testBenchmarkUpdatePriceFeedsIfNecessaryNotFresh() (gas: -334 (-0.189%))
testBenchmarkUpdatePriceFeedsNotFresh() (gas: -1312 (-0.416%))
testBenchmarkUpdatePriceFeedsIfNecessaryFresh() (gas: -1626 (-0.430%))
testBenchmarkUpdatePriceFeedsFresh() (gas: -1576 (-0.441%))
testBenchmarkGetPrice() (gas: -259 (-0.969%))
```
p.s: I read one place that `runs` is an estimate of how many times the contract is expected to be called as opposed to number of optimization passes through the code!
* Change optimizer_runs to 10000
* pyth2wormhole-client: Stagger attestation sched jobs
* pyth2wormhole-client 1.0.0-rc1
This is an initial semver release for the pyth2wormhole-client package.
* p2w_autoattest.py: Add env for atteser --timeout option
* pyth-attesster v1.0.0-rc2
* pyth-attester-v1.0.0-rc3
This fixes a typo in p2w_autoattest.py
* pyth-attester-v1.0.0
* Update pyth-sdk-solidity version
* Add parsePriceFeedUpdates as an empty method
To be implemented in the future
* Update events
* Fix tests
* Address Tom review comment
* Fix Pyth forge test
* Copy BytesLib.sol to OptimizedBytesLib.sol
* Remove `require`s from OptimizedBytesLib
* Use OptimizedBytesLib
* revert to use BytesLib for governance
* Rename to UnsafeBytesLib + use it explicitly
* Remove middle structs
* Parse and process attestation in place
It helps a lot because we won't expand memory anymore
* Update comments
* Remove unusued PriceAttestation struct
* [test-publisher]: Set cap on dyn added symbols
Currently the test publisher creates a new symbol every two minutes
without any cap and running tilt for a
long time will eventually drain all the resources.
This change sets a cap of PYTH_TEST_SYMBOL_COUNT
on the dynamically added symbols. It means that the publisher
starts with PYTH_TEST_SYMBOL_COUNT and will add at most
PYTH_TEST_SYMBOL_COUNT new symbols after that
* Update third_party/pyth/pyth_publisher.py
Co-authored-by: Stanisław Drozd <stan@nexantic.com>
* Update third_party/pyth/pyth_publisher.py
Co-authored-by: Stanisław Drozd <stan@nexantic.com>
* Update third_party/pyth/pyth_publisher.py
Co-authored-by: Stanisław Drozd <stan@nexantic.com>
Co-authored-by: Stanisław Drozd <stan@nexantic.com>
* Move some configs to a config file inside code
* Remove redundant ledger logs
* Use getSquads for execute too
* Refactor ledger logging removal
* update Readme
* pyth2wormhole-client: automatically crawl mapping based on interval
* Make the mapping crawl automation seamless
* pyth2wormhole-client: Make mapping crawling routine more robust
This change takes care of recoverable mapping crawling
errors (e.g. malformed single price on single product is no longer
dropping otherwise good different prices and products in the mapping
in favor of a warn message)
* pyth2wormhole-client: Move mapping crawl sleep near logic it affects
* pyth2wormhole-client: remove stray comment
* pyth2wormhole: Fix faulty merge with master
* pyth2wormhole-client: Fix mapping crawl price counting
* pyth2wormhole-client: split daemon/non-daemon, improve readabi[...]
...lity and remove most warnings
* pyth2wormhole-client: parts-per-thousand -> base points
* pyth2wormhole-client: inaccurate comment
* p2w-client: review advice - bp -> bps, std hasher -> sha256
* pyth2wormhole-client: reuse message queue across mapping lookups
* Dockerfile.client, Dockerfile.solana: harden caching to cut CI time
This change attempts to add useful items to the docker caching which
should save time downloading crates and by adding path=<full path> and
dropping id=<name> ensure that no Dockerfile cache mismatches occur. I
think the id= param is meant to help group builds that benefit from
common cache, but in case of pyth2wormhole-client/SOL contract builds
it became a competition between the two replacing the other's caches
* Dockerfile.client: remove malformed id= params
* Run remote exec CI only if it's changed
To save more GH actions time + have faster CI checks (sometimes it takes longer than tilt!)
* Update remote-executor.yml