Repository navigation
avoid overflow while computing Price for database - #733
Merged
Merged
Conversation
This avoids potential exception with large prices (overflow)
MonsieurNicolas
force-pushed
the
offerPrice
branch
from
September 7, 2015 19:27
bb07f50 to
e5dbcfb
Compare
latobarita
added a commit
that referenced
this pull request
Sep 7, 2015
avoid overflow while computing Price for database Reviewed-by: jedmccaleb
graydon
pushed a commit
to graydon/stellar-core
that referenced
this pull request
Oct 3, 2026
Resolves stellar#731 This change lowers the message size cap to 5MB, and the tx set size cap to 4MB. It goes into effect after the p29 vote to avoid a scenario where a quroum of non-updated validators externalizes a large tx set that upgraded validators cannot download.
SirTyson
added a commit
to SirTyson/stellar-core
that referenced
this pull request
Nov 9, 2026
Brings overlay-v2-shared up to date with master. The previous master merge (b90d48e, stellar#5428) was recorded with master's tip 100cc38 missing from its parents, so this merge used 100cc38 as its base (temporary graft of b90d48e, removed afterwards). Notable master changes brought in: - Protocol 30: CURRENT_LEDGER_PROTOCOL_VERSION follows MAX_SUPPORTED_PROTOCOL_VERSION; CAP-0084 and CAP-0087 ungated, p29 and p30 Soroban hosts (stellar#5472, stellar#5478, stellar#5484, stellar#5483). - Millisecond-resolution close times at protocol 30 (stellar#5423): ConsensusTime/ApplyTime types, STELLAR_VALUE_SIGNED_MS and STELLAR_VALUE_EMPTY_TX_SET_MS. - Tx set validity hardening (stellar#5481), lower max message size in protocol 29 (stellar#733), sub-second ledger edge-case fixes. - Simplified ledger view hierarchy (stellar#5461); the overlay-only-mode sequence number skip now lives in TransactionFrame::checkValid. - Banned accounts deprecated (CAP-0077 is active). - Apply-path performance work (stellar#5402, stellar#5411, stellar#5414, stellar#5415, stellar#5418, stellar#5421, stellar#5436, stellar#5286), apply-load tx set construction mode (stellar#5448), --check-lcm (stellar#5435), v29.0.0 release merge. Conflict resolution: - Files overlay-v2-shared deleted and master modified (the C++ overlay, TransactionQueue, TransactionQueueTests, UpgradesTests, private/Horizon/RPC workflows): kept deleted. Master's changes to them are C++ overlay peer/flow-control logic, tx queue admission and tests for those. - Herder: kept the Rust-overlay submission path (recvTransaction returns TxSubmitStatus) and dropped the deprecated `force` parameter as master did. triggerNextLedger keeps the prepared/built tx set path from the Rust mempool, now with ConsensusTime close times and master's apply-time close-time offset. The early tx set preparation path (prepareTxSet, buildTxSet, setupTriggerNextLedger) takes ConsensusTime. Kept master's mNominatedTxSetOverride test hook (applied before the tx set is cached in the Rust overlay) and the herder.txset.build timer (now timing buildTxSet). Dropped the banned-accounts setup and tx queue maintenance. - AppConnector: dropped both ov2's maybeUpdateImmutableLedgerView and master's C++-overlay getOverlayThreadSnapshot. - LoadGenerator: master's CachedTestAccountPtr with ov2's TxSubmitStatus. - Tests: kept ov2's removal of tests that need the C++ overlay, standalone mode or the tx queue (standalone, manualclose, flooding, tx queue limits, far-future slot cleanup, herderExternalizesValuesWithProtocol, MAX_SAC_TPS, custom token, soroswap and noisy binary search apply-load tests). Added master's ms close time HerderTests and the non-canonical empty tx set test on ov2's Rust-overlay topologies. The tx set size test checks against overlay-v2's own tx set allowance. The sub-second getUpperBoundCloseTimeOffset test checks the offset directly, since there is no C++ tx queue admission. Tests that used CheckValidLedgerViewWrapper now use getLCLView(). - Cargo.lock: master's lockfile plus the overlay crate's packages, regenerated by cargo; semver-compatible duplicates take the newer version. - Build: Makefile.am keeps the Rust overlay rules and adds tracy import-chrome; ci-build.sh keeps ASAN off and takes master's -g1. - Needed to compile: PendingEnvelopes.cpp includes LedgerManager.h (master got it through the C++ OverlayManager.h); ov2's early-nomination and checkpoint-slot tests use ConsensusTime/ApplyTimeOffset; OverlayIPC tests take ledger views from the LedgerManager.
SirTyson
added a commit
to SirTyson/stellar-core
that referenced
this pull request
Nov 9, 2026
The Rust overlay pinned stellar-xdr 26.0.0, which predates protocol 30's XDR. It strict-decodes every StellarMessage it receives, so at protocol 30 it would have: - failed to decode millisecond close-time StellarValues (STELLAR_VALUE_SIGNED_MS), so tx set hashes were no longer extracted from SCP envelopes: no proactive tx set fetch and no tx set source tracking. Core still fetched on demand, but later. - dropped transactions and tx sets containing protocol 30 XDR arms (CAP-0084 muxed contract addresses). stellar-xdr 30.0.0 is generated from exactly the protocol XDR this branch builds against (4f524bbac), and Cargo.lock already carries it for the p30 Soroban host. The crate no longer has a `curr` module, so paths change from stellar_xdr::curr:: to stellar_xdr::. collect_stellar_value_hash now skips empty-tx-set values (both close-time formats). Their tx set hash is Core's synthetic empty set hash, which Core builds locally, so fetching it from the network can never succeed. Tests cover every StellarValue format, an ms value in a ballot, and truncated ms values. Message size limits stay overlay v2's own: a 16 MiB message cap in the Rust overlay and the IPC channel, and a 10 MiB tx set allowance (overlay/NetworkConstants.h). Master's protocol 29 cut to a 5 MiB message cap and a 4 MiB tx set allowance (stellar#733) lives in the C++ overlay's Peer.h/FlowControlCapacity.h. It protects that overlay from externalizing a set upgraded peers can't download, which doesn't apply here, and it would cap perf runs (3k SAC TPS at 2s ledgers needs about 6 MB of Soroban bytes per ledger). The merge adapts master's tx set size test to these constants.
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also added some documentation for the db schema
Move to using "double" for the "Price" column (used in offer exchange to sort offers) Resolves #732