Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracking] Pre-release of the mainnet branch #3077

Closed
wants to merge 204 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
f793ae0
perf: use a blocking task for check_batch_header
ljedrz Oct 31, 2023
04b9526
perf: use a blocking task for insert_certificate
ljedrz Oct 31, 2023
46d6afc
perf: use a blocking task for sync_certificate_with_block
ljedrz Oct 31, 2023
ba5e3fb
Switches transmissions configs to snarkVM
howardwu Nov 26, 2023
6fe8adf
Update rev
howardwu Nov 30, 2023
93ac510
fix: prevent handshake based sig forgery
niklaslong Jan 17, 2024
3c7b9e0
feat: bump `Event` and `Message` versions
niklaslong Jan 19, 2024
6e3e829
Merge pull request #2869 from AleoHQ/feat/max-transmissions
howardwu Jan 30, 2024
00cef9c
Merge testnet3
raychu86 Feb 7, 2024
db46db2
Update rev - 1e4c188 feat/committee-round-lag
raychu86 Feb 7, 2024
c319caf
Introduce get_previous_committee_with_lag_for_round
raychu86 Feb 7, 2024
c1bfb27
Use get_previous_committee_with_lag_for_round in consensus
raychu86 Feb 7, 2024
1f2dfc0
Add test to enforce MAX_GC_ROUNDS is equivalent to the COMMITTEE_ROUN…
raychu86 Feb 7, 2024
4416bc2
Update comment
raychu86 Feb 7, 2024
2612d64
Update rev - 5b5c559 feat/committee-round-lag
raychu86 Feb 7, 2024
1ec9145
Update rev - bef915a feat/committee-round-lag
raychu86 Feb 8, 2024
0cfd9d3
Adds support for multiple committed dags
howardwu Jan 30, 2024
0e47d74
Clarify filtering in is_linked
raychu86 Feb 8, 2024
b158fd4
Adds support for dynamic leaders
mdelle1 Feb 2, 2024
05375ef
Cleanup recursive leader selection in commit_leader_certificate
raychu86 Feb 8, 2024
e20a5c1
Remove unused MAX_GC_ROUNDS variable in favor of snarkVM variant
raychu86 Feb 8, 2024
bd165ec
Merge branch 'testnet3' into mainnet
howardwu Feb 9, 2024
50b0834
Update constant
howardwu Feb 9, 2024
e10df3c
Merge pull request #3015 from niklaslong/fix/2983
howardwu Feb 9, 2024
678f8d9
Resolve merge conflict
howardwu Feb 10, 2024
fc99107
nit: variable name
howardwu Feb 10, 2024
52b6a01
Merge pull request #3066 from AleoHQ/feat/bullshark-block-per-anchor
howardwu Feb 10, 2024
cd6e6fc
Merge mainnet
raychu86 Feb 10, 2024
f161c7a
Update rev - 2d062ce
raychu86 Feb 10, 2024
92e5bb5
nit: first pass of using committee lookback
howardwu Feb 10, 2024
26ae0a9
nit: second pass of using committee lookback
howardwu Feb 10, 2024
afa2597
nit: third pass of using committee lookback
howardwu Feb 10, 2024
b0a7d18
Merge pull request #3065 from AleoHQ/feat/committee-round-lag
howardwu Feb 10, 2024
ce87365
Reverts election certificates
howardwu Feb 10, 2024
c180372
Cargo.lock
howardwu Feb 10, 2024
e0303d4
Merge pull request #3081 from AleoHQ/revert/election-certificates
howardwu Feb 10, 2024
d1960b0
Reduce the primary ping
howardwu Feb 10, 2024
279b329
Remove the batch certificates from primary ping
howardwu Feb 10, 2024
7477acb
Remove batch certificates from primary ping
howardwu Feb 10, 2024
0898240
Update the ping back to 4x
howardwu Feb 10, 2024
bfd7dfc
Increase fetch timeouts
howardwu Feb 10, 2024
dc03a03
Try 0 block behind
howardwu Feb 10, 2024
b9aa45e
Switch to 2x and 1 block
howardwu Feb 10, 2024
7345e01
Merge branch 'testnet3' into mainnet
howardwu Feb 10, 2024
e6c4a06
Merge branch 'mainnet' into feat/reduce-ping
howardwu Feb 10, 2024
c7e3912
Clippy
howardwu Feb 10, 2024
02ba566
Merge branch 'feat/reduce-ping' of https://github.com/AleoHQ/snarkOS …
howardwu Feb 10, 2024
b776798
Merge pull request #3082 from AleoHQ/feat/reduce-ping
howardwu Feb 10, 2024
c99fe7a
Merge branch 'testnet3' into mainnet
howardwu Feb 11, 2024
b7728ea
Update rev
howardwu Feb 11, 2024
62ca01b
Update Testnet3 to MainnetV0
howardwu Feb 11, 2024
ea4f1bb
Update rev
howardwu Feb 11, 2024
7eb4a0f
Update rev
howardwu Feb 11, 2024
ef98344
Update rev
howardwu Feb 11, 2024
e2d863f
Update rev
howardwu Feb 11, 2024
0215f8b
Clippy
howardwu Feb 11, 2024
bd02601
Merge branch 'mainnet' into feat/network-v0
howardwu Feb 11, 2024
f4e8bc2
Fix path references
howardwu Feb 11, 2024
058b37a
Update port usage to match ID derivation
howardwu Feb 11, 2024
2279028
Fix test
howardwu Feb 11, 2024
7e47ef5
Merge pull request #3086 from AleoHQ/feat/network-v0
howardwu Feb 11, 2024
0cb865d
Add logging and more fetch time
howardwu Feb 11, 2024
cbc30f5
Fix network ID
howardwu Feb 11, 2024
c286dd3
Handle Phase 3 TODOs
howardwu Feb 11, 2024
33d40e5
Improve error handling and threshold
howardwu Feb 11, 2024
748de1f
Update runtime thresholds
howardwu Feb 11, 2024
36cfdd3
Update rev
howardwu Feb 11, 2024
86731ad
Fix devnet script indices
howardwu Feb 11, 2024
81e813f
Update the timeout threshold
howardwu Feb 11, 2024
29416d0
Only construct unconfirmed txs once
howardwu Feb 11, 2024
4d2392f
Update rev
howardwu Feb 11, 2024
b2ac620
Fix CLI network ID check
howardwu Feb 11, 2024
fbfa144
Merge branch 'testnet3' into perf/assorted_bft
howardwu Feb 11, 2024
defe227
Merge branch 'mainnet' into perf/assorted_bft
howardwu Feb 11, 2024
5d18ede
Update interface
howardwu Feb 11, 2024
8982335
Use rayon over the certificates
howardwu Feb 11, 2024
36f31a1
Separate out the async logic
howardwu Feb 11, 2024
d419d9d
Update core count
howardwu Feb 11, 2024
cdbc65f
Update redundancy factor
howardwu Feb 11, 2024
09b0665
Optimize validator block sync
raychu86 Feb 11, 2024
cda89fd
nit
raychu86 Feb 11, 2024
f779241
Improve logging
howardwu Feb 11, 2024
f4b29c1
Improve logging
howardwu Feb 11, 2024
5e6458b
Merge branch 'test/perf-bft4' of https://github.com/AleoHQ/snarkOS in…
howardwu Feb 11, 2024
3820be3
Update node/bft/src/primary.rs
howardwu Feb 11, 2024
17ce0db
Merge pull request #2775 from ljedrz/perf/assorted_bft
howardwu Feb 11, 2024
2c72835
Merge branch 'mainnet' into feat/sync-without-bft
howardwu Feb 11, 2024
0780771
Update constant
howardwu Feb 11, 2024
2f19bb2
Merge branch 'mainnet' into feat/sync-without-bft
howardwu Feb 11, 2024
06566aa
Limit outgoing certificate requests to REDUNDANCY_FACTOR
raychu86 Feb 11, 2024
f109240
Limit outgoing transmission requests to REDUNDANCY_FACTOR
raychu86 Feb 11, 2024
36726e6
Handle sync loop with try_sync, and optimize the while loop
howardwu Feb 11, 2024
8310e0a
Handle break and error cases better
howardwu Feb 11, 2024
95767ca
Add a response lock for more frequent polling
howardwu Feb 11, 2024
cf88c44
Add expiration for pending callbacks
raychu86 Feb 11, 2024
c904669
Allow syncing ledger to tip without bft first
howardwu Feb 12, 2024
66f4cc6
Merge pull request #3087 from AleoHQ/feat/sync-without-bft
howardwu Feb 12, 2024
85a3e29
Merge branch 'mainnet' into feat/limit-requests
howardwu Feb 12, 2024
0ac9bfc
Use NUM_REDUNDANT_REQUESTS
raychu86 Feb 12, 2024
82758cc
Add test for expired callbacks
raychu86 Feb 12, 2024
310d9b6
Clean up logging
howardwu Feb 12, 2024
735ad69
Clean up logging
howardwu Feb 12, 2024
894a75d
Merge pull request #3088 from AleoHQ/feat/limit-requests
howardwu Feb 12, 2024
be8e6ce
Limit number of deployments in mempool.
vicsn Feb 12, 2024
f93060b
Use single lock for transactions_queue
vicsn Feb 12, 2024
a5d3349
Improve wording of interleaving
vicsn Feb 12, 2024
2ea0bdc
Introduce MAXIMUM_NUMBER_OF_PROVERS to maintain connections with
vicsn Feb 12, 2024
806d018
Clean up and correct num_peer calculations
vicsn Feb 12, 2024
02a08ec
short circuit on the most common check
vicsn Feb 12, 2024
211d8c6
Further clean up num_peer calculations
vicsn Feb 12, 2024
9ed6534
Update rev - 425db4d
raychu86 Feb 13, 2024
0592a13
Pass through bonded_balances
raychu86 Feb 13, 2024
821e9bd
Add custom bonded balances to CLI
raychu86 Feb 13, 2024
bcedf4e
Add struct for BondedBalances
raychu86 Feb 13, 2024
94f88e2
Update rev - 8680d90
raychu86 Feb 13, 2024
61f5499
Merge mainnet and update rev - 88347f3
raychu86 Feb 14, 2024
264b2d4
Merge pull request #3089 from AleoHQ/limit_deployments_2
howardwu Feb 14, 2024
f0a4dda
Update node/router/src/heartbeat.rs
howardwu Feb 14, 2024
49c9607
Merge pull request #3090 from AleoHQ/improve_peering_robustness
howardwu Feb 14, 2024
d15de73
fix: don't try to propose a batch when we're not yet synced
joske Feb 14, 2024
48a2d6a
Merge pull request #3096 from eqlabs/fix/consensus-sync
howardwu Feb 14, 2024
ed079fa
Update rev
howardwu Feb 15, 2024
86839a2
Merge pull request #3091 from AleoHQ/feat/bonded_balances
howardwu Feb 15, 2024
d70782e
Merge branch 'testnet3' into mainnet
howardwu Feb 15, 2024
3645160
feat: more metrics
joske Feb 15, 2024
f7eaf84
Fix rev and add feature flag guard
howardwu Feb 15, 2024
13a54f2
Merge pull request #3097 from eqlabs/feat/more_metrics
howardwu Feb 15, 2024
a8f9a7c
Update rev
howardwu Feb 16, 2024
5383242
Update analytics tool
howardwu Feb 16, 2024
2590a9b
Handle analytics response
howardwu Feb 17, 2024
42c87f8
Check if the number of peers received is less than u8::MAX
vicsn Feb 19, 2024
50c2fab
feat: handle more POSIX signals on UNIX systems
ljedrz Feb 19, 2024
4cbae9e
Update snarkVM rev - 1cebaaf
raychu86 Feb 19, 2024
a49f7da
Update bootstrap peers
howardwu Feb 19, 2024
37b3a9d
Add fee transmission check in ensure_transmission_id_matches
raychu86 Feb 19, 2024
e59535e
Perform basic check on transmissions in batch proposals
raychu86 Feb 19, 2024
9a5d470
Update is_proposing check
raychu86 Feb 20, 2024
129f89c
add plaintext codec message metrics, as well as inbound/outbound for tcp
miazn Feb 20, 2024
ebdec6c
perf: cache the recently queried committees
ljedrz Feb 20, 2024
497e42c
chore: adjust the lockfile
ljedrz Feb 20, 2024
d5659b6
fix transactions metric -> counter to gauge
miazn Feb 20, 2024
5905164
add better metric names for router messages
miazn Feb 20, 2024
3bb601b
make gauge increment and not set absolute
miazn Feb 20, 2024
f46d258
Merge pull request #3103 from AleoHQ/limit_peer_response
howardwu Feb 20, 2024
d8a8e70
Merge pull request #3102 from ljedrz/feat/handle_more_signals
howardwu Feb 20, 2024
d7accde
Merge pull request #3105 from AleoHQ/update-round-advancement
howardwu Feb 20, 2024
ed65ff3
Resolve merge
howardwu Feb 20, 2024
71d129f
Add round check in signed proposals cache
raychu86 Feb 20, 2024
0e88b08
fix: only cache committies with matching rounds
ljedrz Feb 21, 2024
c1fafe8
perf: skip the timed batch proposal if round progression already trig…
ljedrz Feb 21, 2024
49c576c
remove tcp events/msgs metircs
miazn Feb 21, 2024
e9533b6
Update rev
howardwu Feb 21, 2024
9b586af
Merge branch 'AleoHQ:mainnet' into feat/codec-metrics
miazn Feb 22, 2024
ac024b0
Create a dedicated function for garbage collection
raychu86 Feb 23, 2024
e4a957c
Implement garbage collection on commit
raychu86 Feb 23, 2024
86acd1d
perf: adjust blocking tasks in the primary
ljedrz Feb 23, 2024
ce1dadf
perf: use a blocking task to execute test transactions
ljedrz Feb 23, 2024
c88ce78
Update snarkVM rev - ee10658
raychu86 Feb 26, 2024
624112d
Add committee ID checks
raychu86 Feb 26, 2024
0bcb760
Use committee_id in tests
raychu86 Feb 26, 2024
9dbb8d7
Merge pull request #3107 from miazn/feat/codec-metrics
howardwu Feb 26, 2024
76ccdb1
Add committee ID check to processing batch certificate
raychu86 Feb 26, 2024
124cdcc
Update README.md
renzholy Feb 29, 2024
9b9f178
Use redundancy based on committee size and num requests based on uniq…
raychu86 Mar 1, 2024
b7457ef
Add expected values to MockLedger
raychu86 Mar 1, 2024
f32a0f5
Use dedicated function to find num validators
raychu86 Mar 1, 2024
35927ae
nit
raychu86 Mar 1, 2024
c9d3e94
Track the number of sent requests
raychu86 Mar 2, 2024
44f498b
Update node/bft/src/primary.rs
howardwu Mar 2, 2024
08832d0
Merge pull request #3137 from renzholy/patch-1
howardwu Mar 2, 2024
dd173f7
Merge pull request #3121 from ljedrz/perf/adjust_blocking_primary
howardwu Mar 2, 2024
682500d
Merge pull request #3112 from ljedrz/perf/dont_batch_propose_twice
howardwu Mar 2, 2024
4863cdc
Merge pull request #3123 from ljedrz/perf/blocking_test_txs
howardwu Mar 2, 2024
093532d
nit: reorder items
howardwu Mar 2, 2024
691baca
nit: feature optional
howardwu Mar 2, 2024
44bfab1
Merge pull request #3106 from ljedrz/cache_committees
howardwu Mar 2, 2024
40c93f7
Update node/bft/src/helpers/pending.rs
raychu86 Mar 3, 2024
db874ea
Update node/bft/src/worker.rs
raychu86 Mar 3, 2024
4e30921
Remove unused function
raychu86 Mar 3, 2024
9f39301
Cleanup derivation of max redundant requests
raychu86 Mar 3, 2024
b5f04fb
Add test for num_sent_requests
raychu86 Mar 3, 2024
27e3262
Add transmission request flooding test
raychu86 Mar 3, 2024
99d9b6f
Add more checks to flood test
raychu86 Mar 3, 2024
f2c799b
Add additional resending and flooding tests
raychu86 Mar 3, 2024
a0e9292
nit log
raychu86 Mar 3, 2024
e91eec0
Merge pull request #3140 from AleoHQ/fix/redundant-requests
howardwu Mar 3, 2024
0ec30cb
Merge branch 'mainnet' into committee-id
howardwu Mar 3, 2024
3e3c0a4
Update Cargo.toml
raychu86 Mar 3, 2024
d7a0208
nit: logs
raychu86 Mar 3, 2024
1c23c9a
Merge pull request #3129 from AleoHQ/committee-id
howardwu Mar 3, 2024
bc92d3b
Merge pull request #3109 from AleoHQ/fix/signed-proposals-cache
howardwu Mar 3, 2024
c6ab661
Merge pull request #3117 from AleoHQ/feat/gc-on-commit
howardwu Mar 3, 2024
c414dbf
Merge branch 'mainnet' of https://github.com/AleoHQ/snarkOS into feat…
raychu86 Mar 3, 2024
f8c2827
Update function name to ensure_transmission_is_well_formed
raychu86 Mar 3, 2024
7022ebb
Use the certificate_round for lookback selection
raychu86 Mar 3, 2024
a928e3a
Merge pull request #3143 from AleoHQ/fix/round-selection
howardwu Mar 3, 2024
6e8c6d2
Add the rps limit to start.sh script
howardwu Mar 3, 2024
3e6c2a5
Do not gc during bootup
raychu86 Mar 3, 2024
82f7518
Merge pull request #3144 from AleoHQ/fix/no-gc-on-bootup
howardwu Mar 4, 2024
39fbf98
Merge pull request #3104 from AleoHQ/feat/simple-proposal-transmissio…
howardwu Mar 4, 2024
aa0299b
Perform GC on initialization to ensure our gc_round is correct
raychu86 Mar 4, 2024
0aeccc0
Add test for gc on storage init
raychu86 Mar 4, 2024
f54d3bb
Add test to ensure BFT performs GC on commit
raychu86 Mar 4, 2024
8be6ac9
Merge pull request #3145 from AleoHQ/gc-on-bootup
howardwu Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,6 @@ workflows:
filters:
branches:
only:
- testnet3
- mainnet
jobs:
- integration
118 changes: 91 additions & 27 deletions .devnet/.analytics/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,44 @@ const yargs = require('yargs');
const dimStart = "\x1b[2m";
const dimEnd = "\x1b[0m";

// Function to get the IP address of a given AWS node
async function getIPAddress(awsNodeName) {
// Read the ~/.ssh/config file
const sshConfigFile = fs.readFileSync(`${process.env.HOME}/.ssh/config`, 'utf8');

// Use regular expressions to extract the associated IP address
const regex = new RegExp(`Host\\s+${awsNodeName}[\\s\\S]*?HostName\\s+(\\S+)`);
const match = sshConfigFile.match(regex);

if (match && match[1]) {
return match[1];
} else {
console.error(`No IP address found for ${awsNodeName} in ~/.ssh/config`);
}
}

// Function to get the count of AWS nodes based on the naming convention aws-nXX in the SSH config file
async function getAWSNodeCount() {
// Read the ~/.ssh/config file
const sshConfigFile = fs.readFileSync(`${process.env.HOME}/.ssh/config`, 'utf8');

// Regular expression to match all aws-nXX formats
const regex = /Host\s+(aws-n\d+)/g;
let match;
let highestNumber = -1;

// Iterate over all matches and find the highest number
while ((match = regex.exec(sshConfigFile)) !== null) {
const nodeNumber = parseInt(match[1].replace('aws-n', ''), 10);
if (nodeNumber > highestNumber) {
highestNumber = nodeNumber;
}
}

// Return the count of nodes, adding 1 because it starts from 0
return highestNumber >= 0 ? highestNumber + 1 : 0;
}

// Function to fetch block data
async function fetchBlockData(baseUrl, height) {
try {
Expand Down Expand Up @@ -77,10 +115,32 @@ async function calculateRoundsInBlocks(baseUrl, latestHeight) {
}
}

async function checkBlockHash(blockHeight) {
const numNodes = await getAWSNodeCount();
console.log(`Detected ${numNodes} AWS nodes... \n`);

for (let i = 0; i < numNodes; i++) {
// Define the AWS node name to search for (e.g., aws-n1)
const awsNodeName = `aws-n${i}`;
// Get the IP address of the AWS node
const ipAddress = await getIPAddress(awsNodeName);
// Define the base URL for the node
const baseUrl = `http://${ipAddress}:3030/mainnet/block`;

// Fetch the block data
const blockData = await fetchBlockData(baseUrl, blockHeight);
if (blockData && blockData.block_hash) {
console.log(`${awsNodeName} - Block ${blockHeight} - ${blockData.block_hash}`);
} else {
console.log(`${awsNodeName} - Block ${blockHeight} - No block hash found`);
}
}
}

// Main function to fetch block metrics
async function fetchBlockMetrics(baseUrl, metricType) {
async function fetchBlockMetrics(metricType, optionalBlockHeight) {
// Function to get the latest block height
async function getLatestBlockHeight() {
async function getLatestBlockHeight(baseUrl) {
try {
const response = await axios.get(`${baseUrl}/height/latest`);
const latestHeight = response.data;
Expand All @@ -92,7 +152,17 @@ async function fetchBlockMetrics(baseUrl, metricType) {
}
}

const latestHeight = await getLatestBlockHeight();
// Define the AWS node name to search for (e.g., aws-n1)
const awsNodeName = 'aws-n1';
// Get the IP address of the AWS node
const ipAddress = await getIPAddress(awsNodeName);
// Define the base URL for the node.
const baseUrl = `http://${ipAddress}:3030/mainnet/block`;

console.log(`${dimStart}IP Address: ${ipAddress}${dimEnd}`);
console.log(`${dimStart}Base URL: ${baseUrl}${dimEnd}`);

const latestHeight = await getLatestBlockHeight(baseUrl);
if (latestHeight === null) {
console.error('Unable to fetch latest block height, try again...');
return;
Expand All @@ -104,6 +174,8 @@ async function fetchBlockMetrics(baseUrl, metricType) {
calculateAverageBlockTime(baseUrl, latestHeight);
} else if (metricType === 'roundsInBlocks') {
calculateRoundsInBlocks(baseUrl, latestHeight);
} else if (metricType === 'checkBlockHash' && optionalBlockHeight) {
checkBlockHash(optionalBlockHeight);
} else {
console.error('Invalid metric type. Supported types: "averageBlockTime" or "roundsInBlocks".');
}
Expand All @@ -115,35 +187,27 @@ async function main() {
.options({
'metric-type': {
alias: 'm',
describe: 'Metric type to fetch (averageBlockTime or roundsInBlocks)',
describe: 'Metric type to fetch (averageBlockTime, roundsInBlocks, or checkBlockHash)',
demandOption: true,
choices: ['averageBlockTime', 'roundsInBlocks'],
choices: ['averageBlockTime', 'roundsInBlocks', 'checkBlockHash'],
},
'block-height': {
alias: 'b',
describe: 'Block height to examine for checkBlockHash metric',
type: 'number',
},
})
.check((argv) => {
// Check if metric-type is checkBlockHash and block-height is provided
if (argv['metric-type'] === 'checkBlockHash' && (isNaN(argv['block-height']) || argv['block-height'] == null)) {
throw new Error('Block height is required when metric-type is checkBlockHash');
}
return true; // Indicate that the arguments passed the check
})
.argv;

// Read the ~/.ssh/config file
const sshConfigFile = fs.readFileSync(`${process.env.HOME}/.ssh/config`, 'utf8');

// Define the AWS node name to search for (e.g., aws-n1)
const awsNodeName = 'aws-n1';

// Use regular expressions to extract the IP address associated with aws-n0
const regex = new RegExp(`Host\\s+${awsNodeName}[\\s\\S]*?HostName\\s+(\\S+)`);
const match = sshConfigFile.match(regex);

if (match && match[1]) {
const ipAddress = match[1];
const baseUrl = `http://${ipAddress}:3033/testnet3/block`;

console.log(`${dimStart}IP Address: ${ipAddress}${dimEnd}`);
console.log(`${dimStart}Base URL: ${baseUrl}${dimEnd}`);

// Fetch and output the specified block metric
fetchBlockMetrics(baseUrl, argv['metric-type']);
} else {
console.error(`No IP address found for ${awsNodeName} in ~/.ssh/config`);
}
// Fetch and output the specified block metric
fetchBlockMetrics(argv['metric-type'], argv['block-height']);
}

// Run the main function
Expand Down
2 changes: 0 additions & 2 deletions .devnet/.analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"description": "",
"main": "analytics.js",
"scripts": {
"averageBlockTime": "node analytics.js --metric-type averageBlockTime",
"roundsInBlocks": "node analytics.js --metric-type roundsInBlocks",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "The Aleo Team",
Expand Down
6 changes: 3 additions & 3 deletions .devnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Start by creating EC2 instances in the AWS console.
- Ubuntu 22.04 LTS (not Amazon Linux)
- Security Group - Inbound Policy
- SSH - Port 22 - 0.0.0.0/0 (or your IP)
- Custom TCP - Port 3033 - 0.0.0.0/0 (or your IP)
- Custom TCP - Port 4133 - 0.0.0.0/0
- Custom TCP - Port 3030 - 0.0.0.0/0 (or your IP)
- Custom TCP - Port 4130 - 0.0.0.0/0
- Custom TCP - Port 5000 - 0.0.0.0/0

Be sure the give the EC2 instances a name tag, i.e. `testnet3`.
Be sure the give the EC2 instances a name tag, i.e. `devnet`.

Make sure you set the correct SSH `.pem` and have the `.pem` in your `~/.ssh` directory.

Expand Down
20 changes: 17 additions & 3 deletions .devnet/analytics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,30 @@ fi

# Prompt the user to select a metric type
PS3="Select a metric type: "
options=("Average Block Time" "Rounds in Blocks" "Quit")
options=("Average Block Time" "Rounds in Blocks" "Check Block Hash" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Average Block Time")
npm run averageBlockTime
echo ""
node analytics.js --metric-type averageBlockTime
break
;;
"Rounds in Blocks")
npm run roundsInBlocks
echo ""
node analytics.js --metric-type roundsInBlocks
break
;;
"Check Block Hash")
echo "You selected 'Check Block Hash'. Please enter the block height:"
read blockHeight
echo ""
# Validate input is an integer
if ! [[ "$blockHeight" =~ ^[0-9]+$ ]]; then
echo "Error: Block height must be a positive integer."
exit 1
fi
node analytics.js --metric-type checkBlockHash --block-height "$blockHeight"
break
;;
"Quit")
Expand Down
2 changes: 1 addition & 1 deletion .devnet/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ EOF
}

# Loop through aws-n nodes and terminate tmux sessions in parallel
for NODE_ID in $(seq 0 $NUM_INSTANCES); do
for NODE_ID in $(seq 0 $(($NUM_INSTANCES - 1))); do
terminate_tmux_session $NODE_ID &
done

Expand Down
8 changes: 4 additions & 4 deletions .devnet/config.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Read the EC2 instance name from the user
read -p "Enter the EC2 instance name to filter by (e.g. Name) (default: testnet3): " INSTANCE_NAME
INSTANCE_NAME="${INSTANCE_NAME:-testnet3}"
read -p "Enter the EC2 instance name to filter by (e.g. Name) (default: devnet): " INSTANCE_NAME
INSTANCE_NAME="${INSTANCE_NAME:-devnet}"

# Read the PEM file path from the user or use the default in ~/.ssh
read -p "Enter the PEM file path (default: ~/.ssh/s3-testnet3.pem): " PEM_FILE
PEM_FILE="${PEM_FILE:-~/.ssh/s3-testnet3.pem}"
read -p "Enter the PEM file path (default: ~/.ssh/s3-devnet.pem): " PEM_FILE
PEM_FILE="${PEM_FILE:-~/.ssh/s3-devnet.pem}"

# Use the AWS CLI to describe running EC2 instances, filter by the provided name, and store the JSON output in a variable
instance_info=$(aws ec2 describe-instances \
Expand Down
8 changes: 4 additions & 4 deletions .devnet/install.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Prompt the user for the branch to install (default is "testnet3")
read -p "Enter the branch to install (default: testnet3): " BRANCH
BRANCH=${BRANCH:-testnet3}
# Prompt the user for the branch to install (default is "mainnet")
read -p "Enter the branch to install (default: mainnet): " BRANCH
BRANCH=${BRANCH:-mainnet}

# Determine the number of AWS EC2 instances by checking ~/.ssh/config
NODE_ID=0
Expand Down Expand Up @@ -50,7 +50,7 @@ EOF
}

# Loop through aws-n nodes and run installations in parallel
for NODE_ID in $(seq 0 $NUM_INSTANCES); do
for NODE_ID in $(seq 0 $(($NUM_INSTANCES - 1))); do
run_installation $NODE_ID $BRANCH &
done

Expand Down
8 changes: 4 additions & 4 deletions .devnet/reinstall.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# Prompt the user for the branch to install (default is "testnet3")
read -p "Enter the branch to install (default: testnet3): " BRANCH
BRANCH=${BRANCH:-testnet3}
# Prompt the user for the branch to install (default is "mainnet")
read -p "Enter the branch to install (default: mainnet): " BRANCH
BRANCH=${BRANCH:-mainnet}

# Determine the number of AWS EC2 instances by checking ~/.ssh/config
NODE_ID=0
Expand Down Expand Up @@ -54,7 +54,7 @@ EOF
}

# Loop through aws-n nodes and run installations in parallel
for NODE_ID in $(seq 0 $NUM_INSTANCES); do
for NODE_ID in $(seq 0 $(($NUM_INSTANCES - 1))); do
run_installation $NODE_ID $BRANCH &
done

Expand Down
4 changes: 2 additions & 2 deletions .devnet/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ start_snarkos_in_tmux() {
tmux new-session -d -s snarkos-session

# Send the snarkOS start command to the tmux session with the NODE_ID
tmux send-keys -t "snarkos-session" "snarkos start --nodisplay --bft 0.0.0.0:5000 --rest 0.0.0.0:3033 --peers $NODE_IP:4133 --validators $NODE_IP:5000 --verbosity $VERBOSITY --dev $NODE_ID --dev-num-validators $NUM_INSTANCES --validator --metrics" C-m
tmux send-keys -t "snarkos-session" "snarkos start --nodisplay --bft 0.0.0.0:5000 --rest 0.0.0.0:3030 --peers $NODE_IP:4130 --validators $NODE_IP:5000 --rest-rps 1000 --verbosity $VERBOSITY --dev $NODE_ID --dev-num-validators $NUM_INSTANCES --validator --metrics" C-m

exit # Exit root user
EOF
Expand All @@ -51,7 +51,7 @@ EOF
}

# Loop through aws-n nodes and start snarkOS in tmux sessions in parallel
for NODE_ID in $(seq 0 $NUM_INSTANCES); do
for NODE_ID in $(seq 0 $(($NUM_INSTANCES - 1))); do
start_snarkos_in_tmux $NODE_ID "$NODE_0_IP" &
done

Expand Down
2 changes: 1 addition & 1 deletion .devnet/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOF
}

# Loop through aws-n nodes and terminate tmux sessions in parallel
for NODE_ID in $(seq 0 $NUM_INSTANCES); do
for NODE_ID in $(seq 0 $(($NUM_INSTANCES - 1))); do
terminate_tmux_session $NODE_ID &
done

Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ updates:
schedule:
interval: daily
time: "10:00"
target-branch: "testnet3"
target-branch: "mainnet"
open-pull-requests-limit: 10
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ jobs:
mkdir tempdir
mv target/release/snarkos tempdir
cd tempdir
zip -r aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip snarkos
zip -r aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip snarkos
cd ..
mv tempdir/aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip .
mv tempdir/aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip .

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip
aleo-${{ steps.get_version.outputs.version }}-x86_64-unknown-linux-gnu.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -75,16 +75,16 @@ jobs:
mkdir tempdir
mv target/release/snarkos tempdir
cd tempdir
zip -r aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip snarkos
zip -r aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip snarkos
cd ..
mv tempdir/aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip .
mv tempdir/aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip .

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip
aleo-${{ steps.get_version.outputs.version }}-x86_64-apple-darwin.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -122,13 +122,13 @@ jobs:

- name: Zip
run: |
Compress-Archive target/release/snarkos.exe aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip
Compress-Archive target/release/snarkos.exe aleo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
aleo-testnet1-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip
aleo-${{ steps.get_version.outputs.version }}-x86_64-pc-windows-msvc.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .integration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ mod tests {
store::helpers::memory::ConsensusMemory,
FromBytes,
Ledger,
MainnetV0,
Network,
Testnet3,
};

use tracing_test::traced_test;

type CurrentNetwork = Testnet3;
type CurrentNetwork = MainnetV0;

const TEST_BASE_URL: &str = "https://testnet3.blocks.aleo.org/phase3";

Expand Down
Loading