From e4321f828747b90b8d7388212679845b7e304686 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Thu, 21 Mar 2024 20:55:12 +0000 Subject: [PATCH 1/7] docs: pip 5 --- docs/pips/operational/op-pip-5.md | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 docs/pips/operational/op-pip-5.md diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md new file mode 100644 index 00000000..29d957f0 --- /dev/null +++ b/docs/pips/operational/op-pip-5.md @@ -0,0 +1,40 @@ +# Operational PIP: Accept Pyth Solana receiver governance authority + +## Abstract + +Upgrade the Pyth Solana Receiver on Solana to support new features. + +## Rationale + +We want the Pyth Solana Receiver to support these new features to improve its usability. Moreover, these features will enable the option to build a push oracle on top of the Pyth Solana Receiver. + +## Description + +We are adding two features: +- The option to provide a write authority, different than the payer when posting price updates. The payer is responsible for funding the rent of new price update accounts and to pay the fee for posting an update while the write authority has the ability to update the price update present in an existing price update account. +- When a price update gets posted it will contain a `posted_slot`, this field can be used to check when the update got posted on Solana. + +## Implementation Plan + +* The Pyth Solana Receiver contract has been deployed and tested at the +[`rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ`](https://solscan.io/account/rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ) address. + +* Proposal id: [`FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6`](https://proposals.pyth.network/?tab=proposals&proposal=FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6) + +* Relevant commits: +- https://github.com/pyth-network/pyth-crosschain/commit/f79f205895de61ddec69ae3ed6d4bd1ca1c6542f +- https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b9330db754950a05 + +* Verify the implementation following the guide below: + +1. Make sure you have the Solana CLI tools and Docker. + 1. solana: install `solana` from [here](https://docs.solanalabs.com/cli/install). + 2. Docker: install it from [here](https://www.docker.com/products/docker-desktop/) +2. Clone the `pyth-crosschain` repo (`git clone https://github.com/pyth-network/pyth-crosschain.git`). +3. Go to `target_chains/solana/` +4. Run `./scripts/build_verifiable_program.sh`. This will compile the code in a reproducible way and output a hash of the bytecode obtained from the code. +5. In the [proposal page](https://proposals.pyth.network/?tab=proposals&proposal=FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6), look at the following two important keys: + 1. The `program` field should match the program we're trying to upgrade. + 2. The `buffer` field is the account that contains the new implementation for the program. Copy the address. +6. Get the hash of the proposed buffer `solana -u m program dump temp_file && shasum -a 256 temp_file && rm temp_file` +7. Make sure the hash from step 4 and from step 6 match. From fd45513651ef594459cfb3d0a77c35d0edc1e016 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Thu, 21 Mar 2024 20:56:21 +0000 Subject: [PATCH 2/7] Go --- docs/pips/operational/op-pip-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md index 29d957f0..7a884100 100644 --- a/docs/pips/operational/op-pip-5.md +++ b/docs/pips/operational/op-pip-5.md @@ -1,4 +1,4 @@ -# Operational PIP: Accept Pyth Solana receiver governance authority +# Operational PIP: Improve usability of Pyth Solana Receiver ## Abstract From f9164e72dbde3c67a0b77402a0411702c7b98b61 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Thu, 21 Mar 2024 20:57:42 +0000 Subject: [PATCH 3/7] Send commits --- docs/pips/operational/op-pip-5.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md index 7a884100..9a223ed3 100644 --- a/docs/pips/operational/op-pip-5.md +++ b/docs/pips/operational/op-pip-5.md @@ -22,8 +22,8 @@ We are adding two features: * Proposal id: [`FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6`](https://proposals.pyth.network/?tab=proposals&proposal=FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6) * Relevant commits: -- https://github.com/pyth-network/pyth-crosschain/commit/f79f205895de61ddec69ae3ed6d4bd1ca1c6542f -- https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b9330db754950a05 +https://github.com/pyth-network/pyth-crosschain/commit/f79f205895de61ddec69ae3ed6d4bd1ca1c6542f +https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b9330db754950a05 * Verify the implementation following the guide below: From 24909c876ad6a29d823ab1d6e10341b7cc29caf2 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Thu, 21 Mar 2024 20:58:15 +0000 Subject: [PATCH 4/7] Fix nit --- docs/pips/operational/op-pip-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md index 9a223ed3..040bbece 100644 --- a/docs/pips/operational/op-pip-5.md +++ b/docs/pips/operational/op-pip-5.md @@ -31,7 +31,7 @@ https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b 1. solana: install `solana` from [here](https://docs.solanalabs.com/cli/install). 2. Docker: install it from [here](https://www.docker.com/products/docker-desktop/) 2. Clone the `pyth-crosschain` repo (`git clone https://github.com/pyth-network/pyth-crosschain.git`). -3. Go to `target_chains/solana/` +3. Go to `pyth-crosschain/target_chains/solana/` 4. Run `./scripts/build_verifiable_program.sh`. This will compile the code in a reproducible way and output a hash of the bytecode obtained from the code. 5. In the [proposal page](https://proposals.pyth.network/?tab=proposals&proposal=FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6), look at the following two important keys: 1. The `program` field should match the program we're trying to upgrade. From 4b928b7e1593e717503f048187665ec8077c8b42 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Thu, 21 Mar 2024 20:59:29 +0000 Subject: [PATCH 5/7] Add more info --- docs/pips/operational/op-pip-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md index 040bbece..b562cfeb 100644 --- a/docs/pips/operational/op-pip-5.md +++ b/docs/pips/operational/op-pip-5.md @@ -35,6 +35,6 @@ https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b 4. Run `./scripts/build_verifiable_program.sh`. This will compile the code in a reproducible way and output a hash of the bytecode obtained from the code. 5. In the [proposal page](https://proposals.pyth.network/?tab=proposals&proposal=FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6), look at the following two important keys: 1. The `program` field should match the program we're trying to upgrade. - 2. The `buffer` field is the account that contains the new implementation for the program. Copy the address. + 2. The `buffer` field is the account that contains the proposed new implementation for the program. Copy the address. 6. Get the hash of the proposed buffer `solana -u m program dump temp_file && shasum -a 256 temp_file && rm temp_file` 7. Make sure the hash from step 4 and from step 6 match. From 4342df68dda1b0ad54aecbfc2a16aeb8ba22c743 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 22 Mar 2024 13:52:49 +0000 Subject: [PATCH 6/7] Go --- docs/pips/operational/op-pip-5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md index b562cfeb..2fc975d2 100644 --- a/docs/pips/operational/op-pip-5.md +++ b/docs/pips/operational/op-pip-5.md @@ -36,5 +36,5 @@ https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b 5. In the [proposal page](https://proposals.pyth.network/?tab=proposals&proposal=FZJywtTuJqZMRtP72Vh4dvcBhduGHLNz58Y3X3C5EpW6), look at the following two important keys: 1. The `program` field should match the program we're trying to upgrade. 2. The `buffer` field is the account that contains the proposed new implementation for the program. Copy the address. -6. Get the hash of the proposed buffer `solana -u m program dump temp_file && shasum -a 256 temp_file && rm temp_file` +6. Get the hash of the proposed buffer `solana -u m program dump temp_file && sha256sum temp_file && rm temp_file` 7. Make sure the hash from step 4 and from step 6 match. From 4dc2050bd2d42c2539f0066bca9c69480fe3ca79 Mon Sep 17 00:00:00 2001 From: Guillermo Bescos Date: Fri, 22 Mar 2024 13:55:22 +0000 Subject: [PATCH 7/7] Add sha256sum --- docs/pips/operational/op-pip-5.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pips/operational/op-pip-5.md b/docs/pips/operational/op-pip-5.md index 2fc975d2..83343513 100644 --- a/docs/pips/operational/op-pip-5.md +++ b/docs/pips/operational/op-pip-5.md @@ -27,9 +27,10 @@ https://github.com/pyth-network/pyth-crosschain/commit/1e5df8537adbecf300fa51a8b * Verify the implementation following the guide below: -1. Make sure you have the Solana CLI tools and Docker. +1. Make sure you have the Solana CLI tools, Docker and sha256sum. 1. solana: install `solana` from [here](https://docs.solanalabs.com/cli/install). 2. Docker: install it from [here](https://www.docker.com/products/docker-desktop/) + 3. sha256sum: if on Mac you can install it as a part of coreutils with `brew install coreutils` 2. Clone the `pyth-crosschain` repo (`git clone https://github.com/pyth-network/pyth-crosschain.git`). 3. Go to `pyth-crosschain/target_chains/solana/` 4. Run `./scripts/build_verifiable_program.sh`. This will compile the code in a reproducible way and output a hash of the bytecode obtained from the code.