Better Agent Error Logging (#412)

* Make errors print on one line

* Replace color-eyre with eyre in core and base

* Replace color-eyre with eyre other libs

* Log should be imported without patch version

* Update tracing and opentelemetry

* Only need openssl dynamic libs

* Fix no-default-feature build

* Custom eyre handler

* Removed unused log dep

* Cleanup paste dep

* More package cleanup

* Update tokio

* Minor refactor
nambrot/publish-script
Mattie Conover 3 years ago committed by GitHub
parent 5840a7a278
commit f78e79ab9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 355
      rust/Cargo.lock
  2. 4
      rust/Dockerfile
  3. 30
      rust/abacus-base/Cargo.toml
  4. 2
      rust/abacus-base/src/agent.rs
  5. 8
      rust/abacus-base/src/contract_sync/mod.rs
  6. 2
      rust/abacus-base/src/contract_sync/schema.rs
  7. 2
      rust/abacus-base/src/inbox.rs
  8. 2
      rust/abacus-base/src/indexer.rs
  9. 3
      rust/abacus-base/src/lib.rs
  10. 6
      rust/abacus-base/src/macros.rs
  11. 2
      rust/abacus-base/src/metrics.rs
  12. 229
      rust/abacus-base/src/oneline_eyre.rs
  13. 2
      rust/abacus-base/src/outbox.rs
  14. 2
      rust/abacus-base/src/settings/chains.rs
  15. 2
      rust/abacus-base/src/settings/mod.rs
  16. 10
      rust/abacus-base/src/settings/trace/fmt.rs
  17. 2
      rust/abacus-base/src/settings/trace/mod.rs
  18. 2
      rust/abacus-base/src/settings/trace/span_metrics.rs
  19. 2
      rust/abacus-base/src/traits/checkpoint_syncer.rs
  20. 3
      rust/abacus-base/src/types/checkpoint_syncer.rs
  21. 2
      rust/abacus-base/src/types/local_storage.rs
  22. 2
      rust/abacus-base/src/types/multisig.rs
  23. 2
      rust/abacus-base/src/types/s3_storage.rs
  24. 11
      rust/abacus-core/Cargo.toml
  25. 2
      rust/abacus-core/src/chain.rs
  26. 2
      rust/abacus-core/src/db/abacus_db.rs
  27. 4
      rust/abacus-core/src/db/mod.rs
  28. 2
      rust/abacus-core/src/db/typed_db.rs
  29. 1
      rust/abacus-core/src/test_output.rs
  30. 2
      rust/abacus-core/src/traits/inbox.rs
  31. 2
      rust/abacus-core/src/traits/indexer.rs
  32. 2
      rust/abacus-core/src/traits/message.rs
  33. 2
      rust/abacus-core/src/traits/mod.rs
  34. 2
      rust/abacus-core/src/traits/outbox.rs
  35. 2
      rust/abacus-core/src/traits/validator_manager.rs
  36. 2
      rust/abacus-core/src/utils.rs
  37. 6
      rust/abacus-test/Cargo.toml
  38. 2
      rust/abacus-test/src/mocks/indexer.rs
  39. 23
      rust/agents/checkpointer/Cargo.toml
  40. 5
      rust/agents/checkpointer/src/checkpointer.rs
  41. 14
      rust/agents/checkpointer/src/main.rs
  42. 8
      rust/agents/checkpointer/src/submit.rs
  43. 17
      rust/agents/kathy/Cargo.toml
  44. 6
      rust/agents/kathy/src/kathy.rs
  45. 12
      rust/agents/kathy/src/main.rs
  46. 23
      rust/agents/relayer/Cargo.toml
  47. 11
      rust/agents/relayer/src/checkpoint_relayer.rs
  48. 16
      rust/agents/relayer/src/main.rs
  49. 12
      rust/agents/relayer/src/merkle_tree_builder.rs
  50. 2
      rust/agents/relayer/src/message_processor.rs
  51. 5
      rust/agents/relayer/src/relayer.rs
  52. 23
      rust/agents/validator/Cargo.toml
  53. 15
      rust/agents/validator/src/main.rs
  54. 11
      rust/agents/validator/src/submit.rs
  55. 5
      rust/agents/validator/src/validator.rs
  56. 12
      rust/chains/abacus-ethereum/Cargo.toml
  57. 2
      rust/chains/abacus-ethereum/src/inbox.rs
  58. 2
      rust/chains/abacus-ethereum/src/lib.rs
  59. 2
      rust/chains/abacus-ethereum/src/macros.rs
  60. 2
      rust/chains/abacus-ethereum/src/outbox.rs
  61. 2
      rust/chains/abacus-ethereum/src/validator_manager.rs
  62. 6
      rust/running-locally.md
  63. 6
      rust/tools/abacus-cli/Cargo.toml
  64. 12
      rust/tools/balance-exporter/Cargo.toml
  65. 8
      rust/tools/balance-exporter/src/main.rs
  66. 6
      rust/tools/kms-cli/Cargo.toml

355
rust/Cargo.lock generated

@ -20,9 +20,10 @@ dependencies = [
"abacus-ethereum",
"abacus-test",
"async-trait",
"color-eyre 0.6.1",
"color-eyre",
"config",
"ethers",
"eyre",
"futures-util",
"lazy_static",
"mockall",
@ -41,10 +42,10 @@ dependencies = [
"thiserror",
"tokio",
"tracing",
"tracing-error 0.1.2",
"tracing-error",
"tracing-futures",
"tracing-opentelemetry",
"tracing-subscriber 0.2.25",
"tracing-subscriber",
"warp",
]
@ -54,7 +55,7 @@ version = "0.1.0"
dependencies = [
"abacus-core",
"abacus-ethereum",
"color-eyre 0.5.11",
"color-eyre",
"ethers",
"ethers-signers",
"hex",
@ -72,10 +73,11 @@ version = "0.1.0"
dependencies = [
"async-trait",
"bytes",
"color-eyre 0.5.11",
"color-eyre",
"ethers",
"ethers-providers",
"ethers-signers",
"eyre",
"hex",
"lazy_static",
"num",
@ -95,10 +97,10 @@ version = "0.1.0"
dependencies = [
"abacus-core",
"async-trait",
"color-eyre 0.5.11",
"ethers",
"ethers-contract",
"ethers-signers",
"eyre",
"hex",
"num",
"rocksdb",
@ -116,8 +118,8 @@ version = "0.1.0"
dependencies = [
"abacus-core",
"async-trait",
"color-eyre 0.5.11",
"ethers",
"eyre",
"futures-util",
"mockall",
"rand 0.8.5",
@ -308,8 +310,8 @@ version = "0.1.0"
dependencies = [
"abacus-base",
"abacus-ethereum",
"clap 3.0.0-beta.5",
"color-eyre 0.5.11",
"clap 3.1.18",
"color-eyre",
"futures",
"human-panic",
"metrics",
@ -617,12 +619,11 @@ dependencies = [
"abacus-ethereum",
"abacus-test",
"async-trait",
"color-eyre 0.5.11",
"color-eyre",
"config",
"ethers",
"eyre",
"futures-util",
"log",
"paste",
"prometheus",
"rocksdb",
"serde 1.0.130",
@ -632,7 +633,7 @@ dependencies = [
"tokio-test",
"tracing",
"tracing-futures",
"tracing-subscriber 0.2.25",
"tracing-subscriber",
]
[[package]]
@ -685,35 +686,43 @@ dependencies = [
[[package]]
name = "clap"
version = "3.0.0-beta.5"
version = "3.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63"
checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
"indexmap",
"lazy_static",
"os_str_bytes",
"strsim 0.10.0",
"termcolor",
"textwrap 0.14.2",
"unicase",
"textwrap 0.15.0",
]
[[package]]
name = "clap_derive"
version = "3.0.0-beta.5"
version = "3.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3"
checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c"
dependencies = [
"heck",
"heck 0.4.0",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213"
dependencies = [
"os_str_bytes",
]
[[package]]
name = "coins-bip32"
version = "0.6.0"
@ -771,21 +780,6 @@ dependencies = [
"thiserror",
]
[[package]]
name = "color-eyre"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f1885697ee8a177096d42f158922251a41973117f6d8a234cee94b9509157b7"
dependencies = [
"backtrace",
"color-spantrace 0.1.6",
"eyre",
"indenter",
"once_cell",
"owo-colors 1.3.0",
"tracing-error 0.1.2",
]
[[package]]
name = "color-eyre"
version = "0.6.1"
@ -793,24 +787,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ebf286c900a6d5867aeff75cfee3192857bb7f24b547d4f0df2ed6baa812c90"
dependencies = [
"backtrace",
"color-spantrace 0.2.0",
"color-spantrace",
"eyre",
"indenter",
"once_cell",
"owo-colors 3.2.0",
"tracing-error 0.2.0",
]
[[package]]
name = "color-spantrace"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6eee477a4a8a72f4addd4de416eb56d54bc307b284d6601bafdee1f4ea462d1"
dependencies = [
"once_cell",
"owo-colors 1.3.0",
"tracing-core",
"tracing-error 0.1.2",
"owo-colors",
"tracing-error",
]
[[package]]
@ -820,9 +802,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce"
dependencies = [
"once_cell",
"owo-colors 3.2.0",
"owo-colors",
"tracing-core",
"tracing-error 0.2.0",
"tracing-error",
]
[[package]]
@ -1775,6 +1757,12 @@ dependencies = [
"unicode-segmentation",
]
[[package]]
name = "heck"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
[[package]]
name = "hermit-abi"
version = "0.1.19"
@ -2005,9 +1993,9 @@ dependencies = [
[[package]]
name = "integer-encoding"
version = "1.1.7"
version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48dc51180a9b377fd75814d0cc02199c20f8e99433d6762f650d39cdbbd3b56f"
checksum = "0e85a1509a128c855368e135cffcde7eac17d8e1083f41e2b98c58bc1a5074be"
[[package]]
name = "ipnet"
@ -2075,12 +2063,11 @@ dependencies = [
"abacus-base",
"abacus-core",
"async-trait",
"color-eyre 0.5.11",
"color-eyre",
"config",
"ethers",
"eyre",
"futures-util",
"log",
"paste",
"rand 0.8.5",
"serde 1.0.130",
"serde_json",
@ -2088,7 +2075,7 @@ dependencies = [
"tokio",
"tracing",
"tracing-futures",
"tracing-subscriber 0.2.25",
"tracing-subscriber",
]
[[package]]
@ -2101,8 +2088,8 @@ checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7"
name = "kms-cli"
version = "0.1.0"
dependencies = [
"clap 3.0.0-beta.5",
"color-eyre 0.5.11",
"clap 3.1.18",
"color-eyre",
"ethers",
"ethers-signers",
"hex",
@ -2172,9 +2159,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.106"
version = "0.2.125"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673"
checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b"
[[package]]
name = "libloading"
@ -2231,15 +2218,6 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "matchers"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
dependencies = [
"regex-automata",
]
[[package]]
name = "matches"
version = "0.1.9"
@ -2283,26 +2261,22 @@ dependencies = [
[[package]]
name = "metrics"
version = "0.17.0"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a00f42f354a2ed4894db863b3a4db47aef2d2e4435b937221749bd37a8a7aaa8"
checksum = "2e52eb6380b6d2a10eb3434aec0885374490f5b82c8aaf5cd487a183c98be834"
dependencies = [
"ahash",
"metrics-macros",
"proc-macro-hack",
]
[[package]]
name = "metrics-macros"
version = "0.4.0"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "caa72e4a3d157986dd2565c82ecbddcc23941513669a3766b938f6b72eb87f3f"
checksum = "49e30813093f757be5cf21e50389a24dc7dbb22c49f23b7e8f51d69b508a5ffa"
dependencies = [
"lazy_static",
"proc-macro-hack",
"proc-macro2",
"quote",
"regex",
"syn",
]
@ -2334,24 +2308,14 @@ dependencies = [
[[package]]
name = "mio"
version = "0.7.14"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799"
dependencies = [
"libc",
"log",
"miow",
"ntapi",
"winapi",
]
[[package]]
name = "miow"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
dependencies = [
"winapi",
"wasi 0.11.0+wasi-snapshot-preview1",
"windows-sys",
]
[[package]]
@ -2452,15 +2416,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
[[package]]
name = "ntapi"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
dependencies = [
"winapi",
]
[[package]]
name = "num"
version = "0.4.0"
@ -2621,13 +2576,15 @@ dependencies = [
[[package]]
name = "opentelemetry"
version = "0.14.0"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "492848ff47f11b7f9de0443b404e2c5775f695e1af6b7076ca25f999581d547a"
checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8"
dependencies = [
"async-trait",
"crossbeam-channel",
"futures",
"futures-channel",
"futures-executor",
"futures-util",
"js-sys",
"lazy_static",
"percent-encoding",
@ -2640,13 +2597,12 @@ dependencies = [
[[package]]
name = "opentelemetry-http"
version = "0.3.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b752610d59706ff7cae48003552b3d0bf19bcce532629c8a49095894f21c319"
checksum = "449048140ee61e28f57abe6e9975eedc1f3a29855c7407bd6c12b18578863379"
dependencies = [
"async-trait",
"bytes",
"futures-util",
"http",
"opentelemetry",
"reqwest",
@ -2654,9 +2610,9 @@ dependencies = [
[[package]]
name = "opentelemetry-jaeger"
version = "0.13.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97fd9ed34f208e0394bfb17522ba0d890925685dfd883147670ed474339d4647"
checksum = "f8c0b12cd9e3f9b35b52f6e0dac66866c519b26f424f4bbf96e3fe8bfbdc5229"
dependencies = [
"async-trait",
"headers",
@ -2664,23 +2620,34 @@ dependencies = [
"lazy_static",
"opentelemetry",
"opentelemetry-http",
"opentelemetry-semantic-conventions",
"reqwest",
"thiserror",
"thrift",
"tokio",
]
[[package]]
name = "opentelemetry-semantic-conventions"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd"
dependencies = [
"opentelemetry",
]
[[package]]
name = "opentelemetry-zipkin"
version = "0.12.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb008a5e6685ac350d50ff72f29cdd37ad25bc0960129be75fcc9ad5a67fdc08"
checksum = "fb86c6e02de97a3a7ffa5d267e1ff3f0c930ccf8a31e286277a209af6ed6cfc1"
dependencies = [
"async-trait",
"http",
"lazy_static",
"opentelemetry",
"opentelemetry-http",
"opentelemetry-semantic-conventions",
"reqwest",
"serde 1.0.130",
"serde_json",
@ -2699,12 +2666,9 @@ dependencies = [
[[package]]
name = "os_str_bytes"
version = "4.2.0"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799"
dependencies = [
"memchr",
]
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
[[package]]
name = "os_type"
@ -2715,12 +2679,6 @@ dependencies = [
"regex",
]
[[package]]
name = "owo-colors"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55"
[[package]]
name = "owo-colors"
version = "3.2.0"
@ -3256,15 +3214,6 @@ dependencies = [
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.6.25"
@ -3279,12 +3228,11 @@ dependencies = [
"abacus-core",
"abacus-test",
"async-trait",
"color-eyre 0.5.11",
"color-eyre",
"config",
"ethers",
"eyre",
"futures-util",
"log",
"paste",
"prometheus",
"serde 1.0.130",
"serde_json",
@ -3293,7 +3241,7 @@ dependencies = [
"tokio-test",
"tracing",
"tracing-futures",
"tracing-subscriber 0.2.25",
"tracing-subscriber",
]
[[package]]
@ -3909,9 +3857,9 @@ checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
[[package]]
name = "socket2"
version = "0.4.2"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
dependencies = [
"libc",
"winapi",
@ -3996,7 +3944,7 @@ version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
dependencies = [
"heck",
"heck 0.3.3",
"proc-macro-error",
"proc-macro2",
"quote",
@ -4077,12 +4025,9 @@ dependencies = [
[[package]]
name = "textwrap"
version = "0.14.2"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
dependencies = [
"unicode-width",
]
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
[[package]]
name = "thiserror"
@ -4106,9 +4051,9 @@ dependencies = [
[[package]]
name = "thread_local"
version = "1.1.3"
version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
dependencies = [
"once_cell",
]
@ -4124,9 +4069,9 @@ dependencies = [
[[package]]
name = "thrift"
version = "0.13.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c6d965454947cc7266d22716ebfd07b18d84ebaf35eec558586bbb2a8cb6b5b"
checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e"
dependencies = [
"byteorder",
"integer-encoding",
@ -4161,11 +4106,10 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
[[package]]
name = "tokio"
version = "1.13.0"
version = "1.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee"
checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395"
dependencies = [
"autocfg",
"bytes",
"libc",
"memchr",
@ -4174,15 +4118,16 @@ dependencies = [
"once_cell",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"winapi",
]
[[package]]
name = "tokio-macros"
version = "1.5.1"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "114383b041aa6212c579467afa0075fbbdd0718de036100bc0ba7961d8cb9095"
checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
dependencies = [
"proc-macro2",
"quote",
@ -4326,16 +4271,6 @@ dependencies = [
"valuable",
]
[[package]]
name = "tracing-error"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24"
dependencies = [
"tracing",
"tracing-subscriber 0.2.25",
]
[[package]]
name = "tracing-error"
version = "0.2.0"
@ -4343,7 +4278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e"
dependencies = [
"tracing",
"tracing-subscriber 0.3.6",
"tracing-subscriber",
]
[[package]]
@ -4369,22 +4304,22 @@ dependencies = [
[[package]]
name = "tracing-opentelemetry"
version = "0.13.0"
version = "0.17.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2f4cb277b92a8ba1170b3b911056428ce2ef9993351baf5965bb0359a2e5963"
checksum = "1f9378e96a9361190ae297e7f3a8ff644aacd2897f244b1ff81f381669196fa6"
dependencies = [
"opentelemetry",
"tracing",
"tracing-core",
"tracing-log",
"tracing-subscriber 0.2.25",
"tracing-subscriber",
]
[[package]]
name = "tracing-serde"
version = "0.1.2"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b"
checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
dependencies = [
"serde 1.0.130",
"tracing-core",
@ -4392,37 +4327,21 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
version = "0.2.25"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"
checksum = "4bc28f93baff38037f64e6f43d34cfa1605f27a49c34e8a04c5e78b0babf2596"
dependencies = [
"ansi_term 0.12.1",
"chrono",
"lazy_static",
"matchers",
"regex",
"serde 1.0.130",
"serde_json",
"sharded-slab",
"smallvec",
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
"tracing-serde",
]
[[package]]
name = "tracing-subscriber"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77be66445c4eeebb934a7340f227bfe7b338173d3f8c00a60a5a58005c9faecf"
dependencies = [
"sharded-slab",
"thread_local",
"tracing-core",
]
[[package]]
name = "try-lock"
version = "0.2.3"
@ -4480,9 +4399,9 @@ dependencies = [
[[package]]
name = "typed-builder"
version = "0.7.1"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f85f4270f4f449a3f2c0cf2aecc8415e388a597aeacc7d55fc749c5c968c8533"
checksum = "a46ee5bd706ff79131be9c94e7edcb82b703c487766a114434e5790361cf08c5"
dependencies = [
"proc-macro2",
"quote",
@ -4592,12 +4511,11 @@ dependencies = [
"abacus-ethereum",
"abacus-test",
"async-trait",
"color-eyre 0.5.11",
"color-eyre",
"config",
"ethers",
"eyre",
"futures-util",
"log",
"paste",
"prometheus",
"rocksdb",
"serde 1.0.130",
@ -4607,7 +4525,7 @@ dependencies = [
"tokio-test",
"tracing",
"tracing-futures",
"tracing-subscriber 0.2.25",
"tracing-subscriber",
]
[[package]]
@ -4696,6 +4614,12 @@ version = "0.10.2+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.78"
@ -4837,6 +4761,49 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
dependencies = [
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
[[package]]
name = "winreg"
version = "0.10.1"

@ -25,7 +25,7 @@ RUN \
--mount=id=cargo,type=cache,sharing=locked,target=/usr/src/target \
--mount=id=cargo-home-registry,type=cache,sharing=locked,target=/usr/local/cargo/registry \
--mount=id=cargo-home-git,type=cache,sharing=locked,target=/usr/local/cargo/git \
cargo build --release && \
cargo build --release --no-default-features --features oneline-errors && \
mkdir -p /release && \
cp /usr/src/target/release/validator /release && \
cp /usr/src/target/release/relayer /release && \
@ -38,7 +38,7 @@ RUN \
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y \
libssl-dev \
openssl \
ca-certificates \
tini && \
rm -rf /var/lib/apt/lists/*

@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
# Main block
tokio = { version = "1.0.1", features = ["rt", "macros"] }
tokio = { version = "1", features = ["rt", "macros"] }
config = "0.10"
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", default-features = false }
@ -15,31 +15,31 @@ ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
thiserror = { version = "1.0.22", default-features = false }
async-trait = { version = "0.1.42", default-features = false }
futures-util = "0.3.12"
color-eyre = "0.6.1"
tracing = "0.1.22"
tracing-futures = "0.2.4"
tracing-subscriber = "0.2.15"
eyre = "0.6"
tracing = "0.1"
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3", features = ["json"] }
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb" }
mockall = "0.10.2"
abacus-core = { path = "../abacus-core" }
abacus-ethereum = { path = "../chains/abacus-ethereum"}
abacus-test = { path = "../abacus-test" }
paste = "1.0.5"
tracing-error = "0.1.2"
paste = "1.0"
tracing-error = "0.2"
prometheus = "0.12"
warp = "0.3"
# these versions are important!
tracing-opentelemetry = "0.13.0"
opentelemetry = { version = "0.14.0", features = ["rt-tokio"] }
opentelemetry-jaeger = { version = "0.13.0", features = [
tracing-opentelemetry = "0.17"
opentelemetry = { version = "0.17", features = ["rt-tokio"] }
opentelemetry-jaeger = { version = "0.16", features = [
"reqwest_collector_client",
"tokio",
"rt-tokio"
] }
opentelemetry-zipkin = { version = "0.12.0", default-features = false, features = [
opentelemetry-zipkin = { version = "0.15", default-features = false, features = [
"reqwest-client",
] }
rusoto_core = "0.47.0"
@ -48,6 +48,12 @@ rusoto_s3 = "0.47.0"
lazy_static = "1.4.0"
once_cell = "1.8.0"
[dev-dependencies]
color-eyre = "0.6"
[features]
oneline-eyre = []
[[example]]
name = "example"
path = "./bin/example.rs"

@ -6,7 +6,7 @@ use crate::{
};
use abacus_core::db::DB;
use async_trait::async_trait;
use color_eyre::{Report, Result};
use eyre::{Report, Result};
use futures_util::future::select_all;
use tracing::instrument::Instrumented;
use tracing::{info_span, Instrument};

@ -64,9 +64,7 @@ where
I: AbacusCommonIndexer + 'static,
{
/// TODO: Not implemented
pub fn sync_checkpoints(
&self,
) -> Instrumented<tokio::task::JoinHandle<color_eyre::Result<()>>> {
pub fn sync_checkpoints(&self) -> Instrumented<tokio::task::JoinHandle<eyre::Result<()>>> {
let span = info_span!("MessageContractSync");
tokio::spawn(async move {
@ -83,9 +81,7 @@ where
I: OutboxIndexer + 'static,
{
/// Sync outbox messages
pub fn sync_outbox_messages(
&self,
) -> Instrumented<tokio::task::JoinHandle<color_eyre::Result<()>>> {
pub fn sync_outbox_messages(&self) -> Instrumented<tokio::task::JoinHandle<eyre::Result<()>>> {
let span = info_span!("MessageContractSync");
let db = self.db.clone();

@ -1,6 +1,6 @@
use abacus_core::db::AbacusDB;
use abacus_core::db::DbError;
use color_eyre::Result;
use eyre::Result;
static MESSAGES_LAST_BLOCK_END: &str = "messages_last_inspected";

@ -4,8 +4,8 @@ use abacus_core::{
};
use abacus_test::mocks::inbox::MockInboxContract;
use async_trait::async_trait;
use color_eyre::eyre::Result;
use ethers::core::types::H256;
use eyre::Result;
use abacus_ethereum::EthereumInbox;
use std::str::FromStr;

@ -1,7 +1,7 @@
use abacus_core::{AbacusCommonIndexer, CheckpointWithMeta, OutboxIndexer, RawCommittedMessage};
use abacus_test::mocks::indexer::MockAbacusIndexer;
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
/// Outbox/Inbox CommonIndexer type
#[derive(Debug)]

@ -47,3 +47,6 @@ pub use types::*;
mod validator_manager;
pub use validator_manager::*;
#[cfg(feature = "oneline-eyre")]
pub mod oneline_eyre;

@ -43,6 +43,10 @@ macro_rules! decl_agent {
};
}
/// Export this so they don't need to import paste.
#[doc(hidden)]
pub use paste;
#[macro_export]
/// Declare a new settings block
///
@ -70,7 +74,7 @@ macro_rules! decl_settings {
$($(#[$tags:meta])* $prop:ident: $type:ty,)*
}
) => {
paste::paste! {
abacus_base::paste::paste! {
#[derive(Debug, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[doc = "Settings for `" $name]

@ -1,6 +1,6 @@
//! Useful metrics that all agents should track.
use color_eyre::Result;
use eyre::Result;
use prometheus::{
Encoder, HistogramOpts, HistogramVec, IntCounterVec, IntGaugeVec, Opts, Registry,
};

@ -0,0 +1,229 @@
//! This provides a custom [`eyre::EyreHandler`] type for usage with [`eyre`] that provides
//! a minimal error report with no additional context. Essentially the minimal implementation of an
//! error reporter.
//!
//! ## Setup
//!
//! Install the hook handler before constructing any `eyre::Report` types.
//!
//! # Example
//!
//! ```rust,should_panic
//! use eyre::{eyre, Report, Result, WrapErr};
//!
//! use abacus_base::oneline_eyre;
//!
//!
//! fn main() -> Result<()> {
//! oneline_eyre::install()?;
//! let e: Report = eyre!("oh no this program is just bad!");
//! Err(e).wrap_err("usage example successfully experienced a failure")
//! }
//! ```
//!
//! # TODO
//! Later we can add support for backtraces and spantraces. These are not currently in-use in our
//! deployments and they are difficult to format correctly, so holding off for now.
//!
//! [`eyre::EyreHandler`]: https://docs.rs/eyre/*/eyre/trait.EyreHandler.html
//! [`eyre`]: https://docs.rs/eyre
use core::fmt::{self, Debug, Formatter};
use std::error::Error;
use std::iter;
// use ::backtrace::Backtrace;
// use backtrace::{BacktraceFmt, BytesOrWideString, PrintFmt};
use eyre::{EyreHandler, Result};
/// The default separator used to delimitate lines in error messages.
const DEFAULT_LINE_SEPARATOR: &str = " ## ";
/// The default separator used to delimitate error sections.
const DEFAULT_SECTION_SEPARATOR: &str = " ##$$## ";
// pub trait BacktraceExt {
// /// Returns a reference to the captured backtrace if one exists
// ///
// /// # Example
// ///
// /// ```rust
// /// use eyre::eyre;
// /// use abacus_base::oneline_eyre::{self, BacktraceExt};
// /// oneline_eyre::install();
// /// std::env::set_var("RUST_BACKTRACE", "1");
// ///
// /// let report = eyre!("capture a report");
// /// assert!(report.backtrace().is_some());
// /// ```
// fn backtrace(&self) -> Option<&Backtrace>;
// }
//
// impl BacktraceExt for eyre::Report {
// fn backtrace(&self) -> Option<&Backtrace> {
// self.handler()
// .downcast_ref::<Handler>()
// .and_then(|handler| handler.backtrace.as_ref())
// }
// }
/// A custom context type for minimal error reporting via `eyre`
pub struct Handler {
line_separator: &'static str,
section_separator: &'static str,
// backtrace: Option<Backtrace>,
// show_full_paths: bool,
}
impl Handler {
/// Format a single error on a single line
fn fmt_error(&self, error: &(dyn Error + 'static), f: &mut Formatter<'_>) -> fmt::Result {
let err_str = format!("{error}").replace('\n', self.line_separator);
write!(f, "{err_str}")
}
/// Format the cause of an error on a single line.
fn fmt_cause(&self, cause: &(dyn Error + 'static), f: &mut Formatter<'_>) -> fmt::Result {
write!(f, "{}Caused by:", self.section_separator)?;
let errors = iter::successors(Some(cause), |e| (*e).source());
for (n, error) in errors.enumerate() {
write!(f, "{}({n}) ", self.line_separator)?;
self.fmt_error(error, f)?;
}
Ok(())
}
// /// Format a backtrace onto a single line.
// /// Largely stolen from backtrace's Debug implementation.
// fn fmt_backtrace(&self, backtrace: &Backtrace, f: &mut Formatter<'_>) -> fmt::Result {
// write!(f, "{}Stack backtrace:", self.section_separator)?;
//
// // When printing paths we try to strip the cwd if it exists, otherwise
// // we just print the path as-is. Note that we also only do this for the
// // short format, because if it's full we presumably want to print
// // everything.
// let cwd = if !self.show_full_paths {
// env::current_dir().ok()
// } else { None };
// let mut print_path =
// move |fmt: &mut Formatter<'_>, path: BytesOrWideString<'_>| {
// let path = path.into_path_buf();
// if let Some(cwd) = &cwd {
// if let Ok(suffix) = path.strip_prefix(cwd) {
// return Display::fmt(&suffix.display(), fmt);
// }
// }
// Display::fmt(&path.display(), fmt)
// };
//
// let mut backtrace_fmt = BacktraceFmt::new(f, PrintFmt::Full, &mut print_path);
// backtrace_fmt.add_context()?;
// for frame in backtrace.frames() {
// backtrace_fmt.frame().backtrace_frame(frame)?;
// // write!(f, "{}({n}) {}", self.line_separator)
// }
// backtrace_fmt.finish()
// }
}
impl EyreHandler for Handler {
fn debug(&self, error: &(dyn Error + 'static), f: &mut Formatter<'_>) -> fmt::Result {
if f.alternate() {
return Debug::fmt(error, f);
}
self.fmt_error(error, f)?;
if let Some(cause) = error.source() {
self.fmt_cause(cause, f)?;
}
// if let Some(backtrace) = &self.backtrace {
// self.fmt_backtrace(backtrace, f)?;
// }
Ok(())
// if f.alternate() {
// return core::fmt::Debug::fmt(error, f);
// }
//
// write!(f, "{}", error)?;
//
// if let Some(cause) = error.source() {
// let errors = std::iter::successors(Some(cause), |e| (*e).source());
// for error in errors {
// write!(f, "{}{}", self.separator, error)?;
// }
// }
//
// Ok(())
}
}
/// Builder for customizing the behavior of the global error report hook
#[derive(Debug, Default)]
pub struct HookBuilder {
capture_backtrace_by_default: bool,
line_separator: Option<&'static str>,
section_separator: Option<&'static str>,
// show_full_paths: bool,
}
impl HookBuilder {
fn make_handler(&self, _error: &(dyn Error + 'static)) -> Handler {
// let backtrace = if self.capture_enabled() {
// Some(Backtrace::new())
// } else {
// None
// };
Handler {
// backtrace,
line_separator: self.line_separator.unwrap_or(DEFAULT_LINE_SEPARATOR),
section_separator: self.section_separator.unwrap_or(DEFAULT_SECTION_SEPARATOR),
// show_full_paths: self.show_full_paths,
}
}
// fn capture_enabled(&self) -> bool {
// env::var("RUST_LIB_BACKTRACE")
// .or_else(|_| env::var("RUST_BACKTRACE"))
// .map(|val| val != "0")
// .unwrap_or(self.capture_backtrace_by_default)
// }
/// Configures the default capture mode for `Backtraces` in error reports
pub fn capture_backtrace_by_default(mut self, cond: bool) -> Self {
self.capture_backtrace_by_default = cond;
self
}
// /// Configures whether full paths should be shown in backtraces or relative paths from the
// /// current working directory.
// pub fn show_full_paths(mut self, cond: bool) -> Self {
// self.show_full_paths = cond;
// self
// }
/// Install the given hook as the global error report hook
pub fn install(self) -> Result<()> {
eyre::set_hook(Box::new(move |e| Box::new(self.make_handler(e))))?;
Ok(())
}
}
/// Install the default `oneline_eyre` hook as the global error report hook.
///
/// # Details
///
/// This function must be called to enable the customization of `eyre::Report`
/// provided by `oneline_eyre`. This function should be called early, ideally
/// before any errors could be encountered.
///
/// Only the first install will succeed. Calling this function after another
/// report handler has been installed will cause an error. **Note**: This
/// function _must_ be called before any `eyre::Report`s are constructed to
/// prevent the default handler from being installed.
pub fn install() -> Result<()> {
HookBuilder::default().install()
}

@ -7,8 +7,8 @@ use abacus_core::{
use abacus_ethereum::EthereumOutbox;
use abacus_test::mocks::MockOutboxContract;
use async_trait::async_trait;
use color_eyre::eyre::Result;
use ethers::core::types::H256;
use eyre::Result;
use futures_util::future::select_all;
use std::str::FromStr;
use std::sync::Arc;

@ -1,4 +1,4 @@
use color_eyre::Report;
use eyre::Report;
use serde::Deserialize;
use abacus_core::{ContractLocator, Signers};

@ -46,9 +46,9 @@ use abacus_core::{
AbacusCommon, ContractLocator, Signers,
};
use abacus_ethereum::{make_inbox_indexer, make_outbox_indexer};
use color_eyre::{eyre::bail, Report};
use config::{Config, ConfigError, Environment, File};
use ethers::prelude::AwsSigner;
use eyre::{bail, Report};
use rusoto_core::{credential::EnvironmentProvider, HttpClient};
use rusoto_kms::KmsClient;
use serde::Deserialize;

@ -102,17 +102,17 @@ where
}
}
fn new_span(
fn on_new_span(
&self,
attrs: &span::Attributes<'_>,
id: &span::Id,
ctx: tracing_subscriber::layer::Context<'_, S>,
) {
match self {
LogOutputLayer::Full(inner) => inner.new_span(attrs, id, ctx),
LogOutputLayer::Pretty(inner) => inner.new_span(attrs, id, ctx),
LogOutputLayer::Compact(inner) => inner.new_span(attrs, id, ctx),
LogOutputLayer::Json(inner) => inner.new_span(attrs, id, ctx),
LogOutputLayer::Full(inner) => inner.on_new_span(attrs, id, ctx),
LogOutputLayer::Pretty(inner) => inner.on_new_span(attrs, id, ctx),
LogOutputLayer::Compact(inner) => inner.on_new_span(attrs, id, ctx),
LogOutputLayer::Json(inner) => inner.on_new_span(attrs, id, ctx),
}
}

@ -1,4 +1,4 @@
use color_eyre::Result;
use eyre::Result;
use tracing_opentelemetry::OpenTelemetryLayer;
use tracing_subscriber::{filter::LevelFilter, prelude::*};

@ -22,7 +22,7 @@ impl<S> Layer<S> for TimeSpanLifetime
where
S: Subscriber + for<'a> LookupSpan<'a>,
{
fn new_span(&self, _: &span::Attributes<'_>, id: &span::Id, ctx: Context<'_, S>) {
fn on_new_span(&self, _: &span::Attributes<'_>, id: &span::Id, ctx: Context<'_, S>) {
match ctx.span(id) {
Some(span) => span.extensions_mut().insert(SpanTiming {
start: Instant::now(),

@ -1,6 +1,6 @@
use abacus_core::SignedCheckpoint;
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
/// A generic trait to read/write Checkpoints offchain
#[async_trait]

@ -5,8 +5,7 @@ use tracing::instrument;
use abacus_core::SignedCheckpoint;
use async_trait::async_trait;
use color_eyre::Report;
use color_eyre::Result;
use eyre::{Report, Result};
use crate::S3Storage;
use crate::{CheckpointSyncer, LocalStorage, MultisigCheckpointSyncer};

@ -1,7 +1,7 @@
use abacus_core::SignedCheckpoint;
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
use crate::traits::CheckpointSyncer;

@ -4,7 +4,7 @@ use abacus_core::{MultisigSignedCheckpoint, SignedCheckpointWithSigner};
use ethers::prelude::Address;
use ethers::types::H256;
use color_eyre::Result;
use eyre::Result;
use tracing::{debug, instrument};
use crate::{CheckpointSyncer, CheckpointSyncers};

@ -2,7 +2,7 @@ use std::fmt;
use abacus_core::SignedCheckpoint;
use async_trait::async_trait;
use color_eyre::{eyre::bail, Result};
use eyre::{bail, Result};
use futures_util::TryStreamExt;
use rusoto_core::{credential::EnvironmentProvider, HttpClient, Region, RusotoError};
use rusoto_s3::{GetObjectError, GetObjectRequest, PutObjectRequest, S3Client, S3};

@ -15,18 +15,19 @@ sha3 = "0.9.1"
lazy_static = "*"
thiserror = "*"
async-trait = { version = "0.1.42", default-features = false }
tokio = { version = "1.0.1", features = ["rt", "macros"] }
tracing = "0.1.22"
tracing-futures = "0.2.4"
tokio = { version = "1", features = ["rt", "macros"] }
tracing = "0.1"
tracing-futures = "0.2"
serde = {version = "1.0", features = ["derive"]}
serde_json = {version = "1.0"}
color-eyre = "0.5.0"
eyre = "0.6"
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb" }
bytes = { version = "1", features = ["serde"]}
num = {version="0", features=["serde"]}
[dev-dependencies]
tokio = {version = "1.0.1", features = ["rt", "time"]}
tokio = {version = "1", features = ["rt", "time"]}
color-eyre = "0.6"
[features]
output = []

@ -1,6 +1,6 @@
#![allow(missing_docs)]
use color_eyre::eyre::Result;
use eyre::Result;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize)]

@ -3,8 +3,8 @@ use crate::{
accumulator::merkle::Proof, traits::RawCommittedMessage, AbacusMessage, CommittedMessage,
Decode,
};
use color_eyre::Result;
use ethers::core::types::H256;
use eyre::Result;
use tokio::time::sleep;
use tracing::{debug, info};

@ -1,4 +1,4 @@
use color_eyre::eyre::WrapErr;
use eyre::WrapErr;
use rocksdb::{DBIterator, Options, DB as Rocks};
use std::{path::Path, sync::Arc};
use tracing::info;
@ -42,7 +42,7 @@ type Result<T> = std::result::Result<T, DbError>;
impl DB {
/// Opens db at `db_path` and creates if missing
#[tracing::instrument(err)]
pub fn from_path(db_path: &str) -> color_eyre::Result<DB> {
pub fn from_path(db_path: &str) -> eyre::Result<DB> {
// Canonicalize ensures existence, so we have to do that, then extend
let mut path = Path::new(".").canonicalize()?;
path.extend(&[db_path]);

@ -1,6 +1,6 @@
use crate::db::{DbError, DB};
use crate::{Decode, Encode};
use color_eyre::Result;
use eyre::Result;
/// DB handle for storing data tied to a specific type/entity.
///

@ -37,7 +37,6 @@ pub mod output_functions {
body: Vec::from_hex("1234").unwrap(),
};
let leaf_index = 0;
let message_json = json!({
"origin": abacus_message.origin,
"sender": abacus_message.sender,

@ -1,6 +1,6 @@
use async_trait::async_trait;
use color_eyre::Result;
use ethers::core::types::H256;
use eyre::Result;
use crate::{
accumulator::merkle::Proof,

@ -8,7 +8,7 @@
//! other entities can retrieve this chain-specific info.
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
use crate::{CheckpointWithMeta, RawCommittedMessage};

@ -1,8 +1,8 @@
use std::convert::TryFrom;
use crate::{AbacusError, AbacusMessage, Decode, Encode};
use color_eyre::Result;
use ethers::core::types::H256;
use eyre::Result;
use sha3::{Digest, Keccak256};
/// A Stamped message that has been committed at some leaf index

@ -7,12 +7,12 @@ mod outbox;
mod validator_manager;
use async_trait::async_trait;
use color_eyre::Result;
use ethers::{
contract::ContractError,
core::types::{TransactionReceipt, H256},
providers::{Middleware, ProviderError},
};
use eyre::Result;
use std::error::Error as StdError;
use crate::{db::DbError, utils::domain_hash, AbacusError, Checkpoint};

@ -5,8 +5,8 @@ use crate::{
AbacusCommon, CommittedMessage, Message, RawCommittedMessage, State,
};
use async_trait::async_trait;
use color_eyre::Result;
use ethers::core::types::H256;
use eyre::Result;
/// Interface for the Outbox chain contract. Allows abstraction over different
/// chains

@ -1,5 +1,5 @@
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
use crate::{
traits::{ChainCommunicationError, TxOutcome},

@ -1,7 +1,7 @@
use std::str::FromStr;
use color_eyre::{eyre::bail, Report};
use ethers::core::types::H256;
use eyre::{bail, Report};
use sha3::{Digest, Keccak256};
/// Strips the '0x' prefix off of hex string so it can be deserialized.

@ -5,17 +5,17 @@ authors = ["Luke Tchang <ltchang@stanford.edu>"]
edition = "2021"
[dependencies]
tokio = { version = "1.0.1", features = ["rt", "macros"] }
tokio = { version = "1", features = ["rt", "macros"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0", default-features = false }
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
thiserror = { version = "1.0.22", default-features = false }
async-trait = { version = "0.1.42", default-features = false }
futures-util = "0.3.12"
color-eyre = "0.5.0"
eyre = "0.6"
mockall = "0.10.2"
rand = "0.8.3"
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb" }
abacus-core = { path = "../abacus-core" }
tracing = "0.1.26"
tracing = "0.1"

@ -1,7 +1,7 @@
#![allow(non_snake_case)]
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
use mockall::*;
use abacus_core::{AbacusCommonIndexer, OutboxIndexer, *};

@ -5,27 +5,30 @@ authors = ["Abacus Team"]
edition = "2021"
[dependencies]
tokio = { version = "1.0.1", features = ["rt", "macros"] }
tokio = { version = "1", features = ["rt", "macros"] }
config = "0.10"
serde = "1.0.120"
serde_json = { version = "1.0.61", default-features = false }
log = "0.4.13"
serde = "1.0"
serde_json = { version = "1.0", default-features = false }
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
thiserror = { version = "1.0.22", default-features = false }
async-trait = { version = "0.1.42", default-features = false }
futures-util = "0.3.12"
color-eyre = "0.5.0"
tracing = "0.1.22"
tracing-futures = "0.2.4"
tracing-subscriber = "0.2.15"
eyre = "0.6"
color-eyre = { version = "0.6", optional = true }
tracing = "0.1"
tracing-futures = "0.2"
tracing-subscriber = "0.3"
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb" }
abacus-core = { path = "../../abacus-core" }
abacus-base = { path = "../../abacus-base" }
abacus-ethereum = { path = "../../chains/abacus-ethereum" }
paste = "1.0.5"
[dev-dependencies]
tokio-test = "0.4.0"
tokio-test = "0.4"
abacus-test = { path = "../../abacus-test" }
prometheus = "0.12"
[features]
default = ["color-eyre"]
oneline-errors = ["abacus-base/oneline-eyre"]

@ -1,11 +1,12 @@
use async_trait::async_trait;
use color_eyre::Result;
use eyre::Result;
use tokio::task::JoinHandle;
use tracing::instrument::Instrumented;
use crate::{settings::CheckpointerSettings as Settings, submit::CheckpointSubmitter};
use abacus_base::{AbacusAgentCore, Agent};
use crate::{settings::CheckpointerSettings as Settings, submit::CheckpointSubmitter};
/// A checkpointer agent
#[derive(Debug)]
pub struct Checkpointer {

@ -4,18 +4,22 @@
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
mod checkpointer;
mod settings;
mod submit;
use color_eyre::Result;
use eyre::Result;
use abacus_base::Agent;
use crate::{checkpointer::Checkpointer, settings::CheckpointerSettings as Settings};
mod checkpointer;
mod settings;
mod submit;
async fn _main() -> Result<()> {
#[cfg(feature = "oneline-errors")]
abacus_base::oneline_eyre::install()?;
#[cfg(not(feature = "oneline-errors"))]
color_eyre::install()?;
let settings = Settings::new()?;
let agent = Checkpointer::from_settings(settings).await?;

@ -1,12 +1,12 @@
use std::{sync::Arc, time::Duration};
use abacus_base::CachingOutbox;
use abacus_core::{AbacusCommon, Checkpoint, Outbox};
use color_eyre::Result;
use eyre::Result;
use tokio::{task::JoinHandle, time::sleep};
use tracing::{debug, info, info_span, instrument::Instrumented, Instrument};
use abacus_base::CachingOutbox;
use abacus_core::{AbacusCommon, Checkpoint, Outbox};
pub(crate) struct CheckpointSubmitter {
outbox: Arc<CachingOutbox>,
/// The polling interval

@ -8,20 +8,23 @@ edition = "2021"
[dependencies]
async-trait = {version = "0.1.42", default-features = false}
color-eyre = "0.5.0"
eyre = "0.6"
color-eyre = { version = "0.6", optional = true }
config = "0.10"
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
futures-util = "0.3.12"
log = "0.4.13"
serde = {version = "1.0", features = ["derive"]}
serde_json = {version = "1.0", default-features = false}
thiserror = {version = "1.0.22", default-features = false}
tokio = {version = "1.0.1", features = ["rt", "macros"]}
tracing = "0.1.22"
tracing-futures = "0.2.4"
tracing-subscriber = "0.2.15"
tokio = {version = "1", features = ["rt", "macros"]}
tracing = "0.1"
tracing-futures = "0.2"
tracing-subscriber = "0.3"
rand = "0.8.3"
abacus-base = {path = "../../abacus-base"}
abacus-core = {path = "../../abacus-core"}
paste = "1.0.5"
[features]
default = ["color-eyre"]
oneline-errors = ["abacus-base/oneline-eyre"]

@ -1,15 +1,13 @@
use std::{sync::Arc, time::Duration};
use color_eyre::{eyre::WrapErr, Result};
use ethers::core::types::H256;
use eyre::{Result, WrapErr};
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
use tokio::{sync::Mutex, task::JoinHandle, time::sleep};
use tracing::instrument::Instrumented;
use tracing::{info, Instrument};
use ethers::core::types::H256;
use abacus_base::{decl_agent, AbacusAgentCore, Agent, CachingInbox};
use abacus_core::{AbacusCommon, Message, Outbox};

@ -4,17 +4,21 @@
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
mod kathy;
mod settings;
use color_eyre::Result;
use eyre::Result;
use abacus_base::Agent;
use crate::{kathy::Kathy, settings::KathySettings as Settings};
mod kathy;
mod settings;
async fn _main() -> Result<()> {
#[cfg(feature = "oneline-errors")]
abacus_base::oneline_eyre::install()?;
#[cfg(not(feature = "oneline-errors"))]
color_eyre::install()?;
let settings = Settings::new()?;
let agent = Kathy::from_settings(settings).await?;

@ -5,26 +5,29 @@ authors = ["ltchang <ltchang@stanford.edu>"]
edition = "2021"
[dependencies]
tokio = { version = "1.0.1", features = ["rt", "macros"] }
tokio = { version = "1", features = ["rt", "macros"] }
config = "0.10"
serde = "1.0.120"
serde_json = { version = "1.0.61", default-features = false }
log = "0.4.13"
serde = "1.0"
serde_json = { version = "1.0", default-features = false }
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
thiserror = { version = "1.0.22", default-features = false }
async-trait = { version = "0.1.42", default-features = false }
futures-util = "0.3.12"
color-eyre = "0.5.0"
tracing = "0.1.22"
tracing-futures = "0.2.4"
tracing-subscriber = "0.2.15"
eyre = "0.6"
color-eyre = { version = "0.6", optional = true }
tracing = "0.1"
tracing-futures = "0.2"
tracing-subscriber = "0.3"
abacus-core = { path = "../../abacus-core" }
abacus-base = { path = "../../abacus-base" }
paste = "1.0.5"
prometheus = "0.12"
[dev-dependencies]
tokio-test = "0.4.0"
tokio-test = "0.4"
abacus-test = { path = "../../abacus-test" }
[features]
default = ["color-eyre"]
oneline-errors = ["abacus-base/oneline-eyre"]

@ -1,12 +1,13 @@
use std::time::Duration;
use abacus_base::{InboxContracts, MultisigCheckpointSyncer, Outboxes};
use abacus_core::{db::AbacusDB, AbacusCommon, CommittedMessage, Inbox, InboxValidatorManager};
use color_eyre::Result;
use eyre::Result;
use prometheus::{IntGauge, IntGaugeVec};
use tokio::{task::JoinHandle, time::sleep};
use tracing::{debug, error, info, info_span, instrument, instrument::Instrumented, Instrument};
use abacus_base::{InboxContracts, MultisigCheckpointSyncer, Outboxes};
use abacus_core::{db::AbacusDB, AbacusCommon, CommittedMessage, Inbox, InboxValidatorManager};
use crate::merkle_tree_builder::{MerkleTreeBuilder, MessageBatch};
pub(crate) struct CheckpointRelayer {
@ -98,7 +99,7 @@ impl CheckpointRelayer {
}
// Returns the newest "current" checkpoint index
#[instrument(ret, err, skip(self, messages), fields(messages=messages.len()))]
#[instrument(ret, err, skip(self, messages), fields(messages = messages.len()))]
async fn submit_checkpoint_and_messages(
&mut self,
onchain_checkpoint_index: u32,
@ -173,7 +174,7 @@ impl CheckpointRelayer {
}
}
#[instrument(ret, err, skip(self), fields(inbox_name=self.inbox_contracts.inbox.name()), level = "info")]
#[instrument(ret, err, skip(self), fields(inbox_name = self.inbox_contracts.inbox.name()), level = "info")]
async fn main_loop(mut self) -> Result<()> {
let latest_inbox_checkpoint = self.inbox_contracts.inbox.latest_checkpoint(None).await?;
let mut onchain_checkpoint_index = latest_inbox_checkpoint.index;

@ -7,6 +7,12 @@
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
use eyre::Result;
use abacus_base::Agent;
use crate::{relayer::Relayer, settings::RelayerSettings as Settings};
mod checkpoint_relayer;
mod merkle_tree_builder;
mod message_processor;
@ -14,14 +20,12 @@ mod prover;
mod relayer;
mod settings;
use color_eyre::Result;
use abacus_base::Agent;
use crate::{relayer::Relayer, settings::RelayerSettings as Settings};
async fn _main() -> Result<()> {
#[cfg(feature = "oneline-errors")]
abacus_base::oneline_eyre::install()?;
#[cfg(not(feature = "oneline-errors"))]
color_eyre::install()?;
let settings = Settings::new()?;
let agent = Relayer::from_settings(settings).await?;

@ -1,14 +1,16 @@
use crate::prover::{Prover, ProverError};
use std::fmt::Display;
use ethers::core::types::H256;
use eyre::Result;
use tracing::{debug, error, instrument};
use abacus_core::{
accumulator::{incremental::IncrementalMerkle, merkle::Proof},
db::{AbacusDB, DbError},
ChainCommunicationError, Checkpoint, CommittedMessage,
};
use color_eyre::eyre::Result;
use ethers::core::types::H256;
use std::fmt::Display;
use tracing::{debug, error, instrument};
use crate::prover::{Prover, ProverError};
#[derive(Debug)]
/// Struct to update prover

@ -7,7 +7,7 @@ use std::{
use abacus_base::{CachingInbox, Outboxes};
use abacus_core::{db::AbacusDB, AbacusCommon, CommittedMessage, Inbox, MessageStatus};
use color_eyre::{eyre::bail, Result};
use eyre::{bail, Result};
use prometheus::{IntGauge, IntGaugeVec};
use tokio::{task::JoinHandle, time::sleep};
use tracing::{

@ -1,13 +1,12 @@
use abacus_core::AbacusCommon;
use async_trait::async_trait;
use color_eyre::{eyre::Context, Result};
use eyre::{Context, Result};
use tokio::task::JoinHandle;
use tracing::{instrument::Instrumented, Instrument};
use abacus_base::{
AbacusAgentCore, Agent, ContractSyncMetrics, InboxContracts, MultisigCheckpointSyncer,
};
use abacus_core::AbacusCommon;
use crate::{
checkpoint_relayer::CheckpointRelayer, message_processor::MessageProcessor,

@ -5,27 +5,30 @@ authors = ["Abacus Team"]
edition = "2021"
[dependencies]
tokio = { version = "1.0.1", features = ["rt", "macros"] }
tokio = { version = "1", features = ["rt", "macros"] }
config = "0.10"
serde = "1.0.120"
serde_json = { version = "1.0.61", default-features = false }
log = "0.4.13"
serde = "1.0"
serde_json = { version = "1.0", default-features = false }
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
thiserror = { version = "1.0.22", default-features = false }
async-trait = { version = "0.1.42", default-features = false }
futures-util = "0.3.12"
color-eyre = "0.5.0"
tracing = "0.1.22"
tracing-futures = "0.2.4"
tracing-subscriber = "0.2.15"
eyre = "0.6"
color-eyre = { version = "0.6", optional = true }
tracing = "0.1"
tracing-futures = "0.2"
tracing-subscriber = "0.3"
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb" }
abacus-core = { path = "../../abacus-core" }
abacus-base = { path = "../../abacus-base" }
abacus-ethereum = { path = "../../chains/abacus-ethereum" }
paste = "1.0.5"
[dev-dependencies]
tokio-test = "0.4.0"
tokio-test = "0.4"
abacus-test = { path = "../../abacus-test" }
prometheus = "0.12"
[features]
default = ["color-eyre"]
oneline-errors = ["abacus-base/oneline-eyre"]

@ -4,18 +4,21 @@
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
mod settings;
mod submit;
mod validator;
use color_eyre::Result;
use abacus_base::Agent;
use eyre::Result;
use crate::{settings::ValidatorSettings as Settings, validator::Validator};
mod settings;
mod submit;
mod validator;
async fn _main() -> Result<()> {
#[cfg(feature = "oneline-errors")]
abacus_base::oneline_eyre::install()?;
#[cfg(not(feature = "oneline-errors"))]
color_eyre::install()?;
let settings = Settings::new()?;
let agent = Validator::from_settings(settings).await?;

@ -1,12 +1,13 @@
use std::sync::Arc;
use abacus_base::{CachingOutbox, CheckpointSyncer, CheckpointSyncers};
use abacus_core::{AbacusCommon, Signers};
use std::time::Duration;
use color_eyre::Result;
use tokio::{task::JoinHandle, time::sleep};
use tracing::{info, info_span, instrument::Instrumented, Instrument};
use abacus_base::{CachingOutbox, CheckpointSyncer, CheckpointSyncers};
use abacus_core::{AbacusCommon, Signers};
use eyre::Result;
pub(crate) struct ValidatorSubmitter {
interval: u64,
reorg_period: u64,
@ -55,6 +56,6 @@ impl ValidatorSubmitter {
}
}
})
.instrument(span)
.instrument(span)
}
}

@ -1,13 +1,14 @@
use std::sync::Arc;
use async_trait::async_trait;
use color_eyre::Result;
use tokio::task::JoinHandle;
use tracing::instrument::Instrumented;
use crate::{settings::ValidatorSettings as Settings, submit::ValidatorSubmitter};
use abacus_base::{AbacusAgentCore, Agent, CheckpointSyncers};
use abacus_core::Signers;
use eyre::Result;
use crate::{settings::ValidatorSettings as Settings, submit::ValidatorSubmitter};
/// An validator agent
#[derive(Debug)]

@ -8,19 +8,19 @@ edition = "2021"
[dependencies]
# Main block
serde = "1.0.120"
serde_json = { version = "1.0.61", default-features = false }
serde = "1.0"
serde_json = { version = "1.0", default-features = false }
ethers = {git = "https://github.com/gakonst/ethers-rs", branch = "master", features = ["abigen"]}
ethers-signers = {git = "https://github.com/gakonst/ethers-rs", branch = "master", features = ["aws"]}
ethers-contract = { git = "https://github.com/gakonst/ethers-rs", branch = "master", features=["legacy"] }
async-trait = { version = "0.1.42", default-features = false }
thiserror = { version = "1.0.22", default-features = false }
tracing = "0.1.22"
color-eyre = "0.5.0"
tracing = "0.1"
eyre = "0.6"
num = "0.4"
abacus-core = { path = "../../abacus-core" }
tokio = "1.7.1"
tokio = "1"
hex = "0.4.3"
rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb" }
tracing-futures = "0.2.5"
tracing-futures = "0.2"

@ -7,9 +7,9 @@ use abacus_core::{
CheckpointMeta, CheckpointWithMeta, ContractLocator, Inbox, TxOutcome,
};
use async_trait::async_trait;
use color_eyre::Result;
use ethers::contract::abigen;
use ethers::core::types::{H256, U256};
use eyre::Result;
use tracing::instrument;
use std::{error::Error as StdError, sync::Arc};

@ -5,9 +5,9 @@
#![warn(unused_extern_crates)]
use abacus_core::*;
use color_eyre::eyre::Result;
use ethers::providers::Middleware;
use ethers::types::{Address, BlockId, BlockNumber, NameOrAddress, H160};
use eyre::Result;
use num::Num;
use std::sync::Arc;

@ -102,7 +102,7 @@ macro_rules! boxed_trait {
}};
($name:ident, $abi:ident, $trait:ident, $($n:ident:$t:ty),*) => {
#[doc = "Cast a contract locator to a live contract handle"]
pub async fn $name(conn: Connection, locator: &ContractLocator, signer: Option<Signers>, $($n:$t),*) -> color_eyre::Result<Box<dyn $trait>> {
pub async fn $name(conn: Connection, locator: &ContractLocator, signer: Option<Signers>, $($n:$t),*) -> eyre::Result<Box<dyn $trait>> {
let b: Box<dyn $trait> = match conn {
Connection::Http { url } => {
boxed_trait!(@http url, $abi, signer, locator, $($n),*)

@ -4,9 +4,9 @@
use abacus_core::*;
use abacus_core::{ChainCommunicationError, Message, RawCommittedMessage, TxOutcome};
use async_trait::async_trait;
use color_eyre::Result;
use ethers::contract::abigen;
use ethers::core::types::H256;
use eyre::Result;
use std::{error::Error as StdError, sync::Arc};
use tracing::instrument;

@ -4,9 +4,9 @@
use abacus_core::{ChainCommunicationError, ContractLocator, TxOutcome};
use abacus_core::{InboxValidatorManager, MultisigSignedCheckpoint};
use async_trait::async_trait;
use color_eyre::Result;
use ethers::contract::abigen;
use ethers::core::types::Address;
use eyre::Result;
use std::sync::Arc;

@ -1,6 +1,7 @@
## Setup
Example configuration files
<!--
`rust/local.checkpointer.env`
```shell
OPT_BASE_OUTBOX_CONNECTION_URL=http://localhost:8545
@ -21,8 +22,8 @@ OPT_BASE_SIGNERS_TEST3_KEY=701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2
OPT_BASE_SIGNERS_TEST3_TYPE=hexKey
OPT_CHECKPOINTER_POLLINGINTERVAL=5
OPT_CHECKPOINTER_CREATIONLATENCY=5
```
-->
`rust/local.relayer.env`
```shell
@ -61,6 +62,7 @@ OPT_BASE_INBOXES_TEST3_CONNECTION_URL=http://127.0.0.1:8545
BASE_CONFIG=test1_config.json
RUN_ENV=test
OPT_BASE_METRICS=9091
OPT_BASE_TRACING_FMT=pretty
OPT_BASE_TRACING_LEVEL=info
OPT_BASE_DB=/tmp/local-validator-test1-db
OPT_BASE_VALIDATOR_KEY=59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
@ -84,8 +86,8 @@ yarn abacus
```
In `rust` then start the agents (you will need one shell for each)
<!-- env $(xargs <local.checkpointer.env) cargo run --bin checkpointer -->
```shell
env $(xargs <local.checkpointer.env) cargo run --bin checkpointer
env $(xargs <local.relayer.env) cargo run --bin relayer
env $(xargs <local.validator.env) cargo run --bin validator
```

@ -4,15 +4,15 @@ version = "0.1.0"
edition = "2021"
[dependencies]
color-eyre = "0.5.11"
color-eyre = "0.6"
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
ethers-signers = { git = "https://github.com/gakonst/ethers-rs", branch = "master", features = ["aws"] }
hex = "0.4.3"
once_cell = "1.8.0"
rusoto_core = "0.47.0"
rusoto_kms = "0.47.0"
tokio = "1.9.0"
serde_json = "1.0.66"
tokio = "1"
serde_json = "1.0"
structopt = "0.3.23"
abacus-ethereum = { path = "../../chains/abacus-ethereum" }

@ -10,12 +10,12 @@ license = "Apache-2.0"
tokio = "1"
futures = "0.3"
metrics = "0"
serde_json = "1"
serde = "1"
color-eyre = "0"
clap = "3.0.0-beta.4"
human-panic = "1"
metrics = "0.18"
serde_json = "1.0"
serde = "1.0"
color-eyre = "0.6"
clap = { version = "3.1", features = ["cargo", "derive"] }
human-panic = "1.0"
abacus-base = { path = "../../abacus-base" }

@ -63,24 +63,24 @@ async fn main() -> color_eyre::Result<()> {
setup_panic!();
color_eyre::install()?;
let args = clap::app_from_crate!()
let args = clap::command!()
.arg(
Arg::new("polling-interval")
.validator(|s| {
str::parse::<u64>(s).map_err(|_| anyhow!("polling interval must be u64!"))
})
.about("Minimum number of seconds to wait between poll attempts")
.help("Minimum number of seconds to wait between poll attempts")
.default_value("120"),
)
.arg(
Arg::new("stdin")
.about("Read configuration JSON from stdin")
.help("Read configuration JSON from stdin")
.required_unless_present("file"),
)
.arg(
Arg::new("file")
.takes_value(true)
.about("Path to configuration JSON file"),
.help("Path to configuration JSON file"),
)
.get_matches();

@ -7,12 +7,12 @@ edition = "2021"
[dependencies]
clap = "3.0.0-beta.5"
color-eyre = "0.5.11"
color-eyre = "0.6"
ethers = { git = "https://github.com/gakonst/ethers-rs", branch = "master" }
ethers-signers = { git = "https://github.com/gakonst/ethers-rs", branch = "master", features = ["aws"] }
hex = "0.4.3"
once_cell = "1.8.0"
rusoto_core = "0.47.0"
rusoto_kms = "0.47.0"
tokio = "1.9.0"
serde_json = "1.0.66"
tokio = "1"
serde_json = "1.0"

Loading…
Cancel
Save