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

refactor!: fix epoch database structure #1034

Merged

Conversation

stringhandler
Copy link
Contributor

@stringhandler stringhandler commented May 10, 2024

Description

Changes the epoch, validator and committee structure in the global database.

Motivation and Context

Previously, validator nodes did not deregister and this resulted in a bug that caused the committees for epochs to not be correct.

How Has This Been Tested?

Existing tests, and manual testing

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

BREAKING CHANGE: Data directory must be cleaned

# Conflicts:
#	dan_layer/epoch_manager/src/base_layer/base_layer_epoch_manager.rs
#	dan_layer/epoch_manager/src/base_layer/epoch_manager_service.rs
#	dan_layer/storage/src/global/backend_adapter.rs
#	dan_layer/storage/src/global/validator_node_db.rs
#	dan_layer/storage_sqlite/migrations/2024-04-01-121212_add_sidechain_id/up.sql
#	dan_layer/storage_sqlite/src/global/backend_adapter.rs
#	dan_layer/storage_sqlite/tests/global_db.rs
Copy link

github-actions bot commented May 15, 2024

Test Results (CI)

532 tests   - 1   532 ✅  - 1   1h 43m 46s ⏱️ - 39m 47s
 63 suites ±0     0 💤 ±0 
  2 files   ±0     0 ❌ ±0 

Results for commit 96a13cf. ± Comparison against base commit 533d82e.

This pull request removes 15 and adds 14 tests. Note that renamed tests count towards both.
Scenario: Claim and transfer confidential assets via wallet daemon: tests/features/wallet_daemon.feature:89:3
Scenario: Concurrent calls to the Counter template: tests/features/concurrency.feature:7:3
Scenario: Confidential transfer to unexisting account: tests/features/transfer.feature:163:3
Scenario: Counter template registration and invocation: tests/features/counter.feature:7:3
Scenario: Create account and transfer faucets via wallet daemon: tests/features/wallet_daemon.feature:7:3
Scenario: Create and mint account NFT: tests/features/wallet_daemon.feature:133:3
Scenario: Create resource and mint in one transaction: tests/features/nft.feature:73:3
Scenario: EpochEnd and EpochStart commands are used on epoch change: tests/features/epoch_change.feature:7:3
Scenario: Mint fungible tokens: tests/features/fungible.feature:7:3
Scenario: Mint, mutate and burn non fungible tokens: tests/features/nft.feature:7:3
…
Scenario: Claim and transfer confidential assets via wallet daemon: tests/features/wallet_daemon.feature:90:3
Scenario: Concurrent calls to the Counter template: tests/features/concurrency.feature:8:3
Scenario: Confidential transfer to unexisting account: tests/features/transfer.feature:164:3
Scenario: Counter template registration and invocation: tests/features/counter.feature:8:3
Scenario: Create account and transfer faucets via wallet daemon: tests/features/wallet_daemon.feature:8:3
Scenario: Create and mint account NFT: tests/features/wallet_daemon.feature:134:3
Scenario: Create resource and mint in one transaction: tests/features/nft.feature:74:3
Scenario: EpochEnd and EpochStart commands are used on epoch change: tests/features/epoch_change.feature:8:3
Scenario: Mint fungible tokens: tests/features/fungible.feature:8:3
Scenario: Mint, mutate and burn non fungible tokens: tests/features/nft.feature:8:3
…

♻️ This comment has been updated with latest results.

@stringhandler stringhandler changed the title wip: fix epochs refactor: fix epoch database structure May 15, 2024
@stringhandler stringhandler changed the title refactor: fix epoch database structure refactor!: fix epoch database structure May 15, 2024
@stringhandler stringhandler marked this pull request as ready for review May 15, 2024 11:06
mrnaveira
mrnaveira previously approved these changes May 15, 2024
@stringhandler stringhandler added this pull request to the merge queue May 15, 2024
Merged via the queue into tari-project:development with commit c2aee34 May 15, 2024
11 checks passed
@stringhandler stringhandler deleted the st-fix-epoch-registration branch May 15, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants