From fec1f820b6e1e73dda6ae3994ed52a3ab2348d03 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 20:09:37 +0200 Subject: [PATCH 01/11] Added a new comment to example.txt --- example.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 example.txt diff --git a/example.txt b/example.txt new file mode 100644 index 0000000..90a90bb --- /dev/null +++ b/example.txt @@ -0,0 +1,2 @@ + +# New comment \ No newline at end of file From 37d75d1592822d23afe0b7c7abbe397a7e6ddd10 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 20:51:32 +0200 Subject: [PATCH 02/11] Add new_file --- README.md | 101 +----------------------------------------------------- 1 file changed, 1 insertion(+), 100 deletions(-) diff --git a/README.md b/README.md index 67e456b..5e288eb 100644 --- a/README.md +++ b/README.md @@ -1,100 +1 @@ -# minaVRFpy - -minaVRFpy is the python adaptation of the `batch-check-wittness` step from [zkvalidator]'s [mina-vrf-rs]. This is VERY much work in progress and made available to the mina community for experimental reasons! - -## Intro - -Please refer to [mina-vrf-rs] for the overall approach. Typically the wittness data is generated by the block producer and shared, then the delegator can run the check (via [mina-vrf-rs]): - - -``` -cat witnesses | cargo run --release -- batch-patch-witness --pub B62qpge4uMq4Vv5Rvc8Gw9qSquUYd6xoW1pz7HQkMSHm6h1o7pvLPAN --epoch 5 > patches -cat patches | mina advanced vrf batch-check-witness | sed 's/Using password from environment variable CODA_PRIVKEY_PASS//g' > check -cat check | cargo run --release -- batch-check-witness --pub B62qpge4uMq4Vv5Rvc8Gw9qSquUYd6xoW1pz7HQkMSHm6h1o7pvLPAN --epoch 5 -``` - -This python script offers an alternative to the `batch-check-witness` part in order to e.g. gather the data over multiple epochs or to further examine and enrich the data via e.g. jupyter notebooks. See the [demos] provided. - -## Setup - -clone and install via `pip install .`. The script relies also on https://github.com/bakebrain/coda-python-client/tree/query-sgqlc-refactoring - an https://github.com/profusion/sgqlc version of the python-coda-client - currently also not "officially" made available. An examples is e.g. https://github.com/bakebrain/coda-python-client/blob/query-sgqlc-refactoring/examples/mina_explorer.ipynb - -### config.py - -this file needs to be edited, inparticular `LEDGER_PATH` and `VRF_CHECKED_PATH` need to be created/setup. - -`MINA_EXPLORER_ENDPOINT` - [minaexplorer] enpoint - -`LEDGER_PATH` - path to a folder where the ledgers are stored, e.g. '/home/user/minavrfpy/data/legers/'. - -`LEDGER_DOWNLOAD_SOURCE` - url of a ledger repo to download unavailable ledgers from, the default is https://raw.githubusercontent.com/zkvalidator/mina-graphql-rs/master/data/epochs - -`VRF_CHECKED_PATH` - path to folder where the "checked" data is stored, e.g. '/home/user/minavrfpy/data/vrf_checked/'. Inside this folder there should be another folder name after the key of the block producer. The checked data should reside inside this folder. In order to deal with mutiple epoch data simultaneously the final data's naming convention is e.g. check-epoch-{epoch_number}, An example structure could be like this: - -``` -❯ tree data -data -├── ledgers -│   ├── jwAAZcXndLYxb8w4LTU2d4K1qT3dL8Ck2jKzVEf9t9GAyXweQRG.json -│   ├── jwAXd4GZgxE3YCwqs99g4MpLNiEV2ZfZPstyah4jxo753AVgL6R.json -│   ├── jwJXdYzAikMHnTsw2kYyS1WQxJrGQsy1FKT5c18eHP2wGANafKf.json -│   ├── jwPwVsSPZ2tmmGbp8UrWGmDgFDrrzTPpYcjpWosckmcVZV2kcW7.json -│   ├── jwe63YTTUcc2b4sFdP54ehCZ3Dp9sZKshwCmtoVP3bidzfPfcxw.json -│   ├── jwq7sAxDuN9MrdLjAQULoyrY5hWa6g52SVq8EmajBeBY38zamgz.json -│   ├── jx2XUFjvsvtTKB4HPAzih5boAtuoR34kxjEoU1RUhfXTATyx8tw.json -│   ├── jx4itrnmDkG3ptAiwhitJHt9K8stgFFoenrkZrm2prbtaS54xQU.json -│   ├── jx7buQVWFLsXTtzRgSxbYcT8EYLS8KCZbLrfDcJxMtyy4thw2Ee.json -│   ├── jxBBSjakhQRKLbUM7z99KXNnMke2GbdcJyqpD9gyRoJJybsMRqh.json -│   ├── jxPj7F7aRew1zvpW9JaGSgt9xmJitenrRSM6YGKnuhe5HXqyZtZ.json -│   ├── jxQgtuyHp8nA2P6F9CSRrLcVeHi8Ap7wVHeNnH2UbSX15izcSHK.json -│   ├── jxRySSfk8kJZVj46zveaToDUJUC2GtprmeK7poqWymEzB6d2Tun.json -│   ├── jxVF5YbC3B5Rk6ibfsL97WaqojfxrgWtEqMJST9pb4X8s3kRD2T.json -│   ├── jxVLvFcBbRCDSM8MHLam6UPVPo2KDegbzJN6MTZWyhTvDrPcjYk.json -│   ├── jxct9rteQ7wjhQVf7h4mGQmGZprJMkjbzEWgU7VvV6HEq2DN5yA.json -│   ├── jxhjiLBeMR7pgtV8ogcJvqXdr6asoNrC3g6hoUzEDLBSnZoxUDJ.json -│   └── jxn15ATGoe4WGgYpbssxJH9XW8NXRDy22WvSsBqvMqcnLPgPAwN.json -└── vrf_checked - ├── B62qob1tGxx1BhychEzzah7yvdbRH3E7SNSTrEtkuSZzR2UBezMChg2 - │   ├── check-epoch-18 - │   ├── check-epoch-19 - │   └── check-epoch-20 - └── B62qpge4uMq4Vv5Rvc8Gw9qSquUYd6xoW1pz7HQkMSHm6h1o7pvLPAN - ├── check-epoch-0 - ├── check-epoch-1 - ├── check-epoch-10 - ├── check-epoch-11 - ├── check-epoch-12 - ├── check-epoch-13 - ├── check-epoch-14 - ├── check-epoch-15 - ├── check-epoch-16 - ├── check-epoch-17 - ├── check-epoch-2 - ├── check-epoch-3 - ├── check-epoch-4 - ├── check-epoch-5 - ├── check-epoch-6 - ├── check-epoch-7 - ├── check-epoch-8 - └── check-epoch-9 - -4 directories, 39 files -``` - -## Examples - -### checking current epoch - -![image](https://drive.google.com/uc?export=view&id=1W8xmB3MTmQJejJKcumsxOoQtN1YmAmf9) - -### block time by outcome - -![image](https://drive.google.com/uc?export=view&id=1cUtwPaH6-5wPYJxCr_Xz_OlPjP3Y86-g) - -See more in the notebook [demos]. - - -[zkvalidator]: https://zkvalidator.com/ -[mina-vrf-rs]: https://github.com/zkvalidator/mina-vrf-rs -[minaexplorer]: https://minaexplorer.com/ -[demos]: https://github.com/bakebrain/minavrfpy/tree/main/examples +This is a new files. \ No newline at end of file From 973bb1446ef59efc82b786d7c1eabf2d04737904 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:01:10 +0200 Subject: [PATCH 03/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index 90a90bb..8b7acd6 100644 --- a/example.txt +++ b/example.txt @@ -1,2 +1,3 @@ +# New comment # New comment \ No newline at end of file From 207dd24485cc1375f21b47334b0c2e039a170b4a Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:01:24 +0200 Subject: [PATCH 04/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index 8b7acd6..3152850 100644 --- a/example.txt +++ b/example.txt @@ -1,3 +1,4 @@ +# New comment # New comment # New comment \ No newline at end of file From b841c68903f7fe68cf343c6d6e1c632312a5d8e8 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:02:20 +0200 Subject: [PATCH 05/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index 3152850..a005334 100644 --- a/example.txt +++ b/example.txt @@ -1,4 +1,5 @@ +# New comment # New comment # New comment # New comment \ No newline at end of file From ffd5ad85bd115beb3c8ce198ac4cc1ab265d9134 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:03:08 +0200 Subject: [PATCH 06/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index a005334..ca0467d 100644 --- a/example.txt +++ b/example.txt @@ -2,4 +2,5 @@ # New comment # New comment # New comment +# New comment # New comment \ No newline at end of file From 95460aad6a630ff9d8dd919eff110cb592feb6cb Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:04:31 +0200 Subject: [PATCH 07/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index ca0467d..a9713ce 100644 --- a/example.txt +++ b/example.txt @@ -3,4 +3,5 @@ # New comment # New comment # New comment +# New comment # New comment \ No newline at end of file From d51c788fb1435767eb6438b95b26de00fd6c8b65 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:04:36 +0200 Subject: [PATCH 08/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index a9713ce..5bb4f14 100644 --- a/example.txt +++ b/example.txt @@ -4,4 +4,5 @@ # New comment # New comment # New comment +# New comment # New comment \ No newline at end of file From d27a856eb6270d1c690dd06c4645cbed538ad2a7 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:05:27 +0200 Subject: [PATCH 09/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index 5bb4f14..aa444ef 100644 --- a/example.txt +++ b/example.txt @@ -5,4 +5,5 @@ # New comment # New comment # New comment +# New comment # New comment \ No newline at end of file From 18cc39b6cf7e8d4b5710319a7db2b8a33057ec86 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:05:59 +0200 Subject: [PATCH 10/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index aa444ef..eb652d2 100644 --- a/example.txt +++ b/example.txt @@ -6,4 +6,5 @@ # New comment # New comment # New comment +# New comment # New comment \ No newline at end of file From 554f817d104b05f1973dd3d8f346a7a6940951e2 Mon Sep 17 00:00:00 2001 From: roxane-aria Date: Thu, 13 Apr 2023 21:11:33 +0200 Subject: [PATCH 11/11] Added a new comment to example.txt --- example.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/example.txt b/example.txt index eb652d2..4d9c468 100644 --- a/example.txt +++ b/example.txt @@ -7,4 +7,5 @@ # New comment # New comment # New comment +# New comment # New comment \ No newline at end of file