From 0f80be70f5b1e7620d3550f364f607479e8be935 Mon Sep 17 00:00:00 2001 From: Noah Prince <83885631+ChewingGlass@users.noreply.github.com> Date: Tue, 12 Sep 2023 15:46:17 -0500 Subject: [PATCH 01/31] Fix iot active devices (#405) --- packages/distributor-oracle/src/server.ts | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/packages/distributor-oracle/src/server.ts b/packages/distributor-oracle/src/server.ts index 168995b96..f270baa5c 100644 --- a/packages/distributor-oracle/src/server.ts +++ b/packages/distributor-oracle/src/server.ts @@ -69,10 +69,23 @@ export class PgDatabase implements Database { getActiveDevices(): Promise { return Reward.count({ where: { - lastReward: { - [Op.gte]: new Date(Date.now() - 1000 * 60 * 60 * 24 * 30), // Active within the last 30 days - }, - rewardType: 'mobile_gateway' + [Op.and]: [ + { + lastReward: { + [Op.gte]: new Date(Date.now() - 1000 * 60 * 60 * 24 * 30), // Active within the last 30 days + }, + }, + { + [Op.or]: [ + { + rewardType: "mobile_gateway", + }, + { + rewardType: "iot_gateway", + }, + ], + }, + ], }, }); } @@ -105,8 +118,13 @@ export class PgDatabase implements Database { return "0"; } const keyToAssetKey = keyToAssetForAsset(asset, DAO); - const keyToAsset = await this.issuanceProgram.account.keyToAssetV0.fetch(keyToAssetKey); - const entityKey = decodeEntityKey(keyToAsset.entityKey, keyToAsset.keySerialization)!; + const keyToAsset = await this.issuanceProgram.account.keyToAssetV0.fetch( + keyToAssetKey + ); + const entityKey = decodeEntityKey( + keyToAsset.entityKey, + keyToAsset.keySerialization + )!; // Verify the creator is our entity creator, otherwise they could just // pass in any NFT with this ecc compact to collect rewards if ( From 96cefc2fc481a9cfa9518a4220fa7554259561de Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 12:01:15 -0500 Subject: [PATCH 02/31] improve distributor oracle perf --- .../src/accountFetchCache.ts | 136 +++++++++++++----- packages/distributor-oracle/src/client.ts | 75 +++++++--- yarn.lock | 43 ------ 3 files changed, 154 insertions(+), 100 deletions(-) diff --git a/packages/account-fetch-cache/src/accountFetchCache.ts b/packages/account-fetch-cache/src/accountFetchCache.ts index 8eca1d99b..51e6e00a6 100644 --- a/packages/account-fetch-cache/src/accountFetchCache.ts +++ b/packages/account-fetch-cache/src/accountFetchCache.ts @@ -39,6 +39,26 @@ function getWriteableAccounts( let id = 0; +let singletons: Record = {}; +export function getSingleton(conn: Connection): AccountFetchCache { + const commitment = conn.commitment || "confirmed" + const endp = conn.rpcEndpoint + if (!singletons[endp + commitment]) { + singletons[endp + commitment] = new AccountFetchCache({ + connection: conn, + commitment, + }) + + } + return singletons[endp + commitment]! +} + +function setSingleton(conn: Connection, cache: AccountFetchCache) { + const commitment = conn.commitment || "confirmed"; + const endp = conn.rpcEndpoint; + singletons[endp + commitment] = cache; +} + export class AccountFetchCache { connection: Connection; chunkSize: number; @@ -64,9 +84,7 @@ export class AccountFetchCache { publicKey: PublicKey, com?: Commitment ) => Promise | null>; - oldSendTransaction: ( - ...args: any[] - ) => Promise; + oldSendTransaction: (...args: any[]) => Promise; oldSendRawTransaction: ( rawTransaction: Buffer | Uint8Array | Array, options?: SendOptions @@ -101,8 +119,7 @@ export class AccountFetchCache { ); this.oldSendTransaction = connection.sendTransaction.bind(connection); - this.oldSendRawTransaction = - connection.sendRawTransaction.bind(connection); + this.oldSendRawTransaction = connection.sendRawTransaction.bind(connection); const self = this; @@ -152,12 +169,14 @@ export class AccountFetchCache { return self.requeryMissing(instructions); }) .catch(console.error); - } catch(e: any) { + } catch (e: any) { // TODO: handle transaction v2 } return result; }; + + setSingleton(connection, this) } async requeryMissing(instructions: TransactionInstruction[]) { @@ -214,7 +233,10 @@ export class AccountFetchCache { this.currentBatch = new Set(); // Erase current batch from state, so we can fetch multiple at a time try { const keys = Array.from(currentBatch); - const array = await this.connection.getMultipleAccountsInfo(keys.map(b => new PublicKey(b)), this.commitment) + const array = await this.connection.getMultipleAccountsInfo( + keys.map((b) => new PublicKey(b)), + this.commitment + ); keys.forEach((key, index) => { const callback = this.pendingCallbacks.get(key); callback && callback(array[index], null); @@ -363,6 +385,48 @@ export class AccountFetchCache { return query; } + async searchMultiple( + pubKeys: PublicKey[], + parser?: AccountParser | undefined, + isStatic: Boolean = false, // optimization, set if the data will never change + forceRequery = false + ): Promise<(ParsedAccountBase | undefined)[]> { + pubKeys.forEach(key => { + this.registerParser(key, parser); + const address = key.toBase58(); + if (isStatic) { + this.statics.add(address); + } else if (this.statics.has(address)) { + this.statics.delete(address); // If trying to use this as not static, need to rm it from the statics list. + } + + if (forceRequery || !this.genericCache.has(address)) { + this.currentBatch.add(address); + } + }) + + const searched = new Set(pubKeys.map((p) => p.toBase58())); + // Force a batch fetch to resolve all accounts + const { keys, array } = await this.fetchBatch(); + // Cache these results if they aren't going to change + if (isStatic) { + keys.forEach((key, index) => { + if (searched.has(key)) { + const item = array[index]; + if (item) { + this.genericCache.set( + key, + this.getParsed(key, item, parser) || null + ); + } + } + }); + } + + + return pubKeys.map(key => this.genericCache.get(key.toBase58()) as ParsedAccountBase | undefined); + } + onAccountChange( key: PublicKey, parser: AccountParser | undefined, @@ -373,7 +437,7 @@ export class AccountFetchCache { const address = key.toBase58(); this.updateCache(address, parsed || null); } catch (e: any) { - console.error("accountFetchCache", "Failed to update account", e) + console.error("accountFetchCache", "Failed to update account", e); } } @@ -391,43 +455,43 @@ export class AccountFetchCache { // Only websocket watch accounts that exist // Don't recreate listeners // xNFT doesn't support onAccountChange, so we have to make a new usable connection. - if (!this.accountChangeListeners.has(address)) { - try { + if (!this.accountChangeListeners.has(address)) { + try { + this.accountChangeListeners.set( + address, + this.connection.onAccountChange( + id, + (account) => this.onAccountChange(id, undefined, account), + this.commitment + ) + ); + } catch (e: any) { + if (e.toString().includes("not implemented")) { + // @ts-ignore + this.usableConnection = + // @ts-ignore + this.usableConnection || + new Connection( + // @ts-ignore + this.connection._rpcEndpoint, + this.commitment + ); this.accountChangeListeners.set( address, - this.connection.onAccountChange( + // @ts-ignore + this.usableConnection.onAccountChange( id, + // @ts-ignore (account) => this.onAccountChange(id, undefined, account), this.commitment ) ); - } catch (e: any) { - if (e.toString().includes("not implemented")) { - // @ts-ignore - this.usableConnection = - // @ts-ignore - this.usableConnection || - new Connection( - // @ts-ignore - this.connection._rpcEndpoint, - this.commitment - ); - this.accountChangeListeners.set( - address, - // @ts-ignore - this.usableConnection.onAccountChange( - id, - // @ts-ignore - (account) => this.onAccountChange(id, undefined, account), - this.commitment - ) - ); - } else { - console.error(e) - throw e - } + } else { + console.error(e); + throw e; } } + } } else if (!exists) { // Poll accounts that don't exist this.missingAccounts.set( diff --git a/packages/distributor-oracle/src/client.ts b/packages/distributor-oracle/src/client.ts index 7c6abbafb..dc393dbf5 100644 --- a/packages/distributor-oracle/src/client.ts +++ b/packages/distributor-oracle/src/client.ts @@ -1,4 +1,5 @@ -import { AnchorProvider, BN, Program } from '@coral-xyz/anchor'; +import { AnchorProvider, BN, IdlAccounts, Program } from '@coral-xyz/anchor'; +import { getSingleton } from '@helium/account-fetch-cache'; import { decodeEntityKey, init, @@ -7,7 +8,6 @@ import { keyToAssetForAsset, } from '@helium/helium-entity-manager-sdk'; import { daoKey } from '@helium/helium-sub-daos-sdk'; -import { HeliumEntityManager } from '@helium/idls/lib/types/helium_entity_manager'; import { LazyDistributor } from '@helium/idls/lib/types/lazy_distributor'; import { RewardsOracle } from '@helium/idls/lib/types/rewards_oracle'; import { @@ -31,6 +31,7 @@ import { TransactionInstruction, } from '@solana/web3.js'; import axios from 'axios'; +import { HeliumEntityManager } from "@helium/idls/lib/types/helium_entity_manager"; const HNT = process.env.HNT_MINT ? new PublicKey(process.env.HNT_MINT) @@ -107,23 +108,47 @@ export async function getPendingRewards( ); const hemProgram = await init(program.provider as AnchorProvider); - const withRecipients = await Promise.all( - entityKeys.map(async (entityKey) => { - const keyToAssetK = keyToAssetKey(dao, entityKey, encoding)[0]; - const keyToAsset = await hemProgram.account.keyToAssetV0.fetch( - keyToAssetK - ); - const recipient = recipientKey(lazyDistributor, keyToAsset.asset)[0]; - const recipientAcc = await program.account.recipientV0.fetchNullable( - recipient - ); - - return { - entityKey, - recipientAcc, - }; + const cache = await getSingleton(hemProgram.provider.connection) + const keyToAssetKs = entityKeys.map((entityKey) => { + return keyToAssetKey(dao, entityKey, encoding)[0]; + }) + + const keyToAssets = await cache.searchMultiple( + keyToAssetKs, + (pubkey, account) => ({ + pubkey, + account, + info: hemProgram.coder.accounts.decode< + IdlAccounts["keyToAssetV0"] + >("keyToAssetV0", account.data), + }), + true, + false + ); + keyToAssets.forEach((kta, index) => { + if (!kta?.info) { + throw new Error(`Key to asset account not found for entity key ${entityKeys[index]}`) + } + }) + const recipientKs = keyToAssets.map( + (keyToAsset) => recipientKey(lazyDistributor, keyToAsset!.info!.asset)[0] + ); + const recipients = await cache.searchMultiple( + recipientKs, + (pubkey, account) => ({ + pubkey, + account, + info: program.coder.accounts.decode< + IdlAccounts["recipientV0"] + >("recipientV0", account.data), }) ); + const withRecipients = recipients.map((recipient, index) => { + return { + entityKey: entityKeys[index], + recipientAcc: recipient?.info, + } + }) return withRecipients.reduce((acc, { entityKey, recipientAcc }) => { const sortedOracleRewards = oracleRewards @@ -213,10 +238,18 @@ export async function formBulkTransactions({ let recipientKeys = assets.map( (asset) => recipientKey(lazyDistributor, asset)[0] ); - let recipientAccs = - await lazyDistributorProgram.account.recipientV0.fetchMultiple( - recipientKeys - ); + const cache = await getSingleton( + heliumEntityManagerProgram.provider.connection + ); + const recipientAccs = ( + await cache.searchMultiple(recipientKeys, (pubkey, account) => ({ + pubkey, + account, + info: lazyDistributorProgram.coder.accounts.decode< + IdlAccounts["recipientV0"] + >("recipientV0", account.data), + })) + ).map((x) => x!.info!); let ixsPerAsset = await Promise.all( recipientAccs.map(async (recipientAcc, idx) => { diff --git a/yarn.lock b/yarn.lock index ca55e0bd9..a8cdf3abf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4353,22 +4353,6 @@ avvio@^8.2.1: debug "^4.0.0" fastq "^1.6.1" -aws-sdk@^2.1313.0: - version "2.1455.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1455.0.tgz#d4b98912e54ffdc06e868287d87c8bc6b4c3f00a" - integrity sha512-OCH3YcWZ1mqePNRcOxvnB4F270++X44K+/cKA7op2HYRKjTkIJjFVqJGVdMDPQAHlc0GTCKYD6CJOUEhR2pp7w== - dependencies: - buffer "4.9.2" - events "1.1.1" - ieee754 "1.1.13" - jmespath "0.16.0" - querystring "0.2.0" - sax "1.2.1" - url "0.10.3" - util "^0.12.4" - uuid "8.0.0" - xml2js "0.5.0" - aws-sdk@^2.1344.0: version "2.1448.0" resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1448.0.tgz#13d961afd7c4498d5b4af561118cd80eadee078d" @@ -6545,28 +6529,6 @@ fastify@^4.13.0: semver "^7.5.0" tiny-lru "^11.0.1" -fastify@^4.9.2: - version "4.23.0" - resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.23.0.tgz#e49c4e90f0f6f9a2dd40b2443fce24b7bee86a2f" - integrity sha512-u4aQUjAqf+GQQI+IeIJtzOKCJHtdwPlGxzopq/Kv6QcEdJ7xuJFSQ5Bi7+uJ+F8990jWECLzRcAyZ4pVsloRpQ== - dependencies: - "@fastify/ajv-compiler" "^3.5.0" - "@fastify/error" "^3.2.0" - "@fastify/fast-json-stringify-compiler" "^4.3.0" - abstract-logging "^2.0.1" - avvio "^8.2.1" - fast-content-type-parse "^1.0.0" - fast-json-stringify "^5.7.0" - find-my-way "^7.6.0" - light-my-request "^5.9.1" - pino "^8.12.0" - process-warning "^2.2.0" - proxy-addr "^2.0.7" - rfdc "^1.3.0" - secure-json-parse "^2.5.0" - semver "^7.5.0" - toad-cache "^3.2.0" - fastq@^1.6.0, fastq@^1.6.1: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -11424,11 +11386,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -toad-cache@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/toad-cache/-/toad-cache-3.2.0.tgz#8221a1906ce7bd18cd56b22f5603bcf9e38b54f9" - integrity sha512-Hj5zSqBS6OHbZoQk9IU8VqIr+0JUpwzunnwSlFJhG8aJSInYUMEuzItl3kJsGteTPd1qtflafdRHlRtUazYeqg== - toidentifier@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" From 9c2de13f04f4fab717e25681056f3df133837571 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:10:35 -0500 Subject: [PATCH 03/31] chore(release): publish 0.2.22 --- CHANGELOG.md | 18 ++++++++++++++ lerna.json | 6 +++-- .../account-fetch-cache-hooks/CHANGELOG.md | 8 +++++++ .../account-fetch-cache-hooks/package.json | 4 ++-- packages/account-fetch-cache/CHANGELOG.md | 8 +++++++ packages/account-fetch-cache/package.json | 2 +- .../CHANGELOG.md | 8 +++++++ .../package.json | 4 ++-- packages/active-device-oracle/CHANGELOG.md | 8 +++++++ packages/active-device-oracle/package.json | 2 +- packages/anchor-resolvers/CHANGELOG.md | 8 +++++++ packages/anchor-resolvers/package.json | 2 +- packages/circuit-breaker-sdk/CHANGELOG.md | 8 +++++++ packages/circuit-breaker-sdk/package.json | 6 ++--- packages/crons/CHANGELOG.md | 11 +++++++++ packages/crons/package.json | 22 ++++++++--------- packages/currency-utils/CHANGELOG.md | 8 +++++++ packages/currency-utils/package.json | 2 +- packages/data-credits-sdk/CHANGELOG.md | 8 +++++++ packages/data-credits-sdk/package.json | 10 ++++---- packages/distributor-oracle/CHANGELOG.md | 8 +++++++ packages/distributor-oracle/package.json | 16 ++++++------- packages/fanout-metadata-service/CHANGELOG.md | 8 +++++++ packages/fanout-metadata-service/package.json | 10 ++++---- packages/fanout-sdk/CHANGELOG.md | 8 +++++++ packages/fanout-sdk/package.json | 6 ++--- packages/faucet-service/CHANGELOG.md | 8 +++++++ packages/faucet-service/package.json | 6 ++--- packages/helium-admin-cli/CHANGELOG.md | 16 +++++++++++++ ...PJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json | 1 + packages/helium-admin-cli/package.json | 24 +++++++++---------- .../helium-entity-manager-sdk/CHANGELOG.md | 8 +++++++ .../helium-entity-manager-sdk/package.json | 10 ++++---- packages/helium-react-hooks/CHANGELOG.md | 8 +++++++ packages/helium-react-hooks/package.json | 6 ++--- packages/helium-sub-daos-sdk/CHANGELOG.md | 8 +++++++ packages/helium-sub-daos-sdk/package.json | 10 ++++---- packages/hnt-to-rent-service/CHANGELOG.md | 8 +++++++ packages/hnt-to-rent-service/package.json | 4 ++-- packages/hotspot-utils/CHANGELOG.md | 8 +++++++ packages/hotspot-utils/package.json | 10 ++++---- packages/idls/CHANGELOG.md | 8 +++++++ packages/idls/package.json | 2 +- .../CHANGELOG.md | 8 +++++++ .../package.json | 4 ++-- packages/lazy-distributor-sdk/CHANGELOG.md | 8 +++++++ packages/lazy-distributor-sdk/package.json | 6 ++--- packages/lazy-transactions-sdk/CHANGELOG.md | 11 +++++++++ packages/lazy-transactions-sdk/package.json | 6 ++--- packages/metadata-service/CHANGELOG.md | 8 +++++++ packages/metadata-service/package.json | 6 ++--- packages/migration-service/CHANGELOG.md | 11 +++++++++ packages/migration-service/package.json | 22 ++++++++--------- .../mobile-entity-manager-sdk/CHANGELOG.md | 8 +++++++ .../mobile-entity-manager-sdk/package.json | 8 +++---- packages/monitor-service/CHANGELOG.md | 8 +++++++ packages/monitor-service/package.json | 16 ++++++------- packages/price-oracle-sdk/CHANGELOG.md | 8 +++++++ packages/price-oracle-sdk/package.json | 4 ++-- .../CHANGELOG.md | 8 +++++++ .../package.json | 2 +- packages/rewards-oracle-sdk/CHANGELOG.md | 8 +++++++ packages/rewards-oracle-sdk/package.json | 6 ++--- packages/spl-utils/CHANGELOG.md | 11 +++++++++ packages/spl-utils/package.json | 6 ++--- packages/treasury-management-sdk/CHANGELOG.md | 8 +++++++ packages/treasury-management-sdk/package.json | 8 +++---- .../voter-stake-registry-hooks/CHANGELOG.md | 8 +++++++ .../voter-stake-registry-hooks/package.json | 14 +++++------ .../voter-stake-registry-sdk/CHANGELOG.md | 8 +++++++ .../voter-stake-registry-sdk/package.json | 6 ++--- packages/vsr-metadata-service/CHANGELOG.md | 8 +++++++ packages/vsr-metadata-service/package.json | 10 ++++---- packages/xnft-hotspot/CHANGELOG.md | 8 +++++++ packages/xnft-hotspot/package.json | 12 +++++----- 75 files changed, 478 insertions(+), 149 deletions(-) create mode 100644 packages/crons/CHANGELOG.md create mode 100644 packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json create mode 100644 packages/iot-premine-data-only-service/CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index bfe9a48be..48df757d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + + +### Features + +* **#373:** replace clockwork ([#388](https://github.com/helium/helium-program-library/issues/388)) ([55033c7](https://github.com/helium/helium-program-library/commit/55033c718df08f41eb2f77d726d59d916ebbd677)), closes [#373](https://github.com/helium/helium-program-library/issues/373) +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-library/issues/380)) ([a691257](https://github.com/helium/helium-program-library/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-library/issues/376) [#376](https://github.com/helium/helium-program-library/issues/376) +* **#379:** Automate npm publish and fix devnet conflicting sqds txns ([#386](https://github.com/helium/helium-program-library/issues/386)) ([a4a3780](https://github.com/helium/helium-program-library/commit/a4a37806fefe82ca9a38f04c311f600ad1f7c36c)) + + +### Reverts + +* Revert "Add back mobile genesis fix for devnet" ([93e9a2c](https://github.com/helium/helium-program-library/commit/93e9a2c370ba77a49b02efc2590ddf3039465ed6)) + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package helium-program-library diff --git a/lerna.json b/lerna.json index 8fa2859b5..658ac6c3c 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,8 @@ { "npmClient": "yarn", - "packages": ["packages/*"], + "packages": [ + "packages/*" + ], "useWorkspaces": true, - "version": "0.2.21" + "version": "0.2.22" } diff --git a/packages/account-fetch-cache-hooks/CHANGELOG.md b/packages/account-fetch-cache-hooks/CHANGELOG.md index f3a950602..3c2cea4d3 100644 --- a/packages/account-fetch-cache-hooks/CHANGELOG.md +++ b/packages/account-fetch-cache-hooks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/account-fetch-cache-hooks + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/account-fetch-cache-hooks diff --git a/packages/account-fetch-cache-hooks/package.json b/packages/account-fetch-cache-hooks/package.json index cd440f814..369552252 100644 --- a/packages/account-fetch-cache-hooks/package.json +++ b/packages/account-fetch-cache-hooks/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "React hooks and context for account-fetch-cache", "repository": { "type": "git", @@ -32,7 +32,7 @@ "prebuild": "npm run clean && npm run package" }, "dependencies": { - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@solana/web3.js": "^1.78.4", "react-async-hook": "^4.0.0" }, diff --git a/packages/account-fetch-cache/CHANGELOG.md b/packages/account-fetch-cache/CHANGELOG.md index c3db8ea34..2a7ab0988 100644 --- a/packages/account-fetch-cache/CHANGELOG.md +++ b/packages/account-fetch-cache/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/account-fetch-cache + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/account-fetch-cache diff --git a/packages/account-fetch-cache/package.json b/packages/account-fetch-cache/package.json index 02c3073bd..69082b2c7 100644 --- a/packages/account-fetch-cache/package.json +++ b/packages/account-fetch-cache/package.json @@ -1,6 +1,6 @@ { "name": "@helium/account-fetch-cache", - "version": "0.2.21", + "version": "0.2.22", "description": "Solana account fetch cache to eliminate reduntant fetching, and batch fetches", "publishConfig": { "access": "public", diff --git a/packages/account-postgres-sink-service/CHANGELOG.md b/packages/account-postgres-sink-service/CHANGELOG.md index dabfc9c31..3ae0f506c 100644 --- a/packages/account-postgres-sink-service/CHANGELOG.md +++ b/packages/account-postgres-sink-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/account-postgres-sink-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/account-postgres-sink-service diff --git a/packages/account-postgres-sink-service/package.json b/packages/account-postgres-sink-service/package.json index 6f9cac52f..7be94be3c 100644 --- a/packages/account-postgres-sink-service/package.json +++ b/packages/account-postgres-sink-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Sync account data to postgres", "repository": { "type": "git", @@ -34,7 +34,7 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/web3.js": "^1.78.4", "aws-sdk": "^2.1344.0", diff --git a/packages/active-device-oracle/CHANGELOG.md b/packages/active-device-oracle/CHANGELOG.md index ef753c393..6129d301d 100644 --- a/packages/active-device-oracle/CHANGELOG.md +++ b/packages/active-device-oracle/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/active-device-oracle + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/active-device-oracle diff --git a/packages/active-device-oracle/package.json b/packages/active-device-oracle/package.json index 0cd7ff55f..98c901189 100644 --- a/packages/active-device-oracle/package.json +++ b/packages/active-device-oracle/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Oracle of helium active devices", "repository": { "type": "git", diff --git a/packages/anchor-resolvers/CHANGELOG.md b/packages/anchor-resolvers/CHANGELOG.md index ec83fc30a..9a2f86bee 100644 --- a/packages/anchor-resolvers/CHANGELOG.md +++ b/packages/anchor-resolvers/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/anchor-resolvers + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/anchor-resolvers diff --git a/packages/anchor-resolvers/package.json b/packages/anchor-resolvers/package.json index 2214f6c27..dc6574f5c 100644 --- a/packages/anchor-resolvers/package.json +++ b/packages/anchor-resolvers/package.json @@ -1,6 +1,6 @@ { "name": "@helium/anchor-resolvers", - "version": "0.2.21", + "version": "0.2.22", "description": "Wrappers around anchor custom resolvers to make composition easier", "publishConfig": { "access": "public", diff --git a/packages/circuit-breaker-sdk/CHANGELOG.md b/packages/circuit-breaker-sdk/CHANGELOG.md index dd872a81b..327367f2d 100644 --- a/packages/circuit-breaker-sdk/CHANGELOG.md +++ b/packages/circuit-breaker-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/circuit-breaker-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/circuit-breaker-sdk diff --git a/packages/circuit-breaker-sdk/package.json b/packages/circuit-breaker-sdk/package.json index 2d702bdea..2b8973e19 100644 --- a/packages/circuit-breaker-sdk/package.json +++ b/packages/circuit-breaker-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the circuit breaker smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/crons/CHANGELOG.md b/packages/crons/CHANGELOG.md new file mode 100644 index 000000000..b828c64c6 --- /dev/null +++ b/packages/crons/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + + +### Features + +* **#373:** replace clockwork ([#388](https://github.com/helium/helium-program-library/issues/388)) ([55033c7](https://github.com/helium/helium-program-library/commit/55033c718df08f41eb2f77d726d59d916ebbd677)), closes [#373](https://github.com/helium/helium-program-library/issues/373) diff --git a/packages/crons/package.json b/packages/crons/package.json index 9e0220ff6..ebedef224 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -1,6 +1,6 @@ { "name": "@helium/crons", - "version": "1.0.0", + "version": "0.2.22", "description": "scripts to run on a schedule", "private": true, "publishConfig": { @@ -32,16 +32,16 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/distributor-oracle": "^0.2.21", - "@helium/fanout-sdk": "^0.2.21", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/lazy-distributor-sdk": "^0.2.21", - "@helium/mobile-entity-manager-sdk": "^0.2.21", - "@helium/price-oracle-sdk": "^0.2.21", - "@helium/rewards-oracle-sdk": "^0.2.21", - "@helium/spl-utils": "^0.2.21", - "@helium/treasury-management-sdk": "^0.2.21", + "@helium/distributor-oracle": "^0.2.22", + "@helium/fanout-sdk": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/lazy-distributor-sdk": "^0.2.22", + "@helium/mobile-entity-manager-sdk": "^0.2.22", + "@helium/price-oracle-sdk": "^0.2.22", + "@helium/rewards-oracle-sdk": "^0.2.22", + "@helium/spl-utils": "^0.2.22", + "@helium/treasury-management-sdk": "^0.2.22", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", "axios": "^1.3.6", diff --git a/packages/currency-utils/CHANGELOG.md b/packages/currency-utils/CHANGELOG.md index 610c20396..d20b4d415 100644 --- a/packages/currency-utils/CHANGELOG.md +++ b/packages/currency-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/currency-utils + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/currency-utils diff --git a/packages/currency-utils/package.json b/packages/currency-utils/package.json index adf97762c..30febb278 100644 --- a/packages/currency-utils/package.json +++ b/packages/currency-utils/package.json @@ -1,6 +1,6 @@ { "name": "@helium/currency-utils", - "version": "0.2.21", + "version": "0.2.22", "description": "Currency utilities", "homepage": "https://github.com/helium/helium-program-library#readme", "publishConfig": { diff --git a/packages/data-credits-sdk/CHANGELOG.md b/packages/data-credits-sdk/CHANGELOG.md index b02c15e29..2525eef89 100644 --- a/packages/data-credits-sdk/CHANGELOG.md +++ b/packages/data-credits-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/data-credits-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/data-credits-sdk diff --git a/packages/data-credits-sdk/package.json b/packages/data-credits-sdk/package.json index f1dc10671..38762e879 100644 --- a/packages/data-credits-sdk/package.json +++ b/packages/data-credits-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the data-credits smart contract", "repository": { "type": "git", @@ -32,10 +32,10 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/circuit-breaker-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1", "crypto-js": "^4.1.1" diff --git a/packages/distributor-oracle/CHANGELOG.md b/packages/distributor-oracle/CHANGELOG.md index f9819af5b..813cab23c 100644 --- a/packages/distributor-oracle/CHANGELOG.md +++ b/packages/distributor-oracle/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/distributor-oracle + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/distributor-oracle diff --git a/packages/distributor-oracle/package.json b/packages/distributor-oracle/package.json index 5afbe40cd..c2de1fba6 100644 --- a/packages/distributor-oracle/package.json +++ b/packages/distributor-oracle/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Oracle server for the lazy distributor", "repository": { "type": "git", @@ -36,14 +36,14 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", - "@helium/lazy-distributor-sdk": "^0.2.21", - "@helium/rewards-oracle-sdk": "^0.2.21", - "@helium/spl-utils": "^0.2.21", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", + "@helium/lazy-distributor-sdk": "^0.2.22", + "@helium/rewards-oracle-sdk": "^0.2.22", + "@helium/spl-utils": "^0.2.22", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@solana/spl-token": "^0.3.8", "@types/sequelize": "^4.28.14", diff --git a/packages/fanout-metadata-service/CHANGELOG.md b/packages/fanout-metadata-service/CHANGELOG.md index f0ab6ff3a..39a171f74 100644 --- a/packages/fanout-metadata-service/CHANGELOG.md +++ b/packages/fanout-metadata-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/fanout-metadata-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/fanout-metadata-service diff --git a/packages/fanout-metadata-service/package.json b/packages/fanout-metadata-service/package.json index 97f46b2b0..fe102210b 100644 --- a/packages/fanout-metadata-service/package.json +++ b/packages/fanout-metadata-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Mint metadata of fanout positions", "repository": { "type": "git", @@ -34,10 +34,10 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", - "@helium/fanout-sdk": "^0.2.21", - "@helium/spl-utils": "^0.2.21", + "@helium/fanout-sdk": "^0.2.22", + "@helium/spl-utils": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", @@ -58,4 +58,4 @@ }, "keywords": [], "author": "" -} \ No newline at end of file +} diff --git a/packages/fanout-sdk/CHANGELOG.md b/packages/fanout-sdk/CHANGELOG.md index 98c914bf8..0c0cae09b 100644 --- a/packages/fanout-sdk/CHANGELOG.md +++ b/packages/fanout-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/fanout-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/fanout-sdk diff --git a/packages/fanout-sdk/package.json b/packages/fanout-sdk/package.json index 7091c86c1..5d7892725 100644 --- a/packages/fanout-sdk/package.json +++ b/packages/fanout-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the fanout smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/faucet-service/CHANGELOG.md b/packages/faucet-service/CHANGELOG.md index d1c7ae985..07f25ce14 100644 --- a/packages/faucet-service/CHANGELOG.md +++ b/packages/faucet-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/faucet-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/faucet-service diff --git a/packages/faucet-service/package.json b/packages/faucet-service/package.json index 81f19b7bf..0f75c1e80 100644 --- a/packages/faucet-service/package.json +++ b/packages/faucet-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Faucet for devnet Helium tokens", "repository": { "type": "git", @@ -35,8 +35,8 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/idls": "^0.2.21", - "@helium/spl-utils": "^0.2.21", + "@helium/idls": "^0.2.22", + "@helium/spl-utils": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/web3.js": "^1.78.4", "angry-purple-tiger": "^1.0.5", diff --git a/packages/helium-admin-cli/CHANGELOG.md b/packages/helium-admin-cli/CHANGELOG.md index 8ca782051..0f0d98901 100644 --- a/packages/helium-admin-cli/CHANGELOG.md +++ b/packages/helium-admin-cli/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-libary/issues/380)) ([a691257](https://github.com/helium/helium-program-libary/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-libary/issues/376) [#376](https://github.com/helium/helium-program-libary/issues/376) + + +### Reverts + +* Revert "Add back mobile genesis fix for devnet" ([93e9a2c](https://github.com/helium/helium-program-libary/commit/93e9a2c370ba77a49b02efc2590ddf3039465ed6)) + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/helium-admin-cli diff --git a/packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json b/packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json new file mode 100644 index 000000000..9891375df --- /dev/null +++ b/packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json @@ -0,0 +1 @@ +[117,61,170,179,232,25,86,172,162,50,25,146,137,110,99,1,162,98,66,235,200,8,18,222,45,95,208,9,66,34,83,130,65,144,23,44,231,18,88,67,83,205,111,87,120,248,143,81,253,144,204,141,151,42,96,199,87,179,126,207,175,19,223,145] \ No newline at end of file diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index dc9085301..d817a9352 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "CLI to bootstrap the network", "repository": { "type": "git", @@ -42,18 +42,18 @@ "@clockwork-xyz/sdk": "^0.3.0", "@coral-xyz/anchor": "^0.26.0", "@helium/address": "^4.10.2", - "@helium/circuit-breaker-sdk": "^0.2.21", + "@helium/circuit-breaker-sdk": "^0.2.22", "@helium/crypto": "^4.10.2", - "@helium/data-credits-sdk": "^0.2.21", - "@helium/distributor-oracle": "^0.2.21", - "@helium/fanout-sdk": "^0.2.21", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/lazy-distributor-sdk": "^0.2.21", - "@helium/mobile-entity-manager-sdk": "^0.2.21", - "@helium/price-oracle-sdk": "^0.2.21", - "@helium/spl-utils": "^0.2.21", - "@helium/treasury-management-sdk": "^0.2.21", + "@helium/data-credits-sdk": "^0.2.22", + "@helium/distributor-oracle": "^0.2.22", + "@helium/fanout-sdk": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/lazy-distributor-sdk": "^0.2.22", + "@helium/mobile-entity-manager-sdk": "^0.2.22", + "@helium/price-oracle-sdk": "^0.2.22", + "@helium/spl-utils": "^0.2.22", + "@helium/treasury-management-sdk": "^0.2.22", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-governance": "^0.3.18", "@solana/spl-token": "^0.3.8", diff --git a/packages/helium-entity-manager-sdk/CHANGELOG.md b/packages/helium-entity-manager-sdk/CHANGELOG.md index 5fda3b592..97653af71 100644 --- a/packages/helium-entity-manager-sdk/CHANGELOG.md +++ b/packages/helium-entity-manager-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/helium-entity-manager-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/helium-entity-manager-sdk diff --git a/packages/helium-entity-manager-sdk/package.json b/packages/helium-entity-manager-sdk/package.json index acf5d21b5..21be87d23 100644 --- a/packages/helium-entity-manager-sdk/package.json +++ b/packages/helium-entity-manager-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the helium-entity-manager smart contract", "repository": { "type": "git", @@ -33,10 +33,10 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@helium/address": "^4.10.2", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", - "@helium/spl-utils": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", + "@helium/spl-utils": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1", "crypto-js": "^4.1.1", diff --git a/packages/helium-react-hooks/CHANGELOG.md b/packages/helium-react-hooks/CHANGELOG.md index 89740b323..0e7f601ae 100644 --- a/packages/helium-react-hooks/CHANGELOG.md +++ b/packages/helium-react-hooks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/helium-react-hooks + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/helium-react-hooks diff --git a/packages/helium-react-hooks/package.json b/packages/helium-react-hooks/package.json index 07ca1ef66..e32692630 100644 --- a/packages/helium-react-hooks/package.json +++ b/packages/helium-react-hooks/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "React hooks for helium", "repository": { "type": "git", @@ -33,8 +33,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.21", - "@helium/account-fetch-cache-hooks": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache-hooks": "^0.2.22", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", "bs58": "^4.0.1", diff --git a/packages/helium-sub-daos-sdk/CHANGELOG.md b/packages/helium-sub-daos-sdk/CHANGELOG.md index e7daf5d0d..252339607 100644 --- a/packages/helium-sub-daos-sdk/CHANGELOG.md +++ b/packages/helium-sub-daos-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/helium-sub-daos-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/helium-sub-daos-sdk diff --git a/packages/helium-sub-daos-sdk/package.json b/packages/helium-sub-daos-sdk/package.json index 5cbd6b871..ccf111511 100644 --- a/packages/helium-sub-daos-sdk/package.json +++ b/packages/helium-sub-daos-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the helium-sub-daos smart contract", "repository": { "type": "git", @@ -32,10 +32,10 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/circuit-breaker-sdk": "^0.2.21", - "@helium/treasury-management-sdk": "^0.2.21", - "@helium/voter-stake-registry-sdk": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/treasury-management-sdk": "^0.2.22", + "@helium/voter-stake-registry-sdk": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/hnt-to-rent-service/CHANGELOG.md b/packages/hnt-to-rent-service/CHANGELOG.md index 3378991d0..5a14a8333 100644 --- a/packages/hnt-to-rent-service/CHANGELOG.md +++ b/packages/hnt-to-rent-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/hnt-to-rent-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/hnt-to-rent-service diff --git a/packages/hnt-to-rent-service/package.json b/packages/hnt-to-rent-service/package.json index a2d325798..a3a0349ce 100644 --- a/packages/hnt-to-rent-service/package.json +++ b/packages/hnt-to-rent-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Service that gives flashloans of sol to allow orca swap of small amounts of hnt to sol for fees", "repository": { "type": "git", @@ -34,7 +34,7 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", "@orca-so/whirlpools-sdk": "^0.8.2", "@solana/web3.js": "^1.78.4", diff --git a/packages/hotspot-utils/CHANGELOG.md b/packages/hotspot-utils/CHANGELOG.md index 8f9cb10a3..b165b4441 100644 --- a/packages/hotspot-utils/CHANGELOG.md +++ b/packages/hotspot-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/hotspot-utils + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/hotspot-utils diff --git a/packages/hotspot-utils/package.json b/packages/hotspot-utils/package.json index 2140c9d0d..bd83e33d9 100644 --- a/packages/hotspot-utils/package.json +++ b/packages/hotspot-utils/package.json @@ -1,6 +1,6 @@ { "name": "@helium/hotspot-utils", - "version": "0.2.21", + "version": "0.2.22", "description": "Utils for Hotspot interaction", "homepage": "https://github.com/helium/helium-program-library#readme", "publishConfig": { @@ -29,10 +29,10 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", - "@helium/spl-utils": "^0.2.21", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", + "@helium/spl-utils": "^0.2.22", "@solana/web3.js": "^1.78.4", "bs58": "^4.0.1" }, diff --git a/packages/idls/CHANGELOG.md b/packages/idls/CHANGELOG.md index 97878b0a6..c25378527 100644 --- a/packages/idls/CHANGELOG.md +++ b/packages/idls/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/idls + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/idls diff --git a/packages/idls/package.json b/packages/idls/package.json index e7f727e5e..30b413903 100644 --- a/packages/idls/package.json +++ b/packages/idls/package.json @@ -1,6 +1,6 @@ { "name": "@helium/idls", - "version": "0.2.21", + "version": "0.2.22", "description": "Exported idls", "publishConfig": { "access": "public", diff --git a/packages/iot-premine-data-only-service/CHANGELOG.md b/packages/iot-premine-data-only-service/CHANGELOG.md new file mode 100644 index 000000000..c26f8cb80 --- /dev/null +++ b/packages/iot-premine-data-only-service/CHANGELOG.md @@ -0,0 +1,8 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/iot-premine-data-only-service diff --git a/packages/iot-premine-data-only-service/package.json b/packages/iot-premine-data-only-service/package.json index ffe87f60b..2573e02fc 100644 --- a/packages/iot-premine-data-only-service/package.json +++ b/packages/iot-premine-data-only-service/package.json @@ -1,6 +1,6 @@ { "name": "@helium/iot-premine-data-only-service", - "version": "0.0.1", + "version": "0.2.22", "description": "iot premine data only service", "private": true, "publishConfig": { @@ -34,7 +34,7 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", diff --git a/packages/lazy-distributor-sdk/CHANGELOG.md b/packages/lazy-distributor-sdk/CHANGELOG.md index d3af331e1..ed54f31c2 100644 --- a/packages/lazy-distributor-sdk/CHANGELOG.md +++ b/packages/lazy-distributor-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/lazy-distributor-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/lazy-distributor-sdk diff --git a/packages/lazy-distributor-sdk/package.json b/packages/lazy-distributor-sdk/package.json index 83dc47867..a63a8c900 100644 --- a/packages/lazy-distributor-sdk/package.json +++ b/packages/lazy-distributor-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the lazy-distributor smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/circuit-breaker-sdk": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/lazy-transactions-sdk/CHANGELOG.md b/packages/lazy-transactions-sdk/CHANGELOG.md index a7dec84d2..1a838da4a 100644 --- a/packages/lazy-transactions-sdk/CHANGELOG.md +++ b/packages/lazy-transactions-sdk/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-libary/issues/380)) ([a691257](https://github.com/helium/helium-program-libary/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-libary/issues/376) [#376](https://github.com/helium/helium-program-libary/issues/376) + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/lazy-transactions-sdk diff --git a/packages/lazy-transactions-sdk/package.json b/packages/lazy-transactions-sdk/package.json index 4f1ac8662..ead38dd09 100644 --- a/packages/lazy-transactions-sdk/package.json +++ b/packages/lazy-transactions-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the lazy-transactions smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/idls": "^0.2.21", - "@helium/spl-utils": "^0.2.21", + "@helium/idls": "^0.2.22", + "@helium/spl-utils": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1", "js-sha3": "^0.8.0", diff --git a/packages/metadata-service/CHANGELOG.md b/packages/metadata-service/CHANGELOG.md index 7b23e34f1..cf97736d1 100644 --- a/packages/metadata-service/CHANGELOG.md +++ b/packages/metadata-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/metadata-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/metadata-service diff --git a/packages/metadata-service/package.json b/packages/metadata-service/package.json index 26e84876b..d32fcc778 100644 --- a/packages/metadata-service/package.json +++ b/packages/metadata-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Mint metadata of hotspots", "repository": { "type": "git", @@ -35,8 +35,8 @@ "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", "@helium/address": "^4.10.2", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", diff --git a/packages/migration-service/CHANGELOG.md b/packages/migration-service/CHANGELOG.md index 152db6e81..3020772f5 100644 --- a/packages/migration-service/CHANGELOG.md +++ b/packages/migration-service/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-libary/issues/380)) ([a691257](https://github.com/helium/helium-program-libary/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-libary/issues/376) [#376](https://github.com/helium/helium-program-libary/issues/376) + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/migration-service diff --git a/packages/migration-service/package.json b/packages/migration-service/package.json index 98182b1f2..9d508715b 100644 --- a/packages/migration-service/package.json +++ b/packages/migration-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Migration of state from helium", "repository": { "type": "git", @@ -35,18 +35,18 @@ "@clockwork-xyz/sdk": "^0.3.0", "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", - "@helium/circuit-breaker-sdk": "^0.2.21", + "@helium/circuit-breaker-sdk": "^0.2.22", "@helium/crypto": "^4.10.2", - "@helium/data-credits-sdk": "^0.2.21", - "@helium/distributor-oracle": "^0.2.21", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/lazy-distributor-sdk": "^0.2.21", - "@helium/lazy-transactions-sdk": "^0.2.21", - "@helium/treasury-management-sdk": "^0.2.21", - "@helium/voter-stake-registry-sdk": "^0.2.21", + "@helium/data-credits-sdk": "^0.2.22", + "@helium/distributor-oracle": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/lazy-distributor-sdk": "^0.2.22", + "@helium/lazy-transactions-sdk": "^0.2.22", + "@helium/treasury-management-sdk": "^0.2.22", + "@helium/voter-stake-registry-sdk": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@project-serum/borsh": "^0.2.5", "@solana/buffer-layout": "^4.0.0", diff --git a/packages/mobile-entity-manager-sdk/CHANGELOG.md b/packages/mobile-entity-manager-sdk/CHANGELOG.md index 3bdaf11ce..ac83b5483 100644 --- a/packages/mobile-entity-manager-sdk/CHANGELOG.md +++ b/packages/mobile-entity-manager-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/mobile-entity-manager-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/mobile-entity-manager-sdk diff --git a/packages/mobile-entity-manager-sdk/package.json b/packages/mobile-entity-manager-sdk/package.json index 52502cf41..8c4e50acf 100644 --- a/packages/mobile-entity-manager-sdk/package.json +++ b/packages/mobile-entity-manager-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the mobile-entity-manager smart contract", "repository": { "type": "git", @@ -32,9 +32,9 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/monitor-service/CHANGELOG.md b/packages/monitor-service/CHANGELOG.md index 0f83a32dd..356327437 100644 --- a/packages/monitor-service/CHANGELOG.md +++ b/packages/monitor-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/monitor-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/monitor-service diff --git a/packages/monitor-service/package.json b/packages/monitor-service/package.json index e7c647318..83a7a0e6a 100644 --- a/packages/monitor-service/package.json +++ b/packages/monitor-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Prometheus monitoring of important accounts on Solana", "repository": { "type": "git", @@ -33,13 +33,13 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.21", - "@helium/circuit-breaker-sdk": "^0.2.21", - "@helium/data-credits-sdk": "^0.2.21", - "@helium/helium-entity-manager-sdk": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", - "@helium/lazy-transactions-sdk": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/data-credits-sdk": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", + "@helium/lazy-transactions-sdk": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", diff --git a/packages/price-oracle-sdk/CHANGELOG.md b/packages/price-oracle-sdk/CHANGELOG.md index d1cf82367..a41e5f5e2 100644 --- a/packages/price-oracle-sdk/CHANGELOG.md +++ b/packages/price-oracle-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/price-oracle-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/price-oracle-sdk diff --git a/packages/price-oracle-sdk/package.json b/packages/price-oracle-sdk/package.json index 797d28aba..3d1332eec 100644 --- a/packages/price-oracle-sdk/package.json +++ b/packages/price-oracle-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the price oracle smart contract", "repository": { "type": "git", @@ -32,7 +32,7 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/idls": "^0.2.21", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/rewards-oracle-faucet-service/CHANGELOG.md b/packages/rewards-oracle-faucet-service/CHANGELOG.md index 9ad844bdb..db3ab45ef 100644 --- a/packages/rewards-oracle-faucet-service/CHANGELOG.md +++ b/packages/rewards-oracle-faucet-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/rewards-oracle-faucet-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/rewards-oracle-faucet-service diff --git a/packages/rewards-oracle-faucet-service/package.json b/packages/rewards-oracle-faucet-service/package.json index 433313a5b..b2996582a 100644 --- a/packages/rewards-oracle-faucet-service/package.json +++ b/packages/rewards-oracle-faucet-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Receives requests from Helius webhooks", "repository": { "type": "git", diff --git a/packages/rewards-oracle-sdk/CHANGELOG.md b/packages/rewards-oracle-sdk/CHANGELOG.md index ee84611eb..d35ba7cd6 100644 --- a/packages/rewards-oracle-sdk/CHANGELOG.md +++ b/packages/rewards-oracle-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/rewards-oracle-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/rewards-oracle-sdk diff --git a/packages/rewards-oracle-sdk/package.json b/packages/rewards-oracle-sdk/package.json index 7c8f2c3af..a80a16f6b 100644 --- a/packages/rewards-oracle-sdk/package.json +++ b/packages/rewards-oracle-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the rewards oracle smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/spl-utils/CHANGELOG.md b/packages/spl-utils/CHANGELOG.md index ff5897998..987a9068a 100644 --- a/packages/spl-utils/CHANGELOG.md +++ b/packages/spl-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-library/issues/380)) ([a691257](https://github.com/helium/helium-program-library/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-library/issues/376) [#376](https://github.com/helium/helium-program-library/issues/376) + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/spl-utils diff --git a/packages/spl-utils/package.json b/packages/spl-utils/package.json index 391a2eda8..633edc6e4 100644 --- a/packages/spl-utils/package.json +++ b/packages/spl-utils/package.json @@ -1,6 +1,6 @@ { "name": "@helium/spl-utils", - "version": "0.2.21", + "version": "0.2.22", "description": "Utils shared across spl suite", "publishConfig": { "access": "public", @@ -32,9 +32,9 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", - "@helium/anchor-resolvers": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", diff --git a/packages/treasury-management-sdk/CHANGELOG.md b/packages/treasury-management-sdk/CHANGELOG.md index c93799ead..bbf812257 100644 --- a/packages/treasury-management-sdk/CHANGELOG.md +++ b/packages/treasury-management-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/treasury-management-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/treasury-management-sdk diff --git a/packages/treasury-management-sdk/package.json b/packages/treasury-management-sdk/package.json index ef27b9410..022f26040 100644 --- a/packages/treasury-management-sdk/package.json +++ b/packages/treasury-management-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the treasury-management smart contract", "repository": { "type": "git", @@ -32,9 +32,9 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/circuit-breaker-sdk": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/idls": "^0.2.22", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/voter-stake-registry-hooks/CHANGELOG.md b/packages/voter-stake-registry-hooks/CHANGELOG.md index cce46104b..869f7e89a 100644 --- a/packages/voter-stake-registry-hooks/CHANGELOG.md +++ b/packages/voter-stake-registry-hooks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/voter-stake-registry-hooks + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/voter-stake-registry-hooks diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 337fbc804..76f80a92a 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "React hooks for helium voter stake registry", "repository": { "type": "git", @@ -33,13 +33,13 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.21", - "@helium/account-fetch-cache-hooks": "^0.2.21", - "@helium/helium-react-hooks": "^0.2.21", - "@helium/helium-sub-daos-sdk": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache-hooks": "^0.2.22", + "@helium/helium-react-hooks": "^0.2.22", + "@helium/helium-sub-daos-sdk": "^0.2.22", "@helium/modular-governance-hooks": "^0.0.2", - "@helium/spl-utils": "^0.2.21", - "@helium/voter-stake-registry-sdk": "^0.2.21", + "@helium/spl-utils": "^0.2.22", + "@helium/voter-stake-registry-sdk": "^0.2.22", "@metaplex-foundation/js": "^0.19.4", "@solana/wallet-adapter-base": "^0.9.22", "@solana/wallet-adapter-react": "^0.15.32", diff --git a/packages/voter-stake-registry-sdk/CHANGELOG.md b/packages/voter-stake-registry-sdk/CHANGELOG.md index 4ff35cb12..1a38600d9 100644 --- a/packages/voter-stake-registry-sdk/CHANGELOG.md +++ b/packages/voter-stake-registry-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/voter-stake-registry-sdk + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/voter-stake-registry-sdk diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index 089740872..353d022c9 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Interface to the voter-stake-registry smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.21", - "@helium/idls": "^0.2.21", + "@helium/anchor-resolvers": "^0.2.22", + "@helium/idls": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", diff --git a/packages/vsr-metadata-service/CHANGELOG.md b/packages/vsr-metadata-service/CHANGELOG.md index 88921e090..d378e50c0 100644 --- a/packages/vsr-metadata-service/CHANGELOG.md +++ b/packages/vsr-metadata-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/vsr-metadata-service + + + + + ## [0.2.15](https://github.com/helium/helium-program-libary/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/vsr-metadata-service diff --git a/packages/vsr-metadata-service/package.json b/packages/vsr-metadata-service/package.json index 747cd86b9..06c6fe091 100644 --- a/packages/vsr-metadata-service/package.json +++ b/packages/vsr-metadata-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.21", + "version": "0.2.22", "description": "Mint metadata of vsr positions", "repository": { "type": "git", @@ -34,10 +34,10 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", "@helium/address": "^4.10.2", - "@helium/spl-utils": "^0.2.21", - "@helium/voter-stake-registry-sdk": "^0.2.21", + "@helium/spl-utils": "^0.2.22", + "@helium/voter-stake-registry-sdk": "^0.2.22", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", @@ -58,4 +58,4 @@ }, "keywords": [], "author": "" -} \ No newline at end of file +} diff --git a/packages/xnft-hotspot/CHANGELOG.md b/packages/xnft-hotspot/CHANGELOG.md index 307d83997..6967c5af9 100644 --- a/packages/xnft-hotspot/CHANGELOG.md +++ b/packages/xnft-hotspot/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) + +**Note:** Version bump only for package @helium/xnft-hotspot + + + + + ## [0.2.15](https://github.com/helium/helium-program-library/compare/v0.2.14...v0.2.15) (2023-07-31) **Note:** Version bump only for package @helium/xnft-hotspot diff --git a/packages/xnft-hotspot/package.json b/packages/xnft-hotspot/package.json index b14ead970..1a654163d 100644 --- a/packages/xnft-hotspot/package.json +++ b/packages/xnft-hotspot/package.json @@ -1,6 +1,6 @@ { "name": "@helium/xnft-hotspot", - "version": "0.2.21", + "version": "0.2.22", "private": true, "description": "", "main": "index.js", @@ -18,11 +18,11 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.21", - "@helium/distributor-oracle": "^0.2.21", - "@helium/helium-react-hooks": "^0.2.21", - "@helium/idls": "^0.2.21", - "@helium/lazy-distributor-sdk": "^0.2.21", + "@helium/account-fetch-cache": "^0.2.22", + "@helium/distributor-oracle": "^0.2.22", + "@helium/helium-react-hooks": "^0.2.22", + "@helium/idls": "^0.2.22", + "@helium/lazy-distributor-sdk": "^0.2.22", "@solana/spl-token": "^0.3.8", "assert": "^2.0.0", "bn.js": "^5.2.0", From a04d294c3de8bc92e27b1977aba33c5236f7401d Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:33:38 -0500 Subject: [PATCH 04/31] Add canary release option --- .github/workflows/npm-canary-release.yaml | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/npm-canary-release.yaml diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml new file mode 100644 index 000000000..d196320b1 --- /dev/null +++ b/.github/workflows/npm-canary-release.yaml @@ -0,0 +1,65 @@ +name: '/canary-release' +on: + issue_comment: + types: [ created ] + +permissions: + contents: read # for checkout + pull-requests: write # for comments + packages: write # for publish + +jobs: + canary-release: + name: canary-release + runs-on: ubuntu-latest + if: | + github.event_name == 'issue_comment' && + (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR') && + startsWith(github.event.comment.body, '/canary-release') + steps: + - name: get pr information + uses: actions/github-script@v4 + id: pr + with: + script: | + const request = { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + } + core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`) + try { + const result = await github.pulls.get(request) + core.info(`Got PR: ${JSON.stringify(result.data)}`) + return result.data + } catch (err) { + core.setFailed(`Request failed with error ${err}`) + } + - name: checkout + uses: actions/checkout@v2 + with: + ref: ${{ fromJSON(steps.pr.outputs.result).head.ref }} + repository: ${{ fromJSON(steps.pr.outputs.result).head.repo.full_name }} + fetch-depth: 0 + - name: setup Node + uses: actions/setup-node@v2 + with: + node-version: 16.x + registry-url: 'https://registry.npmjs.org' + - name: install + run: yarn + - name: Publish + run: yarn run release:canary + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.TOKEN }} + - uses: actions/github-script@v4 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '🎉 Canary Release. You can install canary version via `npm install package@next`' + }) \ No newline at end of file From 2a1e19980d74c21b5f51834540421b3c8a0a045e Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:33:38 -0500 Subject: [PATCH 05/31] Rm --- ...rkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json diff --git a/packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json b/packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json deleted file mode 100644 index 9891375df..000000000 --- a/packages/helium-admin-cli/merkle-13M4AHi4ZUEsvGPJYhHGjP6XKD75eWuHxfz4bA76Fb1Af4Q1wzJ.json +++ /dev/null @@ -1 +0,0 @@ -[117,61,170,179,232,25,86,172,162,50,25,146,137,110,99,1,162,98,66,235,200,8,18,222,45,95,208,9,66,34,83,130,65,144,23,44,231,18,88,67,83,205,111,87,120,248,143,81,253,144,204,141,151,42,96,199,87,179,126,207,175,19,223,145] \ No newline at end of file From 8ab99d362076a7ec151372e2577da13d642db1be Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:44:40 -0500 Subject: [PATCH 06/31] Fix canary --- .github/workflows/npm-canary-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml index d196320b1..9294d851d 100644 --- a/.github/workflows/npm-canary-release.yaml +++ b/.github/workflows/npm-canary-release.yaml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'issue_comment' && - (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR') && + (github.event.comment.author_association == 'ADMIN' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR') && startsWith(github.event.comment.body, '/canary-release') steps: - name: get pr information From 59d8d46282a520bcdcebbbcc1801e71b48c6284f Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:47:27 -0500 Subject: [PATCH 07/31] Add comment to canary --- .github/workflows/npm-canary-release.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml index 9294d851d..5fe560515 100644 --- a/.github/workflows/npm-canary-release.yaml +++ b/.github/workflows/npm-canary-release.yaml @@ -9,6 +9,19 @@ permissions: packages: write # for publish jobs: + log: + name: log + runs-on: ubuntu-latest + steps: + - name: log + run: | + echo "event_name: ${{ github.event_name }}" + echo "comment: ${{ github.event.comment.body }}" + echo "author_association: ${{ github.event.comment.author_association }}" + echo "author: ${{ github.event.comment.user.login }}" + echo "author: ${{ github.event.comment.user.type }}" + echo "author: ${{ github.event.comment.user.site_admin }}" + canary-release: name: canary-release runs-on: ubuntu-latest From 2b0a510a357525d1f23334caad3dc5818f12331f Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:48:43 -0500 Subject: [PATCH 08/31] Fix canary --- .github/workflows/npm-canary-release.yaml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml index 5fe560515..59e7ea549 100644 --- a/.github/workflows/npm-canary-release.yaml +++ b/.github/workflows/npm-canary-release.yaml @@ -9,25 +9,12 @@ permissions: packages: write # for publish jobs: - log: - name: log - runs-on: ubuntu-latest - steps: - - name: log - run: | - echo "event_name: ${{ github.event_name }}" - echo "comment: ${{ github.event.comment.body }}" - echo "author_association: ${{ github.event.comment.author_association }}" - echo "author: ${{ github.event.comment.user.login }}" - echo "author: ${{ github.event.comment.user.type }}" - echo "author: ${{ github.event.comment.user.site_admin }}" - canary-release: name: canary-release runs-on: ubuntu-latest if: | github.event_name == 'issue_comment' && - (github.event.comment.author_association == 'ADMIN' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR') && + (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'CONTRIBUTOR') && startsWith(github.event.comment.body, '/canary-release') steps: - name: get pr information From 3cdc78262d2591c42f253b73690d4081a00657dd Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 14:58:34 -0500 Subject: [PATCH 09/31] Fix canary --- .github/workflows/npm-canary-release.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml index 59e7ea549..0170b5e32 100644 --- a/.github/workflows/npm-canary-release.yaml +++ b/.github/workflows/npm-canary-release.yaml @@ -48,11 +48,18 @@ jobs: registry-url: 'https://registry.npmjs.org' - name: install run: yarn + - name: re create .npmrc file + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Publish run: yarn run release:canary env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NODE_AUTH_TOKEN: ${{ secrets.TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - uses: actions/github-script@v4 with: github-token: ${{secrets.GITHUB_TOKEN}} From 20eca0e21a7891767ecbb2de764f17df576c3c51 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 15:03:00 -0500 Subject: [PATCH 10/31] Fix canary --- .github/workflows/npm-canary-release.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml index 0170b5e32..0e0708270 100644 --- a/.github/workflows/npm-canary-release.yaml +++ b/.github/workflows/npm-canary-release.yaml @@ -55,6 +55,8 @@ jobs: EOF env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: build anchor + uses: ./.github/actions/build-anchor - name: Publish run: yarn run release:canary env: From 430613d30ff9360c1c5e2053484600cf6b0bf23c Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 15:08:31 -0500 Subject: [PATCH 11/31] Add verified builds and fix tests/other github actions --- .github/actions/buffer-deploy/action.yaml | 117 ++++++++++++++++++ .github/actions/build-anchor/action.yaml | 10 +- .github/actions/build-verified/action.yaml | 48 +++++++ .github/actions/setup-anchor/action.yaml | 17 +-- .github/actions/setup-ts/action.yaml | 8 -- .../workflows/develop-release-program.yaml | 82 +++++++++++- .github/workflows/npm-canary-release.yaml | 7 +- .github/workflows/npm-publish.yaml | 34 +++++ .github/workflows/release-program.yaml | 31 ++++- .github/workflows/tests.yaml | 2 + 10 files changed, 326 insertions(+), 30 deletions(-) create mode 100644 .github/actions/buffer-deploy/action.yaml create mode 100644 .github/actions/build-verified/action.yaml create mode 100644 .github/workflows/npm-publish.yaml diff --git a/.github/actions/buffer-deploy/action.yaml b/.github/actions/buffer-deploy/action.yaml new file mode 100644 index 000000000..660ae8499 --- /dev/null +++ b/.github/actions/buffer-deploy/action.yaml @@ -0,0 +1,117 @@ +name: "Upload BPF" +description: "Uploads an anchor program as a bpf" +inputs: + devnet: + description: "Whether to use devnet feature" + required: false + default: "false" + testing: + description: "Whether to use devnet feature" + required: false + default: "false" + network: + description: "The Solana network" + required: true + default: "devnet" + program: + description: "The program to build and upload" + required: true + program-id: + description: "The program id of the program we are uploading" + required: true + keypair: + description: "The keypair to use for deploys" + required: true + buffer-authority: + description: "The buffer authority to set" + required: true +outputs: + buffer: + description: "The buffer address" + value: ${{ steps.buffer-deploy-store.outputs.BUFFER }} + idl-buffer: + description: "The idl buffer address." + value: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }} + +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup/ + - uses: ./.github/actions/setup-anchor/ + with: + node-version: ${{ env.NODE_VERSION }} + - run: echo "$DEPLOY_KEYPAIR" > ./deploy-keypair.json && chmod 600 ./deploy-keypair.json + shell: bash + env: + DEPLOY_KEYPAIR: ${{ inputs.keypair }} + - run: solana-keygen new -o keyp --no-bip39-passphrase + shell: bash + - run: ls -l ./target/deploy/ + shell: bash + - name: Buffer Deploy + if: steps.cache-buffer.outputs.cache-hit != 'true' + id: buffer-deploy + uses: nick-invision/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 10 + shell: bash + command: solana program write-buffer --buffer ./keyp -k ./deploy-keypair.json ./target/deploy/$PROGRAM.so -u $NETWORK > ./buffer.out + env: + NETWORK: ${{ inputs.network }} + PROGRAM: ${{ inputs.program }} + - name: IDL Buffer Deploy + uses: nick-invision/retry@v2 + id: idl-buffer-deploy + if: steps.cache-buffer.outputs.cache-hit != 'true' + with: + timeout_minutes: 10 + max_attempts: 50 + shell: bash + command: ~/.cargo/bin/anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster $NETWORK --provider.wallet ./deploy-keypair.json > idl-buffer.out + env: + PROGRAM_ID: ${{ inputs.program-id }} + PROGRAM: ${{ inputs.program }} + NETWORK: ${{ inputs.network }} + - name: Buffer Deploy Store + shell: bash + id: buffer-deploy-store + run: | + echo "BUFFER=$(cat buffer.out | sed 's/Buffer: //g' | xargs echo -n)" >> $GITHUB_OUTPUT + echo "IDL_BUFFER=$(cat idl-buffer.out | sed 's/Idl buffer created: //g' | xargs echo -n)" >> $GITHUB_OUTPUT + - run: echo "The buffer is ${{ steps.buffer-deploy-store.outputs.BUFFER }}" + shell: bash + - run: echo "the idl buffer is ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }}" + shell: bash + - run: echo "the idl is $(cat ./target/idl/$PROGRAM.json)" + shell: bash + env: + PROGRAM: ${{ inputs.program }} + - name: Transfer idl buffer to authority + uses: nick-invision/retry@v2 + if: steps.cache-buffer.outputs.cache-hit != 'true' + with: + timeout_minutes: 10 + max_attempts: 50 + shell: bash + command: anchor idl set-authority $IDL_BUFFER --provider.cluster $NETWORK --program-id $PROGRAM_ID --new-authority $AUTHORITY --provider.wallet ./deploy-keypair.json + env: + IDL_BUFFER: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }} + AUTHORITY: ${{ inputs.buffer-authority }} + NETWORK: ${{ inputs.network }} + PROGRAM_ID: ${{ inputs.program-id }} + - name: Transfer buffer to authority + uses: nick-invision/retry@v2 + if: steps.cache-buffer.outputs.cache-hit != 'true' + with: + timeout_minutes: 10 + max_attempts: 50 + shell: bash + command: solana program set-buffer-authority $BUFFER -k ./deploy-keypair.json --new-buffer-authority $AUTHORITY -u $NETWORK + env: + BUFFER: ${{ steps.buffer-deploy-store.outputs.BUFFER }} + AUTHORITY: ${{ inputs.buffer-authority }} + NETWORK: ${{ inputs.network }} + - run: rm ./deploy-keypair.json + shell: bash + if: always() diff --git a/.github/actions/build-anchor/action.yaml b/.github/actions/build-anchor/action.yaml index 81df98c49..e806fcd07 100644 --- a/.github/actions/build-anchor/action.yaml +++ b/.github/actions/build-anchor/action.yaml @@ -9,6 +9,9 @@ inputs: description: "Whether to use devnet feature" required: false default: "false" + program: + description: "The program to build" + required: false runs: using: "composite" steps: @@ -26,15 +29,14 @@ runs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-2 + key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - name: Cache Anchor Build uses: actions/cache@v2 id: cache-anchor-build with: path: | ./target/ - key: deps-${{ runner.os }}-build-${{ inputs.devnet }}-${{ inputs.testing }}-${{ hashFiles('./programs/**/**') }} - - run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/anchor build ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }} + key: build-${{ runner.os }}-v0001-${{ inputs.devnet }}-${{ inputs.testing }}-${{ hashFiles('./programs/**/**') }}-${{ inputs.program }} + - run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/anchor build ${{ (inputs.program != '' && '-p') || '' }} ${{ inputs.program || '' }} ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }} if: steps.cache-anchor-build.outputs.cache-hit != 'true' shell: bash - - uses: ./.github/actions/setup-ts/ diff --git a/.github/actions/build-verified/action.yaml b/.github/actions/build-verified/action.yaml new file mode 100644 index 000000000..989b09bea --- /dev/null +++ b/.github/actions/build-verified/action.yaml @@ -0,0 +1,48 @@ +name: "Build Verified" +description: "Builds an Anchor Program using solana-verify" +inputs: + devnet: + description: "Whether to use devnet feature" + required: false + default: "false" + testing: + description: "Whether to use devnet feature" + required: false + default: "false" + program: + description: "The program to build and upload" + required: true + program-id: + description: "The program id of the program we are uploading" + required: true + +runs: + using: "composite" + steps: + - uses: ./.github/actions/setup/ + - uses: ./.github/actions/setup-anchor/ + with: + node-version: ${{ env.NODE_VERSION }} + - uses: actions/cache@v2 + name: Cache Cargo registry + index + id: cache-cargo-registry + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: cargo-${{ runner.os }}-v0001-${{ hashFiles('**/Cargo.lock') }} + - uses: actions/cache@v2 + name: Cache Solana Verify + id: cache-solana-verify + with: + path: | + ~/.cargo/bin/solana-verify + key: cargo-${{ runner.os }}-solana-verify + - run: cargo install solana-verify + if: steps.cache-solana-verify.outputs.cache-hit != 'true' + shell: bash + - run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/solana-verify build --library-name $PROGRAM ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }} + shell: bash + env: + PROGRAM: ${{ inputs.program }} diff --git a/.github/actions/setup-anchor/action.yaml b/.github/actions/setup-anchor/action.yaml index 765d04ca9..ce2c3f179 100644 --- a/.github/actions/setup-anchor/action.yaml +++ b/.github/actions/setup-anchor/action.yaml @@ -3,7 +3,6 @@ description: "Setup Anchor" runs: using: "composite" steps: - - uses: actions/checkout@v2 - uses: ./.github/actions/setup/ - uses: ./.github/actions/setup-solana/ - uses: actions/cache@v2 @@ -11,15 +10,19 @@ runs: id: cache-anchor-cli with: path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - ./target/ - key: anchor-cli-${{ runner.os }}-v0001-${{ env.ANCHOR_VERSION }} + ~/.cargo/bin/anchor + key: anchor-cli-${{ runner.os }}-v0002-${{ env.ANCHOR_VERSION }} # if ANCHOR_VERSION is 0, then install the anchor-cli from source - run: if [ $ANCHOR_VERSION -eq 0 ]; then cargo install --git https://github.com/coral-xyz/anchor anchor-cli --locked --force; else cargo install --git https://github.com/coral-xyz/anchor --tag "v$ANCHOR_VERSION" anchor-cli --locked; fi shell: bash if: steps.cache-anchor-cli.outputs.cache-hit != 'true' + - uses: actions/cache@v2 + name: Cache Toml Cli + id: cache-toml-cli + with: + path: | + ~/.cargo/bin/toml + key: toml-cli-${{ runner.os }}-v0002 - run: cargo install toml-cli + if: steps.cache-toml-cli.outputs.cache-hit != 'true' shell: bash diff --git a/.github/actions/setup-ts/action.yaml b/.github/actions/setup-ts/action.yaml index ddcdd298c..681e7a66a 100644 --- a/.github/actions/setup-ts/action.yaml +++ b/.github/actions/setup-ts/action.yaml @@ -16,13 +16,5 @@ runs: - run: yarn && ./node_modules/.bin/lerna bootstrap shell: bash if: steps.cache-typescript-node-modules.outputs.cache-hit != 'true' - - name: Cache Typescript Build - uses: actions/cache@v2 - id: cache-typescript-build - with: - path: | - ./packages - key: deps-${{ runner.os }}-ts-build-${{ hashFiles('./packages/*/src/**/*') }}-${{ hashFiles('./yarn.lock') }} - run: yarn run build - if: steps.cache-typescript-build.outputs.cache-hit != 'true' shell: bash diff --git a/.github/workflows/develop-release-program.yaml b/.github/workflows/develop-release-program.yaml index c564605f1..66079038e 100644 --- a/.github/workflows/develop-release-program.yaml +++ b/.github/workflows/develop-release-program.yaml @@ -33,6 +33,7 @@ jobs: build_programs: needs: [detect_changed_programs] runs-on: ubuntu-latest + if: needs.detect_changed_programs.outputs.programs_with_changes != '[]' && needs.detect_changed_programs.outputs.programs_with_changes != '' strategy: matrix: program: ${{ fromJson(needs.detect_changed_programs.outputs.programs_with_changes) }} @@ -45,21 +46,93 @@ jobs: run: | find programs -type f -name '*.rs' -exec sed -i "s/b\"nJWGUMOK\"/b\"devnethelium5\"/g" {} \; - - name: Install toml-cli + - uses: actions/cache@v2 + name: Cache Toml Cli + id: cache-toml-cli + with: + path: | + ~/.cargo/bin/toml + key: toml-cli-${{ runner.os }}-v0002 + + - run: cargo install toml-cli + if: steps.cache-toml-cli.outputs.cache-hit != 'true' + shell: bash + + - name: Set program information if: steps.cache-toml.outputs.cache-hit != 'true' - run: cargo install toml-cli + run: | + PROGRAM_NAME=${PROGRAM//-/_} # Substitute dashes with underscores + PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.localnet.${PROGRAM_NAME} | tr -d '"') + echo "Program: $PROGRAM_ID" + echo "PROGRAM_NAME=${PROGRAM_NAME}" >> $GITHUB_ENV + echo "PROGRAM_ID=${PROGRAM_ID}" >> $GITHUB_ENV + env: + PROGRAM: ${{ matrix.program }} + + # Build the program with anchor so we get the IDL + - uses: ./.github/actions/build-anchor/ + id: build-anchor + with: + testing: false + devnet: true + program: ${{ env.PROGRAM_NAME }} + + - uses: ./.github/actions/build-verified/ + id: build-verified + with: + devnet: true + program: ${{ env.PROGRAM_NAME }} + program-id: ${{ env.PROGRAM_ID }} + + - name: Store so files + uses: actions/upload-artifact@v3 + with: + name: ${{matrix.program}}-so + path: | + ./target/deploy/${{env.PROGRAM_NAME}}.so + - name: Store idl files + uses: actions/upload-artifact@v3 + with: + name: ${{matrix.program}}-idl + path: | + ./target/idl/${{env.PROGRAM_NAME}}.json + + publish_programs: + needs: [detect_changed_programs, build_programs] + runs-on: ubuntu-latest + if: needs.detect_changed_programs.outputs.programs_with_changes != '[]' && needs.detect_changed_programs.outputs.programs_with_changes != '' + strategy: + # Publish must happen one at a time or there can be conflicts + max-parallel: 1 + matrix: + program: ${{ fromJson(needs.detect_changed_programs.outputs.programs_with_changes) }} + steps: + - name: Checkout code + uses: actions/checkout@v2 + - uses: ./.github/actions/setup-anchor/ - name: Set program information + if: steps.cache-toml.outputs.cache-hit != 'true' run: | PROGRAM_NAME=${PROGRAM//-/_} # Substitute dashes with underscores - PROGRAM_ID=$(toml get Anchor.toml programs.localnet.${PROGRAM_NAME} | tr -d '"') + PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.localnet.${PROGRAM_NAME} | tr -d '"') echo "Program: $PROGRAM_ID" echo "PROGRAM_NAME=${PROGRAM_NAME}" >> $GITHUB_ENV echo "PROGRAM_ID=${PROGRAM_ID}" >> $GITHUB_ENV env: PROGRAM: ${{ matrix.program }} - - uses: ./.github/actions/upload-bpf/ + - name: Download a so files + uses: actions/download-artifact@v3 + with: + name: ${{matrix.program}}-so + path: ./target/deploy/ + - name: Download idl files + uses: actions/download-artifact@v3 + with: + name: ${{matrix.program}}-idl + path: ./target/idl/ + - uses: ./.github/actions/buffer-deploy/ id: buffer-deploy with: devnet: true @@ -68,7 +141,6 @@ jobs: keypair: ${{ secrets.DEVNET_DEPLOYER_KEYPAIR }} program-id: ${{ env.PROGRAM_ID }} buffer-authority: ${{ secrets.DEVNET_MULTISIG_VAULT }} - - name: Squads program upgrade uses: helium/squads-program-upgrade@v0.3.1 with: diff --git a/.github/workflows/npm-canary-release.yaml b/.github/workflows/npm-canary-release.yaml index 0e0708270..3aeea5a21 100644 --- a/.github/workflows/npm-canary-release.yaml +++ b/.github/workflows/npm-canary-release.yaml @@ -55,8 +55,11 @@ jobs: EOF env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: build anchor - uses: ./.github/actions/build-anchor + - uses: ./.github/actions/build-anchor/ + with: + testing: false + devnet: false + - uses: ./.github/actions/setup-ts/ - name: Publish run: yarn run release:canary env: diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml new file mode 100644 index 000000000..d27c8e9be --- /dev/null +++ b/.github/workflows/npm-publish.yaml @@ -0,0 +1,34 @@ +name: NPM Publish + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - "npm-*" # Push events to matching npm-*, i.e. npm-0.0.1 + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ./.github/actions/setup/ + - uses: ./.github/actions/setup-anchor/ + with: + node-version: ${{ env.NODE_VERSION }} + - name: re create .npmrc file + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - uses: ./.github/actions/build-anchor/ + with: + testing: false + devnet: false + - uses: ./.github/actions/setup-ts/ + - name: Lerna Publish + run: yarn release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 8ab763999..8b95d4dc5 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -13,8 +13,16 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Install toml-cli - run: cargo install toml-cli + - uses: actions/cache@v2 + name: Cache Toml Cli + id: cache-toml-cli + with: + path: | + ~/.cargo/bin/toml + key: toml-cli-${{ runner.os }}-v0002 + - run: cargo install toml-cli + if: steps.cache-toml-cli.outputs.cache-hit != 'true' + shell: bash - name: Set tag information run: | @@ -23,14 +31,29 @@ jobs: PROGRAM=$(echo $TAG | sed 's/program-\(.*\)-[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1/') VERSION=$(echo $TAG | sed 's/.*-\([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\)$/\1/') PROGRAM_NAME=${PROGRAM//-/_} # Substitute dashes with underscores - PROGRAM_ID=$(toml get Anchor.toml programs.localnet.${PROGRAM_NAME} | tr -d '"') + PROGRAM_ID=$(~/.cargo/bin/toml get Anchor.toml programs.localnet.${PROGRAM_NAME} | tr -d '"') echo "Program: $PROGRAM" echo "Program: $PROGRAM_ID" echo "Version: $VERSION" echo "PROGRAM_ID=${PROGRAM_ID}" >> $GITHUB_ENV echo "PROGRAM_NAME=${PROGRAM_NAME}" >> $GITHUB_ENV - - uses: ./.github/actions/upload-bpf/ + + # Build the program with anchor so we get the IDL + - uses: ./.github/actions/build-anchor/ + id: build-anchor + with: + testing: false + devnet: false + program: ${{ env.PROGRAM_NAME }} + + - uses: ./.github/actions/build-verified/ + id: build-verified + with: + program: ${{ env.PROGRAM_NAME }} + program-id: ${{ env.PROGRAM_ID }} + + - uses: ./.github/actions/buffer-deploy/ id: buffer-deploy with: network: https://api.mainnet-beta.solana.com diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 97d2ab386..050f25cf0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -68,6 +68,7 @@ jobs: - uses: ./.github/actions/build-anchor/ with: testing: true + - uses: ./.github/actions/setup-ts/ - name: Start Anchor Localnet run: ~/.cargo/bin/anchor localnet --skip-build --provider.wallet ~/.config/solana/id.json & sleep 2 - name: Wait for localnet to start @@ -149,6 +150,7 @@ jobs: - uses: ./.github/actions/build-anchor/ with: testing: true + - uses: ./.github/actions/setup-ts/ - name: Start Anchor Localnet run: ~/.cargo/bin/anchor localnet --skip-build --provider.wallet ~/.config/solana/id.json & sleep 2 - name: Wait for localnet to start From d109531b147f7749b194548ad388f6d2a63c46ad Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 16:09:39 -0500 Subject: [PATCH 12/31] Rm checkout from anchor build --- .github/actions/build-anchor/action.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/build-anchor/action.yaml b/.github/actions/build-anchor/action.yaml index e806fcd07..c35f2f235 100644 --- a/.github/actions/build-anchor/action.yaml +++ b/.github/actions/build-anchor/action.yaml @@ -15,7 +15,6 @@ inputs: runs: using: "composite" steps: - - uses: actions/checkout@v2 - uses: ./.github/actions/setup/ - uses: ./.github/actions/setup-anchor/ with: From f7b5e02891d3b439e7f802e76ab67cf7688c8b66 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 16:13:21 -0500 Subject: [PATCH 13/31] Don't fail on toml exists --- .github/actions/setup-anchor/action.yaml | 2 +- .github/workflows/develop-release-program.yaml | 2 +- .github/workflows/release-program.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-anchor/action.yaml b/.github/actions/setup-anchor/action.yaml index ce2c3f179..df94639a3 100644 --- a/.github/actions/setup-anchor/action.yaml +++ b/.github/actions/setup-anchor/action.yaml @@ -23,6 +23,6 @@ runs: path: | ~/.cargo/bin/toml key: toml-cli-${{ runner.os }}-v0002 - - run: cargo install toml-cli + - run: (cargo install toml-cli || true) if: steps.cache-toml-cli.outputs.cache-hit != 'true' shell: bash diff --git a/.github/workflows/develop-release-program.yaml b/.github/workflows/develop-release-program.yaml index 66079038e..b851675ae 100644 --- a/.github/workflows/develop-release-program.yaml +++ b/.github/workflows/develop-release-program.yaml @@ -54,7 +54,7 @@ jobs: ~/.cargo/bin/toml key: toml-cli-${{ runner.os }}-v0002 - - run: cargo install toml-cli + - run: (cargo install toml-cli || true) if: steps.cache-toml-cli.outputs.cache-hit != 'true' shell: bash diff --git a/.github/workflows/release-program.yaml b/.github/workflows/release-program.yaml index 8b95d4dc5..9133321c1 100644 --- a/.github/workflows/release-program.yaml +++ b/.github/workflows/release-program.yaml @@ -20,7 +20,7 @@ jobs: path: | ~/.cargo/bin/toml key: toml-cli-${{ runner.os }}-v0002 - - run: cargo install toml-cli + - run: (cargo install toml-cli || true) if: steps.cache-toml-cli.outputs.cache-hit != 'true' shell: bash From 95f1f1e2632a99eead184088942afb27a5479301 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 17:45:18 -0500 Subject: [PATCH 14/31] Fix type --- packages/distributor-oracle/src/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/distributor-oracle/src/client.ts b/packages/distributor-oracle/src/client.ts index dc393dbf5..8deb4b07b 100644 --- a/packages/distributor-oracle/src/client.ts +++ b/packages/distributor-oracle/src/client.ts @@ -120,7 +120,7 @@ export async function getPendingRewards( account, info: hemProgram.coder.accounts.decode< IdlAccounts["keyToAssetV0"] - >("keyToAssetV0", account.data), + >("KeyToAssetV0", account.data), }), true, false @@ -140,7 +140,7 @@ export async function getPendingRewards( account, info: program.coder.accounts.decode< IdlAccounts["recipientV0"] - >("recipientV0", account.data), + >("RecipientV0", account.data), }) ); const withRecipients = recipients.map((recipient, index) => { @@ -247,7 +247,7 @@ export async function formBulkTransactions({ account, info: lazyDistributorProgram.coder.accounts.decode< IdlAccounts["recipientV0"] - >("recipientV0", account.data), + >("RecipientV0", account.data), })) ).map((x) => x!.info!); From e9c43b4c770ac252a9cd382aed6db9c12bea61a1 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Wed, 13 Sep 2023 18:24:56 -0500 Subject: [PATCH 15/31] Fix overfetch --- .../src/accountFetchCache.ts | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/packages/account-fetch-cache/src/accountFetchCache.ts b/packages/account-fetch-cache/src/accountFetchCache.ts index 51e6e00a6..a075e5b1d 100644 --- a/packages/account-fetch-cache/src/accountFetchCache.ts +++ b/packages/account-fetch-cache/src/accountFetchCache.ts @@ -5,7 +5,7 @@ import { PublicKey, SendOptions, Transaction, - TransactionInstruction + TransactionInstruction, } from "@solana/web3.js"; import { EventEmitter } from "./eventEmitter"; @@ -41,16 +41,15 @@ let id = 0; let singletons: Record = {}; export function getSingleton(conn: Connection): AccountFetchCache { - const commitment = conn.commitment || "confirmed" - const endp = conn.rpcEndpoint + const commitment = conn.commitment || "confirmed"; + const endp = conn.rpcEndpoint; if (!singletons[endp + commitment]) { singletons[endp + commitment] = new AccountFetchCache({ connection: conn, commitment, - }) - + }); } - return singletons[endp + commitment]! + return singletons[endp + commitment]!; } function setSingleton(conn: Connection, cache: AccountFetchCache) { @@ -176,7 +175,7 @@ export class AccountFetchCache { return result; }; - setSingleton(connection, this) + setSingleton(connection, this); } async requeryMissing(instructions: TransactionInstruction[]) { @@ -252,6 +251,20 @@ export class AccountFetchCache { } } + addToBatchIgnoreResult(id: PublicKey): Promise | undefined { + const idStr = id.toBase58(); + + this.currentBatch.add(idStr); + + this.timeout != null && clearTimeout(this.timeout); + if (this.currentBatch.size > DEFAULT_CHUNK_SIZE) { + return this.fetchBatch().then(() => {}); + } else { + this.timeout = setTimeout(() => this.fetchBatch(), this.delay); + } + return undefined + } + async addToBatch(id: PublicKey): Promise> { const idStr = id.toBase58(); @@ -391,7 +404,7 @@ export class AccountFetchCache { isStatic: Boolean = false, // optimization, set if the data will never change forceRequery = false ): Promise<(ParsedAccountBase | undefined)[]> { - pubKeys.forEach(key => { + for (const key of pubKeys) { this.registerParser(key, parser); const address = key.toBase58(); if (isStatic) { @@ -401,9 +414,9 @@ export class AccountFetchCache { } if (forceRequery || !this.genericCache.has(address)) { - this.currentBatch.add(address); + await this.addToBatchIgnoreResult(key); } - }) + } const searched = new Set(pubKeys.map((p) => p.toBase58())); // Force a batch fetch to resolve all accounts @@ -422,9 +435,13 @@ export class AccountFetchCache { } }); } - - return pubKeys.map(key => this.genericCache.get(key.toBase58()) as ParsedAccountBase | undefined); + return pubKeys.map( + (key) => + this.genericCache.get(key.toBase58()) as + | ParsedAccountBase + | undefined + ); } onAccountChange( From e92a511fce1fb7d9f44223e0ec455e2d9c1b84b0 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 09:52:32 -0500 Subject: [PATCH 16/31] Fix bug --- packages/distributor-oracle/src/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/distributor-oracle/src/client.ts b/packages/distributor-oracle/src/client.ts index 8deb4b07b..68283f32b 100644 --- a/packages/distributor-oracle/src/client.ts +++ b/packages/distributor-oracle/src/client.ts @@ -249,7 +249,7 @@ export async function formBulkTransactions({ IdlAccounts["recipientV0"] >("RecipientV0", account.data), })) - ).map((x) => x!.info!); + ).map((x) => x?.info); let ixsPerAsset = await Promise.all( recipientAccs.map(async (recipientAcc, idx) => { From 950648d334f5e1be43aa8b5872ec172e592fd17e Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 10:08:41 -0500 Subject: [PATCH 17/31] Improve build times --- Cargo.lock | 1 - Cargo.toml | 4 ++++ programs/circuit-breaker/Cargo.toml | 2 +- programs/data-credits/Cargo.toml | 4 ++-- programs/fanout/Cargo.toml | 2 +- programs/helium-entity-manager/Cargo.toml | 5 ++--- programs/helium-sub-daos/Cargo.toml | 4 ++-- programs/lazy-distributor/Cargo.toml | 4 ++-- programs/lazy-transactions/Cargo.toml | 2 +- programs/mobile-entity-manager/Cargo.toml | 6 +++--- programs/rewards-oracle/Cargo.toml | 2 +- programs/treasury-management/Cargo.toml | 4 ++-- programs/voter-stake-registry/Cargo.toml | 2 +- 13 files changed, 22 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4c472c519..7bf8baed4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1779,7 +1779,6 @@ dependencies = [ "data-credits", "default-env", "helium-sub-daos", - "lazy-transactions", "mpl-token-metadata", "shared-utils", "solana-security-txt", diff --git a/Cargo.toml b/Cargo.toml index 47316cee1..472262921 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,3 +24,7 @@ account-compression-cpi = { rev = "9707a03eb7be0ccf4d96a18b662ffcd376365640", gi bubblegum-cpi = { rev = "9707a03eb7be0ccf4d96a18b662ffcd376365640", git = "https://github.com/helium/account-compression-anchor-gen.git", features = ["cpi"]} solana-security-txt = "1.1.1" default-env = "0.1.1" +shared-utils = { path = "./utils/shared-utils" } +circuit-breaker = { path = "./programs/circuit-breaker", features = ["cpi"] } +helium-sub-daos = { path = "./programs/helium-sub-daos", features = ["cpi"] } +helium-entity-manager = { path = "./programs/helium-entity-manager", features = ["cpi"] } \ No newline at end of file diff --git a/programs/circuit-breaker/Cargo.toml b/programs/circuit-breaker/Cargo.toml index 3dfa505fd..9cc5b1069 100644 --- a/programs/circuit-breaker/Cargo.toml +++ b/programs/circuit-breaker/Cargo.toml @@ -25,6 +25,6 @@ overflow-checks = true [dependencies] anchor-lang = { workspace = true } anchor-spl = { workspace = true } -shared-utils = { path = "../../utils/shared-utils" } +shared-utils = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/data-credits/Cargo.toml b/programs/data-credits/Cargo.toml index 8869e843a..d1c49c514 100644 --- a/programs/data-credits/Cargo.toml +++ b/programs/data-credits/Cargo.toml @@ -25,8 +25,8 @@ overflow-checks = true [dependencies] anchor-lang = { version="0.26.0", features = ["init-if-needed"] } anchor-spl = { workspace = true } -helium-sub-daos = { path = "../helium-sub-daos", features = ["cpi"] } -circuit-breaker = { path = "../circuit-breaker", features = ["cpi"] } +helium-sub-daos = { workspace = true } +circuit-breaker = { workspace = true } pyth-sdk-solana = { version = "0.7.0" } lazy-transactions = { path = "../lazy-transactions", features = ["cpi"] } solana-security-txt = { workspace = true } diff --git a/programs/fanout/Cargo.toml b/programs/fanout/Cargo.toml index da357cca9..953913d28 100644 --- a/programs/fanout/Cargo.toml +++ b/programs/fanout/Cargo.toml @@ -25,7 +25,7 @@ overflow-checks = true [dependencies] anchor-lang = { workspace = true } anchor-spl = { workspace = true } -shared-utils = { path = "../../utils/shared-utils" } +shared-utils = { workspace = true } mpl-token-metadata = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/helium-entity-manager/Cargo.toml b/programs/helium-entity-manager/Cargo.toml index eb866c040..571d35979 100644 --- a/programs/helium-entity-manager/Cargo.toml +++ b/programs/helium-entity-manager/Cargo.toml @@ -31,9 +31,8 @@ angry-purple-tiger = "0.1.0" mpl-token-metadata = { workspace = true } bubblegum-cpi = { workspace = true } account-compression-cpi = { workspace = true } -shared-utils = { path = "../../utils/shared-utils" } +shared-utils = { workspace = true } data-credits = { path = "../data-credits", features = ["cpi"] } -helium-sub-daos = { path = "../helium-sub-daos", features = ["cpi"] } -lazy-transactions = { path = "../lazy-transactions", features = ["cpi"] } +helium-sub-daos = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/helium-sub-daos/Cargo.toml b/programs/helium-sub-daos/Cargo.toml index d844729d1..f10df3c4e 100644 --- a/programs/helium-sub-daos/Cargo.toml +++ b/programs/helium-sub-daos/Cargo.toml @@ -27,8 +27,8 @@ anchor-lang = { workspace = true } anchor-spl = { workspace = true } mpl-token-metadata = { workspace = true } voter-stake-registry = { path = "../voter-stake-registry", features = ["no-entrypoint", "cpi"] } -shared-utils = { path = "../../utils/shared-utils" } -circuit-breaker = { path = "../circuit-breaker", features = ["cpi"] } +shared-utils = { workspace = true } +circuit-breaker = { workspace = true } treasury-management = { path = "../treasury-management", features = ["cpi"] } clockwork-sdk = { git = "https://github.com/clockwork-xyz/clockwork", version="2.0.1", rev="781b42fd06f2926899597ce5ea1f19b8ecd3d2e4" } diff --git a/programs/lazy-distributor/Cargo.toml b/programs/lazy-distributor/Cargo.toml index 6b5c9afd2..8bbc558e6 100644 --- a/programs/lazy-distributor/Cargo.toml +++ b/programs/lazy-distributor/Cargo.toml @@ -27,8 +27,8 @@ anchor-lang = { workspace = true } anchor-spl = { workspace = true } mpl-token-metadata = { workspace = true } bubblegum-cpi = { workspace = true } -circuit-breaker = { path = "../circuit-breaker", features = ["cpi"] } -shared-utils = { path = "../../utils/shared-utils" } +circuit-breaker = { workspace = true } +shared-utils = { workspace = true } account-compression-cpi = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/lazy-transactions/Cargo.toml b/programs/lazy-transactions/Cargo.toml index d121be2a2..55aad77e9 100644 --- a/programs/lazy-transactions/Cargo.toml +++ b/programs/lazy-transactions/Cargo.toml @@ -27,6 +27,6 @@ anchor-lang = { workspace = true } anchor-spl = { workspace = true } spl-concurrent-merkle-tree = "0.1.2" bytemuck = "1.13.0" -shared-utils = { path = "../../utils/shared-utils" } +shared-utils = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/mobile-entity-manager/Cargo.toml b/programs/mobile-entity-manager/Cargo.toml index 1d7ae0b1a..085a968e9 100644 --- a/programs/mobile-entity-manager/Cargo.toml +++ b/programs/mobile-entity-manager/Cargo.toml @@ -31,8 +31,8 @@ angry-purple-tiger = "0.1.0" mpl-token-metadata = { workspace = true } bubblegum-cpi = { workspace = true } account-compression-cpi = { workspace = true } -shared-utils = { path = "../../utils/shared-utils" } -helium-entity-manager = { path = "../helium-entity-manager", features = ["cpi"] } -helium-sub-daos = { path = "../helium-sub-daos", features = ["cpi"] } +shared-utils = { workspace = true } +helium-entity-manager = { workspace = true } +helium-sub-daos = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/rewards-oracle/Cargo.toml b/programs/rewards-oracle/Cargo.toml index 06a1fe8ba..863f4a728 100644 --- a/programs/rewards-oracle/Cargo.toml +++ b/programs/rewards-oracle/Cargo.toml @@ -22,6 +22,6 @@ default = [] [dependencies] anchor-lang = "0.26.0" lazy-distributor = { path = "../lazy-distributor", features = ["cpi"] } -helium-entity-manager = { path = "../helium-entity-manager", features = ["cpi"] } +helium-entity-manager = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/treasury-management/Cargo.toml b/programs/treasury-management/Cargo.toml index b67023fa3..928425eac 100644 --- a/programs/treasury-management/Cargo.toml +++ b/programs/treasury-management/Cargo.toml @@ -24,8 +24,8 @@ overflow-checks = true [dependencies] anchor-lang = { workspace = true } -circuit-breaker = { path = "../circuit-breaker", features = ["cpi"] } +circuit-breaker = { workspace = true } anchor-spl = { workspace = true } -shared-utils = { path = "../../utils/shared-utils" } +shared-utils = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index 6b7231067..c89680904 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -40,7 +40,7 @@ mpl-token-metadata = { workspace = true } itertools = "0.10.2" spl-governance-tools= "0.1.3" proposal = { path = "../../utils/proposal" } -shared-utils = { path = "../../utils/shared-utils" } +shared-utils = { workspace = true } solana-security-txt = { workspace = true } default-env = { workspace = true } From ffda404d3abba25631492821bef45cf3163cea18 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 11:05:36 -0500 Subject: [PATCH 18/31] Bulk fetch asset proofs and assets in distributor oracle --- packages/distributor-oracle/src/client.ts | 49 ++++---- packages/spl-utils/src/index.ts | 2 + packages/spl-utils/src/mplAssetAPI.ts | 146 ++++++++++++++++------ tests/distributor-oracle.ts | 67 +++++----- tests/helium-entity-manager.ts | 2 +- 5 files changed, 170 insertions(+), 96 deletions(-) diff --git a/packages/distributor-oracle/src/client.ts b/packages/distributor-oracle/src/client.ts index 68283f32b..a813d1434 100644 --- a/packages/distributor-oracle/src/client.ts +++ b/packages/distributor-oracle/src/client.ts @@ -22,6 +22,8 @@ import { HNT_MINT, getAsset, getAssetProof, + getAssetBatch, + getAssetProofBatch, truthy, } from '@helium/spl-utils'; import { getAssociatedTokenAddress } from '@solana/spl-token'; @@ -178,8 +180,8 @@ export async function formBulkTransactions({ wallet = (lazyDistributorProgram.provider as AnchorProvider).wallet.publicKey, skipOracleSign = false, assetEndpoint, - getAssetFn = getAsset, - getAssetProofFn = getAssetProof, + getAssetBatchFn = getAssetBatch, + getAssetProofBatchFn = getAssetProofBatch, }: { program: Program; rewardsOracleProgram?: Program; @@ -192,11 +194,11 @@ export async function formBulkTransactions({ wallet?: PublicKey; assetEndpoint?: string; skipOracleSign?: boolean; - getAssetFn?: (url: string, assetId: PublicKey) => Promise; - getAssetProofFn?: ( + getAssetBatchFn?: (url: string, assetIds: PublicKey[]) => Promise; + getAssetProofBatchFn?: ( url: string, - assetId: PublicKey - ) => Promise; + assetIds: PublicKey[] + ) => Promise | undefined>; }) { if (assets.length > 100) { throw new Error('Too many assets, max 100'); @@ -217,21 +219,12 @@ export async function formBulkTransactions({ } if (!compressionAssetAccs) { - compressionAssetAccs = await Promise.all( - assets.map(async (asset) => { - // @ts-ignore - const assetAcc = await getAssetFn( - assetEndpoint || provider.connection.rpcEndpoint, - asset - ); - if (!assetAcc) { - throw new Error('No asset with ID ' + asset.toBase58()); - } - return assetAcc; - }) - ); + compressionAssetAccs = await getAssetBatchFn( + assetEndpoint || provider.connection.rpcEndpoint, + assets + ) } - if (compressionAssetAccs.length != assets.length) { + if (compressionAssetAccs?.length != assets.length) { throw new Error('Assets not the same length as compressionAssetAccs'); } @@ -250,7 +243,10 @@ export async function formBulkTransactions({ >("RecipientV0", account.data), })) ).map((x) => x?.info); - + const assetProofsById = await getAssetProofBatchFn( + assetEndpoint || provider.connection.rpcEndpoint, + assets + ) let ixsPerAsset = await Promise.all( recipientAccs.map(async (recipientAcc, idx) => { if (!recipientAcc) { @@ -265,7 +261,7 @@ export async function formBulkTransactions({ // Make the oracle pay for the recipient to avoid newly migrated users not having enough sol to claim rewards payer: lazyDistributorAcc.oracles[0].oracle, getAssetFn: () => Promise.resolve(compressionAssetAccs![idx]), // cache result so we don't hit again - getAssetProofFn, + getAssetProofFn: assetProofsById ? () => Promise.resolve(assetProofsById[compressionAssetAccs![idx].id.toBase58()]) : undefined, }) ).instruction(), ]; @@ -310,14 +306,19 @@ export async function formBulkTransactions({ if (setRewardIxs.length == 0) { return []; } - const distributeIx = await ( + const distributeIx = await( await distributeCompressionRewards({ program: lazyDistributorProgram, assetId: assets![idx], lazyDistributor, rewardsMint: lazyDistributorAcc.rewardsMint!, getAssetFn: () => Promise.resolve(assetAcc), // cache result so we don't hit again - getAssetProofFn, + getAssetProofFn: assetProofsById + ? () => + Promise.resolve( + assetProofsById[compressionAssetAccs![idx].id.toBase58()] + ) + : undefined, assetEndpoint, }) ).instruction(); diff --git a/packages/spl-utils/src/index.ts b/packages/spl-utils/src/index.ts index 1344d844a..5d5905161 100644 --- a/packages/spl-utils/src/index.ts +++ b/packages/spl-utils/src/index.ts @@ -18,6 +18,8 @@ export { getAssetProof, getAssetsByOwner, searchAssets, + getAssetBatch, + getAssetProofBatch, } from './mplAssetAPI'; export { proofArgsAndAccounts } from './proofArgsAndAccounts'; diff --git a/packages/spl-utils/src/mplAssetAPI.ts b/packages/spl-utils/src/mplAssetAPI.ts index 26bcd9c2b..c119bd33d 100644 --- a/packages/spl-utils/src/mplAssetAPI.ts +++ b/packages/spl-utils/src/mplAssetAPI.ts @@ -1,8 +1,8 @@ -import { Creator, Uses } from '@metaplex-foundation/mpl-bubblegum'; -import { PublicKey } from '@solana/web3.js'; -import axios from 'axios'; +import { Creator, Uses } from "@metaplex-foundation/mpl-bubblegum"; +import { PublicKey } from "@solana/web3.js"; +import axios from "axios"; // @ts-ignore -import base58 from 'bs58'; +import base58 from "bs58"; export type AssetProof = { root: PublicKey; @@ -47,14 +47,14 @@ export async function getAsset( ): Promise { try { const response = await axios.post(url, { - jsonrpc: '2.0', - method: 'getAsset', - id: 'rpd-op-123', + jsonrpc: "2.0", + method: "getAsset", + id: "rpd-op-123", params: { id: assetId.toBase58() }, headers: { - 'Cache-Control': 'no-cache', - Pragma: 'no-cache', - Expires: '0', + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", }, }); const result = response.data.result; @@ -67,6 +67,32 @@ export async function getAsset( } } +export async function getAssetBatch( + url: string, + assetIds: PublicKey[] +): Promise { + try { + const response = await axios.post(url, { + jsonrpc: "2.0", + method: "getAssetBatch", + id: "rpd-op-123", + params: { ids: assetIds.map((assetId) => assetId.toBase58()) }, + headers: { + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", + }, + }); + const result = response.data.result; + if (result) { + return result.map(toAsset); + } + } catch (error) { + console.error(error); + throw error; + } +} + export async function getAssets( url: string, assetIds: PublicKey[] @@ -79,9 +105,9 @@ export async function getAssets( } const batch = assetIds.map((assetId, i) => ({ - jsonrpc: '2.0', + jsonrpc: "2.0", id: `get-asset-${i}`, - method: 'getAsset', + method: "getAsset", params: { id: assetId.toBase58(), }, @@ -89,12 +115,12 @@ export async function getAssets( const response = await axios({ url, - method: 'POST', + method: "POST", headers: { - 'Content-Type': 'application/json', - 'Cache-Control': 'no-cache', - Pragma: 'no-cache', - Expires: '0', + "Content-Type": "application/json", + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", }, data: JSON.stringify(batch), }); @@ -153,14 +179,14 @@ export async function getAssetProof( ): Promise { try { const response = await axios.post(url, { - jsonrpc: '2.0', - method: 'getAssetProof', - id: 'rpd-op-123', + jsonrpc: "2.0", + method: "getAssetProof", + id: "rpd-op-123", params: { id: assetId.toBase58() }, headers: { - 'Cache-Control': 'no-cache', - Pragma: 'no-cache', - Expires: '0', + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", }, }); const result = response.data.result; @@ -179,8 +205,46 @@ export async function getAssetProof( } } +export async function getAssetProofBatch( + url: string, + assetIds: PublicKey[] +): Promise | undefined> { + try { + const response = await axios.post(url, { + jsonrpc: "2.0", + method: "getAssetProofBatch", + id: "rpd-op-123", + params: { ids: assetIds.map((assetId) => assetId.toBase58()) }, + headers: { + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", + }, + }); + const result = response.data.result; + if (result) { + return Object.entries(result as Record).reduce( + (acc, [k, r]) => { + acc[k] = { + root: new PublicKey(r.root), + proof: r.proof.map((p: any) => new PublicKey(p)), + nodeIndex: r.node_index, + leaf: new PublicKey(r.leaf), + treeId: new PublicKey(r.tree_id), + } as AssetProof; + return acc; + }, + {} as Record + ); + } + } catch (error) { + console.error(error); + throw error; + } +} + export type AssetsByOwnerOpts = { - sortBy?: { sortBy: 'created'; sortDirection: 'asc' | 'desc' }; + sortBy?: { sortBy: "created"; sortDirection: "asc" | "desc" }; limit?: number; page?: number; before?: string; @@ -191,23 +255,23 @@ export async function getAssetsByOwner( url: string, wallet: string, { - sortBy = { sortBy: 'created', sortDirection: 'asc' }, + sortBy = { sortBy: "created", sortDirection: "asc" }, limit = 50, page = 1, - before = '', - after = '', + before = "", + after = "", }: AssetsByOwnerOpts = {} ): Promise { try { const response = await axios.post(url, { - jsonrpc: '2.0', - method: 'getAssetsByOwner', - id: 'rpd-op-123', + jsonrpc: "2.0", + method: "getAssetsByOwner", + id: "rpd-op-123", params: [wallet, sortBy, limit, page, before, after], headers: { - 'Cache-Control': 'no-cache', - Pragma: 'no-cache', - Expires: '0', + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", }, }); @@ -219,7 +283,7 @@ export async function getAssetsByOwner( } export type SearchAssetsOpts = { - sortBy?: { sortBy: 'created'; sortDirection: 'asc' | 'desc' }; + sortBy?: { sortBy: "created"; sortDirection: "asc" | "desc" }; page?: number; collection?: string; ownerAddress: string; @@ -231,16 +295,16 @@ export async function searchAssets( url: string, { creatorVerified = true, - sortBy = { sortBy: 'created', sortDirection: 'asc' }, + sortBy = { sortBy: "created", sortDirection: "asc" }, page = 1, ...rest }: SearchAssetsOpts ): Promise { try { const response = await axios.post(url, { - jsonrpc: '2.0', - method: 'searchAssets', - id: 'get-assets-op-1', + jsonrpc: "2.0", + method: "searchAssets", + id: "get-assets-op-1", params: { page, creatorVerified, @@ -248,9 +312,9 @@ export async function searchAssets( ...rest, }, headers: { - 'Cache-Control': 'no-cache', - Pragma: 'no-cache', - Expires: '0', + "Cache-Control": "no-cache", + Pragma: "no-cache", + Expires: "0", }, }); diff --git a/tests/distributor-oracle.ts b/tests/distributor-oracle.ts index 74939e9e7..0b3028c69 100644 --- a/tests/distributor-oracle.ts +++ b/tests/distributor-oracle.ts @@ -6,12 +6,12 @@ import { ThresholdType } from "@helium/circuit-breaker-sdk"; import { Keypair as HeliumKeypair } from "@helium/crypto"; import { PROGRAM_ID as DC_PID, - init as initDataCredits + init as initDataCredits, } from "@helium/data-credits-sdk"; import { daoKey, PROGRAM_ID as HSD_PID, - init as initHeliumSubDaos + init as initHeliumSubDaos, } from "@helium/helium-sub-daos-sdk"; import { Asset, @@ -20,12 +20,15 @@ import { createMint, getAsset, sendAndConfirmWithRetry, - sendInstructions + sendInstructions, } from "@helium/spl-utils"; import { - ComputeBudgetProgram, Keypair, LAMPORTS_PER_SOL, PublicKey, + ComputeBudgetProgram, + Keypair, + LAMPORTS_PER_SOL, + PublicKey, SystemProgram, - Transaction + Transaction, } from "@solana/web3.js"; import chai, { assert, expect } from "chai"; import chaiHttp from "chai-http"; @@ -33,35 +36,31 @@ import fs from "fs"; import * as client from "../packages/distributor-oracle/src/client"; import { Database, - OracleServer + OracleServer, } from "../packages/distributor-oracle/src/server"; import { PROGRAM_ID as HEM_PID, init as initHeliumEntityManager, - keyToAssetKey + keyToAssetKey, } from "../packages/helium-entity-manager-sdk/src"; import { initializeCompressionRecipient, init as initLazy, - PROGRAM_ID as LD_PID + PROGRAM_ID as LD_PID, } from "../packages/lazy-distributor-sdk/src"; import { init as initRewards, oracleSignerKey, - PROGRAM_ID as REWARDS_PID + PROGRAM_ID as REWARDS_PID, } from "../packages/rewards-oracle-sdk/src"; import { PROGRAM_ID as VSR_PID, - init as vsrInit + init as vsrInit, } from "../packages/voter-stake-registry-sdk/src"; import { HeliumEntityManager } from "../target/types/helium_entity_manager"; import { LazyDistributor } from "../target/types/lazy_distributor"; import { RewardsOracle } from "../target/types/rewards_oracle"; -import { - ensureLDIdl, - ensureHEMIdl, - initWorld -} from "./utils/fixtures"; +import { ensureLDIdl, ensureHEMIdl, initWorld } from "./utils/fixtures"; import { initVsr } from "./utils/vsr"; import { createMockCompression } from "./utils/compression"; @@ -107,13 +106,16 @@ export class DatabaseMock implements Database { async getBulkRewards(entityKeys: string[]): Promise> { let _this = this; - const res: Record = entityKeys.reduce((acc: Record, key) => { - acc[key] = Math.floor( - (_this.inMemHash.byHotspot[key]?.lifetimeRewards || 0) * - Math.pow(10, 8) - ).toString(); - return acc; - }, {}); + const res: Record = entityKeys.reduce( + (acc: Record, key) => { + acc[key] = Math.floor( + (_this.inMemHash.byHotspot[key]?.lifetimeRewards || 0) * + Math.pow(10, 8) + ).toString(); + return acc; + }, + {} + ); return res; } @@ -258,7 +260,7 @@ describe("distributor-oracle", () => { thresholdType: ThresholdType.Absolute as never, threshold: new anchor.BN(1000000000), }, - approver: oracleSignerKey()[0] + approver: oracleSignerKey()[0], }) .accounts({ rewardsMint, @@ -341,7 +343,11 @@ describe("distributor-oracle", () => { .signers([makerKeypair, eccVerifier]) .rpc({ skipPreflight: true }); - ({getAssetFn, getAssetProofFn, hotspot: asset} = await createMockCompression({ + ({ + getAssetFn, + getAssetProofFn, + hotspot: asset, + } = await createMockCompression({ collection: collection, dao, merkle: merkle, @@ -424,12 +430,14 @@ describe("distributor-oracle", () => { ); }); - it("should bulk sign transactions", async() => { + it("should bulk sign transactions", async () => { const unsigned = await client.formBulkTransactions({ program: ldProgram, rewardsOracleProgram: rewardsProgram, - getAssetFn, - getAssetProofFn, + getAssetBatchFn: async () => [(await getAssetFn())!], + getAssetProofBatchFn: async () => ({ + [asset.toBase58()]: (await getAssetProofFn())!, + }), rewards: [ { oracleKey: oracle.publicKey, @@ -441,7 +449,6 @@ describe("distributor-oracle", () => { lazyDistributor, skipOracleSign: true, }); - console.log(unsigned); const tx = await provider.wallet.signTransaction(unsigned[0]); const serializedTx = tx.serialize({ requireAllSignatures: false, @@ -453,7 +460,7 @@ describe("distributor-oracle", () => { .post("/bulk-sign") .send({ transactions: [[...serializedTx]] }); - console.log(res.body) + console.log(res.body); assert.hasAllKeys(res.body, ["transactions", "success"]); const signedTx = Transaction.from(res.body.transactions[0].data); await sendAndConfirmWithRetry( @@ -470,7 +477,7 @@ describe("distributor-oracle", () => { recipientAcc.totalRewards.toNumber(), Number(await oracleServer.db.getCurrentRewards(asset)) ); - }) + }); it("should sign and execute properly formed transactions", async () => { const unsigned = await client.formTransaction({ diff --git a/tests/helium-entity-manager.ts b/tests/helium-entity-manager.ts index 56b5003ab..5383dbe09 100644 --- a/tests/helium-entity-manager.ts +++ b/tests/helium-entity-manager.ts @@ -509,7 +509,7 @@ describe("helium-entity-manager", () => { let tx = await hemProgram.methods .issueEntityV0({ - entityKey: Buffer.from(bs58.decode(eccKey)), + entityKey: Buffer.from(bs58.decode(eccKey!)), }) .preInstructions([ ComputeBudgetProgram.setComputeUnitLimit({ units: 350000 }), From f244a08e1798f03506f198853e178eeced5cc30e Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 11:06:11 -0500 Subject: [PATCH 19/31] chore(release): publish 0.3.0 --- CHANGELOG.md | 18 ++++++++++++++ lerna.json | 2 +- .../account-fetch-cache-hooks/CHANGELOG.md | 8 +++++++ .../account-fetch-cache-hooks/package.json | 4 ++-- packages/account-fetch-cache/CHANGELOG.md | 8 +++++++ packages/account-fetch-cache/package.json | 2 +- .../CHANGELOG.md | 8 +++++++ .../package.json | 4 ++-- packages/active-device-oracle/CHANGELOG.md | 8 +++++++ packages/active-device-oracle/package.json | 2 +- packages/anchor-resolvers/CHANGELOG.md | 8 +++++++ packages/anchor-resolvers/package.json | 2 +- packages/circuit-breaker-sdk/CHANGELOG.md | 8 +++++++ packages/circuit-breaker-sdk/package.json | 6 ++--- packages/crons/CHANGELOG.md | 11 +++++++++ packages/crons/package.json | 22 ++++++++--------- packages/currency-utils/CHANGELOG.md | 8 +++++++ packages/currency-utils/package.json | 2 +- packages/data-credits-sdk/CHANGELOG.md | 8 +++++++ packages/data-credits-sdk/package.json | 10 ++++---- packages/distributor-oracle/CHANGELOG.md | 8 +++++++ packages/distributor-oracle/package.json | 16 ++++++------- packages/fanout-metadata-service/CHANGELOG.md | 8 +++++++ packages/fanout-metadata-service/package.json | 8 +++---- packages/fanout-sdk/CHANGELOG.md | 8 +++++++ packages/fanout-sdk/package.json | 6 ++--- packages/faucet-service/CHANGELOG.md | 8 +++++++ packages/faucet-service/package.json | 6 ++--- packages/helium-admin-cli/CHANGELOG.md | 16 +++++++++++++ packages/helium-admin-cli/package.json | 24 +++++++++---------- .../helium-entity-manager-sdk/CHANGELOG.md | 8 +++++++ .../helium-entity-manager-sdk/package.json | 10 ++++---- packages/helium-react-hooks/CHANGELOG.md | 8 +++++++ packages/helium-react-hooks/package.json | 6 ++--- packages/helium-sub-daos-sdk/CHANGELOG.md | 8 +++++++ packages/helium-sub-daos-sdk/package.json | 10 ++++---- packages/hnt-to-rent-service/CHANGELOG.md | 8 +++++++ packages/hnt-to-rent-service/package.json | 4 ++-- packages/hotspot-utils/CHANGELOG.md | 8 +++++++ packages/hotspot-utils/package.json | 10 ++++---- packages/idls/CHANGELOG.md | 8 +++++++ packages/idls/package.json | 2 +- .../CHANGELOG.md | 8 +++++++ .../package.json | 4 ++-- packages/lazy-distributor-sdk/CHANGELOG.md | 8 +++++++ packages/lazy-distributor-sdk/package.json | 6 ++--- packages/lazy-transactions-sdk/CHANGELOG.md | 11 +++++++++ packages/lazy-transactions-sdk/package.json | 6 ++--- packages/metadata-service/CHANGELOG.md | 8 +++++++ packages/metadata-service/package.json | 6 ++--- packages/migration-service/CHANGELOG.md | 11 +++++++++ packages/migration-service/package.json | 22 ++++++++--------- .../mobile-entity-manager-sdk/CHANGELOG.md | 8 +++++++ .../mobile-entity-manager-sdk/package.json | 8 +++---- packages/monitor-service/CHANGELOG.md | 8 +++++++ packages/monitor-service/package.json | 16 ++++++------- packages/price-oracle-sdk/CHANGELOG.md | 8 +++++++ packages/price-oracle-sdk/package.json | 4 ++-- .../CHANGELOG.md | 8 +++++++ .../package.json | 2 +- packages/rewards-oracle-sdk/CHANGELOG.md | 8 +++++++ packages/rewards-oracle-sdk/package.json | 6 ++--- packages/spl-utils/CHANGELOG.md | 11 +++++++++ packages/spl-utils/package.json | 6 ++--- packages/treasury-management-sdk/CHANGELOG.md | 8 +++++++ packages/treasury-management-sdk/package.json | 8 +++---- .../voter-stake-registry-hooks/CHANGELOG.md | 8 +++++++ .../voter-stake-registry-hooks/package.json | 14 +++++------ .../voter-stake-registry-sdk/CHANGELOG.md | 8 +++++++ .../voter-stake-registry-sdk/package.json | 6 ++--- packages/vsr-metadata-service/CHANGELOG.md | 8 +++++++ packages/vsr-metadata-service/package.json | 8 +++---- packages/xnft-hotspot/CHANGELOG.md | 8 +++++++ packages/xnft-hotspot/package.json | 12 +++++----- 74 files changed, 472 insertions(+), 146 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48df757d2..cc276b4c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + + +### Features + +* **#373:** replace clockwork ([#388](https://github.com/helium/helium-program-library/issues/388)) ([55033c7](https://github.com/helium/helium-program-library/commit/55033c718df08f41eb2f77d726d59d916ebbd677)), closes [#373](https://github.com/helium/helium-program-library/issues/373) +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-library/issues/380)) ([a691257](https://github.com/helium/helium-program-library/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-library/issues/376) [#376](https://github.com/helium/helium-program-library/issues/376) +* **#379:** Automate npm publish and fix devnet conflicting sqds txns ([#386](https://github.com/helium/helium-program-library/issues/386)) ([a4a3780](https://github.com/helium/helium-program-library/commit/a4a37806fefe82ca9a38f04c311f600ad1f7c36c)) + + +### Reverts + +* Revert "Add back mobile genesis fix for devnet" ([93e9a2c](https://github.com/helium/helium-program-library/commit/93e9a2c370ba77a49b02efc2590ddf3039465ed6)) + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) diff --git a/lerna.json b/lerna.json index 658ac6c3c..abb553f97 100644 --- a/lerna.json +++ b/lerna.json @@ -4,5 +4,5 @@ "packages/*" ], "useWorkspaces": true, - "version": "0.2.22" + "version": "0.3.0" } diff --git a/packages/account-fetch-cache-hooks/CHANGELOG.md b/packages/account-fetch-cache-hooks/CHANGELOG.md index 3c2cea4d3..8d6306de2 100644 --- a/packages/account-fetch-cache-hooks/CHANGELOG.md +++ b/packages/account-fetch-cache-hooks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/account-fetch-cache-hooks + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/account-fetch-cache-hooks diff --git a/packages/account-fetch-cache-hooks/package.json b/packages/account-fetch-cache-hooks/package.json index 369552252..8a188e310 100644 --- a/packages/account-fetch-cache-hooks/package.json +++ b/packages/account-fetch-cache-hooks/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "React hooks and context for account-fetch-cache", "repository": { "type": "git", @@ -32,7 +32,7 @@ "prebuild": "npm run clean && npm run package" }, "dependencies": { - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@solana/web3.js": "^1.78.4", "react-async-hook": "^4.0.0" }, diff --git a/packages/account-fetch-cache/CHANGELOG.md b/packages/account-fetch-cache/CHANGELOG.md index 2a7ab0988..660e87910 100644 --- a/packages/account-fetch-cache/CHANGELOG.md +++ b/packages/account-fetch-cache/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/account-fetch-cache + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/account-fetch-cache diff --git a/packages/account-fetch-cache/package.json b/packages/account-fetch-cache/package.json index 69082b2c7..e96d263ef 100644 --- a/packages/account-fetch-cache/package.json +++ b/packages/account-fetch-cache/package.json @@ -1,6 +1,6 @@ { "name": "@helium/account-fetch-cache", - "version": "0.2.22", + "version": "0.3.0", "description": "Solana account fetch cache to eliminate reduntant fetching, and batch fetches", "publishConfig": { "access": "public", diff --git a/packages/account-postgres-sink-service/CHANGELOG.md b/packages/account-postgres-sink-service/CHANGELOG.md index 3ae0f506c..41177b340 100644 --- a/packages/account-postgres-sink-service/CHANGELOG.md +++ b/packages/account-postgres-sink-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/account-postgres-sink-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/account-postgres-sink-service diff --git a/packages/account-postgres-sink-service/package.json b/packages/account-postgres-sink-service/package.json index 7be94be3c..460e85d5b 100644 --- a/packages/account-postgres-sink-service/package.json +++ b/packages/account-postgres-sink-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Sync account data to postgres", "repository": { "type": "git", @@ -34,7 +34,7 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/web3.js": "^1.78.4", "aws-sdk": "^2.1344.0", diff --git a/packages/active-device-oracle/CHANGELOG.md b/packages/active-device-oracle/CHANGELOG.md index 6129d301d..92639f065 100644 --- a/packages/active-device-oracle/CHANGELOG.md +++ b/packages/active-device-oracle/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/active-device-oracle + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/active-device-oracle diff --git a/packages/active-device-oracle/package.json b/packages/active-device-oracle/package.json index 98c901189..09468419f 100644 --- a/packages/active-device-oracle/package.json +++ b/packages/active-device-oracle/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Oracle of helium active devices", "repository": { "type": "git", diff --git a/packages/anchor-resolvers/CHANGELOG.md b/packages/anchor-resolvers/CHANGELOG.md index 9a2f86bee..42f31aad3 100644 --- a/packages/anchor-resolvers/CHANGELOG.md +++ b/packages/anchor-resolvers/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/anchor-resolvers + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/anchor-resolvers diff --git a/packages/anchor-resolvers/package.json b/packages/anchor-resolvers/package.json index dc6574f5c..8d7839c23 100644 --- a/packages/anchor-resolvers/package.json +++ b/packages/anchor-resolvers/package.json @@ -1,6 +1,6 @@ { "name": "@helium/anchor-resolvers", - "version": "0.2.22", + "version": "0.3.0", "description": "Wrappers around anchor custom resolvers to make composition easier", "publishConfig": { "access": "public", diff --git a/packages/circuit-breaker-sdk/CHANGELOG.md b/packages/circuit-breaker-sdk/CHANGELOG.md index 327367f2d..c19f01da3 100644 --- a/packages/circuit-breaker-sdk/CHANGELOG.md +++ b/packages/circuit-breaker-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/circuit-breaker-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/circuit-breaker-sdk diff --git a/packages/circuit-breaker-sdk/package.json b/packages/circuit-breaker-sdk/package.json index 2b8973e19..8c498dd54 100644 --- a/packages/circuit-breaker-sdk/package.json +++ b/packages/circuit-breaker-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the circuit breaker smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/crons/CHANGELOG.md b/packages/crons/CHANGELOG.md index b828c64c6..9b1cbb006 100644 --- a/packages/crons/CHANGELOG.md +++ b/packages/crons/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + + +### Features + +* **#373:** replace clockwork ([#388](https://github.com/helium/helium-program-library/issues/388)) ([55033c7](https://github.com/helium/helium-program-library/commit/55033c718df08f41eb2f77d726d59d916ebbd677)), closes [#373](https://github.com/helium/helium-program-library/issues/373) + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) diff --git a/packages/crons/package.json b/packages/crons/package.json index ebedef224..a54014482 100644 --- a/packages/crons/package.json +++ b/packages/crons/package.json @@ -1,6 +1,6 @@ { "name": "@helium/crons", - "version": "0.2.22", + "version": "0.3.0", "description": "scripts to run on a schedule", "private": true, "publishConfig": { @@ -32,16 +32,16 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/distributor-oracle": "^0.2.22", - "@helium/fanout-sdk": "^0.2.22", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/lazy-distributor-sdk": "^0.2.22", - "@helium/mobile-entity-manager-sdk": "^0.2.22", - "@helium/price-oracle-sdk": "^0.2.22", - "@helium/rewards-oracle-sdk": "^0.2.22", - "@helium/spl-utils": "^0.2.22", - "@helium/treasury-management-sdk": "^0.2.22", + "@helium/distributor-oracle": "^0.3.0", + "@helium/fanout-sdk": "^0.3.0", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/lazy-distributor-sdk": "^0.3.0", + "@helium/mobile-entity-manager-sdk": "^0.3.0", + "@helium/price-oracle-sdk": "^0.3.0", + "@helium/rewards-oracle-sdk": "^0.3.0", + "@helium/spl-utils": "^0.3.0", + "@helium/treasury-management-sdk": "^0.3.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", "axios": "^1.3.6", diff --git a/packages/currency-utils/CHANGELOG.md b/packages/currency-utils/CHANGELOG.md index d20b4d415..a9aa82a50 100644 --- a/packages/currency-utils/CHANGELOG.md +++ b/packages/currency-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/currency-utils + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/currency-utils diff --git a/packages/currency-utils/package.json b/packages/currency-utils/package.json index 30febb278..eda76000d 100644 --- a/packages/currency-utils/package.json +++ b/packages/currency-utils/package.json @@ -1,6 +1,6 @@ { "name": "@helium/currency-utils", - "version": "0.2.22", + "version": "0.3.0", "description": "Currency utilities", "homepage": "https://github.com/helium/helium-program-library#readme", "publishConfig": { diff --git a/packages/data-credits-sdk/CHANGELOG.md b/packages/data-credits-sdk/CHANGELOG.md index 2525eef89..16868aeb6 100644 --- a/packages/data-credits-sdk/CHANGELOG.md +++ b/packages/data-credits-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/data-credits-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/data-credits-sdk diff --git a/packages/data-credits-sdk/package.json b/packages/data-credits-sdk/package.json index 38762e879..b3d010a45 100644 --- a/packages/data-credits-sdk/package.json +++ b/packages/data-credits-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the data-credits smart contract", "repository": { "type": "git", @@ -32,10 +32,10 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/circuit-breaker-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/circuit-breaker-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1", "crypto-js": "^4.1.1" diff --git a/packages/distributor-oracle/CHANGELOG.md b/packages/distributor-oracle/CHANGELOG.md index 813cab23c..0207eaef9 100644 --- a/packages/distributor-oracle/CHANGELOG.md +++ b/packages/distributor-oracle/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/distributor-oracle + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/distributor-oracle diff --git a/packages/distributor-oracle/package.json b/packages/distributor-oracle/package.json index c2de1fba6..53b28e0ab 100644 --- a/packages/distributor-oracle/package.json +++ b/packages/distributor-oracle/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Oracle server for the lazy distributor", "repository": { "type": "git", @@ -36,14 +36,14 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", - "@helium/lazy-distributor-sdk": "^0.2.22", - "@helium/rewards-oracle-sdk": "^0.2.22", - "@helium/spl-utils": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", + "@helium/lazy-distributor-sdk": "^0.3.0", + "@helium/rewards-oracle-sdk": "^0.3.0", + "@helium/spl-utils": "^0.3.0", "@metaplex-foundation/mpl-bubblegum": "^0.7.0", "@solana/spl-token": "^0.3.8", "@types/sequelize": "^4.28.14", diff --git a/packages/fanout-metadata-service/CHANGELOG.md b/packages/fanout-metadata-service/CHANGELOG.md index 39a171f74..ac15a440a 100644 --- a/packages/fanout-metadata-service/CHANGELOG.md +++ b/packages/fanout-metadata-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/fanout-metadata-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/fanout-metadata-service diff --git a/packages/fanout-metadata-service/package.json b/packages/fanout-metadata-service/package.json index fe102210b..a6f0cc3ec 100644 --- a/packages/fanout-metadata-service/package.json +++ b/packages/fanout-metadata-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Mint metadata of fanout positions", "repository": { "type": "git", @@ -34,10 +34,10 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", - "@helium/fanout-sdk": "^0.2.22", - "@helium/spl-utils": "^0.2.22", + "@helium/fanout-sdk": "^0.3.0", + "@helium/spl-utils": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", diff --git a/packages/fanout-sdk/CHANGELOG.md b/packages/fanout-sdk/CHANGELOG.md index 0c0cae09b..2d5734241 100644 --- a/packages/fanout-sdk/CHANGELOG.md +++ b/packages/fanout-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/fanout-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/fanout-sdk diff --git a/packages/fanout-sdk/package.json b/packages/fanout-sdk/package.json index 5d7892725..3e8abf646 100644 --- a/packages/fanout-sdk/package.json +++ b/packages/fanout-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the fanout smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/faucet-service/CHANGELOG.md b/packages/faucet-service/CHANGELOG.md index 07f25ce14..92bf92ad7 100644 --- a/packages/faucet-service/CHANGELOG.md +++ b/packages/faucet-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/faucet-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/faucet-service diff --git a/packages/faucet-service/package.json b/packages/faucet-service/package.json index 0f75c1e80..6e9e2a664 100644 --- a/packages/faucet-service/package.json +++ b/packages/faucet-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Faucet for devnet Helium tokens", "repository": { "type": "git", @@ -35,8 +35,8 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/idls": "^0.2.22", - "@helium/spl-utils": "^0.2.22", + "@helium/idls": "^0.3.0", + "@helium/spl-utils": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/web3.js": "^1.78.4", "angry-purple-tiger": "^1.0.5", diff --git a/packages/helium-admin-cli/CHANGELOG.md b/packages/helium-admin-cli/CHANGELOG.md index 0f0d98901..aca306af4 100644 --- a/packages/helium-admin-cli/CHANGELOG.md +++ b/packages/helium-admin-cli/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-libary/issues/380)) ([a691257](https://github.com/helium/helium-program-libary/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-libary/issues/376) [#376](https://github.com/helium/helium-program-libary/issues/376) + + +### Reverts + +* Revert "Add back mobile genesis fix for devnet" ([93e9a2c](https://github.com/helium/helium-program-libary/commit/93e9a2c370ba77a49b02efc2590ddf3039465ed6)) + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) diff --git a/packages/helium-admin-cli/package.json b/packages/helium-admin-cli/package.json index d817a9352..778813ce4 100644 --- a/packages/helium-admin-cli/package.json +++ b/packages/helium-admin-cli/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "CLI to bootstrap the network", "repository": { "type": "git", @@ -42,18 +42,18 @@ "@clockwork-xyz/sdk": "^0.3.0", "@coral-xyz/anchor": "^0.26.0", "@helium/address": "^4.10.2", - "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.3.0", "@helium/crypto": "^4.10.2", - "@helium/data-credits-sdk": "^0.2.22", - "@helium/distributor-oracle": "^0.2.22", - "@helium/fanout-sdk": "^0.2.22", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/lazy-distributor-sdk": "^0.2.22", - "@helium/mobile-entity-manager-sdk": "^0.2.22", - "@helium/price-oracle-sdk": "^0.2.22", - "@helium/spl-utils": "^0.2.22", - "@helium/treasury-management-sdk": "^0.2.22", + "@helium/data-credits-sdk": "^0.3.0", + "@helium/distributor-oracle": "^0.3.0", + "@helium/fanout-sdk": "^0.3.0", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/lazy-distributor-sdk": "^0.3.0", + "@helium/mobile-entity-manager-sdk": "^0.3.0", + "@helium/price-oracle-sdk": "^0.3.0", + "@helium/spl-utils": "^0.3.0", + "@helium/treasury-management-sdk": "^0.3.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-governance": "^0.3.18", "@solana/spl-token": "^0.3.8", diff --git a/packages/helium-entity-manager-sdk/CHANGELOG.md b/packages/helium-entity-manager-sdk/CHANGELOG.md index 97653af71..d63db37df 100644 --- a/packages/helium-entity-manager-sdk/CHANGELOG.md +++ b/packages/helium-entity-manager-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/helium-entity-manager-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/helium-entity-manager-sdk diff --git a/packages/helium-entity-manager-sdk/package.json b/packages/helium-entity-manager-sdk/package.json index 21be87d23..b59d0b149 100644 --- a/packages/helium-entity-manager-sdk/package.json +++ b/packages/helium-entity-manager-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the helium-entity-manager smart contract", "repository": { "type": "git", @@ -33,10 +33,10 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@helium/address": "^4.10.2", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", - "@helium/spl-utils": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", + "@helium/spl-utils": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1", "crypto-js": "^4.1.1", diff --git a/packages/helium-react-hooks/CHANGELOG.md b/packages/helium-react-hooks/CHANGELOG.md index 0e7f601ae..5f30a74d5 100644 --- a/packages/helium-react-hooks/CHANGELOG.md +++ b/packages/helium-react-hooks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/helium-react-hooks + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/helium-react-hooks diff --git a/packages/helium-react-hooks/package.json b/packages/helium-react-hooks/package.json index e32692630..9969d3a79 100644 --- a/packages/helium-react-hooks/package.json +++ b/packages/helium-react-hooks/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "React hooks for helium", "repository": { "type": "git", @@ -33,8 +33,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.22", - "@helium/account-fetch-cache-hooks": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", + "@helium/account-fetch-cache-hooks": "^0.3.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", "bs58": "^4.0.1", diff --git a/packages/helium-sub-daos-sdk/CHANGELOG.md b/packages/helium-sub-daos-sdk/CHANGELOG.md index 252339607..d12b2a72c 100644 --- a/packages/helium-sub-daos-sdk/CHANGELOG.md +++ b/packages/helium-sub-daos-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/helium-sub-daos-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/helium-sub-daos-sdk diff --git a/packages/helium-sub-daos-sdk/package.json b/packages/helium-sub-daos-sdk/package.json index ccf111511..b38552acd 100644 --- a/packages/helium-sub-daos-sdk/package.json +++ b/packages/helium-sub-daos-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the helium-sub-daos smart contract", "repository": { "type": "git", @@ -32,10 +32,10 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/circuit-breaker-sdk": "^0.2.22", - "@helium/treasury-management-sdk": "^0.2.22", - "@helium/voter-stake-registry-sdk": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/circuit-breaker-sdk": "^0.3.0", + "@helium/treasury-management-sdk": "^0.3.0", + "@helium/voter-stake-registry-sdk": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/hnt-to-rent-service/CHANGELOG.md b/packages/hnt-to-rent-service/CHANGELOG.md index 5a14a8333..818207a69 100644 --- a/packages/hnt-to-rent-service/CHANGELOG.md +++ b/packages/hnt-to-rent-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/hnt-to-rent-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/hnt-to-rent-service diff --git a/packages/hnt-to-rent-service/package.json b/packages/hnt-to-rent-service/package.json index a3a0349ce..fce2b0ac1 100644 --- a/packages/hnt-to-rent-service/package.json +++ b/packages/hnt-to-rent-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Service that gives flashloans of sol to allow orca swap of small amounts of hnt to sol for fees", "repository": { "type": "git", @@ -34,7 +34,7 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", "@orca-so/whirlpools-sdk": "^0.8.2", "@solana/web3.js": "^1.78.4", diff --git a/packages/hotspot-utils/CHANGELOG.md b/packages/hotspot-utils/CHANGELOG.md index b165b4441..8d0a63bd4 100644 --- a/packages/hotspot-utils/CHANGELOG.md +++ b/packages/hotspot-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/hotspot-utils + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/hotspot-utils diff --git a/packages/hotspot-utils/package.json b/packages/hotspot-utils/package.json index bd83e33d9..7288321f4 100644 --- a/packages/hotspot-utils/package.json +++ b/packages/hotspot-utils/package.json @@ -1,6 +1,6 @@ { "name": "@helium/hotspot-utils", - "version": "0.2.22", + "version": "0.3.0", "description": "Utils for Hotspot interaction", "homepage": "https://github.com/helium/helium-program-library#readme", "publishConfig": { @@ -29,10 +29,10 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", - "@helium/spl-utils": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", + "@helium/spl-utils": "^0.3.0", "@solana/web3.js": "^1.78.4", "bs58": "^4.0.1" }, diff --git a/packages/idls/CHANGELOG.md b/packages/idls/CHANGELOG.md index c25378527..254286c55 100644 --- a/packages/idls/CHANGELOG.md +++ b/packages/idls/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/idls + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/idls diff --git a/packages/idls/package.json b/packages/idls/package.json index 30b413903..a8f95b0d6 100644 --- a/packages/idls/package.json +++ b/packages/idls/package.json @@ -1,6 +1,6 @@ { "name": "@helium/idls", - "version": "0.2.22", + "version": "0.3.0", "description": "Exported idls", "publishConfig": { "access": "public", diff --git a/packages/iot-premine-data-only-service/CHANGELOG.md b/packages/iot-premine-data-only-service/CHANGELOG.md index c26f8cb80..72201b6c9 100644 --- a/packages/iot-premine-data-only-service/CHANGELOG.md +++ b/packages/iot-premine-data-only-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/iot-premine-data-only-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/iot-premine-data-only-service diff --git a/packages/iot-premine-data-only-service/package.json b/packages/iot-premine-data-only-service/package.json index 2573e02fc..8e822b049 100644 --- a/packages/iot-premine-data-only-service/package.json +++ b/packages/iot-premine-data-only-service/package.json @@ -1,6 +1,6 @@ { "name": "@helium/iot-premine-data-only-service", - "version": "0.2.22", + "version": "0.3.0", "description": "iot premine data only service", "private": true, "publishConfig": { @@ -34,7 +34,7 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", diff --git a/packages/lazy-distributor-sdk/CHANGELOG.md b/packages/lazy-distributor-sdk/CHANGELOG.md index ed54f31c2..de8319db5 100644 --- a/packages/lazy-distributor-sdk/CHANGELOG.md +++ b/packages/lazy-distributor-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/lazy-distributor-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/lazy-distributor-sdk diff --git a/packages/lazy-distributor-sdk/package.json b/packages/lazy-distributor-sdk/package.json index a63a8c900..8f3e8bebe 100644 --- a/packages/lazy-distributor-sdk/package.json +++ b/packages/lazy-distributor-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the lazy-distributor smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/circuit-breaker-sdk": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/lazy-transactions-sdk/CHANGELOG.md b/packages/lazy-transactions-sdk/CHANGELOG.md index 1a838da4a..9612da6bd 100644 --- a/packages/lazy-transactions-sdk/CHANGELOG.md +++ b/packages/lazy-transactions-sdk/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-libary/issues/380)) ([a691257](https://github.com/helium/helium-program-libary/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-libary/issues/376) [#376](https://github.com/helium/helium-program-libary/issues/376) + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) diff --git a/packages/lazy-transactions-sdk/package.json b/packages/lazy-transactions-sdk/package.json index ead38dd09..2e48b7fd7 100644 --- a/packages/lazy-transactions-sdk/package.json +++ b/packages/lazy-transactions-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the lazy-transactions smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/idls": "^0.2.22", - "@helium/spl-utils": "^0.2.22", + "@helium/idls": "^0.3.0", + "@helium/spl-utils": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1", "js-sha3": "^0.8.0", diff --git a/packages/metadata-service/CHANGELOG.md b/packages/metadata-service/CHANGELOG.md index cf97736d1..c0a26b323 100644 --- a/packages/metadata-service/CHANGELOG.md +++ b/packages/metadata-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/metadata-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/metadata-service diff --git a/packages/metadata-service/package.json b/packages/metadata-service/package.json index d32fcc778..4bdfde253 100644 --- a/packages/metadata-service/package.json +++ b/packages/metadata-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Mint metadata of hotspots", "repository": { "type": "git", @@ -35,8 +35,8 @@ "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", "@helium/address": "^4.10.2", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.78.4", diff --git a/packages/migration-service/CHANGELOG.md b/packages/migration-service/CHANGELOG.md index 3020772f5..8251f7998 100644 --- a/packages/migration-service/CHANGELOG.md +++ b/packages/migration-service/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-libary/issues/380)) ([a691257](https://github.com/helium/helium-program-libary/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-libary/issues/376) [#376](https://github.com/helium/helium-program-libary/issues/376) + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) diff --git a/packages/migration-service/package.json b/packages/migration-service/package.json index 9d508715b..863363901 100644 --- a/packages/migration-service/package.json +++ b/packages/migration-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Migration of state from helium", "repository": { "type": "git", @@ -35,18 +35,18 @@ "@clockwork-xyz/sdk": "^0.3.0", "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", - "@helium/circuit-breaker-sdk": "^0.2.22", + "@helium/circuit-breaker-sdk": "^0.3.0", "@helium/crypto": "^4.10.2", - "@helium/data-credits-sdk": "^0.2.22", - "@helium/distributor-oracle": "^0.2.22", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/lazy-distributor-sdk": "^0.2.22", - "@helium/lazy-transactions-sdk": "^0.2.22", - "@helium/treasury-management-sdk": "^0.2.22", - "@helium/voter-stake-registry-sdk": "^0.2.22", + "@helium/data-credits-sdk": "^0.3.0", + "@helium/distributor-oracle": "^0.3.0", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/lazy-distributor-sdk": "^0.3.0", + "@helium/lazy-transactions-sdk": "^0.3.0", + "@helium/treasury-management-sdk": "^0.3.0", + "@helium/voter-stake-registry-sdk": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@project-serum/borsh": "^0.2.5", "@solana/buffer-layout": "^4.0.0", diff --git a/packages/mobile-entity-manager-sdk/CHANGELOG.md b/packages/mobile-entity-manager-sdk/CHANGELOG.md index ac83b5483..916470e56 100644 --- a/packages/mobile-entity-manager-sdk/CHANGELOG.md +++ b/packages/mobile-entity-manager-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/mobile-entity-manager-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/mobile-entity-manager-sdk diff --git a/packages/mobile-entity-manager-sdk/package.json b/packages/mobile-entity-manager-sdk/package.json index 8c4e50acf..68e2f27cf 100644 --- a/packages/mobile-entity-manager-sdk/package.json +++ b/packages/mobile-entity-manager-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the mobile-entity-manager smart contract", "repository": { "type": "git", @@ -32,9 +32,9 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/monitor-service/CHANGELOG.md b/packages/monitor-service/CHANGELOG.md index 356327437..eafe60aef 100644 --- a/packages/monitor-service/CHANGELOG.md +++ b/packages/monitor-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/monitor-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/monitor-service diff --git a/packages/monitor-service/package.json b/packages/monitor-service/package.json index 83a7a0e6a..a11783a3e 100644 --- a/packages/monitor-service/package.json +++ b/packages/monitor-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Prometheus monitoring of important accounts on Solana", "repository": { "type": "git", @@ -33,13 +33,13 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.22", - "@helium/circuit-breaker-sdk": "^0.2.22", - "@helium/data-credits-sdk": "^0.2.22", - "@helium/helium-entity-manager-sdk": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", - "@helium/lazy-transactions-sdk": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", + "@helium/circuit-breaker-sdk": "^0.3.0", + "@helium/data-credits-sdk": "^0.3.0", + "@helium/helium-entity-manager-sdk": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", + "@helium/lazy-transactions-sdk": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", diff --git a/packages/price-oracle-sdk/CHANGELOG.md b/packages/price-oracle-sdk/CHANGELOG.md index a41e5f5e2..6d20df337 100644 --- a/packages/price-oracle-sdk/CHANGELOG.md +++ b/packages/price-oracle-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/price-oracle-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/price-oracle-sdk diff --git a/packages/price-oracle-sdk/package.json b/packages/price-oracle-sdk/package.json index 3d1332eec..a6ba7a97a 100644 --- a/packages/price-oracle-sdk/package.json +++ b/packages/price-oracle-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the price oracle smart contract", "repository": { "type": "git", @@ -32,7 +32,7 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/idls": "^0.2.22", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/rewards-oracle-faucet-service/CHANGELOG.md b/packages/rewards-oracle-faucet-service/CHANGELOG.md index db3ab45ef..90e06e6eb 100644 --- a/packages/rewards-oracle-faucet-service/CHANGELOG.md +++ b/packages/rewards-oracle-faucet-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/rewards-oracle-faucet-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/rewards-oracle-faucet-service diff --git a/packages/rewards-oracle-faucet-service/package.json b/packages/rewards-oracle-faucet-service/package.json index b2996582a..0f4fc5f5d 100644 --- a/packages/rewards-oracle-faucet-service/package.json +++ b/packages/rewards-oracle-faucet-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Receives requests from Helius webhooks", "repository": { "type": "git", diff --git a/packages/rewards-oracle-sdk/CHANGELOG.md b/packages/rewards-oracle-sdk/CHANGELOG.md index d35ba7cd6..eb90ed47d 100644 --- a/packages/rewards-oracle-sdk/CHANGELOG.md +++ b/packages/rewards-oracle-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/rewards-oracle-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/rewards-oracle-sdk diff --git a/packages/rewards-oracle-sdk/package.json b/packages/rewards-oracle-sdk/package.json index a80a16f6b..13823b8e1 100644 --- a/packages/rewards-oracle-sdk/package.json +++ b/packages/rewards-oracle-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the rewards oracle smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/spl-utils/CHANGELOG.md b/packages/spl-utils/CHANGELOG.md index 987a9068a..02a78657b 100644 --- a/packages/spl-utils/CHANGELOG.md +++ b/packages/spl-utils/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + + +### Features + +* **#376:** Replace lazy transactions markers with a bitmap to reclaim rent ([#380](https://github.com/helium/helium-program-library/issues/380)) ([a691257](https://github.com/helium/helium-program-library/commit/a6912570d4e3d89869cd13c5cfc8ce8c4355148e)), closes [#376](https://github.com/helium/helium-program-library/issues/376) [#376](https://github.com/helium/helium-program-library/issues/376) + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) diff --git a/packages/spl-utils/package.json b/packages/spl-utils/package.json index 633edc6e4..5a1213deb 100644 --- a/packages/spl-utils/package.json +++ b/packages/spl-utils/package.json @@ -1,6 +1,6 @@ { "name": "@helium/spl-utils", - "version": "0.2.22", + "version": "0.3.0", "description": "Utils shared across spl suite", "publishConfig": { "access": "public", @@ -32,9 +32,9 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", - "@helium/anchor-resolvers": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", diff --git a/packages/treasury-management-sdk/CHANGELOG.md b/packages/treasury-management-sdk/CHANGELOG.md index bbf812257..934b82c2b 100644 --- a/packages/treasury-management-sdk/CHANGELOG.md +++ b/packages/treasury-management-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/treasury-management-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/treasury-management-sdk diff --git a/packages/treasury-management-sdk/package.json b/packages/treasury-management-sdk/package.json index 022f26040..ca27c9935 100644 --- a/packages/treasury-management-sdk/package.json +++ b/packages/treasury-management-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the treasury-management smart contract", "repository": { "type": "git", @@ -32,9 +32,9 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/circuit-breaker-sdk": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/circuit-breaker-sdk": "^0.3.0", + "@helium/idls": "^0.3.0", "bn.js": "^5.2.0", "bs58": "^4.0.1" }, diff --git a/packages/voter-stake-registry-hooks/CHANGELOG.md b/packages/voter-stake-registry-hooks/CHANGELOG.md index 869f7e89a..2af67ebc0 100644 --- a/packages/voter-stake-registry-hooks/CHANGELOG.md +++ b/packages/voter-stake-registry-hooks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/voter-stake-registry-hooks + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/voter-stake-registry-hooks diff --git a/packages/voter-stake-registry-hooks/package.json b/packages/voter-stake-registry-hooks/package.json index 76f80a92a..c1b5c9576 100644 --- a/packages/voter-stake-registry-hooks/package.json +++ b/packages/voter-stake-registry-hooks/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "React hooks for helium voter stake registry", "repository": { "type": "git", @@ -33,13 +33,13 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.22", - "@helium/account-fetch-cache-hooks": "^0.2.22", - "@helium/helium-react-hooks": "^0.2.22", - "@helium/helium-sub-daos-sdk": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", + "@helium/account-fetch-cache-hooks": "^0.3.0", + "@helium/helium-react-hooks": "^0.3.0", + "@helium/helium-sub-daos-sdk": "^0.3.0", "@helium/modular-governance-hooks": "^0.0.2", - "@helium/spl-utils": "^0.2.22", - "@helium/voter-stake-registry-sdk": "^0.2.22", + "@helium/spl-utils": "^0.3.0", + "@helium/voter-stake-registry-sdk": "^0.3.0", "@metaplex-foundation/js": "^0.19.4", "@solana/wallet-adapter-base": "^0.9.22", "@solana/wallet-adapter-react": "^0.15.32", diff --git a/packages/voter-stake-registry-sdk/CHANGELOG.md b/packages/voter-stake-registry-sdk/CHANGELOG.md index 1a38600d9..b93771d23 100644 --- a/packages/voter-stake-registry-sdk/CHANGELOG.md +++ b/packages/voter-stake-registry-sdk/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/voter-stake-registry-sdk + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/voter-stake-registry-sdk diff --git a/packages/voter-stake-registry-sdk/package.json b/packages/voter-stake-registry-sdk/package.json index 353d022c9..c45e20afe 100644 --- a/packages/voter-stake-registry-sdk/package.json +++ b/packages/voter-stake-registry-sdk/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Interface to the voter-stake-registry smart contract", "repository": { "type": "git", @@ -32,8 +32,8 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/anchor-resolvers": "^0.2.22", - "@helium/idls": "^0.2.22", + "@helium/anchor-resolvers": "^0.3.0", + "@helium/idls": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-token": "^0.3.8", "bn.js": "^5.2.0", diff --git a/packages/vsr-metadata-service/CHANGELOG.md b/packages/vsr-metadata-service/CHANGELOG.md index d378e50c0..681e947c2 100644 --- a/packages/vsr-metadata-service/CHANGELOG.md +++ b/packages/vsr-metadata-service/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/vsr-metadata-service + + + + + ## [0.2.22](https://github.com/helium/helium-program-libary/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/vsr-metadata-service diff --git a/packages/vsr-metadata-service/package.json b/packages/vsr-metadata-service/package.json index 06c6fe091..8a115bb7f 100644 --- a/packages/vsr-metadata-service/package.json +++ b/packages/vsr-metadata-service/package.json @@ -6,7 +6,7 @@ "registry": "https://registry.npmjs.org/" }, "license": "Apache-2.0", - "version": "0.2.22", + "version": "0.3.0", "description": "Mint metadata of vsr positions", "repository": { "type": "git", @@ -34,10 +34,10 @@ "dependencies": { "@coral-xyz/anchor": "^0.26.0", "@fastify/cors": "^8.1.1", - "@helium/account-fetch-cache": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", "@helium/address": "^4.10.2", - "@helium/spl-utils": "^0.2.22", - "@helium/voter-stake-registry-sdk": "^0.2.22", + "@helium/spl-utils": "^0.3.0", + "@helium/voter-stake-registry-sdk": "^0.3.0", "@metaplex-foundation/mpl-token-metadata": "^2.10.0", "@solana/spl-account-compression": "^0.1.7", "@solana/spl-token": "^0.3.8", diff --git a/packages/xnft-hotspot/CHANGELOG.md b/packages/xnft-hotspot/CHANGELOG.md index 6967c5af9..54fb573ef 100644 --- a/packages/xnft-hotspot/CHANGELOG.md +++ b/packages/xnft-hotspot/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) + +**Note:** Version bump only for package @helium/xnft-hotspot + + + + + ## [0.2.22](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.2.22) (2023-09-13) **Note:** Version bump only for package @helium/xnft-hotspot diff --git a/packages/xnft-hotspot/package.json b/packages/xnft-hotspot/package.json index 1a654163d..f4578ae7e 100644 --- a/packages/xnft-hotspot/package.json +++ b/packages/xnft-hotspot/package.json @@ -1,6 +1,6 @@ { "name": "@helium/xnft-hotspot", - "version": "0.2.22", + "version": "0.3.0", "private": true, "description": "", "main": "index.js", @@ -18,11 +18,11 @@ }, "dependencies": { "@coral-xyz/anchor": "^0.26.0", - "@helium/account-fetch-cache": "^0.2.22", - "@helium/distributor-oracle": "^0.2.22", - "@helium/helium-react-hooks": "^0.2.22", - "@helium/idls": "^0.2.22", - "@helium/lazy-distributor-sdk": "^0.2.22", + "@helium/account-fetch-cache": "^0.3.0", + "@helium/distributor-oracle": "^0.3.0", + "@helium/helium-react-hooks": "^0.3.0", + "@helium/idls": "^0.3.0", + "@helium/lazy-distributor-sdk": "^0.3.0", "@solana/spl-token": "^0.3.8", "assert": "^2.0.0", "bn.js": "^5.2.0", From 70ab6b5137ffd7467ae656d083b00a041367c470 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 11:22:23 -0500 Subject: [PATCH 20/31] Yarn lock change --- yarn.lock | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/yarn.lock b/yarn.lock index a8cdf3abf..1fa08b06b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -724,6 +724,22 @@ dependencies: "@hapi/hoek" "^9.0.0" +"@helium/account-fetch-cache-hooks@^0.2.21", "@helium/account-fetch-cache-hooks@^0.2.5": + version "0.2.21" + resolved "https://registry.yarnpkg.com/@helium/account-fetch-cache-hooks/-/account-fetch-cache-hooks-0.2.21.tgz#c957838d0f5767db0e7425e968fa7facc512ac4c" + integrity sha512-oYzYCmdlo3b2GL8XM5Bs6NzBcCQGF9TJggNyxaCNNnHfe0Pobvexf8jBHTPzijebNyXTpyKcvzIzPXD7WUqlYg== + dependencies: + "@helium/account-fetch-cache" "^0.2.21" + "@solana/web3.js" "^1.66.2" + react-async-hook "^4.0.0" + +"@helium/account-fetch-cache@^0.2.21", "@helium/account-fetch-cache@^0.2.5": + version "0.2.21" + resolved "https://registry.yarnpkg.com/@helium/account-fetch-cache/-/account-fetch-cache-0.2.21.tgz#a7aab7d9e32de14ea6d55cc239c33ab5513b6a62" + integrity sha512-aOtM/BkTGOUKh608MsoqS41kpGBcdmklFOCrJR2D/3eFWoVAyjNoyEaMAg5AMVFvEvIZ7ulGSAd7SXQnVbxO4w== + dependencies: + "@solana/web3.js" "^1.43.4" + "@helium/address@^4.10.2": version "4.10.2" resolved "https://registry.yarnpkg.com/@helium/address/-/address-4.10.2.tgz#56960b118fceb6b6ddabe3e4ecec467d9ae50e26" @@ -733,6 +749,14 @@ js-sha256 "^0.9.0" multiformats "^9.6.4" +"@helium/anchor-resolvers@^0.2.5": + version "0.2.21" + resolved "https://registry.yarnpkg.com/@helium/anchor-resolvers/-/anchor-resolvers-0.2.21.tgz#8cd13bca3e7af83ffff3ab754dcf9f788d26e57e" + integrity sha512-rz3GJaULGmokjrq63v4sy683PMUkL31jrK5wVX01tzCYbI1woC9vISoPd3oSSuauZqQXdBhhQ49GKrpzi49JbA== + dependencies: + "@solana/spl-token" "^0.3.6" + "@solana/web3.js" "^1.43.4" + "@helium/crypto@^3.60.0": version "3.60.0" resolved "https://registry.yarnpkg.com/@helium/crypto/-/crypto-3.60.0.tgz#58be74745d0c7cc3198481dc69f5530393fc7287" @@ -751,6 +775,20 @@ create-hash "^1.2.0" libsodium-wrappers "^0.7.6" +"@helium/helium-react-hooks@^0.2.5": + version "0.2.21" + resolved "https://registry.yarnpkg.com/@helium/helium-react-hooks/-/helium-react-hooks-0.2.21.tgz#84b82b83602c20cae4a96c790786bb4b84e32530" + integrity sha512-c+U6TB+D+pww8awYvf7WtfY285FhbiUDGhE8KVEU8Y2RBHA39gE2F13Y0oSCj4RQfjGynv60ONCVc7PEkOqmsw== + dependencies: + "@coral-xyz/anchor" "^0.26.0" + "@helium/account-fetch-cache" "^0.2.21" + "@helium/account-fetch-cache-hooks" "^0.2.21" + "@solana/spl-token" "^0.3.6" + "@solana/web3.js" "^1.66.2" + bs58 "^5.0.0" + pako "^2.0.3" + react-async-hook "^4.0.0" + "@helium/modular-governance-hooks@^0.0.2": version "0.0.2" resolved "https://registry.yarnpkg.com/@helium/modular-governance-hooks/-/modular-governance-hooks-0.0.2.tgz#cbc51b2ae15c260614406cce092749883addd3a0" From db45bff600acc56a6a14351e7c7c5f1d0adcc062 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 14:22:08 -0500 Subject: [PATCH 21/31] More efficiency --- packages/distributor-oracle/src/client.ts | 25 +++++++++++++++---- .../spl-utils/src/proofArgsAndAccounts.ts | 14 +++++++---- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/packages/distributor-oracle/src/client.ts b/packages/distributor-oracle/src/client.ts index a813d1434..c60459f1b 100644 --- a/packages/distributor-oracle/src/client.ts +++ b/packages/distributor-oracle/src/client.ts @@ -270,14 +270,29 @@ export async function formBulkTransactions({ }) ); + const keyToAssetKs = compressionAssetAccs.map((assetAcc, idx) => { + return keyToAssetForAsset(assetAcc) + }) + const keyToAssets = await cache.searchMultiple( + keyToAssetKs, + (pubkey, account) => ({ + pubkey, + account, + info: heliumEntityManagerProgram!.coder.accounts.decode< + IdlAccounts["keyToAssetV0"] + >("KeyToAssetV0", account.data), + }), + true, + false + ); // construct the set and distribute ixs let setAndDistributeIxs = await Promise.all( compressionAssetAccs.map(async (assetAcc, idx) => { - const keyToAssetK = keyToAssetForAsset(assetAcc); - const keyToAsset = - await heliumEntityManagerProgram!.account.keyToAssetV0.fetch( - keyToAssetK - ); + const keyToAssetK = keyToAssets[idx]?.pubkey; + const keyToAsset = keyToAssets[idx]?.info + if (!keyToAsset || !keyToAssetK) { + return [] + } const entityKey = decodeEntityKey( keyToAsset.entityKey, keyToAsset.keySerialization diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index ff62a3001..1681944de 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -12,6 +12,8 @@ export type ProofArgsAndAccountsArgs = { assetId: PublicKey ) => Promise; }; +// Cache canopy depths so we don't parse large tree accounts over and over +const canopyToDepthCache: Record = {}; export async function proofArgsAndAccounts({ connection, assetId, @@ -42,11 +44,13 @@ export async function proofArgsAndAccounts({ const { compression: { leafId }, } = asset; - const { root, proof, leaf, treeId } = assetProof; - const canopy = await ( - await ConcurrentMerkleTreeAccount.fromAccountAddress(connection, treeId) - ).getCanopyDepth(); - + const { root, proof, treeId } = assetProof; + if (typeof canopyToDepthCache[treeId.toBase58()] === "undefined") { + canopyToDepthCache[treeId.toBase58()] = await ( + await ConcurrentMerkleTreeAccount.fromAccountAddress(connection, treeId) + ).getCanopyDepth(); + } + const canopy = canopyToDepthCache[treeId.toBase58()]; return { asset, args: { From b0dadd1160f8622d0587919ea2d9961251d56360 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 14:47:41 -0500 Subject: [PATCH 22/31] More perf --- packages/spl-utils/src/proofArgsAndAccounts.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index 1681944de..26d77096b 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -13,7 +13,7 @@ export type ProofArgsAndAccountsArgs = { ) => Promise; }; // Cache canopy depths so we don't parse large tree accounts over and over -const canopyToDepthCache: Record = {}; +const canopyToDepthCache: Record> = {}; export async function proofArgsAndAccounts({ connection, assetId, @@ -46,11 +46,12 @@ export async function proofArgsAndAccounts({ } = asset; const { root, proof, treeId } = assetProof; if (typeof canopyToDepthCache[treeId.toBase58()] === "undefined") { - canopyToDepthCache[treeId.toBase58()] = await ( - await ConcurrentMerkleTreeAccount.fromAccountAddress(connection, treeId) - ).getCanopyDepth(); + canopyToDepthCache[treeId.toBase58()] = + ConcurrentMerkleTreeAccount.fromAccountAddress(connection, treeId).then( + (t) => t.getCanopyDepth() + ); } - const canopy = canopyToDepthCache[treeId.toBase58()]; + const canopy = await canopyToDepthCache[treeId.toBase58()]; return { asset, args: { From c70e7c9ad2fbdae5f62a2968de705b53a891a46e Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 15:12:45 -0500 Subject: [PATCH 23/31] Fix perf more --- .../functions/distributeCompressionRewards.ts | 54 ++++++------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/packages/lazy-distributor-sdk/src/functions/distributeCompressionRewards.ts b/packages/lazy-distributor-sdk/src/functions/distributeCompressionRewards.ts index d302c5f8b..e3da9c2a0 100644 --- a/packages/lazy-distributor-sdk/src/functions/distributeCompressionRewards.ts +++ b/packages/lazy-distributor-sdk/src/functions/distributeCompressionRewards.ts @@ -1,17 +1,14 @@ -import { LazyDistributor } from "@helium/idls/lib/types/lazy_distributor"; -import { Asset, getAsset, getAssetProof, AssetProof } from "@helium/spl-utils"; import { Idl, Program } from "@coral-xyz/anchor"; +import { LazyDistributor } from "@helium/idls/lib/types/lazy_distributor"; +import { Asset, AssetProof, proofArgsAndAccounts } from "@helium/spl-utils"; import { PublicKey } from "@solana/web3.js"; -import { ConcurrentMerkleTreeAccount } from "@solana/spl-account-compression"; export async function distributeCompressionRewards({ program, assetId, lazyDistributor, - assetEndpoint, rewardsMint, - getAssetFn = getAsset, - getAssetProofFn = getAssetProof, + ...rest }: { program: Program; assetId: PublicKey; @@ -25,47 +22,30 @@ export async function distributeCompressionRewards({ assetId: PublicKey ) => Promise; }) { - // @ts-ignore - const endpoint = assetEndpoint || program.provider.connection._rpcEndpoint; - const asset = await getAssetFn(endpoint, assetId); - if (!asset) { - throw new Error("No asset with ID " + assetId.toBase58()); - } - const assetProof = await getAssetProofFn(endpoint, assetId); - if (!assetProof) { - throw new Error("No asset proof with ID " + assetId.toBase58()); - } - const { root, proof, leaf, treeId } = assetProof; const { - ownership: { owner }, - compression: { leafId }, - } = asset; - const canopy = await ( - await ConcurrentMerkleTreeAccount.fromAccountAddress(program.provider.connection, treeId) - ).getCanopyDepth(); + asset: { + ownership: { owner }, + }, + args, + accounts, + remainingAccounts, + } = await proofArgsAndAccounts({ + connection: program.provider.connection, + assetId, + ...rest, + }); return program.methods .distributeCompressionRewardsV0({ - dataHash: asset.compression.dataHash!.toJSON().data, - creatorHash: asset.compression.creatorHash!.toJSON().data, - root: root.toBuffer().toJSON().data, - index: leafId!, + ...args, }) .accounts({ + ...accounts, common: { lazyDistributor, rewardsMint, owner, }, - merkleTree: treeId, }) - .remainingAccounts( - proof.slice(0, proof.length - canopy).map((p) => { - return { - pubkey: p, - isWritable: false, - isSigner: false, - }; - }) - ); + .remainingAccounts(remainingAccounts); } From fe0297f592918d5631df8be0c8ea997c95ea13a0 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 15:33:17 -0500 Subject: [PATCH 24/31] Slightly more performant gMA --- packages/account-fetch-cache/src/accountFetchCache.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/account-fetch-cache/src/accountFetchCache.ts b/packages/account-fetch-cache/src/accountFetchCache.ts index a075e5b1d..784e16976 100644 --- a/packages/account-fetch-cache/src/accountFetchCache.ts +++ b/packages/account-fetch-cache/src/accountFetchCache.ts @@ -8,6 +8,7 @@ import { TransactionInstruction, } from "@solana/web3.js"; import { EventEmitter } from "./eventEmitter"; +import { getMultipleAccounts } from "./getMultipleAccounts"; export const DEFAULT_CHUNK_SIZE = 99; export const DEFAULT_DELAY = 50; @@ -232,8 +233,9 @@ export class AccountFetchCache { this.currentBatch = new Set(); // Erase current batch from state, so we can fetch multiple at a time try { const keys = Array.from(currentBatch); - const array = await this.connection.getMultipleAccountsInfo( - keys.map((b) => new PublicKey(b)), + const array = await getMultipleAccounts( + this.connection, + keys, this.commitment ); keys.forEach((key, index) => { From 5571e713dad2a2df880cd2f7ff368bffef0f7c76 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 15:58:16 -0500 Subject: [PATCH 25/31] fix --- packages/account-fetch-cache/src/accountFetchCache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/account-fetch-cache/src/accountFetchCache.ts b/packages/account-fetch-cache/src/accountFetchCache.ts index 784e16976..c67c06d7a 100644 --- a/packages/account-fetch-cache/src/accountFetchCache.ts +++ b/packages/account-fetch-cache/src/accountFetchCache.ts @@ -233,7 +233,7 @@ export class AccountFetchCache { this.currentBatch = new Set(); // Erase current batch from state, so we can fetch multiple at a time try { const keys = Array.from(currentBatch); - const array = await getMultipleAccounts( + const { array } = await getMultipleAccounts( this.connection, keys, this.commitment From 013351ee6e08faa74f097d1faa6650bbb40ac6d8 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 19:24:32 -0500 Subject: [PATCH 26/31] Fix performance from deserializing massive canopy --- .../spl-utils/src/proofArgsAndAccounts.ts | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index 26d77096b..c4492ac9e 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -1,5 +1,5 @@ import { Asset, AssetProof, getAsset, getAssetProof } from "./mplAssetAPI"; -import { ConcurrentMerkleTreeAccount } from "@solana/spl-account-compression"; +import { concurrentMerkleTreeBeetFactory, concurrentMerkleTreeHeaderBeet, getCanopyDepth } from "@solana/spl-account-compression"; import { Connection, PublicKey, AccountMeta } from "@solana/web3.js"; export type ProofArgsAndAccountsArgs = { @@ -12,8 +12,6 @@ export type ProofArgsAndAccountsArgs = { assetId: PublicKey ) => Promise; }; -// Cache canopy depths so we don't parse large tree accounts over and over -const canopyToDepthCache: Record> = {}; export async function proofArgsAndAccounts({ connection, assetId, @@ -45,13 +43,29 @@ export async function proofArgsAndAccounts({ compression: { leafId }, } = asset; const { root, proof, treeId } = assetProof; - if (typeof canopyToDepthCache[treeId.toBase58()] === "undefined") { - canopyToDepthCache[treeId.toBase58()] = - ConcurrentMerkleTreeAccount.fromAccountAddress(connection, treeId).then( - (t) => t.getCanopyDepth() - ); + + // IMPORTANT! Do not use `ConcurrentMerkleTreeAccount` class. It stupidly deserializes the whole merkle tree, + // including reading the entire canopy. For large trees this will freeze the wallet app. + let offset = 0; + const buffer = (await connection.getAccountInfo(treeId))!.data; + const [versionedHeader, offsetIncr] = + concurrentMerkleTreeHeaderBeet.deserialize(buffer); + offset = offsetIncr; + + // Only 1 version available + if (versionedHeader.header.__kind !== "V1") { + throw Error( + `Header has unsupported version: ${versionedHeader.header.__kind}` + ); } - const canopy = await canopyToDepthCache[treeId.toBase58()]; + const header = versionedHeader.header.fields[0]; + const [_, offsetIncr2] = concurrentMerkleTreeBeetFactory( + header.maxDepth, + header.maxBufferSize + ).deserialize(buffer, offset); + offset = offsetIncr2; + + const canopy = getCanopyDepth(buffer.byteLength - offset); return { asset, args: { From bb96c92d44d58ccd10fe2e2b8ebed8950d23307d Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 14 Sep 2023 20:07:02 -0500 Subject: [PATCH 27/31] More efficiency --- .../src/accountFetchCache.ts | 5 +- .../spl-utils/src/proofArgsAndAccounts.ts | 50 ++++++++++++------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/packages/account-fetch-cache/src/accountFetchCache.ts b/packages/account-fetch-cache/src/accountFetchCache.ts index c67c06d7a..5b7323585 100644 --- a/packages/account-fetch-cache/src/accountFetchCache.ts +++ b/packages/account-fetch-cache/src/accountFetchCache.ts @@ -123,7 +123,10 @@ export class AccountFetchCache { const self = this; - if (extendConnection) { + // @ts-ignore + if (extendConnection && !connection._accountFetchWrapped) { + // @ts-ignore + connection._accountFetchWrapped = true; this.oldGetAccountinfo = connection.getAccountInfo.bind(connection); connection.getAccountInfo = async ( diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index c4492ac9e..413bf1a52 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -12,6 +12,8 @@ export type ProofArgsAndAccountsArgs = { assetId: PublicKey ) => Promise; }; + +const canopyCache: Record> = {} export async function proofArgsAndAccounts({ connection, assetId, @@ -44,28 +46,38 @@ export async function proofArgsAndAccounts({ } = asset; const { root, proof, treeId } = assetProof; - // IMPORTANT! Do not use `ConcurrentMerkleTreeAccount` class. It stupidly deserializes the whole merkle tree, - // including reading the entire canopy. For large trees this will freeze the wallet app. - let offset = 0; - const buffer = (await connection.getAccountInfo(treeId))!.data; - const [versionedHeader, offsetIncr] = - concurrentMerkleTreeHeaderBeet.deserialize(buffer); - offset = offsetIncr; + const tree = treeId.toBase58(); + if (!canopyCache[tree]) { + canopyCache[tree] = (async () => { + // IMPORTANT! Do not use `ConcurrentMerkleTreeAccount` class. It stupidly deserializes the whole merkle tree, + // including reading the entire canopy. For large trees this will freeze the wallet app. + let offset = 0; + // Construct a new connection to ensure there's no caching. Don't want to cache + // a giant account in AccountFetchCache accidentally. It also adds uneeded latency + const newConn = new Connection(connection.rpcEndpoint) + const buffer = (await newConn.getAccountInfo(treeId))!.data; + const [versionedHeader, offsetIncr] = + concurrentMerkleTreeHeaderBeet.deserialize(buffer); + offset = offsetIncr; + + // Only 1 version available + if (versionedHeader.header.__kind !== "V1") { + throw Error( + `Header has unsupported version: ${versionedHeader.header.__kind}` + ); + } + const header = versionedHeader.header.fields[0]; + const [_, offsetIncr2] = concurrentMerkleTreeBeetFactory( + header.maxDepth, + header.maxBufferSize + ).deserialize(buffer, offset); + offset = offsetIncr2; - // Only 1 version available - if (versionedHeader.header.__kind !== "V1") { - throw Error( - `Header has unsupported version: ${versionedHeader.header.__kind}` - ); + return getCanopyDepth(buffer.byteLength - offset); + })() } - const header = versionedHeader.header.fields[0]; - const [_, offsetIncr2] = concurrentMerkleTreeBeetFactory( - header.maxDepth, - header.maxBufferSize - ).deserialize(buffer, offset); - offset = offsetIncr2; + const canopy = await canopyCache[tree] - const canopy = getCanopyDepth(buffer.byteLength - offset); return { asset, args: { From 201108ba02556353d3d06865f5444da136d99f9f Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 15 Sep 2023 08:32:55 -0500 Subject: [PATCH 28/31] Cache well known merkle tree canopy depths so users don't have to laod them --- .../src/write-merkle-canopy-depths.ts | 43 +++++++++++++++++++ .../spl-utils/src/proofArgsAndAccounts.ts | 25 ++++++++--- 2 files changed, 62 insertions(+), 6 deletions(-) create mode 100644 packages/helium-admin-cli/src/write-merkle-canopy-depths.ts diff --git a/packages/helium-admin-cli/src/write-merkle-canopy-depths.ts b/packages/helium-admin-cli/src/write-merkle-canopy-depths.ts new file mode 100644 index 000000000..24160d5a2 --- /dev/null +++ b/packages/helium-admin-cli/src/write-merkle-canopy-depths.ts @@ -0,0 +1,43 @@ +import * as anchor from "@coral-xyz/anchor"; +import { init as initHem } from "@helium/helium-entity-manager-sdk"; +import os from "os"; +import yargs from "yargs/yargs"; +import fs from "fs"; +import { ConcurrentMerkleTreeAccount } from "@solana/spl-account-compression"; + +export async function run(args: any = process.argv) { + const yarg = yargs(args).options({ + wallet: { + alias: "k", + describe: "Anchor wallet keypair", + default: `${os.homedir()}/.config/solana/id.json`, + }, + url: { + alias: "u", + default: "http://127.0.0.1:8899", + describe: "The solana url", + }, + }); + const argv = await yarg.argv; + process.env.ANCHOR_WALLET = argv.wallet; + process.env.ANCHOR_PROVIDER_URL = argv.url; + anchor.setProvider(anchor.AnchorProvider.local(argv.url)); + const provider = anchor.getProvider() as anchor.AnchorProvider; + const hemProgram = await initHem(provider); + + const makers = await hemProgram.account.makerV0.all(); + const merkles = makers.map((m) => m.account.merkleTree); + let merkleDepths = {}; + for (const merkle of merkles) { + merkleDepths[merkle.toBase58()] = ( + await ConcurrentMerkleTreeAccount.fromAccountAddress( + hemProgram.provider.connection, + merkle + ) + ).getCanopyDepth(); + } + fs.writeFileSync( + "./merkles.json", + JSON.stringify(merkleDepths, null, 2) + ); +} diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index 413bf1a52..104503d8e 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -1,5 +1,9 @@ import { Asset, AssetProof, getAsset, getAssetProof } from "./mplAssetAPI"; -import { concurrentMerkleTreeBeetFactory, concurrentMerkleTreeHeaderBeet, getCanopyDepth } from "@solana/spl-account-compression"; +import { + concurrentMerkleTreeBeetFactory, + concurrentMerkleTreeHeaderBeet, + getCanopyDepth, +} from "@solana/spl-account-compression"; import { Connection, PublicKey, AccountMeta } from "@solana/web3.js"; export type ProofArgsAndAccountsArgs = { @@ -13,7 +17,10 @@ export type ProofArgsAndAccountsArgs = { ) => Promise; }; -const canopyCache: Record> = {} +const WELL_KNOWN_CANOPY_URL = + "https://shdw-drive.genesysgo.net/6tcnBSybPG7piEDShBcrVtYJDPSvGrDbVvXmXKpzBvWP/merkles.json"; +let wellKnownCanopyCache: Record; +const canopyCache: Record> = {}; export async function proofArgsAndAccounts({ connection, assetId, @@ -47,14 +54,20 @@ export async function proofArgsAndAccounts({ const { root, proof, treeId } = assetProof; const tree = treeId.toBase58(); - if (!canopyCache[tree]) { + if (!canopyCache[tree] && !wellKnownCanopyCache[tree]) { canopyCache[tree] = (async () => { + if (!wellKnownCanopyCache) { + wellKnownCanopyCache = await (await fetch(WELL_KNOWN_CANOPY_URL)).json() + } + if (wellKnownCanopyCache[tree]) { + return wellKnownCanopyCache[tree] + } // IMPORTANT! Do not use `ConcurrentMerkleTreeAccount` class. It stupidly deserializes the whole merkle tree, // including reading the entire canopy. For large trees this will freeze the wallet app. let offset = 0; // Construct a new connection to ensure there's no caching. Don't want to cache // a giant account in AccountFetchCache accidentally. It also adds uneeded latency - const newConn = new Connection(connection.rpcEndpoint) + const newConn = new Connection(connection.rpcEndpoint); const buffer = (await newConn.getAccountInfo(treeId))!.data; const [versionedHeader, offsetIncr] = concurrentMerkleTreeHeaderBeet.deserialize(buffer); @@ -74,9 +87,9 @@ export async function proofArgsAndAccounts({ offset = offsetIncr2; return getCanopyDepth(buffer.byteLength - offset); - })() + })(); } - const canopy = await canopyCache[tree] + const canopy = await (wellKnownCanopyCache[tree] || canopyCache[tree]); return { asset, From 4e88eb5d5e95e6c90b33dcfc259230321736a093 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 15 Sep 2023 08:56:51 -0500 Subject: [PATCH 29/31] Bugfix --- packages/spl-utils/src/proofArgsAndAccounts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index 104503d8e..2226627fe 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -89,7 +89,7 @@ export async function proofArgsAndAccounts({ return getCanopyDepth(buffer.byteLength - offset); })(); } - const canopy = await (wellKnownCanopyCache[tree] || canopyCache[tree]); + const canopy = await (wellKnownCanopyCache?.[tree] || canopyCache[tree]); return { asset, From fad6007375c1a3c6f6707b3d26a376b373a3a410 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 15 Sep 2023 09:08:16 -0500 Subject: [PATCH 30/31] Bugfix --- packages/spl-utils/src/proofArgsAndAccounts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/spl-utils/src/proofArgsAndAccounts.ts b/packages/spl-utils/src/proofArgsAndAccounts.ts index 2226627fe..2609637c0 100644 --- a/packages/spl-utils/src/proofArgsAndAccounts.ts +++ b/packages/spl-utils/src/proofArgsAndAccounts.ts @@ -54,7 +54,7 @@ export async function proofArgsAndAccounts({ const { root, proof, treeId } = assetProof; const tree = treeId.toBase58(); - if (!canopyCache[tree] && !wellKnownCanopyCache[tree]) { + if (!canopyCache[tree] && !wellKnownCanopyCache?.[tree]) { canopyCache[tree] = (async () => { if (!wellKnownCanopyCache) { wellKnownCanopyCache = await (await fetch(WELL_KNOWN_CANOPY_URL)).json() From 69e32b613071d885fe09e9d8ad656742c9fa4468 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Fri, 15 Sep 2023 09:51:47 -0500 Subject: [PATCH 31/31] Update changelog --- .github/actions/upload-bpf/action.yaml | 139 ------------------------- CHANGELOG.md | 3 + 2 files changed, 3 insertions(+), 139 deletions(-) delete mode 100644 .github/actions/upload-bpf/action.yaml diff --git a/.github/actions/upload-bpf/action.yaml b/.github/actions/upload-bpf/action.yaml deleted file mode 100644 index 929c899f9..000000000 --- a/.github/actions/upload-bpf/action.yaml +++ /dev/null @@ -1,139 +0,0 @@ -name: "Upload BPF" -description: "Uploads an anchor program as a bpf" -inputs: - devnet: - description: "Whether to use devnet feature" - required: false - default: "false" - testing: - description: "Whether to use devnet feature" - required: false - default: "false" - network: - description: "The Solana network" - required: true - default: "devnet" - program: - description: "The program to build and upload" - required: true - program-id: - description: "The program id of the program we are uploading" - required: true - keypair: - description: "The keypair to use for deploys" - required: true - buffer-authority: - description: "The buffer authority to set" - required: true -outputs: - buffer: - description: "The buffer address" - value: ${{ steps.buffer-deploy-store.outputs.BUFFER }} - idl-buffer: - description: "The idl buffer address." - value: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }} - -runs: - using: "composite" - steps: - - uses: actions/checkout@v2 - - uses: ./.github/actions/setup/ - - uses: ./.github/actions/setup-anchor/ - with: - node-version: ${{ env.NODE_VERSION }} - - uses: actions/cache@v2 - name: Cache Cargo registry + index - id: cache-cargo-registry - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - key: cargo-${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}-2 - - name: Cache Deps Builds - uses: actions/cache@v2 - id: cache-cargo-deps-builds - with: - path: | - ./deps/metaplex-program-brary - ./deps/solana-program-library - ./deps/clockwork - key: deps-${{ runner.os }}-build-${{ hashFiles('./deps/**/Cargo.lock') }} - - run: ${{ inputs.testing == 'true' && 'TESTING=true' || '' }} ~/.cargo/bin/anchor build -p $PROGRAM ${{ inputs.devnet == 'true' && '-- --features devnet' || '' }} - shell: bash - env: - PROGRAM: ${{ inputs.program }} - - run: solana-keygen new -o keyp --no-bip39-passphrase - shell: bash - - run: echo "$DEPLOY_KEYPAIR" > ./deploy-keypair.json && chmod 600 ./deploy-keypair.json - shell: bash - env: - DEPLOY_KEYPAIR: ${{ inputs.keypair }} - - name: Buffer Deploy - if: steps.cache-buffer.outputs.cache-hit != 'true' - id: buffer-deploy - uses: nick-invision/retry@v2 - with: - timeout_minutes: 30 - max_attempts: 10 - shell: bash - command: solana program write-buffer --buffer ./keyp -k ./deploy-keypair.json ./target/deploy/$PROGRAM.so -u $NETWORK > ./buffer.out - env: - NETWORK: ${{ inputs.network }} - PROGRAM: ${{ inputs.program }} - - name: IDL Buffer Deploy - uses: nick-invision/retry@v2 - id: idl-buffer-deploy - if: steps.cache-buffer.outputs.cache-hit != 'true' - with: - timeout_minutes: 10 - max_attempts: 50 - shell: bash - command: ~/.cargo/bin/anchor idl write-buffer $PROGRAM_ID --filepath ./target/idl/$PROGRAM.json --provider.cluster $NETWORK --provider.wallet ./deploy-keypair.json > idl-buffer.out - env: - PROGRAM_ID: ${{ inputs.program-id }} - PROGRAM: ${{ inputs.program }} - NETWORK: ${{ inputs.network }} - - name: Buffer Deploy Store - shell: bash - id: buffer-deploy-store - run: | - echo "BUFFER=$(cat buffer.out | sed 's/Buffer: //g' | xargs echo -n)" >> $GITHUB_OUTPUT - echo "IDL_BUFFER=$(cat idl-buffer.out | sed 's/Idl buffer created: //g' | xargs echo -n)" >> $GITHUB_OUTPUT - - run: echo "The buffer is ${{ steps.buffer-deploy-store.outputs.BUFFER }}" - shell: bash - - run: echo "the idl buffer is ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }}" - shell: bash - - run: echo "the idl is $(cat ./target/idl/$PROGRAM.json)" - shell: bash - env: - PROGRAM: ${{ inputs.program }} - - name: Transfer idl buffer to authority - uses: nick-invision/retry@v2 - if: steps.cache-buffer.outputs.cache-hit != 'true' - with: - timeout_minutes: 10 - max_attempts: 50 - shell: bash - command: anchor idl set-authority $IDL_BUFFER --provider.cluster $NETWORK --program-id $PROGRAM_ID --new-authority $AUTHORITY --provider.wallet ./deploy-keypair.json - env: - IDL_BUFFER: ${{ steps.buffer-deploy-store.outputs.IDL_BUFFER }} - AUTHORITY: ${{ inputs.buffer-authority }} - NETWORK: ${{ inputs.network }} - PROGRAM_ID: ${{ inputs.program-id }} - - name: Transfer buffer to authority - uses: nick-invision/retry@v2 - if: steps.cache-buffer.outputs.cache-hit != 'true' - with: - timeout_minutes: 10 - max_attempts: 50 - shell: bash - command: solana program set-buffer-authority $BUFFER -k ./deploy-keypair.json --new-buffer-authority $AUTHORITY -u $NETWORK - env: - BUFFER: ${{ steps.buffer-deploy-store.outputs.BUFFER }} - AUTHORITY: ${{ inputs.buffer-authority }} - NETWORK: ${{ inputs.network }} - - run: rm ./deploy-keypair.json - shell: bash - if: always() diff --git a/CHANGELOG.md b/CHANGELOG.md index cc276b4c2..ea0cb45f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline # [0.3.0](https://github.com/helium/helium-program-library/compare/v0.2.21...v0.3.0) (2023-09-14) +### Breaking + + * `distributor-oracle` - `bulkFormTransactions` now takes batch functions for asset and proof fetching, instead of individual fetch functions. If you were passing custom functions, this code will need to change. ### Features