You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* solana.rs: Modify KeyStore config to accept literal pubkeys
This **breaking** change improves on the legacy file-based keystore
appoach to program/mapping public keys. With it, the user can name the
public keys in-line, e.g.:
'key_store.program_key_path = "program_key.json"'
is now expressed as:
'key_store.program_key = "FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH"'
This change is accompanied with a small tool to inline the public keys
from an older file-based config, named "agent-migrate-config".
The sample configs are rewritten to use the new format and name the
appropriate pubkeys out-of-the-box.
Tests include a sanity-check for the migration tool.
* README.md: Include key store migration information for v2.0.0
* README.md: add pipe for migrator output
* test_integration.py: Add missing manual agent invocation
This is necessary to provide the agent with an altered migrated
config.
* README.md: typo
* solana.rs: strinigified -> stringified
We don't like our SOL addresses strinigified.
* config.sample.pythtest.toml: The perils of Ctrl-C + Ctrl-V
Copy file name to clipboardExpand all lines: README.md
+36-14
Original file line number
Diff line number
Diff line change
@@ -32,24 +32,46 @@ The logging level can be configured at runtime
32
32
through the `RUST_LOG` environment variable using the standard
33
33
`error|warn|info|debug|trace` levels.
34
34
35
-
### Key Store
36
-
If you already have a key store set up, you can skip this step. If you haven't, you will need to create one before publishing data. A key store contains the cryptographic keys needed to publish data. Once you have a key store set up, please ensure that the configuration file mentioned above contains the correct path to your key store.
35
+
### Key Store Config Migration [v1.x.x LEGACY]
36
+
Pyth agent v2.0.0 introduces a simplified program and mapping key configuration. This breaking change alters how you define program/mapping key options in your agent config:
37
+
```toml
38
+
# Old v1.x.x way
39
+
[primarynetwork]
40
+
key_store.root_path = "/path/to/keystore"
41
+
key_store.publish_keypair_path = "publish_key_pair.json"# Relative path from root_path, "publish_key_pair.json" by default
42
+
key_store.program_key_path = "program_key.json"# Relative path from root_path, "program_key.json" by default
43
+
key_store.mapping_key_path = "mapping_key.json"# Relative path from root_path, "mapping_key.json" by default
44
+
45
+
# [...]
46
+
47
+
# New v2.0.0 way
48
+
[primary_network]
49
+
key_store.publish_keypair_path = "/path/to/keypair.json"# The root_path is gone, we specify the full path
50
+
# Not using separate files anymore
51
+
key_store.program_key = "LiteralProgramPubkeyInsideTheConfig"# contents of legacy program_key.json;
52
+
key_store.mapping_key = "LiteralMappingPubkeyInsideTheConfig"# contents of legacy mapping_key.json
53
+
54
+
# [...]
37
55
38
-
```bash
39
-
# Install the Solana Tool Suite, needed for creating the key used to sign your transactions.
40
-
sh -c "$(curl -sSfL https://release.solana.com/v1.14.13/install)"
56
+
```
41
57
42
-
# Create the key store directory. This can be any location that is convenient for you.
43
-
PYTH_KEY_STORE=$HOME/.pythd
58
+
#### Automatic Migration
59
+
If you are upgrading to agent v2.0.0 with an existing config, you can use the provided automatic migrator program:
60
+
```shell
61
+
# Build
62
+
$ cargo build --release
63
+
# Run the migrator, making sure that the key store with previous keys is reachable
0 commit comments