cardano-ledger-byron icon indicating copy to clipboard operation
cardano-ledger-byron copied to clipboard

Remove unused ProtocolParameters

Open ruhatch opened this issue 5 years ago • 1 comments

Background

The ProtocolParameters datatype contains parameters that can be updated through the update system. Some of these may never have been used and so can be removed to simplify that type.

Proposed Solution

We first need to audit mainnet to see which parameters have never been updated. Then we should remove those from the datatype and drop their binary representations in the CBOR decoders.

Next Actions

  • [ ] Audit mainnet for unused parameter
  • [ ] Remove unused parameters from ProtocolParameters and ProtocolParametersUpdate

ruhatch avatar May 13 '19 17:05 ruhatch

For what it's worth, I found this list in the old cardanodocs.com documentation after clicking various and sundry links.

At the very least, it might be helpful to copy some of this information into the ProtocolParameters type's Haddock.

Its fields are described below:

bvdScriptVersion – a script language version used to validate script transactions. If the proposal increases upBlockVersion, it must also increase bvdScriptVersion by 1 (and can’t leave it unchanged).
bvdSlotDuration – slot duration (in milliseconds).
bvdMaxBlockSize – block size limit (in bytes). A proposal can’t increase the block size limit more than twofold compared to the previous limit.
bvdMaxHeaderSize - block header size limit (in bytes).
bvdMaxTxSize – transaction size limit (in bytes, currently 4096), limits size of TxAux

The checks described above are made in verifyNextBVData.

In addition, there are some fields that are unused right now, but will be used in the future. Their meaning is briefly described below:

bvdMpcThd – eligibility threshold for MPC.
bvdHeavyDelThd – threshold for heavyweight delegation.
bvdUpdateVoteThd – portion of total stake necessary to vote for or against an update.
bvdUpdateProposalThd – portion of total stake such that block containing UpdateProposal must contain positive votes for this proposal from stakeholders owning at least this amount of stake.
bvdUpdateImplicit – number of slots after which an update is implicitly approved (unless it has more negative votes than positive).
bvdUpdateSoftforkThd – portion of total stake such that if total stake of issuers of blocks with some block version is bigger than this portion, this block version is adopted

nfrisby avatar Feb 29 '20 23:02 nfrisby