diff --git a/scripts/data/format_args.py b/scripts/data/format_args.py old mode 100644 new mode 100755 diff --git a/scripts/data/generate_timestamp_data.py b/scripts/data/generate_timestamp_data.py index ed75f02d..0c76161d 100644 --- a/scripts/data/generate_timestamp_data.py +++ b/scripts/data/generate_timestamp_data.py @@ -94,122 +94,120 @@ def get_timestamp_data(block_number): def hardcoded_timestamp_data(block_number): - def hardcoded_timestamp_data(block_number): - hardcoded_data = { - 0: { - "block_number": "0", - "epoch_start_time": "1231006505", - "previous_timestamps": [], - }, - 1: { - "block_number": "1", - "epoch_start_time": "1231469665", - "previous_timestamps": ["1231006505"], - }, - 2: { - "block_number": "2", - "epoch_start_time": "1231469744", - "previous_timestamps": ["1231006505", "1231469665"], - }, - 3: { - "block_number": "3", - "epoch_start_time": "1231470173", - "previous_timestamps": ["1231006505", "1231469665", "1231469744"], - }, - 4: { - "block_number": "4", - "epoch_start_time": "1231470988", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - ], - }, - 5: { - "block_number": "5", - "epoch_start_time": "1231471428", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - "1231470988", - ], - }, - 6: { - "block_number": "6", - "epoch_start_time": "1231471789", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - "1231470988", - "1231471428", - ], - }, - 7: { - "block_number": "7", - "epoch_start_time": "1231472369", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - "1231470988", - "1231471428", - "1231471789", - ], - }, - 8: { - "block_number": "8", - "epoch_start_time": "1231472743", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - "1231470988", - "1231471428", - "1231471789", - "1231472369", - ], - }, - 9: { - "block_number": "9", - "epoch_start_time": "1231473279", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - "1231470988", - "1231471428", - "1231471789", - "1231472369", - "1231472743", - ], - }, - 10: { - "block_number": "10", - "epoch_start_time": "1231473952", - "previous_timestamps": [ - "1231006505", - "1231469665", - "1231469744", - "1231470173", - "1231470988", - "1231471428", - "1231471789", - "1231472369", - "1231472743", - "1231473279", - ], - }, - } - - return hardcoded_data.get(block_number, {}) + hardcoded_data = { + 0: { + "block_number": "0", + "epoch_start_time": "1231006505", + "previous_timestamps": [], + }, + 1: { + "block_number": "1", + "epoch_start_time": "1231469665", + "previous_timestamps": ["1231006505"], + }, + 2: { + "block_number": "2", + "epoch_start_time": "1231469744", + "previous_timestamps": ["1231006505", "1231469665"], + }, + 3: { + "block_number": "3", + "epoch_start_time": "1231470173", + "previous_timestamps": ["1231006505", "1231469665", "1231469744"], + }, + 4: { + "block_number": "4", + "epoch_start_time": "1231470988", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + ], + }, + 5: { + "block_number": "5", + "epoch_start_time": "1231471428", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + "1231470988", + ], + }, + 6: { + "block_number": "6", + "epoch_start_time": "1231471789", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + "1231470988", + "1231471428", + ], + }, + 7: { + "block_number": "7", + "epoch_start_time": "1231472369", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + "1231470988", + "1231471428", + "1231471789", + ], + }, + 8: { + "block_number": "8", + "epoch_start_time": "1231472743", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + "1231470988", + "1231471428", + "1231471789", + "1231472369", + ], + }, + 9: { + "block_number": "9", + "epoch_start_time": "1231473279", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + "1231470988", + "1231471428", + "1231471789", + "1231472369", + "1231472743", + ], + }, + 10: { + "block_number": "10", + "epoch_start_time": "1231473952", + "previous_timestamps": [ + "1231006505", + "1231469665", + "1231469744", + "1231470173", + "1231470988", + "1231471428", + "1231471789", + "1231472369", + "1231472743", + "1231473279", + ], + }, + } + return hardcoded_data.get(block_number, {}) if __name__ == "__main__": diff --git a/scripts/data/requirements.txt b/scripts/data/requirements.txt index d07be68e..a891d2b3 100644 --- a/scripts/data/requirements.txt +++ b/scripts/data/requirements.txt @@ -5,3 +5,4 @@ flake8-black==0.3.6 poseidon_py==0.1.5 tqdm==4.66.5 google-cloud-storage==2.18.2 +google-api-python-client==2.149.0 \ No newline at end of file