Skip to content

Instantly share code, notes, and snippets.

@amc-ie
Last active January 11, 2024 20:42
Show Gist options
  • Save amc-ie/4f43cc084e64b06f26135629673825c6 to your computer and use it in GitHub Desktop.
Save amc-ie/4f43cc084e64b06f26135629673825c6 to your computer and use it in GitHub Desktop.
Berkeley Testnet Release 2.0.0rampup8 (ITN RC4)
Mina's ecosystem partner, O(1) Labs, is continuously working on improvements to the core protocol and today we are excited to announce an updated unstable release 56fa1db that is ready to test on the Testworld 2.0 testnet!
Please report any issues in the comments on this post or tag any issues you create with `Testworld-2-0-protocol-performance-testing` and include `ITN RC4` in the issue title.
#### What changed
This release focuses on bug fixes & improvements implemented based on current findings from the Testworld initiative.
* Fix duplicated rows in zkapp_account_precondition table https://github.com/MinaProtocol/mina/pull/14785
**Download script**
[remove_duplicated_zkapp_account_precondition_rows.sh](https://raw.githubusercontent.com/MinaProtocol/mina/080acace858dadb74d3158ff2d473d701af4f0a3/scripts/archive/zkapp_duplicated_precondition/remove_duplicated_zkapp_account_precondition_rows.sh)
**Generate sql scripts:**
**run** `remove_duplicated_zkapp_account_precondition_rows.sh {schema}`
> :warning: scripts assumes certain location from which is executed (namely database localhost), If location is different, script may need editing in order to successfully connect to database
**run produced scripts in correct order:**
`psql -U [USERNAME] [DATABASE] < zkapp_precondition_script.sql`
`psql -U [USERNAME] [DATABASE] < zkapp_update_body_script.sql`
**Download update schema script **
[add_constraint.sql](https://raw.githubusercontent.com/MinaProtocol/mina/080acace858dadb74d3158ff2d473d701af4f0a3/scripts/archive/zkapp_duplicated_precondition/add_constraint.sql)
`psql -U [USERNAME] [DATABASE] < add_constraint.sql`
* Fix/archive db add indexes https://github.com/MinaProtocol/mina/pull/14792
**Download script**
[add_indexes_script](https://raw.githubusercontent.com/MinaProtocol/mina/7f2844158ebf4d2bd1e20e02e6cfdfded54520e2/src/app/archive/add_indexes.sql)
**To optimize the archiving of max cost zkapps; please run the following script:
`psql -U [USERNAME] [DATABASE] < add_indexes.sql`**
> :warning: Creating indexes can take up to several hours. This is normal behavior. In order to track progress of index creation you can utilize below command:
```
SELECT
t.tablename,
indexname,
c.reltuples AS num_rows,
pg_size_pretty(pg_relation_size(quote_ident(t.tablename)::text)) AS table_size,
pg_size_pretty(pg_relation_size(quote_ident(indexrelname)::text)) AS index_size,
CASE WHEN indisunique THEN 'Y'
ELSE 'N'
END AS UNIQUE,
idx_scan AS number_of_scans,
idx_tup_read AS tuples_read,
idx_tup_fetch AS tuples_fetched
FROM pg_tables t
LEFT OUTER JOIN pg_class c ON t.tablename=c.relname
LEFT OUTER JOIN
( SELECT c.relname AS ctablename, ipg.relname AS indexname, x.indnatts AS number_of_columns, idx_scan, idx_tup_read, idx_tup_fetch, indexrelname, indisunique FROM pg_index x
JOIN pg_class c ON c.oid = x.indrelid
JOIN pg_class ipg ON ipg.oid = x.indexrelid
JOIN pg_stat_all_indexes psai ON x.indexrelid = psai.indexrelid )
AS foo
ON t.tablename = foo.ctablename
WHERE t.schemaname='public'
AND indexname like 'idx_zkapp_%_element_ids';
```
* Adding the ability to soft-cap https://github.com/MinaProtocol/mina/pull/14644
* Support setting zkapp limit in orchestrator https://github.com/MinaProtocol/mina/pull/14818
* add timing log to check_database https://github.com/MinaProtocol/mina/pull/14667
* batch insertion events in archive database https://github.com/MinaProtocol/mina/pull/14779
* o1trace/trace-tool revival https://github.com/MinaProtocol/mina/pull/14811
* Handle inability to contact metrics server on forwarding https://github.com/MinaProtocol/mina/pull/14505
* Child_processes: ensure stderr/stdout get flushed https://github.com/MinaProtocol/mina/pull/14696
* Fix genesis ledger directory growing in size https://github.com/MinaProtocol/mina/pull/14819
* Reset feature flags before assertion https://github.com/MinaProtocol/mina/pull/14402
* Fix parsing of URLs https://github.com/MinaProtocol/mina/pull/14809
#### Complete CHANGELOG since 4a0fff9 in:
GitHub Compare: 4a0fff9...56fa1db
#### O1JS CHANGELOG
https://github.com/o1-labs/o1js/blob/main/CHANGELOG.md
#### Installation
Supported environments include macOS, Linux (Debian 10, 11 and Ubuntu 20.04 LTS), and any host machine with Docker.
There is no schema change comparing to previous release candidate when installing Mina Archive node
#### Upgrading and Connecting to Testworld 2.0
**Debian Packages**
First, set up and update the rampup Debian Repository for your platform.
Replace CODENAME with the appropriate codename for your machine (`focal`, `buster`, or `bullseye`), and run:
```
sudo rm /etc/apt/sources.list.d/mina*.list
echo "deb [trusted=yes] http://packages.o1test.net/ CODENAME rampup" | sudo tee /etc/apt/sources.list.d/mina-rampup.list
sudo apt-get update
```
Then, install the package or packages that you need:
- Mina Daemon `sudo apt-get install -y mina-berkeley=2.0.0rampup8-56fa1db`
- Mina Archive `sudo apt-get install -y mina-archive=2.0.0rampup8-56fa1db`
- zkApps Test Transaction CLI `sudo apt-get install -y mina-zkapp-test-transaction=2.0.0rampup8-56fa1db`
- [zkApps Transaction CLI README](https://github.com/MinaProtocol/mina/blob/ecbb3d490dce0f199894ebdf787a03b8fec64bd4/src/app/zkapp_test_transaction/README.md)
**Docker Images**
Every docker image is built for each of the supported platforms.
To select the base docker image, replace CODENAME with the codename appropriate for your machine (`focal`, `buster`, or `bullseye`):
- Mina Daemon: [gcr.io/o1labs-192920/mina-daemon:2.0.0rampup8-56fa1db-CODENAME-berkeley](http://gcr.io/o1labs-192920/mina-daemon2.0.0rampup8-56fa1db-CODENAME-berkeley)
- Mina Archive: [gcr.io/o1labs-192920/mina-archive:2.0.0rampup8-56fa1db-CODENAME](http://gcr.io/o1labs-192920/mina-archive:2.0.0rampup8-56fa1db-CODENAME)
#### Step-by-Step Guide
This version connects and functions only on the newly launched Testworld 2.0.
1. Create a libp2p key pair for a node the first time and persist it.
`mina libp2p generate-keypair -privkey-path <path-to-the-key-file>`
2. Set the environment variable `MINA_LIBP2P_PASS` with the password set for the libp2p key pair in the previous step.
3. Run mina daemon with:
`-libp2p-keypair <path-to-the-key-file>` and `--peer-list-url https://storage.googleapis.com/seed-lists/testworld-2-0_seeds.txt` and `--itn-max-logs 10000`
For more detailed information please check out our [Testworld documentation](https://docs.minaprotocol.com/test-world-2/launching-a-node).
If you are running the correct version on the correct network, Testworld 2.0, the expected output of the `mina client status` command is:
```
Git SHA-1: 56fa1dbcc36aa638c84cdc624adc407075a088a2
Chain ID: 332c8cc05ba8de9efc23a011f57015d8c9ec96fac81d5d3f7a06969faf4bce92
```
**Full Changelog**: https://github.com/MinaProtocol/mina/compare/2.0.0rampup7...2.0.0rampup8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment