Skip to content

Commit

Permalink
Merge pull request #301 from EpicsDAO/feature
Browse files Browse the repository at this point in the history
update firedancer config
  • Loading branch information
POPPIN-FUMI authored Oct 7, 2024
2 parents 14a672d + 873a77c commit 324cda5
Show file tree
Hide file tree
Showing 566 changed files with 27,308 additions and 218 deletions.
5 changes: 5 additions & 0 deletions .changeset/violet-oranges-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@epics-dao/solv': patch
---

Update firedancer config
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,20 @@ Options:
-h, --help Display help for command
```

## New Features - solv v4.6.x Release

Now you can easily setup Yellowstone Geyser plugin and Firedancer!

### Yellowstone Geyser gRPC Interface Support

```bash
solv setup --geyser
```

- Yellowstone Geyser Doc - [https://github.com/rpcpool/yellowstone-grpc](https://github.com/rpcpool/yellowstone-grpc)

### Firedancer Setup Support (Frankendancer)

## Start Solana Validator

```bash
Expand Down
144 changes: 0 additions & 144 deletions install

This file was deleted.

1 change: 1 addition & 0 deletions packages/solv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.7",
"@solana-developers/helpers": "^2.5.6",
"@swc/core": "1.7.21",
"@types/bn.js": "5.1.5",
"@types/cli-progress": "3.11.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ dynamic_port_range = "8900-9000"

[rpc]
port = 0
full_api = true
private = true
transaction_history = true
extended_tx_metadata_storage = true
only_known = true
pubsub_enable_block_subscription = true
pubsub_enable_vote_subscription = true
bigtable_ledger_storage = true
full_api = false
private = false
transaction_history = false
extended_tx_metadata_storage = false
only_known = false
pubsub_enable_block_subscription = false
pubsub_enable_vote_subscription = false
bigtable_ledger_storage = false

[snapshots]
incremental_snapshots = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ dynamic_port_range = "8900-9000"
snapshot_fetch = true
genesis_fetch = true
expected_genesis_hash = "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY"
known_validators = ["5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on"]


[hugetlbfs]
mount_path = "/mnt"
56 changes: 34 additions & 22 deletions packages/solv/src/cli/setup/template/firedancer/configToml.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,68 @@
const configToml = () => {
const filePath = '/home/solv/firedancer/config.toml'
const body = `name = "solv"
user = "solv"
scratch_directory = "/home/{user}"
dynamic_port_range = "8900-9000"
const body = `name = \"solv\"
user = \"solv\"
scratch_directory = \"/home/{user}\"
dynamic_port_range = \"8900-9000\"
[log]
path = "/home/solv/solana-validator.log"
colorize = "auto"
level_logfile = "INFO"
level_stderr = "NOTICE"
level_flush = "WARNING"
path = \"/home/solv/solana-validator.log\"
colorize = \"auto\"
level_logfile = \"INFO\"
level_stderr = \"NOTICE\"
level_flush = \"WARNING\"
[reporting]
solana_metrics_config = \"host=https://metrics.solana.com:8086,db=tds,u=testnet_write,p=c4fa841aa918bf8274e3e2a44d77568d9861b3ea\"
[ledger]
path = "/mnt/ledger"
accounts_path = "/mnt/accounts"
path = \"/mnt/ledger\"
accounts_path = \"/mnt/accounts\"
limit_size = 200_000_000
account_indexes = []
account_index_exclude_keys = []
snapshot_archive_format = "zstd"
snapshot_archive_format = \"zstd\"
require_tower = false
[rpc]
port = 8899
full_api = true
private = true
[snapshots]
incremental_snapshots = true
full_snapshot_interval_slots = 25000
incremental_snapshot_interval_slots = 100
path = ""
path = \"\"
[gossip]
entrypoints = [
"entrypoint.testnet.solana.com:8001",
"entrypoint2.testnet.solana.com:8001",
"entrypoint3.testnet.solana.com:8001",
\"entrypoint.testnet.solana.com:8001\",
\"entrypoint2.testnet.solana.com:8001\",
\"entrypoint3.testnet.solana.com:8001\",
]
[consensus]
identity_path = "/home/solv/identity.json"
vote_account_path = "/home/solv/testnet-vote-account-keypair.json"
identity_path = \"/home/solv/identity.json\"
vote_account_path = \"/home/solv/testnet-vote-account-keypair.json\"
authorized_voter_paths = [
"/home/solv/testnet-validator-keypair.json"
\"/home/solv/testnet-validator-keypair.json\"
]
snapshot_fetch = true
genesis_fetch = true
expected_genesis_hash = "4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY"
known_validators = ["5D1fNXzvv5NjV1ysLjirC4WY92RNsVH18vjmcszZd8on"]
expected_genesis_hash = \"4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY\"
[layout]
affinity = \"0-126/2\"
net_tile_count = 1
quic_tile_count = 1
verify_tile_count = 27
bank_tile_count = 27
shred_tile_count = 1
[hugetlbfs]
mount_path = "/mnt"`
mount_path = \"/mnt\"`
return { filePath, body }
}

Expand Down
22 changes: 22 additions & 0 deletions packages/solv/src/lib/token/approveTransaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { approve } from '@solana/spl-token'
import { Connection, PublicKey, Signer } from '@solana/web3.js'

const approveTransaction = async (
connection: Connection,
payer: Signer,
account: PublicKey,
delegate: PublicKey,
owner: PublicKey,
amount: number,
) => {
const transactionSignature = await approve(
connection,
payer,
account,
delegate,
owner,
amount,
)
return transactionSignature
}
export default approveTransaction
16 changes: 16 additions & 0 deletions packages/solv/src/lib/token/buildApproveTransaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { PublicKey, Transaction } from '@solana/web3.js'
import { createApproveInstruction } from '@solana/spl-token'

async function buildApproveTransaction(
account: PublicKey,
delegate: PublicKey,
owner: PublicKey,
amount: number,
): Promise<Transaction> {
const transaction = new Transaction().add(
createApproveInstruction(account, delegate, owner, amount),
)

return transaction
}
export default buildApproveTransaction
13 changes: 13 additions & 0 deletions packages/solv/src/lib/token/buildRevokeTransaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { PublicKey, Transaction } from '@solana/web3.js'
import { createRevokeInstruction } from '@solana/spl-token'

async function buildRevokeTransaction(
account: PublicKey,
owner: PublicKey,
): Promise<Transaction> {
const transaction = new Transaction().add(
createRevokeInstruction(account, owner),
)
return transaction
}
export default buildRevokeTransaction
14 changes: 14 additions & 0 deletions packages/solv/src/lib/token/revokeTransaction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { revoke } from '@solana/spl-token'
import { Connection, PublicKey, Signer } from '@solana/web3.js'

const revokeTransaction = async (
connection: Connection,
payer: Signer,
account: PublicKey,
owner: PublicKey,
) => {
const transactionSignature = await revoke(connection, payer, account, owner)
return transactionSignature
}

export default revokeTransaction
Loading

0 comments on commit 324cda5

Please sign in to comment.