stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

Broadcast `/new_pox_set` events to observers registered to `any` event

Open zone117x opened this issue 1 year ago • 4 comments

The /new_pox_set event was not broadcasted to observers who subscribed to the * any event.

zone117x avatar Feb 21 '24 15:02 zone117x

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (059ae88) 76.77% compared to head (d9f6a96) 76.95%. Report is 12 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4406      +/-   ##
==========================================
+ Coverage   76.77%   76.95%   +0.17%     
==========================================
  Files         448      448              
  Lines      321365   321365              
==========================================
+ Hits       246733   247304     +571     
+ Misses      74632    74061     -571     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 21 '24 15:02 codecov[bot]

This was intentional -- the * event hasn't received any of the new events data for sometime, because that necessarily makes it a breaking change. If someone registered on * doesn't handle the new event data, it would cause their node to stall.

My preference would be to deprecate * because of this.

kantai avatar Feb 21 '24 17:02 kantai

Currently the STACKS_EVENT_OBSERVER env var is the easiest way to register an event observer in many deployments, for example in docker-compose. I don't think the * option should be removed unless the env var option is improved to be able to preserve the functionality. It's painful to depend on .toml template file manipulation to swap in host names.

I also don't think adding to the * events should be considered a breaking change. The * key exists exactly for this purpose, and it's the responsibility of observers to correctly handle any event.

zone117x avatar Feb 21 '24 18:02 zone117x

Note that if https://github.com/stacks-network/stacks-core/issues/4407 is implemented, then we could table this discussion for now

zone117x avatar Feb 21 '24 18:02 zone117x

Addressed by https://github.com/stacks-network/stacks-core/pull/4430, closing

saralab avatar Feb 27 '24 14:02 saralab