-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Rename genesis block to genesis config #6816
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6816 +/- ##
========================================
- Coverage 79.9% 70.1% -9.8%
========================================
Files 219 219
Lines 42145 48014 +5869
========================================
+ Hits 33695 33697 +2
- Misses 8450 14317 +5867 |
The thing that you've renamed |
@@ -21,7 +21,7 @@ To interact with a Solana node inside a JavaScript application, use the [solana- | |||
* [getClusterNodes](jsonrpc-api.md#getclusternodes) | |||
* [getEpochInfo](jsonrpc-api.md#getepochinfo) | |||
* [getEpochSchedule](jsonrpc-api.md#getepochschedule) | |||
* [getGenesisBlockhash](jsonrpc-api.md#getgenesisblockhash) | |||
* [getGenesisConfigHash](jsonrpc-api.md#getgenesisconfighash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather we keep this as getGenesisBlockhash
, and strike the downstream changes due to this rename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvines if we keep this as getGenesisBlockhash
are we considering the genesis config's hash as a blockhash? Or is this being interpreted as the genesis block's hash? If it's the latter, I think we should return the hash of the first block here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
genesis config's hash is a blockhash as in bank0 that's the only recent_blockhash available to transactions to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to getGenesisHash as discussed in Discord
@garious it looks like a "blockhash" from a bank's perspective but it is computed as a hash of the genesis config, there are no entries in it. I don't think it fits the definition here: https://github.com/solana-labs/solana/blob/master/book/src/terminology.md#blockhash |
Fix the definition? |
I'm lost, sorry. I don't see a problem with the blockhash definition. Remind me why RPC needs to query for the genesis hash? |
Thinking more on it, calling the GenesisConfig hash a blockhash seems very wrong. |
We check it on validator boot up to make sure that a validator is starting up with the right genesis configuration |
won't fix - easier to update terminology |
Fixing the terminology comes with a fixed, known cost. The hardest part is coming to consensus, and that part is done. Not fixing terminology adds a cost to every engineer that encounters the inconsistency as well as every bug that arises around the confusion. |
3459d26
to
21b8bde
Compare
💔 Unable to automerge due to CI failure |
💔 Unable to automerge due to CI failure |
Pull request has been modified.
e6da4ff
to
a3db78d
Compare
💔 Unable to automerge due to CI failure |
a3db78d
to
3a0be4e
Compare
3a0be4e
to
29d2d7b
Compare
Part 1 of fix for #6795