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
We want a function which takes two LedgerCloseMeta xdr objects and returns a LedgerCloseMeta object which includes all the transactions and meta from the two source LedgerCloseMeta xdr objects. The purpose of this function is to create ledgers with arbitrarily an large number of transactions. Instead of generating fake transactions and meta we can combine existing ledgers to create large ledgers.
The text was updated successfully, but these errors were encountered:
I prototyped the merge function here . However, I ran into a problem related to the specific order in which ledger entry changes are applied.
Changes within a ledger should be applied in the following order:
fee changes of all transactions
transaction meta changes of all transactions
upgrade changes
So if we have two ledgers the order of application for those two ledgers will be:
fee changes of all transactions from ledger 1
transaction meta changes of all transactions from ledger 1
upgrade changes from ledger 1
fee changes of all transactions from ledger 2
transaction meta changes of all transactions from ledger 2
upgrade changes from ledger 2
However, if we try to merge ledgers 1 and 2 into a single ledger we can no longer maintain the ordering above and instead we will obtain the following order:
fee changes of all transactions from ledger 1
fee changes of all transactions from ledger 2
transaction meta changes of all transactions from ledger 1
transaction meta changes of all transactions from ledger 2
upgrade changes from ledger 1
upgrade changes from ledger 2
Given the importance of having the correct application order, I think we cannot proceed with combining several ledger objects into one. Instead, I think we'll need to refactor ingestion to support ingesting multiple ledgers within a single DB transaction as an approximation of having one large ledger which is the union of a bunch of smaller ledgers.
We want a function which takes two LedgerCloseMeta xdr objects and returns a LedgerCloseMeta object which includes all the transactions and meta from the two source LedgerCloseMeta xdr objects. The purpose of this function is to create ledgers with arbitrarily an large number of transactions. Instead of generating fake transactions and meta we can combine existing ledgers to create large ledgers.
The text was updated successfully, but these errors were encountered: