Skip to content

Commit b0e86e7

Browse files
authored
Merge pull request #63 from bitauth/upgrade-instructions
Add upgrade instructions, improve release notes
2 parents 308dddd + 789b351 commit b0e86e7

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

.cspell.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
"language": "en",
55
"words": [
66
"Admin's",
7+
"Asic",
8+
"authbase",
79
"authchain",
810
"authchains",
11+
"authhead",
912
"backoff",
1013
"bchd",
1114
"bchn",
@@ -21,6 +24,8 @@
2124
"camelcase",
2225
"chaingraph",
2326
"chaingraph's",
27+
"CHECKLOCKTIMEVERIFY",
28+
"CHECKSEQUENCEVERIFY",
2429
"Chipnet",
2530
"CLI's",
2631
"codecov",
@@ -31,6 +36,7 @@
3136
"denormalized",
3237
"Devs",
3338
"execa",
39+
"fkey",
3440
"getaddr",
3541
"getblocks",
3642
"getdata",
@@ -69,6 +75,7 @@
6975
"pino",
7076
"pkey",
7177
"pldbgapi",
78+
"plpgsql",
7279
"plusplus",
7380
"postgres",
7481
"postgresql",
@@ -78,6 +85,7 @@
7885
"PUSHBYTES",
7986
"pushdata",
8087
"readonly",
88+
"regclass",
8189
"rpcallowip",
8290
"rpcpassword",
8391
"rpcuser",

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,22 @@ Mainnet Chaingraph deployments may take 10 hours or more to sync fully and build
9999

100100
To continue exploring the Chaingraph API, check out the example queries on [**chaingraph.cash**](https://chaingraph.cash).
101101

102+
### Upgrade Chaingraph
103+
104+
These instructions upgrade the `my-chaingraph` cluster created in the [Quick Start](#quick-start) to the latest version of Chaingraph:
105+
106+
```sh
107+
helm repo update # Pull the latest bitauth/chaingraph helm chart
108+
helm get values my-chaingraph -o yaml > my-values.yaml
109+
helm upgrade my-chaingraph bitauth/chaingraph --reset-values --values my-values.yaml
110+
```
111+
112+
As a best practice, consider preserving the `my-values.yaml` file for future reference. You can also preserve the latest deployment status and notes at any time:
113+
114+
```sh
115+
helm status my-chaingraph > status.txt
116+
```
117+
102118
## Architecture
103119

104120
Chaingraph is a Kubernetes application which manages a stack of open source software including one or more Bitcoin Cash full nodes, a syncing agent, a Postgres SQL database, and a Hasura instance.

charts/chaingraph/templates/NOTES.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ If this installation is intended for production use, an allow-list is recommende
182182
: |___/ |_| :
183183
:............................................................:
184184

185-
Chaingraph version {{ .Chart.Version }} was installed successfully 🚀
185+
Chaingraph version {{ .Chart.Version }} was {{ if .Release.IsUpgrade }}upgraded{{ else }}installed{{ end }} successfully 🚀
186186

187-
Above are some notes about your configuration. You may want to copy and save these notes for future reference.
187+
Above are some notes about your configuration. Consider printing them to a file for future reference:
188+
$ helm status {{ .Release.Name }} > notes-{{ .Release.Name }}.txt

images/hasura/hasura-data/migrations/default/1616195337538_init/up.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COMMENT ON COLUMN block.version IS 'The "version" field of this block; a 4-byte
3131
COMMENT ON COLUMN block.timestamp IS 'The uint32 current Unix timestamp claimed by the miner at the time this block was mined. By consensus, block timestamps must be within ~2 hours of the actual time, but timestamps are not guaranteed to be accurate. Timestamps of later blocks can also be earlier than their parent blocks.';
3232
COMMENT ON COLUMN block.hash IS 'The 32-byte, double-sha256 hash of the block header (encoded using the standard P2P network format) in big-endian byte order. This is used as a universal, unique identifier for the block. Big-endian byte order is typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).';
3333
COMMENT ON COLUMN block.previous_block_hash IS 'The 32-byte, double-sha256 hash of the previous block''s header in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).';
34-
COMMENT ON COLUMN block.merkle_root IS 'The 32-byte root hash of the double-sha256 merkle tree of transactions confirmed by this block. Note, the unusual merkle tree construction used by most chains is vulnerable to CVE-2012-2459. The final node in oddly-numbered levels is duplicated, and special care is required to ensure trees contain minimal duplicatation.';
34+
COMMENT ON COLUMN block.merkle_root IS 'The 32-byte root hash of the double-sha256 merkle tree of transactions confirmed by this block. Note, the unusual merkle tree construction used by most chains is vulnerable to CVE-2012-2459. The final node in oddly-numbered levels is duplicated, and special care is required to ensure trees contain minimal duplication.';
3535
COMMENT ON COLUMN block.bits IS 'The uint32 packed representation of the difficulty target being used for this block. To be valid, the block hash value must be less than this difficulty target.';
3636
COMMENT ON COLUMN block.nonce IS 'The uint32 nonce used for this block. This field allows miners to introduce entropy into the block header, changing the resulting hash during mining.';
3737
COMMENT ON COLUMN block.size_bytes IS 'The network-encoded size of this block in bytes including transactions.';
@@ -59,7 +59,7 @@ ALTER TABLE ONLY transaction
5959
COMMENT ON TABLE transaction IS 'A transaction.';
6060
COMMENT ON COLUMN transaction.internal_id IS 'A unique, int64 identifier for this transaction assigned by Chaingraph. This value is not guaranteed to be consistent between Chaingraph instances.';
6161
COMMENT ON COLUMN transaction.hash IS 'The 32-byte, double-sha256 hash of this transaction (encoded using the standard P2P network format) in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).';
62-
COMMENT ON COLUMN transaction.version IS 'The version of this transaction. In the v1 and v2 transaction formats, a 4-byte field typically represented as an int32. (Verson 2 transactions are defined in BIP68.)';
62+
COMMENT ON COLUMN transaction.version IS 'The version of this transaction. In the v1 and v2 transaction formats, a 4-byte field typically represented as an int32. (Version 2 transactions are defined in BIP68.)';
6363
COMMENT ON COLUMN transaction.locktime IS 'The uint32 locktime at which this transaction is considered valid. Locktime can be provided as either a timestamp or a block height: values less than 500,000,000 are understood to be a block height (the current block number in the chain, beginning from block 0); values greater than or equal to 500,000,000 are understood to be a UNIX timestamp.';
6464
COMMENT ON COLUMN transaction.size_bytes IS 'The network-encoded size of this transaction in bytes.';
6565
COMMENT ON COLUMN transaction.is_coinbase IS 'A boolean value indicating whether this transaction is a coinbase transaction. A coinbase transaction must be the 0th transaction in a block, it must have one input which spends from the empty outpoint_transaction_hash (0x0000...) and – after BIP34 – includes the block''s height in its unlocking_bytecode (A.K.A. "coinbase" field), and it may spend the sum of the block''s transaction fees and block reward to its output(s).';
@@ -587,7 +587,7 @@ $$;
587587
COMMENT ON FUNCTION parse_bytecode_pattern_with_pushdata_lengths (bytea) IS 'Parse a sequence of bitcoin VM bytecode, extracting the first byte of each instruction and any pushdata length bytes (for OP_PUSHDATA_1, OP_PUSHDATA_2, and OP_PUSHDATA_4). The resulting pattern excludes the contents of pushed values such that similar bytecode sequences produce the same pattern, even if different data or public keys are used.';
588588

589589
-- For performance, this function does not detect the otherwise valid (but useless) redeem bytecode of 'OP_1'.
590-
-- Redeem bytecodes of 'OP_1' through 'OP_16' will always return NULL.
590+
-- Redeem bytecode values of 'OP_1' through 'OP_16' will always return NULL.
591591
CREATE FUNCTION parse_bytecode_pattern_redeem(bytecode bytea) RETURNS bytea
592592
LANGUAGE plpgsql IMMUTABLE
593593
AS $$

0 commit comments

Comments
 (0)