Add a simulation test run
This commit is contained in:
parent
652c69cbee
commit
ee210f1c3b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
venv
|
||||
__pycache__
|
||||
generated
|
||||
.ipynb_checkpoints
|
||||
|
||||
@ -30,7 +30,7 @@ This guide explains how to use the interactive notebook to experiment with diffe
|
||||
|
||||
3. **Use the Interactive Interface**
|
||||
|
||||
The notebook will open automatically in your browser. Execute it by clicking "Run All" from `Run` tab in order to start experimenting with different participation scenarios.
|
||||
The notebook will open automatically in your browser. Execute it by clicking "Run All Cells" from `Run` tab in order to start experimenting with different participation scenarios.
|
||||
|
||||
## Using the Interactive Interface
|
||||
|
||||
|
||||
3
test-runs/README.md
Normal file
3
test-runs/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Simulation Test Runs
|
||||
|
||||
<!-- TODO -->
|
||||
2402
test-runs/run1/generated/generated-accounts.json
Normal file
2402
test-runs/run1/generated/generated-accounts.json
Normal file
File diff suppressed because it is too large
Load Diff
38802
test-runs/run1/generated/generated-participants.json
Normal file
38802
test-runs/run1/generated/generated-participants.json
Normal file
File diff suppressed because it is too large
Load Diff
13
test-runs/run1/generated/point-allocation-stats.json
Normal file
13
test-runs/run1/generated/point-allocation-stats.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"totalParticipants": 400,
|
||||
"validators": 200,
|
||||
"delegators": 200,
|
||||
"galaxiesAllocated": 200,
|
||||
"starsAllocated": 30000,
|
||||
"config": {
|
||||
"totalParticipants": 400,
|
||||
"galaxyCount": 200,
|
||||
"starCount": 30000,
|
||||
"outputDir": "/app/generated"
|
||||
}
|
||||
}
|
||||
392617
test-runs/run1/generated/watcher-events.json
Normal file
392617
test-runs/run1/generated/watcher-events.json
Normal file
File diff suppressed because it is too large
Load Diff
134
test-runs/run1/output.log
Normal file
134
test-runs/run1/output.log
Normal file
@ -0,0 +1,134 @@
|
||||
================================================================================
|
||||
LOCKDROP ALLOCATION COMPARISON TESTS
|
||||
================================================================================
|
||||
test_0_star_allocations (test_allocations.AllocationTest.test_0_star_allocations)
|
||||
Test star allocations for all lock periods ...
|
||||
Star Allocations Comparison:
|
||||
+---------------+---------+-----------------------------------------------+--------------------+--------------------+--------------+
|
||||
| Lock Period | Point | Zenith Address | Notebook ($sZ) | zenithd ($sZ) | Difference |
|
||||
+===============+=========+===============================================+====================+====================+==============+
|
||||
| 1 years | ~milzod | zenith1udqej93xhavjrpaxeazkgtz4m2x4tr7l07ptcj | 855,210,960,000 | 855,210,960,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+--------------------+--------------------+--------------+
|
||||
| 2 years | ~disbec | zenith1udqej93xhavjrpaxeazkgtz4m2x4tr7l07ptcj | 1,710,421,920,000 | 1,710,421,920,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+--------------------+--------------------+--------------+
|
||||
| 3 years | ~famtul | zenith1udqej93xhavjrpaxeazkgtz4m2x4tr7l07ptcj | 2,565,632,880,000 | 2,565,632,880,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+--------------------+--------------------+--------------+
|
||||
| 4 years | ~lorsut | zenith1udqej93xhavjrpaxeazkgtz4m2x4tr7l07ptcj | 3,420,843,840,000 | 3,420,843,840,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+--------------------+--------------------+--------------+
|
||||
| 5 years | ~tortyp | zenith1udqej93xhavjrpaxeazkgtz4m2x4tr7l07ptcj | 12,780,607,328,988 | 12,780,607,328,988 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+--------------------+--------------------+--------------+
|
||||
ok
|
||||
test_1_galaxy_allocations (test_allocations.AllocationTest.test_1_galaxy_allocations)
|
||||
Test galaxy allocations for all lock periods ...
|
||||
Galaxy Allocations Comparison:
|
||||
+---------------+---------+-----------------------------------------------+-------------------+-------------------+--------------+
|
||||
| Lock Period | Point | Zenith Address | Notebook ($sZ) | zenithd ($sZ) | Difference |
|
||||
+===============+=========+===============================================+===================+===================+==============+
|
||||
| 1 years | ~tec | zenith1p22wyjr0epplr8cktnc73dpeynph8n3vknvhnl | 501,765,840,000 | 501,765,840,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+-------------------+-------------------+--------------+
|
||||
| 2 years | ~tem | zenith1ghpvwrwjwr9fgazunpsy300l672ev25z330we7 | 1,003,531,680,000 | 1,003,531,680,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+-------------------+-------------------+--------------+
|
||||
| 3 years | ~sed | zenith1teqcdpzqslgtrwul2ac2h6x4vp7ld8adzm2gzf | 1,505,297,520,000 | 1,505,297,520,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+-------------------+-------------------+--------------+
|
||||
| 4 years | ~nec | zenith1qtf9hffx738fl4ddkk8tar9989qr7u0g59d5h0 | 2,007,063,360,000 | 2,007,063,360,000 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+-------------------+-------------------+--------------+
|
||||
| 5 years | ~byl | zenith1udqej93xhavjrpaxeazkgtz4m2x4tr7l07ptcj | 8,205,775,018,378 | 8,205,775,018,378 | 0 |
|
||||
+---------------+---------+-----------------------------------------------+-------------------+-------------------+--------------+
|
||||
ok
|
||||
test_2_total_allocations (test_allocations.AllocationTest.test_2_total_allocations)
|
||||
Test total allocations for all participants ...
|
||||
Total Allocations Comparison:
|
||||
+------------+--------------------------+
|
||||
| Source | Total Allocation ($sZ) |
|
||||
+============+==========================+
|
||||
| Notebook | 128,849,018,879,999,890 |
|
||||
+------------+--------------------------+
|
||||
| zenithd | 128,849,018,879,999,890 |
|
||||
+------------+--------------------------+
|
||||
| Difference | 0 |
|
||||
+------------+--------------------------+
|
||||
ok
|
||||
test_unlock_schedule_calculation (test_unlock_schedule.UnlockScheduleTest.test_unlock_schedule_calculation)
|
||||
Test unlock schedule calculations for all lock periods ...
|
||||
Unlock Blocks Comparison:
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| Point | Lock Period | Start Time | Expected Blocks | zenithd Blocks | Difference |
|
||||
+=========+===============+=====================+===================+==================+==============+
|
||||
| ~milzod | 1 years | 2025-07-07T14:43:58 | 14,172,264 | 14,172,264 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~tec | 1 years | 2025-05-03T23:34:40 | 11,380,185 | 11,380,185 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~disbec | 2 years | 2025-07-07T14:43:58 | 29,951,064 | 29,951,064 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~tem | 2 years | 2025-05-24T04:03:39 | 28,031,054 | 28,031,054 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~famtul | 3 years | 2025-07-07T14:43:58 | 45,729,864 | 45,729,864 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~sed | 3 years | 2025-07-07T10:55:28 | 45,723,009 | 45,723,009 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~lorsut | 4 years | 2025-07-07T14:43:58 | 61,508,664 | 61,508,664 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~nec | 4 years | 2025-05-08T09:19:35 | 58,906,932 | 58,906,932 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~tortyp | 5 years | 2025-07-07T14:43:58 | 77,287,464 | 77,287,464 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
| ~byl | 5 years | 2025-07-07T14:43:58 | 77,287,464 | 77,287,464 | 0 |
|
||||
+---------+---------------+---------------------+-------------------+------------------+--------------+
|
||||
|
||||
Initial Unlock Amounts Comparison:
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| Point | Lock Period | Start Time | Expected ($sZ) | zenithd ($sZ) | Difference |
|
||||
+=========+===============+=====================+==================+=================+==============+
|
||||
| ~milzod | 1 years | 2025-07-07T14:43:58 | 87,074,251,200 | 87,074,251,200 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~tec | 1 years | 2025-05-03T23:34:40 | 139,875,957,000 | 139,875,957,000 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~disbec | 2 years | 2025-07-07T14:43:58 | 87,074,251,200 | 87,074,251,200 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~tem | 2 years | 2025-05-24T04:03:39 | 112,144,162,800 | 112,144,162,800 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~famtul | 3 years | 2025-07-07T14:43:58 | 87,074,251,200 | 87,074,251,200 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~sed | 3 years | 2025-07-07T10:55:28 | 51,305,833,800 | 51,305,833,800 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~lorsut | 4 years | 2025-07-07T14:43:58 | 87,074,251,200 | 87,074,251,200 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~nec | 4 years | 2025-05-08T09:19:35 | 133,822,922,400 | 133,822,922,400 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~tortyp | 5 years | 2025-07-07T14:43:58 | 260,254,338,427 | 260,254,338,427 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
| ~byl | 5 years | 2025-07-07T14:43:58 | 167,096,014,588 | 167,096,014,588 | 0 |
|
||||
+---------+---------------+---------------------+------------------+-----------------+--------------+
|
||||
ok
|
||||
test_accrual_state_calculation (test_accrual_state.AccrualStateTest.test_accrual_state_calculation)
|
||||
Test accrual state calculations after some blocks ...
|
||||
Total Unlocked at Block 612:
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| Point | Lock Period | Block Height | Last Unlocked At | Expected ($sZ) | zenithd ($sZ) | Difference |
|
||||
+=========+===============+================+====================+==================+=================+==============+
|
||||
| ~milzod | 1 years | Block 612 | Block 600 | 87,106,771,200 | 87,106,771,200 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~tec | 1 years | Block 612 | Block 600 | 139,895,037,000 | 139,895,037,000 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~disbec | 2 years | Block 612 | Block 600 | 87,106,771,200 | 87,106,771,200 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~tem | 2 years | Block 612 | Block 600 | 112,163,242,800 | 112,163,242,800 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~famtul | 3 years | Block 612 | Block 600 | 87,106,771,200 | 87,106,771,200 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~sed | 3 years | Block 612 | Block 600 | 51,324,913,800 | 51,324,913,800 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~lorsut | 4 years | Block 612 | Block 600 | 87,106,771,200 | 87,106,771,200 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~nec | 4 years | Block 612 | Block 600 | 133,842,002,400 | 133,842,002,400 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~tortyp | 5 years | Block 612 | Block 600 | 260,351,536,748 | 260,351,536,748 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
| ~byl | 5 years | Block 612 | Block 600 | 167,158,420,664 | 167,158,420,664 | 0 |
|
||||
+---------+---------------+----------------+--------------------+------------------+-----------------+--------------+
|
||||
ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 5 tests in 2.939s
|
||||
|
||||
OK
|
||||
@ -8,8 +8,6 @@ class AccrualStateTest(BaseAllocationTest):
|
||||
|
||||
def test_accrual_state_calculation(self):
|
||||
"""Test accrual state calculations after some blocks"""
|
||||
print("\nACCRUAL STATE CALCULATIONS")
|
||||
|
||||
# Get latest block height for testing
|
||||
test_block_height = self._get_latest_block_height_from_api()
|
||||
if not test_block_height:
|
||||
|
||||
@ -8,7 +8,6 @@ class AllocationTest(BaseAllocationTest):
|
||||
|
||||
def test_0_star_allocations(self):
|
||||
"""Test star allocations for all lock periods"""
|
||||
print("\nSTAR ALLOCATIONS COMPARISON")
|
||||
|
||||
table_data = []
|
||||
headers = ["Lock Period", "Point", "Zenith Address", "Notebook ($sZ)", "zenithd ($sZ)", "Difference"]
|
||||
@ -51,11 +50,11 @@ class AllocationTest(BaseAllocationTest):
|
||||
f"zenithd={api_allocation:,} $sZ, "
|
||||
f"Diff={difference:+,} $sZ")
|
||||
|
||||
print("\nStar Allocations Comparison:")
|
||||
print(tabulate(table_data, headers=headers, tablefmt="grid"))
|
||||
|
||||
def test_1_galaxy_allocations(self):
|
||||
"""Test galaxy allocations for all lock periods"""
|
||||
print("\nGALAXY ALLOCATIONS COMPARISON")
|
||||
|
||||
table_data = []
|
||||
headers = ["Lock Period", "Point", "Zenith Address", "Notebook ($sZ)", "zenithd ($sZ)", "Difference"]
|
||||
@ -98,11 +97,11 @@ class AllocationTest(BaseAllocationTest):
|
||||
f"zenithd={api_allocation:,} $sZ, "
|
||||
f"Diff={difference:+,} $sZ")
|
||||
|
||||
print("\nGalaxy Allocations Comparison:")
|
||||
print(tabulate(table_data, headers=headers, tablefmt="grid"))
|
||||
|
||||
def test_2_total_allocations(self):
|
||||
"""Test total allocations for all participants"""
|
||||
print("\nTOTAL ALLOCATIONS COMPARISON")
|
||||
|
||||
notebook_total = self.notebook_allocations.get('total', 0)
|
||||
|
||||
@ -127,6 +126,7 @@ class AllocationTest(BaseAllocationTest):
|
||||
]
|
||||
headers = ["Source", "Total Allocation ($sZ)"]
|
||||
|
||||
print("\nTotal Allocations Comparison:")
|
||||
print(tabulate(table_data, headers=headers, tablefmt="grid"))
|
||||
|
||||
self.assertEqual(notebook_total, api_total,
|
||||
|
||||
@ -9,7 +9,6 @@ class UnlockScheduleTest(BaseAllocationTest):
|
||||
|
||||
def test_unlock_schedule_calculation(self):
|
||||
"""Test unlock schedule calculations for all lock periods"""
|
||||
print("\nUNLOCK SCHEDULE CALCULATIONS")
|
||||
|
||||
genesis_timestamp = self._get_genesis_time_from_api()
|
||||
if not genesis_timestamp:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user