Skip to content
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

chore(core/types): remove Blocks's Timestamp() method #1429

Open
wants to merge 5 commits into
base: libevm
Choose a base branch
from

Conversation

qdm12
Copy link
Collaborator

@qdm12 qdm12 commented Jan 22, 2025

Why this should be merged

In core/types, the Block method Timestamp does the same as the method Time and is not present upstream, this causes small difficulties migrating to libevm core/types.Block which doesn't have a Timestamp method.

How this works

  • core/types.Block method Timestamp() removed
  • Use core.NewBlockContext to convert types.Block and types.Header for calls to core.ApplyUpgrades

How this was tested

Existing CI passing

Need to be documented?

No

Need to update RELEASES.md?

No

@qdm12 qdm12 force-pushed the qdm12/block-remove-timestamp branch 3 times, most recently from 1bc820a to 2cf8ef3 Compare January 23, 2025 08:38
@qdm12 qdm12 marked this pull request as ready for review January 23, 2025 08:38
@qdm12 qdm12 requested review from ceyonur, darioush and a team as code owners January 23, 2025 08:38
precompile/contracts/deployerallowlist/module.go Outdated Show resolved Hide resolved
precompile/allowlist/config.go Outdated Show resolved Hide resolved
@qdm12 qdm12 force-pushed the qdm12/block-remove-timestamp branch 2 times, most recently from 29c0766 to d590a04 Compare January 24, 2025 09:41
@qdm12 qdm12 requested a review from darioush January 24, 2025 09:42
Copy link
Collaborator

@ceyonur ceyonur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes in the subnet-evm context are lgtm, but we should consider that this will break all precompiles (including precompiles in precompile-evm + subnet-evm forks)

@qdm12 qdm12 force-pushed the qdm12/block-remove-timestamp branch from d590a04 to 40167aa Compare February 6, 2025 08:46
@qdm12 qdm12 changed the base branch from master to libevm February 6, 2025 08:47
@qdm12 qdm12 force-pushed the qdm12/block-remove-timestamp branch from 40167aa to a0857ed Compare February 6, 2025 08:50
- `Time()` does the same as `Timestamp()`
- `Time()` is present upstream, not `Timestamp()`
@qdm12 qdm12 force-pushed the qdm12/block-remove-timestamp branch from a0857ed to 40e07af Compare February 6, 2025 08:56
ceyonur
ceyonur previously approved these changes Feb 6, 2025
@qdm12 qdm12 force-pushed the qdm12/block-remove-timestamp branch from 2b90a54 to 7a882f9 Compare February 6, 2025 14:09
precompile/contract/interfaces.go Outdated Show resolved Hide resolved
core/state_processor.go Outdated Show resolved Hide resolved
ceyonur
ceyonur previously approved these changes Feb 6, 2025
core/chain_makers.go Outdated Show resolved Hide resolved
@qdm12 qdm12 enabled auto-merge (squash) February 7, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants