XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Proposal: Amendment to clean up the "LedgerHashes" object #3218

Open mDuo13 opened 4 years ago

mDuo13 commented 4 years ago

The "recent" LedgerHashes object singleton object has a legacy field, FirstLedgerSequence, which perpetually carries the useless value 2 forward in all ledgers.

I propose a simple amendment that, when enabled, modifies the recent LedgerHashes object to remove this field. (The fact that it did so should be recorded the metadata of the "EnableAmendment" transaction.) It would have no ongoing effects and would have no effects on parallel chains where the recent LedgerHashes object doesn't have this legacy field.

There's a good case to be made that the cost of implementing this change is higher than the cost of just leaving it be. After all, every amendment is essentially a hard fork from the previous protocol of the XRP Ledger. I just hate that we have a silly legacy field lingering around in the production ledger chain. I also think that this could be a good exercise and minimal use case for a category of amendments that perform "one-time-cleanup" because I have a feeling that, going forward, it's likely that the ledger may have a need for slightly more dramatic "cleanups" to the shared ledger state.

nbougalis commented 4 years ago

I like this; at the same time we could make some other tweaks to the ledger hashes object as well.

sublimator commented 4 years ago

and add FirstLedgerSequence to txns for symmetry and a Pony hash256 field

intelliot commented 1 year ago

I also think that this could be a good exercise and minimal use case for a category of amendments that perform "one-time-cleanup" because I have a feeling that, going forward, it's likely that the ledger may have a need for slightly more dramatic "cleanups" to the shared ledger state.

I guess https://github.com/XRPLF/rippled/pull/4105 falls into this category?

@mDuo13 do you still think this issue is worth doing?