Eth2.0-specs: Max Deposit and Max Deposits

Created on 6 Jan 2019  路  9Comments  路  Source: ethereum/eth2.0-specs

I find it slightly confusing MAX_DEPOSIT and MAX_DEPOSITS are so close. Given they define two very different meanings, but only one s apart. The developer can easily misconfigure block's max operation from 16 to 32...

proofread

All 9 comments

What do people think about:
MIN_DEPOSIT -> MIN_DEPOSIT_IN_ETHER
MAX_DEPOSIT -> MAX_DEPOSIT_IN_ETHER
GWEI_PER_ETH -> GWEI_PER_ETHER

MIN_VALIDATOR_DEPOSIT? Clearly differentiates from the _number_ of max deposits in the other value.

My vote is MAX_DEPOSIT_AMOUNT and MIN_DEPOSIT_AMOUNT. We no longer use "deposit" to refer to a uint64.

That sounds good. Happy to open a PR forMAX_DEPOSIT_AMOUNT and MIN_DEPOSIT_AMOUNT if there's no objection

@JustinDrake
My point is indicating the denomination unit explicitly. Doesn't MAX_DEPOSIT_AMOUNT make it still/more confusing since we have DepositData.amount for the amount in gwei?

I like

  • MIN_DEPOSIT_IN_ETH
  • MAX_DEPOSIT_IN_ETH
  • GWEI_PER_ETH

I think "eth" is clear enough and very commonly used. Not opposed to "ether" if that's the consensus.
To echo @hwwhww, py-evm has had trouble in the past with denomination ambiguities, and ultimately resolved it by being very explicit in naming and typing. We've already had a number of small bugs around manipulating ether values in the spec up to this point. I think explicit in name will almost entirely eliminate these types of bugs.

418 sounds like a great idea to solve the denomination issue.

If #418 is applied, MAX_DEPOSIT_AMOUNT sounds correct then.

Sounds good. I'll open PR today. We can just use MAX_DEPOSIT_AMOUNT as 32 * 1e9

I believe this is addressed by #420 :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Swader picture Swader  路  28Comments

JustinDrake picture JustinDrake  路  12Comments

protolambda picture protolambda  路  18Comments

protolambda picture protolambda  路  32Comments

econoar picture econoar  路  41Comments