Skip to content

Commit 38c36e2

Browse files
update example keys
1 parent 93a13f4 commit 38c36e2

File tree

4 files changed

+9
-19
lines changed

4 files changed

+9
-19
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set( CMAKE_INCLUDE_CURRENT_DIR ON )
1515
include_directories( program/src/ )
1616

1717
# gcc compiler/linker flags
18-
add_compile_options( -ggdb -Wall -Wextra -Werror -mavx2 -std=c++11 -m64 )
18+
add_compile_options( -ggdb -Wall -Wextra -Werror -std=c++11 -m64 )
1919
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
2020

2121
#

dashboard/dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Prices
55
this.req = [];
66
this.sub = [];
77
this.reuse = [];
8-
this.fact = [ 0, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6, 1e-7, 1e-8 ];
8+
this.fact = [ 0, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-6, 1e-7, 1e-8, 1e-9, 1e-10 ];
99
}
1010
send( msg, callback ) {
1111
let id = 0;

doc/getting_started.md

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The pyth-client repo consists of a C++ library (libpc.a), a command-line administration tool (pyth) and a json/websocket-based server (pythd).
44

5-
You can integrate with libpc directly in your application (see `pctest/test_publish.cpp` example) or connect to the pythd server and interact via json-based messaging over websockets (see `pctest/test_publish.py`).
5+
You can integrate with libpc directly in your application. See `pctest/test_publish.cpp` ifor an example.
66

77
Before doing this you need to setup a *key-store* directory. A key-store is a collection of cryptographic keys for interracting with the solana block-chain. This can be done via the pyth command-line tool. First, build the project by following the instructions in the README.md file and cd to the build directory, then run the following:
88

@@ -20,7 +20,7 @@ This creates the directory (if it didnt already exist) and creates a key-pair fi
2020
Please extract the public key from this key-pair and send it to the administrator so it can be permissioned for your symbols of interest. The public key can be extracted as follows:
2121

2222
```
23-
./pyth pub_key $KDIR/publish_key_pair.json
23+
./pyth get_pub_key $KDIR/publish_key_pair.json
2424
```
2525

2626
This will output the public key in base58 encoding and will look something like:
@@ -29,26 +29,16 @@ This will output the public key in base58 encoding and will look something like:
2929
5rYvdyWAunZgD2EC1aKo7hQbutUUnkt7bBFM6xNq2z7Z
3030
```
3131

32-
Once permissioned, you need two additional public keys in the key-store. The id of the so-called mapping-account that contains the list of on-chain symbols and the id of the on-chain oracle program that you use to publish prices. A program already exists to initialize these for testing on solana devnet:
32+
Once permissioned, you need two additional public keys in the key-store. The id of the mapping-account that contains the directory listing of the on-chain symbols and the id of the on-chain oracle program that you use to publish prices. A program already exists to initialize these for testing:
3333

3434
```
3535
../pctest/init_key_store.sh $KDIR
3636
```
3737

3838
This creates two files: `$KDIR/program_key.json` and `$KDIR/mapping_key.json`.
3939

40-
Once pemissioned, you can test your setup by running the test_publisher.cpp example program for publishing and subscribing to two symbols on the devnet solana chain:
40+
Once pemissioned, you can test your setup by running the test_publish.cpp example program for publishing and subscribing to two symbols on the test solana node:
4141

4242
```
43-
./test_publish -k $KDIR -r devnet.solana.com
44-
```
45-
46-
There is a python version of the same program that uses the pythd server instead to publish prices on-chain:
47-
48-
```
49-
# start the pythd server
50-
./pythd -k $KDIR -r devnet.solana.com &
51-
52-
# start the publisher
53-
../pctest/test_publish.py
43+
./test_publish -k $KDIR -r 44.232.27.44
5444
```

pctest/init_key_store.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ KDIR=$1
1616
if [ -z "$KDIR" ] ; then
1717
KDIR=$HOME/.pythd
1818
fi
19-
echo "25d2dsoksoMjjzKJ7tyP4n1CWLzmb4MTHhqJEbzGbT8q" > $KDIR/program_key.json
19+
echo "7LmwnZDXi2d9dYsp45WsPkudU2Gb2ftjUC6fsxYvZocu" > $KDIR/program_key.json
2020
check "chmod 0400 $KDIR/program_key.json"
21-
echo "B2Csr2HUoq7CPCnjXBuxD7jb4cbpsQ2nFY9kSy61MUkN" > $KDIR/mapping_key.json
21+
echo "HQ9xBAuxpXcd9BgNjgE1Jm4uhwvU8BicP5w3gKfPRuAo" > $KDIR/mapping_key.json
2222
check "chmod 0400 $KDIR/mapping_key.json"

0 commit comments

Comments
 (0)