You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
The default commitment for pubsub and http requests are different which can cause consistency issues in downstream clients.
This problem manifests itself in the web3 sdk. When a commitment is not specified for a Connection, an account info request will default to finalized but confirming a transaction will default to confirmed because it uses pubsub to subscribe to confirmation. This causes consistency problems in apps that may immediately fetch account state after confirming a transaction. The out of the box configuration shouldn't be error prone like this.
Proposed Solution
Default everything to confirmed?
Problem is that this is a breaking change and some clients may be surprised about the defaults changing. However, one could argue that any application requiring full finalization, should already be explicit about that in commitment parameters and not rely on defaults.
I think we still want to be conservative and default to finalized for everything, 100% safety by default
However, one could argue that any application requiring full finalization, should already be explicit about that in commitment parameters and not rely on defaults.
Pretty sure this'll break some exchanges that already assume finalized by default
Ok, by being conservative, developers opt into lower levels of safety if they wish but by default get a slow but safe experience. We should consolidate in the other direction then and change the Pubsub default to finalized
Problem
The default commitment for pubsub and http requests are different which can cause consistency issues in downstream clients.
This problem manifests itself in the web3 sdk. When a commitment is not specified for a
Connection
, an account info request will default to finalized but confirming a transaction will default to confirmed because it uses pubsub to subscribe to confirmation. This causes consistency problems in apps that may immediately fetch account state after confirming a transaction. The out of the box configuration shouldn't be error prone like this.Proposed Solution
Default everything to confirmed?
Problem is that this is a breaking change and some clients may be surprised about the defaults changing. However, one could argue that any application requiring full finalization, should already be explicit about that in commitment parameters and not rely on defaults.
tag @mvines @CriesofCarrots
The text was updated successfully, but these errors were encountered: