File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 39
39
40
40
FIRST_PARIS_LEVEL = 5726209
41
41
42
+ FIRST_QUEBEC_LEVEL = 7692289
43
+
42
44
TEZOS_RPC_PORT = 8732
43
45
44
46
SIGNER_PORT = 6732
81
83
"MAINNET" : {
82
84
# General
83
85
"NAME" : "MAINNET" ,
84
- "MINIMAL_BLOCK_DELAY" : 10 ,
85
- "BLOCKS_PER_CYCLE" : 24576 ,
86
+ "MINIMAL_BLOCK_DELAY" : 8 ,
87
+ "BLOCKS_PER_CYCLE" : 30720 ,
86
88
},
87
89
CURRENT_TESTNET : {
88
90
# General
89
91
"NAME" : CURRENT_TESTNET ,
90
- "MINIMAL_BLOCK_DELAY" : 5 ,
91
- "BLOCKS_PER_CYCLE" : 12288 ,
92
+ "MINIMAL_BLOCK_DELAY" : 4 ,
93
+ "BLOCKS_PER_CYCLE" : 15360 ,
92
94
},
93
95
}
94
96
Original file line number Diff line number Diff line change 1
1
from abc import ABC , abstractmethod
2
- from Constants import FIRST_GRANADA_LEVEL , FIRST_MUMBAI_LEVEL , FIRST_PARIS_LEVEL
2
+ from Constants import (
3
+ FIRST_GRANADA_LEVEL ,
4
+ FIRST_MUMBAI_LEVEL ,
5
+ FIRST_PARIS_LEVEL ,
6
+ FIRST_QUEBEC_LEVEL ,
7
+ )
3
8
4
9
# TODO: we should check if we are on mainnet, or a testnet
5
10
# we could add a get_current_protocol() method and check against it
@@ -15,10 +20,13 @@ def get_current_cycle_and_level(self):
15
20
pass
16
21
17
22
def level_in_cycle (self , level ):
18
- if level >= FIRST_PARIS_LEVEL :
23
+ if level >= FIRST_QUEBEC_LEVEL :
24
+ # Since protocol Quebec
25
+ return (level - FIRST_QUEBEC_LEVEL ) % self .nw ["BLOCKS_PER_CYCLE" ]
26
+ elif level >= FIRST_PARIS_LEVEL :
19
27
# Since protocol Paris
20
28
return (level - FIRST_PARIS_LEVEL ) % self .nw ["BLOCKS_PER_CYCLE" ]
21
- if level >= FIRST_MUMBAI_LEVEL :
29
+ elif level >= FIRST_MUMBAI_LEVEL :
22
30
# Since protocol Mumbai
23
31
return (level - FIRST_MUMBAI_LEVEL ) % self .nw ["BLOCKS_PER_CYCLE" ]
24
32
elif level >= FIRST_GRANADA_LEVEL :
You can’t perform that action at this time.
0 commit comments