Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Manage tx validation and propagation with its files #85

Merged
merged 48 commits into from
Feb 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ece7b89
first implementation
musitdev Feb 7, 2024
00831fd
correct file management. Work locally. Before remote test
musitdev Feb 8, 2024
0056630
correct p2p peer list init
musitdev Feb 9, 2024
53d5423
add some logs to follow tx
musitdev Feb 9, 2024
30f9e48
correct rebase error
musitdev Feb 9, 2024
557bc58
add checksum to VM file and test
musitdev Feb 9, 2024
992de81
add type state to file and Tx
musitdev Feb 11, 2024
4fc59b2
correct some issues in file path
musitdev Feb 12, 2024
072235e
add some logs
musitdev Feb 12, 2024
6428170
update proof generated file path
musitdev Feb 12, 2024
3dd91cb
remove comments
musitdev Feb 12, 2024
2a714a1
add comment, add timeout and error management to http download connec…
musitdev Feb 12, 2024
fdf618f
correct http url definition
musitdev Feb 12, 2024
ff9e291
add timeout to http send
musitdev Feb 12, 2024
c58ad9d
add better download error login and log file checksum
musitdev Feb 12, 2024
b19c14f
correct build
musitdev Feb 12, 2024
423d573
desactivate checksum verification for downloaded files
musitdev Feb 12, 2024
14bbd3c
add some logs for checksum
musitdev Feb 12, 2024
4557493
change hasher for VM file and activate checksum verification
musitdev Feb 12, 2024
48aec37
correct host detection for download
musitdev Feb 12, 2024
32c5c0e
disable proof and verifcation workflow and remove some logs
musitdev Feb 12, 2024
7bce8e6
rebase from master and correct download file issue
musitdev Feb 13, 2024
f8be0df
rebase from master and correct download file issue
musitdev Feb 13, 2024
3b59b32
pass clippy and tests
musitdev Feb 13, 2024
803cfe7
correct clippy
musitdev Feb 13, 2024
a9a4d87
do some cleaning
musitdev Feb 14, 2024
3a1f086
correct PR remarks
musitdev Feb 16, 2024
2a76a8e
Merge branch 'main' into manage_tx_consistency
tuommaki Feb 19, 2024
f422f14
add newline to be like the original file
musitdev Feb 19, 2024
a0216cc
change generated file name from uuid to checksum
musitdev Feb 19, 2024
02a1347
Avoid to move download existing file
musitdev Feb 19, 2024
d45fb19
correct clippy
musitdev Feb 19, 2024
d68428b
remove asset manager call to test
musitdev Feb 20, 2024
d44e527
correct some path issue
musitdev Feb 20, 2024
ff72aed
add verify tx execution in the workflow.
musitdev Feb 20, 2024
ee8a376
add mark deploy tx as executed
musitdev Feb 20, 2024
6d563e0
remove the dbg! that panic
musitdev Feb 20, 2024
e8cce96
Merge branch 'main' into manage_tx_consistency
tuommaki Feb 21, 2024
29a99d8
change verif tx workflow management and change logs
musitdev Feb 21, 2024
a168896
Merge branch 'manage_tx_consistency' of https://github.com/gevulotnet…
musitdev Feb 21, 2024
8766908
add some logs
musitdev Feb 21, 2024
9952880
Merge branch 'main' into manage_tx_consistency
tuommaki Feb 21, 2024
65b0b97
Terminate VM on get_task() when already assigned with Task (#96)
tuommaki Feb 21, 2024
e4481f6
revert .gitignore change
musitdev Feb 21, 2024
d9b2683
Merge branch 'manage_tx_consistency' of https://github.com/gevulotnet…
musitdev Feb 21, 2024
80998df
correct mutex lock issue
musitdev Feb 21, 2024
3aaab1f
add some logs
musitdev Feb 21, 2024
37d7eb0
remove asset management and some logs
musitdev Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update proof generated file path
musitdev committed Feb 16, 2024
commit 6428170de4fb1e79f08fd6e61a6719cc105d0c90
1 change: 1 addition & 0 deletions crates/node/src/scheduler/mod.rs
Original file line number Diff line number Diff line change
@@ -522,6 +522,7 @@ impl TaskManager for Scheduler {
}
};

tracing::trace!("Submit result exec files:{}", executed_files.len());
tracing::info!("Submit result Tx created:{}", tx.hash.to_string());

//Move tx file from execution Tx path to new Tx path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//Move tx file from execution Tx path to new Tx path
// Move the file from executed transaction's workspace path to new transactions workspace path.

9 changes: 3 additions & 6 deletions crates/node/src/types/file.rs
Original file line number Diff line number Diff line change
@@ -119,13 +119,10 @@ impl File<ProofVerif> {
}

pub fn get_relatif_path(&self, tx_hash: Hash) -> PathBuf {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn get_relatif_path(&self, tx_hash: Hash) -> PathBuf {
pub fn get_relative_path(&self, tx_hash: Hash) -> PathBuf {

let mut file_path = Path::new(&self.name);
if file_path.is_absolute() {
file_path = file_path.strip_prefix("/").unwrap(); //unwrap tested in is_absolute
}

//get uuid from file name
let uuid = Path::new(&self.name).file_name().unwrap();
let mut path = PathBuf::from(tx_hash.to_string());
path.push(file_path);
path.push(uuid);
path
}

8 changes: 5 additions & 3 deletions crates/node/src/types/transaction.rs
Original file line number Diff line number Diff line change
@@ -447,12 +447,14 @@ impl Transaction<TxReceive> {
.collect()
}
Payload::Proof { files, .. } | Payload::Verification { files, .. } => {
//generated file during execution has already been moved. No Download.
tracing::trace!(
"Payload::Proof tx:{} is_from_tx_exec_result:{}",
"Payload::Proof tx:{} is_from_tx_exec_result:{} files.len:{}",
self.hash.to_string(),
self.state.is_from_tx_exec_result()
self.state.is_from_tx_exec_result(),
files.len(),
);

//generated file during execution has already been moved. No Download.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//generated file during execution has already been moved. No Download.
// If the file was generated during the execution, it has been already moved.
// No need to download anything.

if self.state.is_from_tx_exec_result() {
Ok(vec![])
} else {