-
Notifications
You must be signed in to change notification settings - Fork 12
Implement the RPCBlockHeaderSubscriber for indexing finalized results
#728
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
base: main
Are you sure you want to change the base?
Changes from 105 commits
a276412
7d36012
75a1d18
ce83ebb
d159467
5e8f388
bfe6188
037c234
6afde4d
ff927f7
4555263
34dbde5
bf4626c
1f084be
a8329e4
fa39603
d68f2ba
823e965
91b1ec0
2ddd052
97f5f93
1e977a9
f978871
23b4c87
d98d8c5
2f12447
a4766eb
44aa626
6711c92
219d720
0e90079
fc4ead5
5d95d07
4b59bcb
d736faf
70674b9
7318ee3
f4b1c5f
ace558d
d728f14
62f6916
a4a807f
e10fbf7
8e04341
1b20a6b
7226a6b
05b38f2
7ea340a
fd55071
1457b3e
0071e40
5f04f5e
08373b3
4bd108e
6826497
1e2a0fd
f3a5b7f
3ec09b9
7b1c6f1
b8c6187
f8a3eb1
3d6f09b
c00b0f7
b7e6803
f7dc819
2fa4139
3400afc
f39360d
a2914c1
4398ef5
092753c
5a07802
644f359
9364624
34f6efd
d36af20
71e1ce8
e4cd73c
88e6d7e
cfa6656
7575806
8b80fd0
6f5b3c9
a93abf0
bcb027f
ed3f17b
f51de72
965b10b
fed891a
a8f7437
eab1a53
e3d06a2
108e232
efd12b0
a404eab
733be55
fffd7f8
6552a69
e302a12
60caf94
c754eb7
ec1385e
cb7f210
5e17b0b
5c97d88
2862171
5baae43
48b6d0c
28de201
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,15 @@ type Config struct { | |
| // TxBatchInterval is the time interval upon which to submit the transaction batches to the | ||
| // Flow network. | ||
| TxBatchInterval time.Duration | ||
| // ExperimentalSoftFinalityEnabled enables the experimental soft finality feature which syncs | ||
| // EVM block and transaction data from the upstream Access node before the block is sealed. | ||
| // CAUTION: This feature is experimental and may return incorrect data in certain circumstances. | ||
| ExperimentalSoftFinalityEnabled bool | ||
| // ExperimentalSealingVerificationEnabled enables the experimental sealing verification feature | ||
| // which verifies the hash of the EVM events ingested by the requester engine match the hash | ||
| // of the events from the sealed block in the Flow network. | ||
| // CAUTION: This feature is experimental and will cause the node to halt if the events don't match. | ||
| ExperimentalSealingVerificationEnabled bool | ||
|
Comment on lines
+123
to
+131
Contributor
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. 🧩 Analysis chainLGTM! The experimental configuration fields are well-documented. The addition of these experimental feature flags is clear and includes appropriate CAUTION warnings about potential data issues and node halting behavior. The naming follows Go conventions and the documentation is explicit about the risks. However, given the PR context noting that integration tests cannot currently run (Emulator limitation) and the known limitations with execution forks requiring manual operator intervention, please ensure comprehensive operator-facing documentation exists. Run the following script to verify operator documentation exists for these experimental features: 🏁 Script executed: #!/bin/bash
# Description: Verify that operator documentation exists for the new experimental features
# Search for documentation files that might cover these features
echo "=== Searching for documentation files ==="
fd -e md -e txt -e rst . | head -20
# Search for references to the experimental flags in documentation
echo -e "\n=== Searching for soft finality documentation ==="
rg -n -C3 --type=md "soft.finality|ExperimentalSoftFinalityEnabled"
echo -e "\n=== Searching for sealing verification documentation ==="
rg -n -C3 --type=md "sealing.verification|ExperimentalSealingVerificationEnabled"
# Search for any operator guides or deployment docs
echo -e "\n=== Searching for operator/deployment guides ==="
rg -n -l --type=md "operator|deployment|configuration|experimental" | head -10Length of output: 355 🏁 Script executed: #!/bin/bash
# Search for any references to the experimental features in the entire codebase
echo "=== Searching for ExperimentalSoftFinalityEnabled references ==="
rg -n "ExperimentalSoftFinalityEnabled" . | head -20
echo -e "\n=== Searching for ExperimentalSealingVerificationEnabled references ==="
rg -n "ExperimentalSealingVerificationEnabled" . | head -20
echo -e "\n=== Checking README.md for experimental feature documentation ==="
cat README.md | head -100
echo -e "\n=== Checking if there's any EXPERIMENTAL documentation pattern ==="
rg -n -C2 "EXPERIMENTAL|experimental.*feature" --type=md | head -40Length of output: 6591 🏁 Script executed: #!/bin/bash
# Check how the experimental flags are used in bootstrap.go
echo "=== bootstrap.go lines 165-175 (ExperimentalSoftFinalityEnabled usage) ==="
sed -n '160,180p' bootstrap/bootstrap.go
echo -e "\n=== cmd/run/cmd.go lines 225-240 (Flag definition and assignment) ==="
sed -n '225,240p' cmd/run/cmd.go
echo -e "\n=== Check if there's any configuration documentation ==="
find . -name "*config*" -type f | grep -E "\.(md|txt|rst)$"
echo -e "\n=== Search for any mention of flags/configuration in docs ==="
rg -n "flag|--experimental" README.md | head -20Length of output: 2161 🏁 Script executed: #!/bin/bash
# Find where the experimental flags are defined as command-line flags
echo "=== Searching for experimentalSoftFinalityEnabled flag definition ==="
rg -n "experimentalSoftFinalityEnabled" . -B2 -A2 | grep -E "(flag|Flag|Define|cmd|command)" -A2 -B2
echo -e "\n=== Searching for experimentalSealingVerificationEnabled flag definition ==="
rg -n "experimentalSealingVerificationEnabled" . -B2 -A2 | grep -E "(flag|Flag|Define|cmd|command)" -A2 -B2
echo -e "\n=== Check cmd/run/cmd.go for flag.Bool definitions ==="
rg -n "flag.Bool|flag.String" cmd/run/cmd.go | tail -20
echo -e "\n=== Extract README.md configuration table (lines 231-280) ==="
sed -n '231,280p' README.mdLength of output: 9751 Add experimental feature flags to README.md configuration table. The code changes are sound and the experimental flags have appropriate runtime warnings in Add entries for 🤖 Prompt for AI Agents |
||
| // EOAActivityCacheTTL is the time interval used to track EOA activity. Tx send more | ||
| // frequently than this interval will be batched. | ||
| // Useful only when batch transaction submission is enabled. | ||
|
|
||
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.
💡 Verification agent
🧩 Analysis chain
Consider adjusting the default value for the sealing verification flag.
The
experimentalSealingVerificationEnabledflag is set totrueby default, but the warning indicates it may result in indexing halts if events don't match. For experimental features with potential operational impacts, it's generally safer to default to the more conservative option (false) and require users to explicitly opt-in.This is especially important since the PR is implementing a new subscriber for indexing finalized results, and unexpected halts could impact service reliability.
🏁 Script executed:
Length of output: 338
Action: Change the default for experimentalSealingVerificationEnabled to false to avoid unintended indexing halts.
The current default value of
true(in cmd/run/cmd.go:292-293) risks triggering indexing halts if events don’t match. Since our check in the bootstrap directory didn’t reveal any special handling for this flag, it makes sense to default to the more conservative option. This change ensures that users must explicitly enable the experimental sealing verification feature—and thus accept its potential operational impacts—rather than inadvertently opting into a risky behavior with production consequences.cmd/run/cmd.go(Lines 292-293)Please update the default flag accordingly to improve operational safety when the new subscriber for indexing finalized results is active.
📝 Committable suggestion