-
Notifications
You must be signed in to change notification settings - Fork 679
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
Duplicate events broadcasted to same API server #2810
Comments
Sounds like something we should be doing! |
is there any way to get out of this? And does this lead to node sync to fail? I'm having this issue on my testnet node. I've unset the env var but behavior is the same.
|
@pseudozach Unfortunately once a data failure occurs on the stacks-blockchain-api side of things and all subsequent events fail to broadcast, it is very difficult to resolve, and would involve manually editing the stacks-node's database. Your best bet at the moment would be to copy the data from another stacks-node and API to the corrupted pair if you have one, or sync from genesis. |
We just ran into this with two of our api/nodes which is really unfortunate -- curious if there has been any update on this? cc @gregorycoppola |
Did you run into this issue because the same server was configured twice (i.e., either multiple entries for the same server in the config file or one in the config file and one in the environment variable?) Just trying to figure out if that's related to this issue (which is about a duplication in the event observer list).
Probably! I think if we just did some simple deduplication when the event observer is instantiated, that would resolve this issue. |
Temporarily assigning to @kantai. Please feel free to handle however you see fit. |
This seems like it could be somewhat straightforward to fix -- the event_emitter can just check as its broadcasting whether or not a particular endpoint appears twice in the notification chain (or use a This seems like it could be a good first issue, so I'll tag as such. If nobody has cycles for this by next week, I'll also tag as icebox. |
Describe the bug
When an API server is configured in both a
events_observer
block in the stacks-node's config TOML, and theSTACKS_EVENT_OBSERVER
environment variable, stacks-node will broadcast transactions to the target API server twice, causing it to fail over time.Steps To Reproduce
STACKS_EVENT_OBSERVER
env variable pointing to the API server.events_observer
block pointing to the API serverExpected behavior
The stacks-node should detect if there are duplicate event server entries between the
events_observer
block in the TOML and theSTACKS_EVENT_OBSERVER
env variable. If duplicate entries are found, print a log message saying so and exit.Environment (please complete the following information):
stacks-node version
2.0.11.2.0
More info can be found here.
The text was updated successfully, but these errors were encountered: