* node: guardiand support for accounting
Change-Id: I97fe1f6d6d71a5803881ff4c793e3c30f22b14d8
* Node: Tie accounting into the guardian
Change-Id: I31600d18176f516b75b3eb046fd7ac6e54e1b133
* Node: accounting tests and metrics
Change-Id: Ieb139772edf464ed1ab202861babeaf0f857ad6b
* Node: minor tweak to accounting metrics
Change-Id: Iad2b7e34870734f0c5e5d538c0ac86269a9a4728
* Node: load accounting key
Change-Id: I228ce23e63b556d751000b97097202eda48650aa
* More work in progress
Change-Id: I85088d26c05cf02d26043cf6ee8c67efd13f2ea4
* Node: send observations to accounting contract
Change-Id: Ib90909c2ee705d5e2a7e6cf3a6ec4ba7519e2eb1
* Node: Fix lint error in accounting tests
Change-Id: Id73397cf45107243a9f68ba82bed3ccf2b0299b5
* Node: Need to copy libwasmvm.so
Change-Id: I2856c8964ca082f1f4014d6db9fb1b2dc4e64409
* Node: Rename wormchain to wormconn
Change-Id: I6782be733ebdd92b908228d3984a906aa4c795f7
* Node: moving accounting check after governor
Change-Id: I064c77d30514715c6f8b6b5da50806a5e1adf657
* Node: Add accounting status to heartbeat
Change-Id: I0ae3e476386cfaccc5c877ee1351dbe41c0358c7
* Node: start of accounting integration work
Change-Id: I8ad206eb7fc07aa9e1a2ebc321f2c490ec36b51e
* Node: More broadcast tx stuff
Change-Id: Id2cc83df859310c013665eaa9c6ce3033bb1d9c5
* Node: Can actually send a request to accounting
Change-Id: I6af5d59c53939f58b2f13ae501914bef260592f2
* Node: More accounting tx broadcast stuff
Change-Id: If758e49f8928807e87053320e9330c7208aad490
* Node: config changes for accounting
Change-Id: I2803cceb188d04c557a52aa9aa8ba7296da8879f
* Node: More accounting changes
Change-Id: Id979af0ec6ab8484bc094072f3febf39355351ca
* Node/Acct: Use new observation request format
* Node/acct: use new contract interface
* Node/acct: fix minor copy/paste error
* Node: Clean up comments and lint errors
* Node: disable accounting in dev by default
* Node: Fix test failure
* Remove test code
* Switch messages to debug, rename Run()
* check for "out of gas"
* Use worker routine to submit observations
* Rename mutex to reflect what it protects
* Create handleEvents func
* Remove FinalizeObservation
* Node/Acct: Trying to use tm library for watcher
* Node/acct: switch watcher to use tm library
* Node/Acct: Need separate WS parm for accounting
* Node/Acct: Fix compile error in tests
* Node/Acct: Minor rework
* Node: add wormchain as a dep to remove stale code
* Node/Acct: GS index is not correct in requests
* Node/Acct: Peg connection error metric
* Node/Acct: Add wormchain to node docker file
* Node/Acct: Fix for double base64 decode
* Node/Acct: Change public key to sender address
* Node/Acct: Fix lint error
* Node/Acct: key pass phrase change
* Node/Acct: Pass guardian index in obs req
* Node/Acct: No go on submit observation
* Node/Acct: Don't double encode tx_hash
* Node/Acct: Remove unneeded base64 encoding
* Node/Acct: handle submit channel overflow
* Node/Acct: Added a TODO to document a review issue
* Node/Acct: Fix for checking if channel is full
Co-authored-by: Conor Patrick <conorpp94@gmail.com>
* sdk/rust: Move profile settings to workspace
* sdk/rust: Add serde_wormhole crate
The serde_wormhole crate implements the wormhole wire format as a serde
data format. This will let us replace all the hand-rolled
serialization with auto-generated code, which is less error-prone and
easier to review.
* sdk/rust: Add serde-based struct defintions
Refactor the core crate to add serde-based struct definitions for the
various messages used by the different wormhole smart contracts. This
will also make it easier to use alternate data formats (like json) for
client-side tooling.
Co-authored-by: Reisen <reisen@morphism.org>
* sdk/rust: Drop references to `de::Unexpected`
The `de::Unexpected` enum from serde has a `Float(f64)` variant.
Referencing this enum anywhere in the code will cause the compiler to
emit its `fmt::Display` impl, which includes an `f64.load` instruction
on wasm targets. Even if this instruction is never executed, its mere
existence will cause cosmos chains to reject any cosmwasm contract that
has it.
Fix this by removing all references to `de::Unexpected`.
* cosmwasm: Use cargo resolver version "2"
Enable the new feature resolver for the entire workspace. This
prevents features that are enabled only for dev builds from also being
enabled in normal builds.
* Move cosmwasm Dockerfile to root directory
The cosmwasm contracts now also depend on the rust sdk so the docker
build context needs to be set to the root directory rather than the
cosmwasm/ directory.
* cosmwasm: Add wormchain-accounting contract
This contract implements tokenbridge accounting specifically for the
wormchain environment.
Fixes#1880.
* cosmwasm/accounting: Drop references to `de::Unexpected`
The `de::Unexpected` enum from serde has a `Float(f64)` variant.
Referencing this enum anywhere in the code will cause the compiler to
emit its `fmt::Display` impl, which includes an `f64.load` instruction
on wasm targets. Even if this instruction is never executed, its mere
existence will cause cosmos chains to reject any cosmwasm contracts that
contain it.
Fix this by removing references to `de::Unexpected`.
Co-authored-by: Reisen <reisen@morphism.org>
We want wormchain to use the vaa package from the sdk directory so copy
that into the image when building. Also move the dockerfile into the
parent directory to be consistent with what we do for the other
dockerfiles that use the root directory as the context.
* near-sdk-refactor: Fix attest
: Fix missing function calls
: make near on near
: renamed tryHexToNativeStringNear
* near-sdk-refactor: bumped near-sdk-js version
Co-authored-by: Josh Siegel <jsiegel@jumptrading.com>
* node: Shrink final docker image size
* Tiltfile: guardiand should run the build stage
* node: allow building without -race
* node: Support development builds
A development build must use the --unsafeDevMode flag.
* CI: build docker image
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
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.
* initial spy-relayer
* Update spy_relayer Dockerfile
* added example mainnet config files
* split out private keys into its own ENV variable
* Update spy relayer supportedChains.json
To remove the `walletPrivateKey` entries. All of the private keys have
been split out into their own json file.
* fixed evm private key env parse
* missing solana accounts report 0 balance, rather than error
* wallet address is logged in debug
* spy_relayer: enabled prometheus default metrics
Also set a prefix of `relayer_`
* spy_relayer: updates to the prometheus bits
* Use a single metric registry
* Use a simpler metric name and add labels for individual wallets
* spy_relayer: human readable app mode in the metrics
[ listener | relayer | both ]
* spy_relayer: unify metrics
* remove the collection of default metrics
* hardcode the `spy_relayer_` prefix on all custom metrics
* fixed dep arrays, nullable terra token/balance info
* attempt stack debug
* debug pullTerraBalance
* provider http or ws
* update sdk
* logging for tokenAddress is 0
* fix foreign address calc
* fix calcLocalAddressesTerra
* relayer/spy_relayer: update prometheus helpers
Add / url handler for the ingress-gce stupid load balancer that
doesn't support custom url healthchecks unless you make a BackendConfig
custom resource definition.
* logging refinement
* use chain name in prometheus
* adjust retry timeout calculation
* spy_relayer: update prometheus bits
* improved error handling
* relayer ui improvements
* prep sdk release
* use latest sdk, manual redeem button
* relaying ux improvements
* gas price fix
* shortened terra success log
* use gh base relayer list
* fix prometheus urls
* Update prometheus metric name
* only show TPS warning on mainnet
* show relayer fee in source preview
* fix unwrap check
* add native bool to balance metric
* logging improvements
* add feeRecipientAddress to redeemOnSolana
* gather solana fees
* remove relayer ws support
* add nativeCurrencySymbol to ChainConfigInfo
* fix solana native symbol
* demoteWorking option, logger contexts
* scoped logging
* bridge_ui: unwrap native
* add evm wallet monitor test
* solana vaa parsing fix
* add monitorRedis
* make Jeff's brain happy
* log demoting keys
* register redisQueue metric
* human readable redisQueue metric
* fix timestamp inconsistency
* use scopedLogger for the first level of workers
* pull wallet balances in parallel
* more scoped logging
* pick a solana fee
* moving keys log improvement
* update eth gas calculations based on recent txs
* use postVaaSolanaWithRetry
* split success and failures by chain
* fix using terraCoin
* check prom every 10s
* batch getting evm token balances
* batch calcLocalAddressesEVM
* debug worker logging
* log retry number
* support Polygon?
* reset status on demotion
* enhance!
* update avax fee
Co-authored-by: Chase Moran <chasemoran45@gmail.com>
Co-authored-by: Kevin Peters <kpeters@jumptrading.com>
Co-authored-by: Evan Gray <battledingo@gmail.com>
* 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
* tests run in tilt / ci
* changed bridge_ui test process
* tests use kube proxy when in ci
* fix: allTests.sh permission
* fix: bridge_ui dockerfile sha for amd64
* fix: bridge_ui should use cra test
* fix: ci tests
Co-authored-by: Evan Gray <battledingo@gmail.com>
* initial commit
* cleanup, spacing fixes
* update copy
* responsive footer
* logo link
* router link active underline
* fix side-by-side padding
* app card links
* initial network table
* sort guardians
* network selector
* add envs to unbreak deployment
* 404
* wip explorer
* recent messages list
* fix activeNetwork context init
* add Oasis and Avalanche utils
* add title to RecentMessages
* add explorer ChainOverviewCard
* add explorer PastWeekCard
* save exact versions of npm packages
* add explorer search functionality
* mvp
* remove dupe page
* add basic social images
* add social sharing metadata
* update development siteUrl
* test with example prod url
* fix social card name
* update number of chains
* decode payload with WASM
* updated copy
* fix index portal link
* prod .env variables
* show more recent messages for chain or contract
* fix decodePayload summary
* delete explorer v1
* fix explorer dockerfile
* fix explorer serve settings for devent
* remove proto-gen-web for explorer
* rm proto-gen-web for explorer
Co-authored-by: Evan Gray <battledingo@gmail.com>
Co-authored-by: Evan Gray <56235822+evan-gray@users.noreply.github.com>
* Stub out algorand support in wormhole
1) Introduce the algorand chain constant in all the appropriate places
2) Deploy pyth/hernandc algorand smart contracts into devnet
3) Fund all the correct contracts for devnet testing
Change-Id: I6e4402b5b21223b32ea89653f8c7606f5c7f2843
* pr/jsiegel/algorand-v1: ALGORAND is not a EVM chain @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: fix lint @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: put the requirements into the image @ gusc1a-ossdev-jsl1
* jsiegel/algorand: make the watcher hang forever @ gusc1a-ossdev-jsl1
* jsiegel/algorand: comment these out @ gusc1a-ossdev-jsl1
* jsiegel/algorand: put this back in @ gusc1a-ossdev-jsl1
* jsiegel/algorand: fix guardian example @ gusc1a-ossdev-jsl1
* Generate teal source code
commit-id:a537a109
* jsiegel/algorand: it builds @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: add Dockerfile.teal @ gusc1a-ossdev-jsl1
* jsiegel/algorand: improve the dependencies @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: Fix up build @ gusc1a-ossdev-jsl1
* dead file
* pr/jsiegel/algorand-v1: remove more stuff @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: fix build @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: freeze the requirements @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: Fix teal to use pipenv @ gusc1a-ossdev-jsl1
* pr/jsiegel/algorand-v1: fix miss-merge @ gusc1a-ossdev-jsl1
Co-authored-by: Leo <leo@certus.one>
As far as I can tell, both primary and node are happy. We can't use
https://github.com/algorand/sandbox since it makes too many
assumptions about its environment (docker-compose, interactive
development vs. reproducible CI usage).
Instead, use the official mainnet Docker images and ship our own config.
Caveat: "goal network create" is not reproducible and each Docker
build will generate a new set of root keys. We can presumably avoid
this by hardcoding the output of "goal network create"
(using --noimportkeys to avoid having to vendor a SQLite DB.. we'd
just re-import them to kmd at runtime, which is what goal is doing
internally: f51d2d7d5a/netdeploy/networkTemplate.go (L131))
Change-Id: I8c99c6150c9c244c9f12b68a58184c2d5697cee8
This helps avoid expensive rebuilds when rebasing while working on
components like guardiand.
User can manually click "Apply" to update resources or set it back
to TRIGGER_MODE_AUTO via the UI for individual components.
Change-Id: I66697ddefb6c305493ca8cc53eba2a0e9cdd1b09
- Add Cloud Functions:
- "Recent" gap list, can filter and/or group by chain or address.
- "Totals" counts 24h, 30d, rolling daily. can filter and group.
- "Transaction" lookup row by chain-native transaction identifier.
- Pad sequence in rowkey to fixed length, for sequential row order.
- Add Cloud Function deploy instructions.
- Fix#410 Buildpack image cleanup
Change-Id: Ifa3110a3d58e2f94adb48ccb451c27ab3add0611
This adds the explorer and Pyth as optional components to improve
Tilt startup times, as originally suggested by Justin.
Defaults to true in CI.
Change-Id: Id9fffe5b11311baadc042815c0cc747de037554e
This adds a readiness probe, such that future breakage would be
detected in CI. It also fixes build caching.
Fixescertusone/wormhole#378
Change-Id: I4e929b491bba62b893eec9975f477256eecde6aa
Ensure there's no core vs. token bridge ambiguity.
Breaking changes to the CLI:
* "guardiand bridge" CLI is now "guardiand node"
* --solanaBridgeAddress is now --solanaContract
* --bridgeKey is now --guardianKey
The Heartbeat proto message had one of its fields renamed from
BridgeAddress to ContractAddress, but this won't break the wire
format and the only consumer appears to be the CLI.
Change includes a "go mod tidy" - it insisted.
Change-Id: Id8b312827737f07f2d5f3944ebce469d946e7f51
This removes all locally ran shell scripts, which should hopefully
enable the Tiltfile to run without changes on Windows.
We lose the invariant of clearing the output directories, which
seems like a reasonable sacrifice for banishing bash.
Change-Id: I756928a25cada1b613ed9fda145809a414a46466
The Go dependency is still required to build the pack binary.
Use "tilt docker" to use Minikube's Docker instance, if available,
removing the local Docker dependency for Minikube users.
The Makefile continues to not require Docker and runs buf locally.
Remove broken Powershell scripts (can't test on Windows). These scripts
should now be substantially easier to write.
Change-Id: Ie80bf68e0e468a747861bea36fa5b353d9de110d
- Explorer page fetch data from hosted Cloud Functions.
- Network page use GetLastHeartbeats rather than gRPC stream.
Change-Id: I57dce2ee0b84c4b31fcf7308855668a139ffe20e
- Add development BigTable instance
- Devnet Guardians save to local bigtable automatically
- Cloud Functions run in devnet containers
Change-Id: I9fa32a06b24218cf5c9c01cdff6f37c67e8d1e7c
- Use "npm ci" instead of "npm install" in a couple of places.
- Migrate generate-wasm.sh to a Dockerfile so it can be cached.
- Disable namespace creation and explorer build in CI.
Change-Id: I2e6ee806438863ca81ada701e14684f9f4cc0a76