Skip to content

Commit

Permalink
Fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Oct 30, 2024
1 parent 04f8138 commit c77463c
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 116 deletions.
Empty file modified scripts/data/format_args.py
100644 → 100755
Empty file.
230 changes: 114 additions & 116 deletions scripts/data/generate_timestamp_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
1 change: 1 addition & 0 deletions scripts/data/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c77463c

Please sign in to comment.