Skip to content

Enable graft validation checks for debug #5584

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

Conversation

shuaibbapputty
Copy link
Contributor

@shuaibbapputty shuaibbapputty commented Aug 6, 2024

Closes #5197

Fix graft validation checks

  • Removed the conditional compilation for reorg threshold checks in debug builds

This will be good to go as we have reorg_threshold set to 0 on debug builds.

let reorg_threshold =
inner
.reorg_threshold
.unwrap_or_else(|| if cfg!(debug_assertions) { 0 } else { 250 });

@shuaibbapputty shuaibbapputty force-pushed the shuaib/enable-debug-test-for-grafting branch 2 times, most recently from 724ce94 to 8dce075 Compare August 7, 2024 03:21
@shuaibbapputty shuaibbapputty changed the title enable debug test for grafting Enable graft validation checks for debug Aug 7, 2024
@shuaibbapputty shuaibbapputty force-pushed the shuaib/enable-debug-test-for-grafting branch from 8dce075 to 8ec22b3 Compare August 7, 2024 03:42
@shuaibbapputty shuaibbapputty force-pushed the shuaib/enable-debug-test-for-grafting branch from 8ec22b3 to 386dbbf Compare August 7, 2024 04:27
@shuaibbapputty
Copy link
Contributor Author

@lutter @incrypto32 would appreciate a review of this PR.

@lutter
Copy link
Collaborator

lutter commented Aug 7, 2024

Interesting. This used to fail CI; do you have any idea where the reorg threshold is set to 0 when we run tests?

@shuaibbapputty
Copy link
Contributor Author

shuaibbapputty commented Aug 8, 2024

Yep, this used to fail before. The reason for the change in behavior is that at the time the issue was opened, the cfg!(debug_assertions) macro wasn't being used to set the reorg threshold in debug mode.

And now, while running tests (which are typically in debug mode), the cfg!(debug_assertions) macro is being applied, and the reorg threshold is set to 0 by default. unless explicitly set by "ETHEREUM_REORG_THRESHOLD" env var

@lutter lutter merged commit 6cfc444 into graphprotocol:master Sep 19, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Change subgraph runner tests to not graft onto subgraph head
2 participants