-
Notifications
You must be signed in to change notification settings - Fork 461
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
fix timestamp differences #7882
base: eth_simulate_v1
Are you sure you want to change the base?
Conversation
@@ -23,6 +23,8 @@ public class BlocksConfig : IBlocksConfig | |||
|
|||
public ulong SecondsPerSlot { get; set; } = 12; | |||
|
|||
public ulong SimulateSecondsPerSlot { get; set; } = 1; |
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.
Maybe it fits better in JsonRcpConfig
?
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.
Yes, we can do it if we want to make it configurable.
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.
Have you discussed it with Geth Devs? I think 12 seconds is better. What is the reasoning for 1nd?
Yes this is actually unifying eth_simulate space. Main reasoning is to have similar cross-chain behaviour. User can provide overrides for it if he wants. |
Yes, I had a call with the eth_simulate devs teams; geth has 1 second increment, you can check from here: https://github.com/s1na/go-ethereum/blob/f25fcd34e11061568c187c44dd02fb6e9c8546de/internal/ethapi/simulate.go#L48 |
yes, so that's why our SecondsPerSlot can be used, providing overrides sounds worse |
but why? I think the better approach would be to do SecondsPerSlot and this value is configurable |
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 don't think we need a seperate config value for this, either hardcode 1 and people will override it through RPC -> like geth
or just do what we are doing now and discuss with the geth team
right now it is hardcoded to 1 , I'll make it configurable as well via moving the variable to the jsonRpcConfig |
for geth, it is completely hardcoded and not configurable either |
https://github.com/s1na/go-ethereum/pull/new/simulate/timestamp-default |
Fixes Closes Resolves #
Please choose one of the keywords above to refer to the issue this PR solves followed by the issue number (e.g. Fixes #000). If no issue number, remove the line. Also, remove everything marked optional that is not applicable. Remove this note after reading.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Optional. Remove if not applicable.
Documentation
Requires documentation update
If yes, link the PR to the docs update or the issue with the details labeled
docs
. Remove if not applicable.Requires explanation in Release Notes
If yes, fill in the details here. Remove if not applicable.
Remarks
Optional. Remove if not applicable.