Skip to content

Commit

Permalink
moving epoch_time to be the last field in target state
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroProofs committed Jul 15, 2024
1 parent 80e4b83 commit f621b18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion aiken.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ requirements = []
source = "github"

[etags]
"aiken-lang/fuzz@main" = [{ secs_since_epoch = 1721071594, nanos_since_epoch = 601555000 }, "a8294651f1577c671d580c99c9bc5445ef1fd44e4aa3dde550434a4cbc8d50b6"]
"aiken-lang/fuzz@main" = [{ secs_since_epoch = 1721077393, nanos_since_epoch = 77472000 }, "a8294651f1577c671d580c99c9bc5445ef1fd44e4aa3dde550434a4cbc8d50b6"]
17 changes: 9 additions & 8 deletions miner/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,6 @@ app
toHex(nonce),
// miner_cred_hash: ByteArray
toHex(minerCredHash),
// epoch_time: Int
state.fields[4] as bigint,
// block_number: Int
state.fields[0] as bigint,
// current_hash: ByteArray
Expand All @@ -381,6 +379,8 @@ app
state.fields[2] as bigint,
// difficulty_number: Int
state.fields[3] as bigint,
// epoch_time: Int
state.fields[4] as bigint,
]),
),
);
Expand Down Expand Up @@ -425,8 +425,6 @@ app
toHex(nonce),
// miner_cred_hash: ByteArray
toHex(minerCredHash),
//epoch_time: Int
state.fields[4] as bigint,
// block_number: Int
state.fields[0] as bigint,
// current_hash: ByteArray
Expand All @@ -435,6 +433,8 @@ app
state.fields[2] as bigint,
// difficulty_number: Int
state.fields[3] as bigint,
//epoch_time: Int
state.fields[4] as bigint,
]),
),
);
Expand Down Expand Up @@ -2362,8 +2362,7 @@ app
toHex(nonce),
// miner_cred_hash: ByteArray
toHex(minerCredHash),
// epoch_time: Int
state.fields[4] as bigint,

// block_number: Int
state.fields[0] as bigint,
// current_hash: ByteArray
Expand All @@ -2372,6 +2371,8 @@ app
state.fields[2] as bigint,
// difficulty_number: Int
state.fields[3] as bigint,
// epoch_time: Int
state.fields[4] as bigint,
]),
),
);
Expand Down Expand Up @@ -2416,8 +2417,6 @@ app
toHex(nonce),
// miner_cred_hash: ByteArray
toHex(minerCredHash),
//epoch_time: Int
state.fields[4] as bigint,
// block_number: Int
state.fields[0] as bigint,
// current_hash: ByteArray
Expand All @@ -2426,6 +2425,8 @@ app
state.fields[2] as bigint,
// difficulty_number: Int
state.fields[3] as bigint,
//epoch_time: Int
state.fields[4] as bigint,
]),
),
);
Expand Down
2 changes: 1 addition & 1 deletion validators/tunav2.ak
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ type MineAction {
type TargetState {
nonce: ByteArray,
miner: ByteArray,
epoch_time: Int,
block_number: Int,
current_hash: ByteArray,
leading_zeros: Int,
target_number: Int,
epoch_time: Int,
}

validator(fortuna_v1_hash: Data, fork_script_hash: Data) {
Expand Down

0 comments on commit f621b18

Please sign in to comment.