diff --git a/Cargo.lock b/Cargo.lock index 6a829ee3..b43942a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,24 +2,23 @@ # It is not intended for manual editing. [[package]] name = "abscissa_core" -version = "0.5.2" +version = "0.6.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a07677093120a02583717b6dd1ef81d8de1e8d01bd226c83f0f9bdf3e56bb3a" +checksum = "576dbfaac815924aefd67b1a6566fefdb617f3df250a9eb384440078831143e4" dependencies = [ "abscissa_derive", + "arc-swap", "backtrace", "canonical-path", "chrono", - "color-backtrace", - "generational-arena", + "color-eyre", + "fs-err", "gumdrop", - "libc", "once_cell", "regex", "secrecy", "semver", "serde", - "signal-hook", "termcolor", "toml", "tracing", @@ -44,9 +43,9 @@ dependencies = [ [[package]] name = "abscissa_tokio" -version = "0.5.1" +version = "0.6.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7d1a5aa670b07be20e9457b491e78022d8421d4a39939f8b01a6a16ea85dc" +checksum = "5483def0ba1533f8040c0288451373a3522f13be7386426bb81cf7605a806a50" dependencies = [ "abscissa_core", "tokio", @@ -127,11 +126,11 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -140,6 +139,12 @@ version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" +[[package]] +name = "arc-swap" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d7d63395147b81a9e570bcc6243aaf71c017bd666d4909cfef0085bdda8d73" + [[package]] name = "arrayvec" version = "0.5.2" @@ -163,17 +168,6 @@ dependencies = [ "syn", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - [[package]] name = "autocfg" version = "1.0.1" @@ -196,9 +190,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.12.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" @@ -245,9 +239,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bumpalo" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f07aa6688c702439a1be0307b6a94dffe1168569e45b9500c1372bc580740d59" +checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" [[package]] name = "byteorder" @@ -336,14 +330,14 @@ dependencies = [ "num-traits", "serde", "time", - "winapi 0.3.9", + "winapi", ] [[package]] name = "chunked_transfer" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7477065d45a8fe57167bf3cf8bcd3729b54cfcb81cca49bda2d038ea89ae82ca" +checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" [[package]] name = "cipher" @@ -365,14 +359,16 @@ dependencies = [ ] [[package]] -name = "color-backtrace" -version = "0.3.0" +name = "color-eyre" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d13f1078cc63c791d0deba0dd43db37c9ec02b311f10bed10b577016f3a957" +checksum = "7b29030875fd8376e4a28ef497790d5b4a7843d8d1396bf08ce46f5eec562c5c" dependencies = [ - "atty", "backtrace", - "termcolor", + "eyre", + "indenter", + "once_cell", + "owo-colors", ] [[package]] @@ -383,9 +379,9 @@ checksum = "c5d82796b70971fbb603900a5edc797a4d9be0f9ec1257f83a1dba0aa374e3e9" [[package]] name = "core-foundation" -version = "0.7.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" dependencies = [ "core-foundation-sys", "libc", @@ -393,9 +389,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.7.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" [[package]] name = "cpuid-bool" @@ -422,9 +418,9 @@ dependencies = [ [[package]] name = "ct-logs" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c8e13110a84b6315df212c045be706af261fd364791cad863285439ebba672e" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" dependencies = [ "sct", ] @@ -623,20 +619,10 @@ dependencies = [ ] [[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" +name = "fs-err" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +checksum = "bcd1163ae48bda72a20ae26d66a04d3094135cadab911cff418ae5e33f253431" [[package]] name = "funty" @@ -732,22 +718,13 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.4", + "pin-project-lite", "pin-utils", "proc-macro-hack", "proc-macro-nested", "slab", ] -[[package]] -name = "generational-arena" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d3b771574f62d0548cee0ad9057857e9fc25d7a3335f140c84f6acd0bf601" -dependencies = [ - "cfg-if 0.1.10", -] - [[package]] name = "generic-array" version = "0.14.4" @@ -777,7 +754,7 @@ checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.1+wasi-snapshot-preview1", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] @@ -817,38 +794,12 @@ dependencies = [ "syn", ] -[[package]] -name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", - "tracing-futures", -] - [[package]] name = "harp" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60bf12c625ed5e96f81609ae4377c34e9fa3e4d1fada392404322daeace511ab" -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" - [[package]] name = "hermit-abi" version = "0.1.18" @@ -923,19 +874,19 @@ dependencies = [ [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "http", ] [[package]] name = "httparse" -version = "1.3.4" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" [[package]] name = "httpdate" @@ -945,21 +896,20 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "hyper" -version = "0.13.9" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ad767baac13b44d4529fcf58ba2cd0995e36e7b435bc5b039de6f47e880dbf" +checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", "httpdate", "itoa", - "pin-project 1.0.4", + "pin-project", "socket2", "tokio", "tower-service", @@ -969,11 +919,10 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37743cc83e8ee85eacfce90f2f4102030d9ff0a95244098d781e9bee4a90abb6" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes 0.5.6", "ct-logs", "futures-util", "hyper", @@ -983,6 +932,7 @@ dependencies = [ "tokio", "tokio-rustls", "webpki", + "webpki-roots", ] [[package]] @@ -1008,25 +958,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4d5eb2e114fec2b7fe0fadc22888ad2658789bb7acac4dbee9cf8389f971ec8" -[[package]] -name = "indexmap" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "itertools" version = "0.7.11" @@ -1038,9 +969,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.8.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" dependencies = [ "either", ] @@ -1079,16 +1010,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -1113,9 +1034,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.82" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" +checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3" [[package]] name = "libusb1-sys" @@ -1131,11 +1052,11 @@ dependencies = [ [[package]] name = "log" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 0.1.10", + "cfg-if 1.0.0", ] [[package]] @@ -1153,12 +1074,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.3.4" @@ -1189,44 +1104,25 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.23" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", "log", "miow", - "net2", - "slab", - "winapi 0.2.8", + "ntapi", + "winapi", ] [[package]] name = "miow" -version = "0.2.2" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", + "socket2", + "winapi", ] [[package]] @@ -1242,6 +1138,15 @@ dependencies = [ "void", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -1272,6 +1177,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "object" version = "0.23.0" @@ -1297,13 +1212,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] -name = "owning_ref" -version = "0.4.1" +name = "owo-colors" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] +checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" [[package]] name = "p256" @@ -1341,33 +1253,13 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -[[package]] -name = "pin-project" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" -dependencies = [ - "pin-project-internal 0.4.27", -] - [[package]] name = "pin-project" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" dependencies = [ - "pin-project-internal 1.0.4", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "pin-project-internal", ] [[package]] @@ -1381,12 +1273,6 @@ dependencies = [ "syn", ] -[[package]] -name = "pin-project-lite" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" - [[package]] name = "pin-project-lite" version = "0.2.4" @@ -1453,11 +1339,11 @@ dependencies = [ [[package]] name = "prost" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" +checksum = "9e6984d2f1a23009bd270b8bb56d0926810a3d483f59c987d77969e9d8e840b2" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "prost-derive", ] @@ -1487,12 +1373,12 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" +checksum = "169a15f3008ecb5160cba7d37bcd690a7601b6d30cfb87a117d45e59d52af5d4" dependencies = [ "anyhow", - "itertools 0.8.2", + "itertools 0.9.0", "proc-macro2", "quote", "syn", @@ -1500,11 +1386,11 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" +checksum = "b518d7cdd93dab1d1122cf07fa9a60771836c668dde9d9e2a139f957f0d9f1bb" dependencies = [ - "bytes 0.5.6", + "bytes 1.0.1", "prost", ] @@ -1653,14 +1539,14 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] name = "ring" -version = "0.16.19" +version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024a1e66fea74c66c66624ee5622a7ff0e4b73a13b4f5c326ddb50c708944226" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", "libc", @@ -1668,7 +1554,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1689,7 +1575,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1721,9 +1607,9 @@ checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" [[package]] name = "rustls" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d1126dcf58e93cee7d098dbda643b5f92ed724f1f6a63007c1116eed6700c81" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" dependencies = [ "base64", "log", @@ -1734,9 +1620,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629d439a7672da82dd955498445e496ee2096fe2117b9f796558a43fdb9e59b8" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ "openssl-probe", "rustls", @@ -1766,7 +1652,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1781,9 +1667,9 @@ dependencies = [ [[package]] name = "secrecy" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9182278ed645df3477a9c27bfee0621c621aa16f6972635f7f795dae3d81070f" +checksum = "0673d6a6449f5e7d12a1caf424fd9363e2af3a4953023ed455e3c4beef4597c0" dependencies = [ "serde", "zeroize", @@ -1791,9 +1677,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad502866817f0575705bd7be36e2b2535cc33262d493aa733a2ec862baa2bc2b" +checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" dependencies = [ "bitflags", "core-foundation", @@ -1804,9 +1690,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ceb04988b17b6d1dcd555390fa822ca5637b4a14e1f5099f13d351bed4d6c7" +checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" dependencies = [ "core-foundation-sys", "libc", @@ -1814,9 +1700,9 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +checksum = "394cec28fa623e00903caf7ba4fa6fb9a0e260280bb8cdbbba029611108a0190" dependencies = [ "semver-parser", "serde", @@ -1905,22 +1791,12 @@ dependencies = [ ] [[package]] -name = "signal-hook" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e31d442c16f047a671b5a71e2161d6e68814012b7f5379d269ebd915fac2729" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-registry" -version = "1.3.0" +name = "sharded-slab" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" +checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3" dependencies = [ - "libc", + "lazy_static", ] [[package]] @@ -1954,12 +1830,9 @@ checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "smallvec" -version = "0.6.14" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" @@ -1969,7 +1842,7 @@ checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ "cfg-if 1.0.0", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1978,12 +1851,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - [[package]] name = "stdtx" version = "0.4.0" @@ -2059,18 +1926,18 @@ dependencies = [ "rand 0.8.3", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] name = "tendermint" -version = "0.17.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dece4b481502a8dc31696b7656b97dd73fba374112c22a9a9dae2dcae47231ac" +checksum = "1335b31840735b04fe2b6d44309122397afd04b7d24670dece2b99cc4ef487c5" dependencies = [ "anomaly", "async-trait", - "bytes 0.5.6", + "bytes 1.0.1", "chrono", "ed25519", "ed25519-dalek", @@ -2097,9 +1964,9 @@ dependencies = [ [[package]] name = "tendermint-p2p" -version = "0.17.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15e92ca7defc38f12aef43e0d37a3d34a73fdfb5c0413ab3bc7c4bffa6fe8ad" +checksum = "df9d2f48555eb4ab9d0b0c617e4efaacb4ee767c4e840e48d67aa7d4520dfb0c" dependencies = [ "chacha20poly1305", "ed25519-dalek", @@ -2122,12 +1989,12 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.17.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dc89e2c7de21f1abb9ae5bc7eb5570b10a3ec11ca0a7a009ec594b1d3b8c917" +checksum = "c7d54af90058f8df5bf6b9469f6988f49a80c169c3e450d702c1101432df60a6" dependencies = [ "anomaly", - "bytes 0.5.6", + "bytes 1.0.1", "chrono", "num-derive", "num-traits", @@ -2141,18 +2008,18 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.17.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777930720ed2ade8198dcbaddcfbeaf8528215de3d4641d806ff1e42952a8d3c" +checksum = "a4e26ea1b21ae9d652e6cc8451c122d90672b7f59e874ae81e6d39b64b0d0dd1" dependencies = [ "async-trait", - "bytes 0.5.6", + "bytes 1.0.1", "chrono", "futures", "getrandom 0.1.16", "http", "hyper", - "pin-project 1.0.4", + "pin-project", "serde", "serde_bytes", "serde_json", @@ -2211,7 +2078,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2250,6 +2117,7 @@ dependencies = [ "abscissa_tokio", "byteorder", "bytes 0.5.6", + "bytes 1.0.1", "chrono", "ed25519-dalek", "getrandom 0.1.16", @@ -2288,27 +2156,23 @@ dependencies = [ [[package]] name = "tokio" -version = "0.2.24" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099837d3464c16a808060bb3f02263b412f6fafcb5d01c533d309985fbeebe48" +checksum = "6714d663090b6b0acb0fa85841c6d66233d150cdb2602c8f9b8abb03370beb3f" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", - "memchr", + "autocfg", + "libc", "mio", - "pin-project-lite 0.1.11", - "slab", + "num_cpus", + "pin-project-lite", "tokio-macros", ] [[package]] name = "tokio-macros" -version = "0.2.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" +checksum = "42517d2975ca3114b22a16192634e8241dc5cc1f130be194645970cc1c371494" dependencies = [ "proc-macro2", "quote", @@ -2317,30 +2181,15 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.14.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12831b255bcfa39dc0436b01e19fea231a37db570686c06ee72c423479f889a" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "futures-core", "rustls", "tokio", "webpki", ] -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project-lite 0.1.11", - "tokio", -] - [[package]] name = "toml" version = "0.5.8" @@ -2363,8 +2212,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.4", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -2389,16 +2237,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "tracing-futures" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -dependencies = [ - "pin-project 0.4.27", - "tracing", -] - [[package]] name = "tracing-log" version = "0.1.1" @@ -2412,17 +2250,18 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.1.6" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192ca16595cdd0661ce319e8eede9c975f227cdaabc4faaefdc256f43d852e45" +checksum = "a1fa8f0c8f4c594e4fc9debc1990deab13238077271ba84dd853d54902ee3401" dependencies = [ "ansi_term", - "chrono", "lazy_static", "matchers", - "owning_ref", "regex", + "sharded-slab", "smallvec", + "thread_local", + "tracing", "tracing-core", "tracing-log", ] @@ -2534,7 +2373,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ "same-file", - "winapi 0.3.9", + "winapi", "winapi-util", ] @@ -2556,9 +2395,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.1+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" @@ -2635,10 +2474,13 @@ dependencies = [ ] [[package]] -name = "winapi" -version = "0.2.8" +name = "webpki-roots" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" +dependencies = [ + "webpki", +] [[package]] name = "winapi" @@ -2650,12 +2492,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2668,7 +2504,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2677,16 +2513,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "wyz" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index ed235534..041006cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,24 +11,25 @@ keywords = ["cosmos", "ed25519", "kms", "key-management", "yubihsm"] edition = "2018" [dependencies] -abscissa_core = "0.5" -abscissa_tokio = { version = "0.5", optional = true } -bytes = "0.5" +abscissa_core = "=0.6.0-pre.1" +abscissa_tokio = { version = "=0.6.0-pre.1", optional = true } +bytes_v0_5 = { version = "0.5", package = "bytes" } +bytes = "1" chrono = "0.4" ed25519-dalek = "1" getrandom = "0.1" gumdrop = "0.7" hkd32 = { version = "0.5", default-features = false, features = ["mnemonic"] } -hkdf = "0.10.0" -hyper = { version = "0.13", optional = true } -hyper-rustls = { version = "0.21", optional = true } +hkdf = "0.10" +hyper = { version = "0.14", optional = true } +hyper-rustls = { version = "0.22", optional = true, features = ["webpki-roots"] } k256 = { version = "0.7", features = ["ecdsa", "sha256"] } ledger = { version = "0.2", optional = true } once_cell = "1.5" -prost = "0.6" +prost = "0.7" prost-amino = "0.6" prost-amino-derive = "0.6" -prost-derive = "0.6" +prost-derive = "0.7" rand_core = { version = "0.5", features = ["std"] } rpassword = { version = "5", optional = true } serde = { version = "1", features = ["serde_derive"] } @@ -39,17 +40,17 @@ stdtx = { version = "0.4", optional = true } subtle = "2" subtle-encoding = { version = "0.5", features = ["bech32-preview"] } tempfile = "3" -tendermint = { version = "0.17", features = ["secp256k1"] } -tendermint-rpc = { version = "0.17", optional = true, features = ["http-client"] } -tendermint-proto = "0.17" -tendermint-p2p = { version = "0.17", features = ["amino"] } +tendermint = { version = "0.18", features = ["secp256k1"] } +tendermint-rpc = { version = "0.18", optional = true, features = ["http-client"] } +tendermint-proto = "0.18" +tendermint-p2p = { version = "0.18", features = ["amino"] } thiserror = "1" wait-timeout = "0.2" yubihsm = { version = "0.38", features = ["secp256k1", "setup", "usb"], optional = true } zeroize = "1" [dev-dependencies] -abscissa_core = { version = "0.5", features = ["testing"] } +abscissa_core = { version = "=0.6.0-pre.1", features = ["testing"] } byteorder = "1" rand = "0.7" diff --git a/src/amino_types/proposal.rs b/src/amino_types/proposal.rs index 5647d787..8d7de586 100644 --- a/src/amino_types/proposal.rs +++ b/src/amino_types/proposal.rs @@ -9,6 +9,7 @@ use super::{ }; use crate::{config::validator::ProtocolVersion, rpc}; use bytes::BufMut; +use bytes_v0_5::BytesMut as BytesMutV05; use ed25519_dalek as ed25519; use once_cell::sync::Lazy; use prost::Message as _; @@ -161,7 +162,9 @@ impl SignableMsg for SignProposalRequest { timestamp: proposal.timestamp, }; - cp.encode_length_delimited(sign_bytes)?; + let mut sign_bytes_v0_5 = BytesMutV05::new(); + cp.encode_length_delimited(&mut sign_bytes_v0_5)?; + sign_bytes.put_slice(sign_bytes_v0_5.as_ref()); } Ok(true) diff --git a/src/amino_types/vote.rs b/src/amino_types/vote.rs index 737f353e..29b306b5 100644 --- a/src/amino_types/vote.rs +++ b/src/amino_types/vote.rs @@ -9,6 +9,7 @@ use super::{ }; use crate::{config::validator::ProtocolVersion, rpc}; use bytes::BufMut; +use bytes_v0_5::BytesMut as BytesMutV05; use ed25519_dalek as ed25519; use once_cell::sync::Lazy; use prost::Message as _; @@ -221,7 +222,9 @@ impl SignableMsg for SignVoteRequest { cv.encode_length_delimited(sign_bytes).unwrap(); } else { let cv = CanonicalVote::new(vote, chain_id.as_str()); - cv.encode_length_delimited(sign_bytes)?; + let mut sign_bytes_v0_5 = BytesMutV05::new(); + cv.encode_length_delimited(&mut sign_bytes_v0_5)?; + sign_bytes.put_slice(sign_bytes_v0_5.as_ref()); } Ok(true) diff --git a/src/application.rs b/src/application.rs index 99cb42cb..5ccbdfcd 100644 --- a/src/application.rs +++ b/src/application.rs @@ -3,36 +3,18 @@ use crate::{commands::KmsCommand, config::KmsConfig}; use abscissa_core::{ application::{self, AppCell}, + config::{self, CfgCell}, trace, Application, FrameworkError, StandardPaths, }; /// Application state -pub static APPLICATION: AppCell = AppCell::new(); - -/// Obtain a read-only (multi-reader) lock on the application state. -/// -/// Panics if the application state has not been initialized. -pub fn app_reader() -> application::lock::Reader { - APPLICATION.read() -} - -/// Obtain an exclusive mutable lock on the application state. -pub fn app_writer() -> application::lock::Writer { - APPLICATION.write() -} - -/// Obtain a read-only (multi-reader) lock on the application configuration. -/// -/// Panics if the application configuration has not been loaded. -pub fn app_config() -> abscissa_core::config::Reader { - abscissa_core::config::Reader::new(&APPLICATION) -} +pub static APP: AppCell = AppCell::new(); /// The `tmkms` application #[derive(Debug)] pub struct KmsApplication { /// Application configuration. - config: Option, + config: CfgCell, /// Application state. state: application::State, @@ -41,7 +23,7 @@ pub struct KmsApplication { impl Default for KmsApplication { fn default() -> Self { Self { - config: None, + config: CfgCell::default(), state: application::State::default(), } } @@ -58,8 +40,8 @@ impl Application for KmsApplication { type Paths = StandardPaths; /// Accessor for application configuration. - fn config(&self) -> &KmsConfig { - self.config.as_ref().expect("not configured yet") + fn config(&self) -> config::Reader { + self.config.read() } /// Borrow the application state immutably. @@ -67,11 +49,6 @@ impl Application for KmsApplication { &self.state } - /// Borrow the application state mutably. - fn state_mut(&mut self) -> &mut application::State { - &mut self.state - } - /// Register all components used by this application. /// /// If you would like to add additional components to your application @@ -84,7 +61,8 @@ impl Application for KmsApplication { #[cfg(feature = "tx-signer")] components.push(Box::new(abscissa_tokio::TokioComponent::new()?)); - self.state.components.register(components) + let mut component_registry = self.state.components_mut(); + component_registry.register(components) } /// Post-configuration lifecycle callback. @@ -93,8 +71,9 @@ impl Application for KmsApplication { /// time in app lifecycle when configuration would be loaded if /// possible. fn after_config(&mut self, config: Self::Cfg) -> Result<(), FrameworkError> { - self.state.components.after_config(&config)?; - self.config = Some(config); + let mut component_registry = self.state.components_mut(); + component_registry.after_config(&config)?; + self.config.set_once(config); Ok(()) } diff --git a/src/bin/tmkms/main.rs b/src/bin/tmkms/main.rs index 93c983f6..5ff9fdbd 100644 --- a/src/bin/tmkms/main.rs +++ b/src/bin/tmkms/main.rs @@ -1,8 +1,8 @@ //! Main entry point for the `tmkms` executable -use tmkms::application::APPLICATION; +use tmkms::application::APP; /// Boot the `tmkms` application fn main() { - abscissa_core::boot(&APPLICATION); + abscissa_core::boot(&APP); } diff --git a/src/commands/ledger.rs b/src/commands/ledger.rs index 0ac686f0..22d3dada 100644 --- a/src/commands/ledger.rs +++ b/src/commands/ledger.rs @@ -46,7 +46,7 @@ pub struct InitCommand { impl Runnable for InitCommand { fn run(&self) { - let config = app_config(); + let config = APP.config(); chain::load_config(&config).unwrap_or_else(|e| { status_err!("error loading configuration: {}", e); diff --git a/src/commands/start.rs b/src/commands/start.rs index 45c7a3da..22425931 100644 --- a/src/commands/start.rs +++ b/src/commands/start.rs @@ -5,7 +5,7 @@ use abscissa_core::{Command, Options}; use std::{path::PathBuf, process}; #[cfg(feature = "tx-signer")] -use crate::{application::APPLICATION, config::TxSignerConfig, tx_signer::TxSigner}; +use crate::{application::APP, config::TxSignerConfig, tx_signer::TxSigner}; /// The `start` command #[derive(Command, Debug, Options)] @@ -44,7 +44,7 @@ impl Runnable for StartCommand { impl StartCommand { /// Spawn clients from the app's configuration fn spawn_clients(&self) -> Vec { - let config = app_config(); + let config = APP.config(); chain::load_config(&config).unwrap_or_else(|e| { status_err!("error loading configuration: {}", e); @@ -71,7 +71,7 @@ fn run_app(validator_clients: Vec) { #[cfg(feature = "tx-signer")] fn run_app(validator_clients: Vec) { let signer_config = { - let cfg = app_config(); + let cfg = APP.config(); match cfg.tx_signer.len() { 0 => None, @@ -114,7 +114,7 @@ fn blocking_wait(validator_clients: Vec) { /// Launch the Tokio executor and spawn transaction signers #[cfg(feature = "tx-signer")] fn run_async_executor(config: TxSignerConfig) { - abscissa_tokio::run(&APPLICATION, async { + abscissa_tokio::run(&APP, async { let mut signer = TxSigner::new(&config).unwrap_or_else(|e| { status_err!("couldn't initialize TX signer: {}", e); process::exit(1); diff --git a/src/commands/yubihsm/keys/list.rs b/src/commands/yubihsm/keys/list.rs index 9d4ba8c8..bdb780d9 100644 --- a/src/commands/yubihsm/keys/list.rs +++ b/src/commands/yubihsm/keys/list.rs @@ -1,6 +1,6 @@ //! List keys inside the YubiHSM2 -use crate::{application::app_config, chain, keyring, prelude::*, Map}; +use crate::{chain, keyring, prelude::*, Map}; use abscissa_core::{Command, Options, Runnable}; use k256::elliptic_curve::generic_array::GenericArray; use std::{path::PathBuf, process}; @@ -76,7 +76,7 @@ fn load_key_formatters() -> Map { /// Load chain-specific key formatters from the configuration fn load_chain_formatters() -> Map { - let cfg = app_config(); + let cfg = APP.config(); let mut map = Map::new(); for chain in &cfg.chain { diff --git a/src/config/provider/yubihsm.rs b/src/config/provider/yubihsm.rs index fb4c8981..761f0468 100644 --- a/src/config/provider/yubihsm.rs +++ b/src/config/provider/yubihsm.rs @@ -4,7 +4,7 @@ use super::KeyType; use crate::{chain, prelude::*}; use abscissa_core::secret::{CloneableSecret, DebugSecret, ExposeSecret, Secret}; use serde::Deserialize; -use std::{fs, path::PathBuf, process}; +use std::{fmt, fs, path::PathBuf, process}; use tendermint::net; use yubihsm::Credentials; use zeroize::{Zeroize, Zeroizing}; @@ -104,8 +104,8 @@ pub struct Password(String); impl CloneableSecret for Password {} impl DebugSecret for Password { - fn debug_secret() -> &'static str { - "REDACTED PASSWORD" + fn debug_secret(f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { + f.write_str("REDACTED PASSWORD") } } diff --git a/src/prelude.rs b/src/prelude.rs index 9783b5d6..98022c95 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -1,19 +1,11 @@ //! Application-local prelude: conveniently import types/functions/macros //! which are generally useful and should be available everywhere. -/// Application state accessors -pub use crate::application::{app_config, app_reader, app_writer}; - -/// Commonly used Abscissa traits -pub use abscissa_core::{Application, Command, Runnable}; - -/// Error macros -pub use abscissa_core::{ensure, fail, fatal, format_err}; - -/// Tracing macros -pub use abscissa_core::tracing::{debug, error, event, info, span, trace, warn, Level}; +/// Abscissa core prelude +pub use abscissa_core::prelude::*; /// Status macros -pub use abscissa_core::{ - status_attr_err, status_attr_ok, status_err, status_info, status_ok, status_warn, -}; +pub use abscissa_core::{status_attr_err, status_attr_ok}; + +/// Application state +pub use crate::application::APP; diff --git a/src/rpc.rs b/src/rpc.rs index 11562dcb..10631a16 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -5,7 +5,7 @@ use std::io::Read; -use bytes::Bytes; +use bytes_v0_5::Bytes; use prost::Message as _; use prost_amino::{encoding::decode_varint, Message as _}; use tendermint_p2p::secret_connection::DATA_MAX_SIZE; diff --git a/src/tx_signer.rs b/src/tx_signer.rs index 7f0b3b67..117aa7c9 100644 --- a/src/tx_signer.rs +++ b/src/tx_signer.rs @@ -119,7 +119,7 @@ impl TxSigner { "[{}] error getting initial block height: {}", self.chain_id, e ); - time::delay_for(RETRY_DELAY).await + time::sleep(RETRY_DELAY).await } } }; @@ -137,7 +137,7 @@ impl TxSigner { "[{}] couldn't get current block height via RPC: {}", &self.chain_id, e ); - time::delay_for(RETRY_DELAY).await; + time::sleep(RETRY_DELAY).await; continue; } }; @@ -179,7 +179,7 @@ impl TxSigner { &self.chain_id, target_height, min_secs ); - time::delay_until(min_deadline).await; + time::sleep_until(min_deadline).await; } return Ok(status); @@ -193,7 +193,7 @@ impl TxSigner { return Ok(status); } - time::delay_for(RPC_POLL_INTERVAL).await + time::sleep(RPC_POLL_INTERVAL).await } } diff --git a/src/tx_signer/jsonrpc.rs b/src/tx_signer/jsonrpc.rs index 10610569..211bc267 100644 --- a/src/tx_signer/jsonrpc.rs +++ b/src/tx_signer/jsonrpc.rs @@ -6,7 +6,6 @@ use crate::{ error::{Error, ErrorKind}, prelude::*, }; -use bytes::Buf; use hyper::{ http::{header, Uri}, Body, @@ -40,10 +39,10 @@ impl Client { self.add_headers(&mut request); let builder = hyper::Client::builder(); - let connector = HttpsConnector::new(); + let connector = HttpsConnector::with_webpki_roots(); // TODO: local cert truststore let response = builder.build(connector).request(request).await?; - let response_body = hyper::body::aggregate(response.into_body()).await?; - let response_json = serde_json::from_slice::(response_body.bytes())?; + let response_body = hyper::body::to_bytes(response.into_body()).await?; + let response_json = serde_json::from_slice::(response_body.as_ref())?; match response_json.status { Status::Ok => Ok(response_json.tx), diff --git a/src/yubihsm.rs b/src/yubihsm.rs index 03dd345c..84e82831 100644 --- a/src/yubihsm.rs +++ b/src/yubihsm.rs @@ -16,8 +16,10 @@ use std::{ }, }; use yubihsm::{Client, Connector}; + #[cfg(feature = "yubihsm-server")] use zeroize::Zeroizing; + #[cfg(not(feature = "yubihsm-mock"))] use { crate::config::provider::yubihsm::AdapterConfig, @@ -194,7 +196,7 @@ fn prompt_for_auth_key_password(auth_key_id: u16) -> yubihsm::Credentials { /// Get the YubiHSM-related configuration pub fn config() -> YubihsmConfig { - let kms_config = app_config(); + let kms_config = APP.config(); let yubihsm_configs = &kms_config.providers.yubihsm; if yubihsm_configs.len() != 1 {