Skip to content

Conversation

@yoshidan
Copy link
Contributor

@yoshidan yoshidan commented Mar 8, 2025

Naohiro Yoshida added 5 commits March 5, 2025 19:44
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
@yoshidan yoshidan marked this pull request as ready for review March 17, 2025 10:58
Naohiro Yoshida added 2 commits March 18, 2025 14:22
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
@yoshidan yoshidan changed the title Support msec timestamp in BEP520 Support msec timestamp and 500 epoch length in BEP520 Mar 18, 2025
Naohiro Yoshida added 21 commits March 18, 2025 22:03
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Naohiro Yoshida added 11 commits March 23, 2025 16:47
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
@yoshidan yoshidan requested a review from 3100 March 28, 2025 02:06
@3100 3100 requested a review from Copilot April 1, 2025 02:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements BEP520 support by updating the timestamp format to use millisecond precision and changing the epoch length from 200 to 500.

  • Updated logging and state extraction to convert timestamps using a new MilliTimestamp helper.
  • Adjusted test expectations and constants to accommodate the new 500-block epoch length and modified turnLength parameters.
  • Made related updates in CI configurations and docker-compose files to reflect the new epoch length and branch requirements.

Reviewed Changes

Copilot reviewed 14 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tool/testdata/internal/create_client.go Converts epoch hash outputs from module.MakeEpochHash to a common.Hash
tests/prover_network_test.go Updates expected timestamp value using MilliTimestamp
module/vote_test.go Adjusts expected vote attestation values to new block and signature logic
module/validator_set_test.go Changes expected turnLength value from 1 to 6
module/setup_test.go Revises header query tests and expected block numbers based on new epoch
module/prover.go Switches timestamp conversion to MilliTimestamp
module/lib_test.go Updates RLP strings for various header functions
module/header_query_test.go Adjust test configurations for header queries based on updated epochs
module/header.go Introduces MilliTimestamp to compute msec timestamps using MixDigest
module/constant/production.go Updates BlocksPerEpoch constant from 200 to 500
module/constant/development.go Removes development override for BlocksPerEpoch
e2e/chains/bsc/docker-compose.simple.yml Removes BLOCKS_PER_EPOCH override from environment variables
e2e/chains/bsc/docker-compose.bsc.yml Changes branch checkout from v1.5.5 to develop
.github/workflows/ci.yml Increases wait time in CI to accommodate the new epoch length
Files not reviewed (4)
  • e2e/Makefile: Language not supported
  • e2e/chains/bsc/genesis/genesis-template.template: Language not supported
  • e2e/chains/bsc/scripts/bootstrap.sh: Language not supported
  • go.mod: Language not supported
Comments suppressed due to low confidence (3)

module/header.go:76

  • [nitpick] Consider adding documentation or inline comments to clarify the assumption that the lower 64 bits of MixDigest represent the millisecond remainder. This will help maintainers understand the logic for converting the header's timestamp into millisecond precision.
func MilliTimestamp(h *types.Header) uint64 {

.github/workflows/ci.yml:60

  • [nitpick] The increased sleep duration (1500 seconds) for waiting for 1000 blocks may significantly extend the CI build time. Verify that this delay is necessary or consider alternative strategies to avoid potential timeouts in the pipeline.
sleep 1500

module/setup_test.go:167

  • The accompanying comment states 'checkpoint = 18' while the expected block number is 1517. Please verify that the expected header number is correct given the new turnLength and epoch configuration.
ts.Require().Equal(int64(1517), target.Number.Int64())

Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
Naohiro Yoshida and others added 2 commits April 7, 2025 13:08
Signed-off-by: Naohiro Yoshida <naohiro.yoshida@datachain.jp>
@yoshidan yoshidan merged commit 6d11cee into feature/fork_state Apr 7, 2025
1 of 2 checks passed
@yoshidan yoshidan deleted the feature/rolentz_msec branch April 7, 2025 04:41
@yoshidan yoshidan mentioned this pull request Apr 7, 2025
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