Conversation
00def70 to
b1d9123
Compare
src/transactions/MergeTests.cpp
Outdated
There was a problem hiding this comment.
Won't it break catchup complete on current pubnet?
There was a problem hiding this comment.
no it won't: what I did here is change the test to be explicit about what is going on by adding an extra closeLedgerOn(*app, 2, 1, 1, 2016); after setting up the original accounts.
the check REQUIRE(a1SeqNum == a1.loadSequenceNumber()) was just misleading because the reason a1SeqNum was not changing was that the setup and the transaction being tested (with all its sub-operations) were occurring during the same ledger.
src/transactions/MergeTests.cpp
Outdated
There was a problem hiding this comment.
if we move that 2 lines down we could get rid of line 637
There was a problem hiding this comment.
but then it would be seqNumRightAfterMax and not maxSeqNum
There was a problem hiding this comment.
In that case maybe remove line 637 and use maxSeqNum + 1 in 638 and 639?
src/transactions/OperationFrame.cpp
Outdated
There was a problem hiding this comment.
it is bad that we cannot move MANAGE_DATA_NOT_SUPPORTED_YET here as well
There was a problem hiding this comment.
yeah MANAGE_DATA_NOT_SUPPORTED_YET should not have been implemented like this in the first place and now we have to keep that behavior to replay old versions of the protocol
|
What happened to this one? |
|
Q on "Why In the issue, I am also proposing moving @nullstyle any input especially on that last point? |
|
@MonsieurNicolas at first take, I think switching to |
269f145 to
6f5b771
Compare
src/test/TxTests.cpp
Outdated
There was a problem hiding this comment.
cant we just check before loop if modified.size() == 1?
There was a problem hiding this comment.
it's a fake iterator, it only implements begin and end
There was a problem hiding this comment.
bumping to 0 is OK (always no-op)?
There was a problem hiding this comment.
0 is a valid sequence number, so yes
There was a problem hiding this comment.
so this is second way to lock account, next to setting master weight to 0, nice!
There was a problem hiding this comment.
no it doesn't lock the account, it just cannot be used as source account for a transaction
src/transactions/MergeOpFrame.cpp
Outdated
There was a problem hiding this comment.
I think a comment here explaining why this condition exists would be nice
There was a problem hiding this comment.
I forgot that I wanted to get rid of this magic across the code base
6f5b771 to
cb0ce09
Compare
|
@vogel I updated that latest commit with your suggestions |
cb0ce09 to
36efb6d
Compare
|
(rebased to current master) |
7b6c7df to
6fcdcf6
Compare
now that we use "CreateTestApplication", the version used by default is "latest"
Regardless of protocol version to allow consumers (like Horizon) to move to it 100% in the future
allows to perform more checks directly there instead of having the caller perform those; also removed some exceptions that are not relevant
even though sequence numbers are stored as signed integers in SQL, in which case the values just wrap around and are stored as negative numbers
This makes it compliant with the proposal dated 02-Feb-2018 stellar/stellar-protocol#53
This makes it compliant with the proposal dated 02-Feb-2018 stellar/stellar-protocol#53
6fcdcf6 to
f9f9187
Compare
|
r+ f9f9187 |
BumpSequence Reviewed-by: vogel
Resolves #1445 #1532
This commit superseeds #1519 (that only contained the commits related to sequence number processing)
I didn't squash commits on purpose to preserve the timeline wrt various revs of the specification that led to the current implementation.
The first batch of commits updates the way we process sequence numbers
note: I only made a minor adjustment to the last commit compared to #1519
applyCheck(previously we were skipping a bunch of validations if the failures were too early)After that we introduce
BumpSequenceThe first couple drafts had additional failure modes/conditions on the operation.
The latest one makes
BumpSequenceextremely simple and instead:MergeAccountto fail if recreating the account in the same ledger (for example in a subsequent operation in the same transaction) would lead to an account with a smaller sequence number. For this to work, I had to adjust some tests that were overlooking this fact.