-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update defaultRuntimeConfig for v1.1.1 #2958
Conversation
eaf7221
to
860727f
Compare
There's a TODO here to not hardcode the |
Sure, I'm currently facing weird compile errors, only on
|
any imports you changed, just try moving them around, for example after json_serialization |
f6427f7
to
06a3d09
Compare
CI issues were just intermittent. It resumed to run :-) |
4bae21c
to
c4f8e0f
Compare
c4f8e0f
to
0407708
Compare
The compilation problems were indeed due to some Bundled the fix with #2960, once that one is merged, this here can be rebased and should build successfully. |
The YAML import I'd like to look into separately, having the |
0407708
to
cb3c666
Compare
TERMINAL_TOTAL_DIFFICULTY: | ||
u256"115792089237316195423570985008687907853269984665640564039457584007913129638912", | ||
# By default, don't use this param | ||
TERMINAL_BLOCK_HASH: BlockHash.fromHex( |
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.
Let's keep the usage of the BlockHash
type to the absolute minimum. The type exists only because of an inappropriate design of our package dependencies resulting in multiple competing definitions for the Ethereum types. We would like to migrate to a world where every type is defined once and used consistently everywhere. BlockHash
won't exist in that world.
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.
What would be the appropriate type here? Eth2Digest
?
The inspiration for this was your commit 81dc6c8
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.
where every type is defined once and used consistently everywhere
hm, there are some problems with that approach - mainly that you end up with massive depedency trees but also that when you change a type slightly because one consumer of the type needs something (for example a formatting of json or whatever), all dependent code has to change as well - putting up some barriers between types isn't a bad idea, often
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 would respectufully disagree that putting the said barrier is a good idea in our particular situation.
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.
The inspiration for this was your commit 81dc6c8
My changes are in the eth1_monitor
module that needs to talk to an execution engine over JSON-RPC. Right now, types like BlockHash
are the native types of nim-web3 (our json-rpc based library for consuming the Eth1 APIs). There are no good reasons for code outside the eth1_monitor
module to work with these types.
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.
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.
well, the dep tree is a practical problem - right now, to compile some simple spec tests, we also pull in libp2p which pulls in chronos and a bunch of crypto libraries that have nothing to do with the spec, merely because somewhere there's some silly type reused.
the reverse dep problem is actually more of a concern - central points of types also become central points of failure meaning a small seemingly benign change chan break many downstreams.
Anyway, this wasn't about this change in particular, rather a problem that we've been running into more frequently as the dep trees get more complex because not all projects move at the same upgrade pace.
(trying whether this compiles fine without ssz change. SSZ should not be required because this field is not exchanged via RPC only via REST). |
This synchronizes defaultRuntimeConfig with v1.1.1 of the spec. - Introduces `TERMINAL_TOTAL_DIFFICULTY` and `TERMINAL_BLOCK_HASH`. - Sets `ALTAIR_FORK_EPOCH` in `mainnet` preset.
025e25e
to
3f3227e
Compare
Compiles fine. The CI issues were just intermittent connection issues. |
This synchronizes defaultRuntimeConfig with v1.1.1 of the spec. - Introduces `TERMINAL_TOTAL_DIFFICULTY` and `TERMINAL_BLOCK_HASH`. - Sets `ALTAIR_FORK_EPOCH` in `mainnet` preset.
This synchronizes defaultRuntimeConfig with v1.1.1 of the spec.
TERMINAL_TOTAL_DIFFICULTY
andTERMINAL_BLOCK_HASH
.ALTAIR_FORK_EPOCH
inmainnet
preset.