Commit Graph

220 Commits

Author SHA1 Message Date
bruce-riley 57fe302314
Add emitter type to guardian mainnet consts (#1293)
* Add emitter type to guardian mainnet consts

* Add stringer to fix lint errors
2022-06-21 14:13:44 -05:00
Evan Gray 5931368ed7 node: terra2 support 2022-06-21 10:47:16 -04:00
bruce-riley f07b5dfbfb
Guardian parse transfer VAA payload (#1232)
* Parse transfer VAA payload

Change-Id: I23136807e5101ae823e9d198ac52d3446a94b0f2

* Enhance StringToAddress()

Change-Id: If7721c991443443cd811cc5b3ee070224aa6c2ce

* Code review rework

Change-Id: I75ae8c5386d9bcde1cfdd6b1e666bfefbe9852fe

* Payload length can be shorter

Change-Id: I459a180d7a54faf96b72943c9485696eb08b3d61

* Ran go fmt

Change-Id: Ia6ba3aaa13eb7c4e573c263a2d7868bf3e9937a4

* Decoding payload should not require a VAA

Change-Id: I143119e8667f340c43c7662488d909f087b9d1cc

* Fix comment typo

* Refactor StringToAddress tests to table pattern

* Refactor DecodeTransferPayloadHdr tests

* Add unit-tests for IsTransfer and fix array out of bounds bug

* Make sure length checking handles sub-byte hex strings appropriately

* Add empty string negative cases for TestStringToAddress and TestDecodeTransferPayloadHdr

* Fix nil ptr error in unit-tests

* Fix parenthesis in IsTransfer()

* More rework

Co-authored-by: claudijd <jclaudius@jumptrading.com>
2022-06-15 15:45:21 -05:00
bruce-riley 24c5b17267
Neon to testnet (#1262)
* WIP: neon

* Watcher support

* Use eth_getLogs for Neon

* bridge_ui: update sdk version

* Setting WETH address for Neon

* Portal bridge support for WNEON

* relayer: update sdk

Co-authored-by: Evan Gray <battledingo@gmail.com>
2022-06-14 10:22:49 -04:00
Chirantan Ekbote 7454c26f19 node: Update terra.go to latest version
This is necessary to use a more recent version of cosmos-sdk (v0.39.1 ->
v0.44.5).
2022-06-09 12:40:27 +09:00
Bruce Riley cf8c97082b Minor tweak to finalized check 2022-06-07 10:36:12 -04:00
Bruce Riley d6f4740136 Undo formatting changes 2022-06-07 10:36:12 -04:00
Bruce Riley 0ac89c3c06 Move polygon stuff to a different branch 2022-06-07 10:36:12 -04:00
Bruce Riley cf4722a546 Refactor to generalize polling
Change-Id: Ie30056486ec86f6dceffed231ac227fa9c3499a7
2022-06-07 10:36:12 -04:00
Bruce Riley bc7834448e Enhance error handling
Change-Id: Ied2521c0ebfc6bc8cf76ea90be6bc40dc0d811a3
2022-06-07 10:36:12 -04:00
Bruce Riley 9d423422c4 Rework the code
Change-Id: Id0aed3e3bce8f1e5332479132fab9437252909db
2022-06-07 10:36:12 -04:00
Bruce Riley 80512c0350 Initial rough draft
Change-Id: Ic2c8b15438162fd097e866f9a0ca1f6adf6a3f55
2022-06-07 10:36:12 -04:00
Josh Siegel 594674db5e algo/watcher: Fixes for testnet 2022-06-07 08:57:27 -05:00
Bruce Riley 5562141599 Only require 64 confs in polygon testnet 2022-06-06 12:49:44 -04:00
Bruce Riley dcce155f43 Acala mainnet deploy 2022-06-03 14:44:22 -04:00
tbjump ba5fcc4ad8 apply gofmt and enforce it for new commits 2022-06-02 07:57:49 -04:00
Jonathan Claudius f32e6c4aa8
Reorder quorum and verifysignatures (#1166) 2022-05-25 08:35:08 -04:00
Jonathan Claudius 1e6611ebb6
Add comments on vaa min length (#1206)
* Add proof of work on minVAALength

* Change minVAALength to 57
2022-05-24 10:42:30 -04:00
tbjump 67c39e71c0
enable additional linters, including gosec (#1215)
enable additional linters, including gosec
2022-05-23 16:21:10 +02:00
tbjump 8c1e571724
fix getUniqueClientId to actually return unique ID (#1127)
fix getUniqueClientId to actually return unique ID
2022-05-23 15:05:55 +02:00
tbjump 1c2a70554b
supress gosec issue (#1216)
supress gosec issue
2022-05-23 11:25:24 +02:00
tbjump d87ae5a272
gosec fixes (#1201)
* nosec linter surpression in nodekey_test.go

* Mark DeterministicEcdsaKeyByIndex as Insecure

* nosec - surpress warning

* simplify range expression

Co-authored-by: tbjump <>
2022-05-20 08:09:48 -07:00
bruce-riley 018908a420
Klaytn mainnet deploy (#1185)
* Klaytn mainnet deploy
2022-05-16 10:06:17 -04:00
Csongor Kiss 4d54fee0b9
node: New default current guardian set index (#1101)
The current guardian set index is 2, so the `guardiand` template command
should generate prototxt files accordingly.

Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
2022-05-13 19:47:45 -04:00
Jeff Schroeder da0fb0ddf7 node/hack/repair_terra: token bridge messages only
Ensure that the sequence numbers are just for the terra token bridge.
2022-05-13 15:26:14 -04:00
Jeff Schroeder f1d28915f8 node/hack/repair_terra: add a rate limiter
Otherwise the terra fcd tells us to gfy after too many requests.
2022-05-13 15:26:14 -04:00
Csongor Kiss 68693689cf node/repair: allow multiple sequences in a tx 2022-05-13 15:26:14 -04:00
Jeff Schroeder e70830002e repair_eth: work better when messages are skipped
Otherwise there can be a nil pointer deref for polygon when it skips
the VAA.
2022-05-13 13:22:55 -04:00
Bruce Riley d266438654 Celo mainnet deploy changes 2022-05-13 13:11:28 -04:00
Josh Siegel ac9b4a5d05 algo/rollback: handle rollbacks gracefully @ gusc1a-ossdev-jsl5 2022-05-12 09:10:10 -05:00
Josh Siegel c9d7a617ee Rewrite algorand guardian watcher to directly hit the node instead of depending on indexer 2022-05-12 06:50:07 -05:00
bruce-riley c7ba459de8
Moonbeam to testnet (#1150)
* Moonbeam to testnet

* Fix typo

* Shouldn't touch the CLI with this PR

* Update SDK version
2022-05-10 11:23:07 -04:00
Leo 2a83ea406b node/pkg/ethereum: move up nil check for TransactionReceipt
This fixes a null pointer dereference for a nil tx.

commit-id:a6a356b8
2022-05-05 09:04:54 -04:00
Leopold Schabel eb3b777520 node/cmd/guardiand: improve send-observation-request arg parser
Accept chain names (i.e. "solana") and base58 tx hashes.

commit-id:d7114740
2022-05-02 14:41:55 -04:00
bruce-riley a94a3cf2fb
Karura mainnet deploy (#1142)
* Start of move to mainnet

* Rework to safe mode check

* Update truffle-config

* Should not check safe mode in dev mode
2022-05-02 14:28:17 -04:00
bruce-riley 49f4a98cb2
Add missing aurora address references (#1117)
* Add missing aurora address references

Change-Id: I57a7dc7450d8527ab1ee6710dfbd6eda6da93f07

* Fix copy and paste error in comment

Change-Id: Ie7fc3cdbeab76518aad0f0220798cd1788d4be45
2022-05-02 13:06:56 -04:00
Evan Gray 1229ca5cff algo: guardian 2022-04-29 20:56:46 -04:00
Jeff Schroeder 0981dc19bc node/hack/repair_eth: skip missed message
Otherwise, the script will run until the max number of times and
never complete.
2022-04-29 07:21:03 -04:00
Jeff Schroeder 542acdf0d6 node/hack/repair_eth: more cat & mouse for polygon
* Added the `User-Agent` header to all requests to the block explorer
  so cloudflare's browser check is happier.
* Add an option to sleep between loops hitting the block explorer. More
  than 1 / second on polygonscan gets you blocked temporarily.

These changes are required to repair missed messages on polygon.
2022-04-29 07:21:03 -04:00
bruce-riley d04328b858
Celo testnet support (#1051)
* Initial Celo support

Change-Id: Iee98ee29a8b09af9ca76945792b750d96a170702

* Watcher support

* Fix high level make file

* Remove node binary committed by mistake

* Port change from EthWatcher to CeloWatcher

* Use docker to build ABIs

* Refactor watcher to eliminate massive redunancy

* Fix lint-and-tests to handle multiple defs on link

* Minor code cleanup

* Celo should use ganache in devnet

* Prep for mainnet deploy

* Code review rework

* Remove celo from sdk package.json
2022-04-28 12:20:38 -04:00
justinschuldt 4ae277f264 shutdown auth proof template 2022-04-28 02:32:04 -05:00
Jeff Schroeder a4c91d8f1b
Minor updates to repair_eth (#1120)
* node/hack/repair_eth: use a cookiejar for http

Otherwise, explorers like polygonscan, which implement a cloudflare WAF,
will block all requests.

* node/hack/repair_eth: add -showError flag

When an explorer is having problems or blocks a repair http request, it returns an error like:

    Failed to get current height: failed to decode response: invalid character '<' looking for beginning of value

This allows showing the actual response body to better troubleshoot the problem.
2022-04-27 14:33:43 -04:00
bruce-riley 87b36399d3
Add safe mode check (#1108)
Change-Id: Ida10e1ab0c056b4ed1ce2317800235843763a7ac
2022-04-26 07:51:10 -05:00
bruce-riley 05d84b4d6f
Add fantom to repair script (#1109)
Change-Id: Ic81b1082b72bb0cd66d9f15e951f6df2b92972ad
2022-04-26 07:50:07 -05:00
Csongor Kiss 0f6c1e2d98 Allow specifying the timestamp in governance inject
The 'timestamp' field is now allowed in a governance prototxt, which
applies to all the messages in the struct. If the timestamp is not
specified, then it defaults to 0, which is identical to the existing
behaviour.
2022-04-19 17:52:05 +01:00
Jonathan Claudius b18a6c8c2f
Fix segfault from empty GetSignedVAARequest (#1069) 2022-04-11 19:16:59 -04:00
Jonathan Claudius bad4f7061b
Adds unit-tests and functional improvements to guardian signature verification (#1068)
* Add more comprehensive structs unit-tests

* Make VerifySignatures fail on duplicate addresses

* Adjust duplicate detection to guard on signatures instead of addresses

* Add monotonic check in VerifySignatures

* Move logic into VerifySignatures and add more test cases

* Add a paranoid check for duplicate signers

* Make VerifySignatures unit-tests less contrived

* Add more verify signature test cases

* Refactor VerifySignatures tests

* Add VerifySignature fuzz tests

* Add tc.result checking instead of hardcoded true

* Change comparison so it throws debug on failure for fuzz tests

* Add unit-tests for observation signature logic

* Fix comment typos

* Refactor observation tests

* Add missing test case

* Fix VAAInvalidSignatures test case label

* Clean up unit-tests for observation and structs

* Change errorString convention in test

* Format Signature Verification Test Cases

* Remove unnecessary casting

* Add multi-signer same key cases

* Fix err usage in test cases

* Remove duplicate getVAA
2022-04-11 19:14:41 -04:00
Leopold Schabel 1fd6e14885 node/pkg/ethereum: fix unreachable nil check
The program would've crashed on `l.Address` before it
could reach the nilness check.

commit-id:17b64899
2022-04-11 17:10:14 -04:00
Bruce Riley 10f00b934b Promote Aurora to Mainnet 2022-04-11 17:05:07 -04:00
Paul Noel 763f80b45d
Repair eth for Aurora (#1065)
* node/hack/repair_eth: update for Aurora

Change-Id: Ic073cb7806ce611a0d0c742b864dfa5cd57f39da

* bridge_ui/utils: update for Aurora

Change-Id: I19089355910d1252d139267ce1398e1dcdd46095

* node/hack/repair_eth: add comments

Change-Id: I2361d317e24446590334d39bc2e52f68d75932c5

* node/hack/repair_eth: fix comments

Change-Id: I4fd3e04d74f4f0b1c3731c556a106663bb36b66d
2022-04-11 16:27:20 -04:00