-
Notifications
You must be signed in to change notification settings - Fork 56
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
Merge 2.0-bridge into master #2508
Closed
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
07cddcd
chore(data_structures): rename aux.rs file for Windows compatibility
aesedepece cfa93f6
feat(c-bridge): add new config params
guidiaz 293c9df
feat(c-bridge): count drs per state on dr_database
guidiaz e08f9b7
feat(c-bridge): implement new watch_dog actor
guidiaz 2e961ee
chore: attend pr review comments
guidiaz 8e6ff2f
fix(c-bridge): use wit/rpc client instead of tcp::socket to check wit…
guidiaz 7156203
feat(c-bridge): count drs per state on dr_database
guidiaz b0c1d7e
fix(c-bridge): avoid polling query status while no new query is detected
guidiaz 3b2aae7
fix(c-bridge): json metrics syntax
guidiaz ade3aef
feat(c-bridge): polish drs status metrics
guidiaz e0532d3
chore: attend pr review comments
guidiaz 0c72d7f
chore: cargo clippy --fix
guidiaz 2ee9d50
fix(c-bridge): watch_dog: witHourlyExpenditure not being reported
guidiaz bf4def5
feat(c-bridge): watch_dog: implement new witDailyQueries metric
guidiaz 6f405f4
feat(c-bridge): watch_dog: implement new evmContractVersion
guidiaz 1543175
fix(c-bridge): remove duplicated entry in wrb_abi.json
guidiaz 8ace7be
fix(c-bridge): drsLast* metrics not being updated properly
guidiaz 8103620
feat(c-bridge): new metrics status values
guidiaz 07f2d1a
chore: cargo fmt --all
guidiaz c835336
feat(c-bridge): report metrics on minutes o'clock
guidiaz 9095f5c
chore: cargo fmt --all
guidiaz 33623f5
test: fix legacy tests
guidiaz 878c703
chore: cargo.lock
guidiaz 20cb9ae
chore: clippy --fix
guidiaz f6780ae
chore: indulge pedantic clippy
guidiaz 767a00e
fix: export CLIPPY_LINTS with no \r chars
guidiaz 94fba8a
chore: attend pr review comments
guidiaz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -653,15 +653,14 @@ mod tests { | |
]) | ||
}) | ||
.collect(); | ||
let verbose = true; | ||
|
||
let params_one = unwrap_batch(batch_results[0].clone()); | ||
wrb_contract_abi | ||
.function("reportResult") | ||
.and_then(|function| function.encode_input(¶ms_one.into_tokens())) | ||
.expect("encode args failed"); | ||
|
||
let params_batch = (batch_results, verbose); | ||
let params_batch = batch_results; | ||
wrb_contract_abi | ||
.function("reportResultBatch") | ||
.and_then(|function| function.encode_input(¶ms_batch.into_tokens())) | ||
|
@@ -682,15 +681,11 @@ mod tests { | |
.parse() | ||
.unwrap(), | ||
topics: vec![ | ||
"0x00e9413c6321ec446a267b7ebf5bb108663f2ef58b35c4f6e18905ac8f205cb2" | ||
"0x4df64445edc775fba59db44b8001852fb1b777eea88fd54f04572dd114e3ff7f" | ||
.parse() | ||
.unwrap(), | ||
], | ||
data: web3::types::Bytes(vec![ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 248, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 232, 36, 130, 44, 106, 92, | ||
40, 222, 53, 104, 223, 153, 96, 77, 104, 233, 253, 156, 140, | ||
]), | ||
data: web3::types::Bytes(hex::decode("0000000000000000000000000000000000000000000000000000000000001b58000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000146e6f7420696e20506f7374656420737461747573000000000000000000000000").unwrap()), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well done. I hate how much we rely on byte arrays all across the code base and in our APIs. Hex is the way to go. |
||
block_hash: None, | ||
block_number: None, | ||
transaction_hash: None, | ||
|
@@ -700,13 +695,9 @@ mod tests { | |
log_type: None, | ||
removed: None, | ||
}; | ||
|
||
assert_eq!( | ||
parse_batch_report_error_log(&wrb_contract_abi, log_posted_result), | ||
Some(( | ||
U256::from(63605), | ||
String::from("WitnetOracle: query not in Posted status"), | ||
)) | ||
Some((U256::from(7_000), String::from("not in Posted status"),)) | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hahaha pretty convenient