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

Mining multiple shards support #187

Merged
merged 52 commits into from
Sep 9, 2024
Merged

Mining multiple shards support #187

merged 52 commits into from
Sep 9, 2024

Conversation

syntrust
Copy link
Collaborator

@syntrust syntrust commented Jan 12, 2024

changes including:

  • Allowing miners to create storage files for shards that do not exist in the contract.
  • The flag --shard_index can be used repeatedly to create multiple shards using init.sh.
env ES_NODE_STORAGE_MINER=0x123...ab ./init.sh --shard_index 1 --shard_index 2

Note that

  1. The shard files will be created in ./es-data ($data_dir) under the name of shard-$(shard_index).dat.
  2. The shard will be skipped if the file already exists.
  3. The shard 0 will be tried to create if no --shard_index is used.
  • The run.sh file will start with data files in ./es-data/shard-*.dat, as well as files specified by --storage.files.
  • TestMining in integration_tests/node_mine_test.go has been updated to
    • support L2 contract and
    • call putBlobs to upload blobs
    • be able to reuse a smart contract deployed (previously only newly deployed contract can be used).

Integration test:

env ES_NODE_SIGNER_PRIVATE_KEY=<pk> ./integration_tests/run_tests.sh

Tests:

Docs update: ethstorage/ethstorage-doc#33

@syntrust syntrust changed the base branch from main to rapidsnark January 12, 2024 08:56
@syntrust syntrust changed the title Mining test for 2 shards (Draft) Mining test for 2 shards Jan 12, 2024
@syntrust syntrust changed the base branch from rapidsnark to rapidsnark-test May 6, 2024 03:43
@syntrust syntrust force-pushed the rapidsnark-test branch from 722b0d8 to bea15c4 Compare May 9, 2024 08:01
@syntrust syntrust changed the title (Draft) Mining test for 2 shards (Draft) Mining multiple shards support May 11, 2024
@syntrust syntrust changed the title (Draft) Mining multiple shards support Mining multiple shards support May 14, 2024
@syntrust syntrust marked this pull request as draft May 14, 2024 11:36
@syntrust syntrust changed the base branch from run-opt1 to main August 14, 2024 08:17
init.sh Outdated Show resolved Hide resolved
integration_tests/run_tests.sh Outdated Show resolved Hide resolved
cmd/es-node/main.go Show resolved Hide resolved
cmd/es-utils/utils/utils.go Show resolved Hide resolved
@syntrust syntrust requested a review from ping-ke September 3, 2024 02:43
@syntrust syntrust merged commit 1e469eb into main Sep 9, 2024
2 checks passed
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