* Governor Guardian admin commands
Opening PR describing the types of admin commands that Guardians would have in relation to the Governor security module.
* Update GOVERNOR.md
Small wording tweak to remove a duplicative clause
Opening this PR for open feedback on a security feature that Guardians can optionally opt into that would limit the amount of notional value that can be transferred out of a given chain in a given time frame -- this would reduce the damage to the bridge during an existential threat scenario.
The wrapped assets on terra have been migrated to code id 767, but the
config wasn't updated to store this new code id, so newly created
wrapped assets all use an older code id. This patch upgrades all wrapped
assets to 767 and changes the config so future wrapped assets also use
that code id.
Also added a new function `migrate_wrapped_assets` so this task can be
done in the future in a less error-prone way.
Before this check, users were able to lose funds by sending money to an
address that's shorter than 32 bytes.
This commit is essentially a backport of the fix from the new cosmwasm contract.
* Add the default backend for the relayer
Start to slowly split things out.
* Configure the backends when configuring the env
* First stab at the pluggable listener backend
* Update relayer example (and test) config
* relayer: JIT backend
* relayer: walletMonitor remove useless function
* relayer: update worker init() funcs
It is silly to accept a boolean in thing.init() vs just not running init
if you don't want to run thing.
* relayer: remove env property from Listener
It is verified in init() in spy_listener.ts and rest_listen.ts, so it can
be deferred to not require the import.
* relayer: clean up the main bits
Only try to init() something when it is actually supposed to run
per the cli flags.
* spy_relayer: more descriptive var name in main
* spy_relayer: Update relay worker with more docs
* spy_relayer: add targetChainName to WorkerInfo
This makes it easier to pretty print the chain name in the logs without
having to look the name up.
* spy_relayer: update logs and use the backend
* Use the Relayer interface's process() method in place of processVaa()
* Update the logs to include the chain name in the worker and auditor threads
* spy_relayer: remove processRequest()
It has been moved to the process() method of the default Relayer backend.
* spy_relayer: start fleshing out the Relayer default
* spy_relayer: fix a logic bug in checkQueue()
Co-authored-by: @swimricky
* spy_relayer: update TokenBridgeRelayer.process()
* Remove some extra logic
* Actually use the ChainId type since the id of 0 is in the sdk now
* spy_signature: add Relayer.runAuditor()
The auditor code is payload specific and needs to be with the backend.
* spy_relayer: move Relayer.runAuditor()
Make it part of the backend since the backend has all of the payload
specific logic into it.
* spy_relayer: move relay() --> Relayer.relay()
The actual relaying is part of the backend, so make it so.
* spy_relayer: add Relayer.runAuditor()
* spy_relayer: no more deprecated hexToNativeString
* spy_relayer: implement Relayer.targetChainId()
This is used for finding workable items in the incoming queue to toss
into the working queue.
* spy_relayer: remove relay.ts
The relay() function was moved to Relayer.relay()
* spy_relayer: more uses of deprecated hexToNativeString()
* spy_relayer: remove unused import
* spy_relayer: review feedback from @bruce-riley
* Fix some spelling tyops
* Simplify some logging
* Simplify a conditional for the payload version check
* spy_relayer: misc fixes and code clean up
* Fixed integration tests
* Added launch.json file for debugging in VS Code
* Updated to latest wormhole SDK
* Backup queue uses same key as redis
* Added Terra Classic flag
* Throttle potential infinite loop in audit thread
* Fixed spy service connection leak
Co-authored-by: Evan Gray <battledingo@gmail.com>
Co-authored-by: Kevin Peters <kpeters@jumptrading.com>
`canonicalAddress` and `humanAddress` are useful functions for all
cosmos chains so move it into a new cosmos package. This also means we
need to stop hardcoding "terra" in `humanAddress` and take the human
readable part as a parameter instead.
Prior to this change, these values were hardcode in the contract, as
the only supported chain was terra 2. This change allows the contract to
be deployed to other cosmwasm chains without having to recompile the
contract for each one.
The migration code ensures that terra2 is upgraded appropriately.