hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
322 stars 359 forks source link

GCS: validator fails to understand folders #4449

Open sapph1re opened 1 month ago

sapph1re commented 1 month ago

When trying to run a validator specifying checkpointSyncer settings for GCS: --checkpointSyncer.type gcs --checkpointSyncer.bucket an-s3-signatures-repository --checkpointSyncer.folder atletaolympia

You get an error, apparently because it tries to report metadata with bucket name as bucket/folder, but apparently the "/" character is not accepted there:

  2024-09-06T21:41:51.634228Z  INFO hyperlane_base::db::rocks: Opening existing db, path: /hyperlane_db
    at hyperlane-base/src/db/rocks/mod.rs:86
    in hyperlane_base::db::rocks::from_path with db_path: "/hyperlane_db"

Building provider with signer
Building provider without signer
Building provider with signer
Building provider without signer
  2024-09-06T21:41:57.367309Z  INFO validator::server::eigen_node: Serving the EigenNodeAPI routes...
    at agents/validator/src/server/eigen_node.rs:66

Building provider without signer
thread 'main' panicked at 'Failed to report agent metadata: error validating bucket name an-s3-signatures-repository/atletaolympia

Caused by:
    Character '/' @ 27 is not allowed

Location:
    hyperlane-base/src/types/gcs_storage.rs:181:9', agents/validator/src/validator.rs:178:14
stack backtrace:
   0:     0x58678357db81 - std::backtrace_rs::backtrace::libunwind::trace::h66dc1c6acf794faa
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x58678357db81 - std::backtrace_rs::backtrace::trace_unsynchronized::ha80d20099a67f790
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x58678357db81 - std::sys_common::backtrace::_print_fmt::h7b959d43f35f16d4
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x58678357db81 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hdaa196410d9ee0b9
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x5867835ab8bf - core::fmt::rt::Argument::fmt::h0ddfbbe8be3f80d0
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/fmt/rt.rs:138:9
   5:     0x5867835ab8bf - core::fmt::write::h66b3c629f3d623e4
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/fmt/mod.rs:1094:21
   6:     0x586783579de7 - std::io::Write::write_fmt::hb6d80fba4115e0c2
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/io/mod.rs:1714:15
   7:     0x58678357d995 - std::sys_common::backtrace::_print::h1a49cfb0cf3cce17
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x58678357d995 - std::sys_common::backtrace::print::hca95c2d0055e42a2
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x58678357f103 - std::panicking::default_hook::{{closure}}::hc03c01c56bca600c
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:269:22
  10:     0x58678357ee94 - std::panicking::default_hook::hb2cb5315b6634f1c
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:288:9
  11:     0x58678357f689 - std::panicking::rust_panic_with_hook::h75cd912a39a34e8a
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:705:13
  12:     0x58678357f587 - std::panicking::begin_panic_handler::{{closure}}::h1498b46f7849e167
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:597:13
  13:     0x58678357dfe6 - std::sys_common::backtrace::__rust_end_short_backtrace::hd36a39b27b98086b
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/sys_common/backtrace.rs:151:18
  14:     0x58678357f2d2 - rust_begin_unwind
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5
  15:     0x586781475b33 - core::panicking::panic_fmt::h98ef273141454c23
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14
  16:     0x586781475fd3 - core::result::unwrap_failed::h26e7d1a596cddd61
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1651:5
  17:     0x5867817afb67 - <validator::validator::Validator as hyperlane_base::agent::BaseAgent>::run::{{closure}}::h7bbd9f99b0c24077
  18:     0x5867815cba29 - <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::h9697bb289ad0737b
  19:     0x58678187670c - tokio::runtime::scheduler::current_thread::CoreGuard::block_on::h5e778e1a7f23bed6
  20:     0x586781a0fd9d - tokio::runtime::context::runtime::enter_runtime::hdcc1d33107a4c3e0
  21:     0x586781875f6e - tokio::runtime::scheduler::current_thread::CurrentThread::block_on::hbf83b23af66195d1
  22:     0x5867818cd7aa - tokio::runtime::runtime::Runtime::block_on::h663a16b81be953cb
  23:     0x5867818a0efb - validator::main::h9820a7deb2dca0d5
  24:     0x586781778723 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2ccdd4011c786ef7
  25:     0x58678177873d - std::rt::lang_start::{{closure}}::h7611d8d96ac712c0
  26:     0x586783571bcb - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h87e9a912d8a0de33
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:284:13
  27:     0x586783571bcb - std::panicking::try::do_call::ha8d57d42181c12cf
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:500:40
  28:     0x586783571bcb - std::panicking::try::h2fdb2d19c253437c
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:464:19
  29:     0x586783571bcb - std::panic::catch_unwind::h9fe5959d2e133449
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panic.rs:142:14
  30:     0x586783571bcb - std::rt::lang_start_internal::{{closure}}::ha072eb7bbeaa0b6a
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/rt.rs:148:48
  31:     0x586783571bcb - std::panicking::try::do_call::h983dae29f79ed5db
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:500:40
  32:     0x586783571bcb - std::panicking::try::h15014751f4b412ba
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:464:19
  33:     0x586783571bcb - std::panic::catch_unwind::hf837426183b1055f
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panic.rs:142:14
  34:     0x586783571bcb - std::rt::lang_start_internal::h2bbe0b58b2b89a9f
                               at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/rt.rs:148:20
  35:     0x5867818a0fe5 - main
  36:     0x7603f22e6d90 - <unknown>
  37:     0x7603f22e6e40 - __libc_start_main
  38:     0x5867814a4de1 - _start
  39:                0x0 - <unknown>

Folder is not mandatory and the error can be avoided by not using the folder setting. But it has to be supported properly.

sapph1re commented 6 days ago

Should be fixed by #4652