-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parsing sequences of H256s in a matchinglist via agent settings #3180
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a crazy edge case when deserializing: https://users.rust-lang.org/t/solved-serde-deserialize-str-containig-special-chars/27218/2
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3180 +/- ##
=======================================
Coverage 67.18% 67.18%
=======================================
Files 101 101
Lines 1021 1021
Branches 106 106
=======================================
Hits 686 686
Misses 291 291
Partials 44 44
|
…yperlane-xyz#3180) ### Description Upon trying to use a blacklist with an array of H256s as the `recipientAddress`, was getting a panic: ``` running 1 test parse_value: Array [Object {"destinationdomain": Number(11155111), "origindomain": Number(1399811151), "recipientaddress": Array [String("0x6AD4DEBA8A147d000C09de6465267a9047d1c217"), String("0x6AD4DEBA8A147d000C09de6465267a9047d1c218")], "senderaddress": Array [String("0x6AD4DEBA8A147d000C09de6465267a9047d1c217"), String("0x6AD4DEBA8A147d000C09de6465267a9047d1c218")]}] "Expected matching list" thread 'settings::matching_list::test::supports_sequence_h256s' panicked at 'called `Result::unwrap()` on an `Err` value: ConfigParsingError([(ConfigPath([]), Expected matching list Caused by: invalid type: string "0x6AD4DEBA8A147d000C09de6465267a9047d1c217", expected a borrowed string Location: /Users/trevor/abacus-monorepo/rust/hyperlane-base/src/settings/parser/json_value_parser.rs:259:14)])', agents/relayer/src/settings/matching_list.rs:473:60 stack backtrace: 0: rust_begin_unwind at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5 1: core::panicking::panic_fmt at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14 2: core::result::unwrap_failed at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1651:5 3: core::result::Result<T,E>::unwrap at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1076:23 4: relayer::settings::matching_list::test::supports_sequence_h256s at ./src/settings/matching_list.rs:473:9 5: relayer::settings::matching_list::test::supports_sequence_h256s::{{closure}} at ./src/settings/matching_list.rs:459:34 6: core::ops::function::FnOnce::call_once at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5 7: core::ops::function::FnOnce::call_once at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. test settings::matching_list::test::supports_sequence_h256s ... FAILED ``` Honestly not too sure about the implications of this being a String vs &str ### Drive-by changes <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->
Description
Upon trying to use a blacklist with an array of H256s as the
recipientAddress
, was getting a panic:Honestly not too sure about the implications of this being a String vs &str
Drive-by changes
Related issues
Backward compatibility
Testing