Skip to content
This repository has been 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
Show file tree
Hide file tree
Changes from 40 commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.DS_Store
.idea
*.pki
**/.sqlx
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm... Why is this here? AFAIK you need these files in order to be able to compile the code that uses sqlx. These also need to be updated regularly when changing DB (though the build usually fails when there's need).

See /~https://github.com/launchbadge/sqlx/?tab=readme-ov-file#compile-time-verification and /~https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md#enable-building-in-offline-mode-with-query

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it was sqlx temporary file folder. I've one deleted by sqlx, so I thought that it's a working directory of sqlx and not part of the code. I remove.

crates/tests/e2e-tests/files
crates/tests/e2e-tests/prover
crates/tests/e2e-tests/verifier
38 changes: 20 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::file::FileData;
use gevulot_node::types::transaction::ProgramMetadata;
use gevulot_node::types::transaction::{Created, ProgramMetadata};
use gevulot_node::types::Hash;
use gevulot_node::{
rpc_client::RpcClient,
Expand Down Expand Up @@ -203,7 +203,7 @@ pub async fn run_deploy_command(
))
}

async fn send_transaction(client: &RpcClient, tx: &Transaction) -> Result<Hash, String> {
async fn send_transaction(client: &RpcClient, tx: &Transaction<Created>) -> Result<Hash, String> {
client
.send_transaction(tx)
.await
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions crates/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ clap = { version = "4", features = ["derive", "env", "string"] }
console-subscriber = "0.2"
ecies = {version = "0.2", default-features = false, features = ["pure"]}
eyre = "0.6.8"
futures = "0.3.30"
futures-util = "0.3"
hex = "0.4"
home = "0.5"
Expand Down
16 changes: 16 additions & 0 deletions crates/node/migrations/20240215174342_add_txfile_and_checksum.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Add checksum to task files
-- Add a new table to store Tx files.

ALTER TABLE file ADD checksum VARCHAR(64) NOT NULL;

DROP TABLE IF EXISTS txfile;

CREATE TABLE txfile (
tx_id VARCHAR(64) NOT NULL,
name VARCHAR(256) NOT NULL,
url VARCHAR(2048) NOT NULL,
checksum VARCHAR(64) NOT NULL,
CONSTRAINT fk_tx
FOREIGN KEY (tx_id)
REFERENCES transaction (hash) ON DELETE CASCADE
);
195 changes: 0 additions & 195 deletions crates/node/src/asset_manager/mod.rs

This file was deleted.

Loading
Loading