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
it looks like getHeader isn't used correctly in the codebase. getHeader is a const getter, and is meant to be used when creating a LedgerTxn child. The problem is that when it comes to modifying the header at apply time, getHeader doesn't check any invariance, like whether there's an active writer already that may modify the header, a child exists (which invalidates the header), or if ledger header is already sealed (which suggests buggy usage). This creates an opportunity to load and use an invalid header. We should switch to using loadHeader instead, which enforces the invariants mentioned.
it looks like
getHeader
isn't used correctly in the codebase. getHeader is a const getter, and is meant to be used when creating a LedgerTxn child. The problem is that when it comes to modifying the header at apply time,getHeader
doesn't check any invariance, like whether there's an active writer already that may modify the header, a child exists (which invalidates the header), or if ledger header is already sealed (which suggests buggy usage). This creates an opportunity to load and use an invalid header. We should switch to usingloadHeader
instead, which enforces the invariants mentioned.stellar-core/src/herder/Upgrades.cpp
Line 1317 in e92596f
stellar-core/src/transactions/InvokeHostFunctionOpFrame.cpp
Line 361 in e92596f
stellar-core/src/bucket/BucketManagerImpl.cpp
Line 983 in e92596f
The text was updated successfully, but these errors were encountered: