Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/web3.js/noble/secp…
Browse files Browse the repository at this point in the history
…256k1-1.7.1
  • Loading branch information
steveluscher authored Jan 31, 2023
2 parents e628e56 + 6489c20 commit 29a7b40
Show file tree
Hide file tree
Showing 254 changed files with 14,067 additions and 7,999 deletions.
25 changes: 0 additions & 25 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ pull_request_rules:
- status-success=ci-gate
- label=automerge
- label!=no-automerge
- author≠@dont-squash-my-commits
- or:
# only require docs checks if docs files changed
- -files~=^docs/
Expand All @@ -56,30 +55,6 @@ pull_request_rules:
actions:
merge:
method: squash
# Join the dont-squash-my-commits group if you won't like your commits squashed
- name: automatic merge (rebase) on CI success
conditions:
- and:
- status-success=buildkite/solana
- status-success=ci-gate
- label=automerge
- label!=no-automerge
- author=@dont-squash-my-commits
- or:
# only require docs checks if docs files changed
- -files~=^docs/
- status-success=build & deploy docs
- or:
# only require explorer checks if explorer files changed
- status-success=check-explorer
- -files~=^explorer/
- or:
# only require web3 checks if web3.js files changed
- status-success=all-web3-checks
- -files~=^web3.js/
actions:
merge:
method: rebase
- name: remove automerge label on CI failure
conditions:
- label=automerge
Expand Down
37 changes: 36 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,41 @@ of the direction" suddenly has the appearance of "I approve of these changes."
Instead, add a comment that mentions the usernames that you would like a review
from. Ask explicitly what you would like feedback on.

## Crate Creation

If your PR includes a new crate, you must publish its v0.0.1 version
before the PR can be merged. Here are the steps:

* Create a sub-directory for your new crate.
* Under the newly-created directory, create a Cargo.toml file. Below is an
example template:

```
[package]
name = "solana-<PACKAGE_NAME>"
version = "0.0.1"
description = "<DESCRIPTION>"
authors = ["Solana Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
homepage = "https://solana.com/"
documentation = "https://docs.rs/solana-<PACKAGE_NAME>"
license = "Apache-2.0"
edition = "2021"
```

* Submit the PR for initial review. You should see the crate-check CI
job fails because the newly created crate is not yet published.

* Once all review feedback has been addressed, publish v0.0.1 of the crate
under your personal crates.io account, and then transfer the crate ownership
to solana-grimes.
https://crates.io/policies#package-ownership

* After successful publication, update the PR by replacing the v0.0.1 version
number with the correct version. At this time you should see the crate-check
CI job passes, and your published crate should be available under
https://crates.io/crates/.

## Rust coding conventions

* All Rust code is formatted using the latest version of `rustfmt`. Once
Expand Down Expand Up @@ -258,4 +293,4 @@ Current design proposals may be viewed on the docs site:
1. [Accepted Proposals](https://docs.solana.com/proposals/accepted-design-proposals)
2. [Implemented Proposals](https://docs.solana.com/implemented-proposals/implemented-proposals)

New design proposals should follow this guide on [how to submit a design proposal](./docs/src/proposals.md#submit-a-design-proposal).
New design proposals should follow this guide on [how to submit a design proposal](./docs/src/proposals.md#submit-a-design-proposal).
75 changes: 75 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022 Solana Foundation.
Copyright 2023 Solana Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ send us that patch!

All claims, content, designs, algorithms, estimates, roadmaps,
specifications, and performance measurements described in this project
are done with the Solana Foundation's ("SF") good faith efforts. It is up to
are done with the Solana Labs, Inc. (“SL”) good faith efforts. It is up to
the reader to check and validate their accuracy and truthfulness.
Furthermore, nothing in this project constitutes a solicitation for
investment.

Any content produced by SF or developer resources that SF provides are
for educational and inspirational purposes only. SF does not encourage,
Any content produced by SL or developer resources that SL provides are
for educational and inspirational purposes only. SL does not encourage,
induce or sanction the deployment, integration or use of any such
applications (including the code comprising the Solana blockchain
protocol) in violation of applicable laws or regulations and hereby
Expand All @@ -136,19 +136,10 @@ reader is or is working on behalf of a Specially Designated National
(SDN) or a person subject to similar blocking or denied party
prohibitions.

The reader should be aware that U.S. export control and sanctions laws
prohibit U.S. persons (and other persons that are subject to such laws)
from transacting with persons in certain countries and territories or
that are on the SDN list. As a project-based primarily on open-source
software, it is possible that such sanctioned persons may nevertheless
bypass prohibitions, obtain the code comprising the Solana blockchain
protocol (or other project code or applications) and deploy, integrate,
or otherwise use it. Accordingly, there is a risk to individuals that
other persons using the Solana blockchain protocol may be sanctioned
persons and that transactions with such persons would be a violation of
U.S. export controls and sanctions law. This risk applies to
individuals, organizations, and other ecosystem participants that
deploy, integrate, or use the Solana blockchain protocol code directly
(e.g., as a node operator), and individuals that transact on the Solana
blockchain through light clients, third party interfaces, and/or wallet
software.
The reader should be aware that U.S. export control and sanctions laws prohibit
U.S. persons (and other persons that are subject to such laws) from transacting
with persons in certain countries and territories or that are on the SDN list.
Accordingly, there is a risk to individuals that other persons using any of the
code contained in this repo, or a derivation thereof, may be sanctioned persons
and that transactions with such persons would be a violation of U.S. export
controls and sanctions law.
40 changes: 30 additions & 10 deletions banking-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ use {
rand::{thread_rng, Rng},
rayon::prelude::*,
solana_client::connection_cache::ConnectionCache,
solana_core::banking_stage::BankingStage,
solana_core::{
banking_stage::BankingStage,
banking_trace::{BankingPacketBatch, BankingTracer, BANKING_TRACE_DIR_DEFAULT_BYTE_LIMIT},
},
solana_gossip::cluster_info::{ClusterInfo, Node},
solana_ledger::{
blockstore::Blockstore,
Expand Down Expand Up @@ -255,6 +258,12 @@ fn main() {
.takes_value(false)
.help("Skip transaction sanity execution"),
)
.arg(
Arg::new("trace_banking")
.long("trace-banking")
.takes_value(false)
.help("Enable banking tracing"),
)
.arg(
Arg::new("write_lock_contention")
.long("write-lock-contention")
Expand Down Expand Up @@ -407,14 +416,22 @@ fn main() {
let leader_schedule_cache = Arc::new(LeaderScheduleCache::new_from_bank(&bank));
let (exit, poh_recorder, poh_service, signal_receiver) =
create_test_recorder(&bank, &blockstore, None, Some(leader_schedule_cache));
let (non_vote_sender, non_vote_receiver) = unbounded();
let (tpu_vote_sender, tpu_vote_receiver) = unbounded();
let (gossip_vote_sender, gossip_vote_receiver) = unbounded();
let cluster_info = ClusterInfo::new(
Node::new_localhost().info,
Arc::new(Keypair::new()),
SocketAddrSpace::Unspecified,
);
let (banking_tracer, tracer_thread) =
BankingTracer::new(matches.is_present("trace_banking").then_some((
&blockstore.banking_trace_path(),
exit.clone(),
BANKING_TRACE_DIR_DEFAULT_BYTE_LIMIT,
)))
.unwrap();
let (non_vote_sender, non_vote_receiver) = banking_tracer.create_channel_non_vote();
let (tpu_vote_sender, tpu_vote_receiver) = banking_tracer.create_channel_tpu_vote();
let (gossip_vote_sender, gossip_vote_receiver) =
banking_tracer.create_channel_gossip_vote();
let cluster_info = {
let keypair = Arc::new(Keypair::new());
let node = Node::new_localhost_with_pubkey(&keypair.pubkey());
ClusterInfo::new(node.info, keypair, SocketAddrSpace::Unspecified)
};
let cluster_info = Arc::new(cluster_info);
let tpu_use_quic = matches.is_present("tpu_use_quic");
let connection_cache = match tpu_use_quic {
Expand Down Expand Up @@ -462,7 +479,7 @@ fn main() {
timestamp(),
);
non_vote_sender
.send((vec![packet_batch.clone()], None))
.send(BankingPacketBatch::new((vec![packet_batch.clone()], None)))
.unwrap();
}

Expand Down Expand Up @@ -583,6 +600,9 @@ fn main() {
poh_service.join().unwrap();
sleep(Duration::from_secs(1));
debug!("waited for poh_service");
if let Some(tracer_thread) = tracer_thread {
tracer_thread.join().unwrap().unwrap();
}
}
let _unused = Blockstore::destroy(&ledger_path);
}
8 changes: 7 additions & 1 deletion ci/buildkite-pipeline-in-disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ cd "$(dirname "$0")"/..
output_file=${1:-/dev/stderr}

if [[ -n $CI_PULL_REQUEST ]]; then
IFS=':' read -ra affected_files <<< "$(buildkite-agent meta-data get affected_files)"
# filter pr number from ci branch.
[[ $CI_BRANCH =~ pull/([0-9]+)/head ]]
pr_number=${BASH_REMATCH[1]}
echo "get affected files from PR: $pr_number"

# get affected files
readarray -t affected_files < <(gh pr diff --name-only "$pr_number")
if [[ ${#affected_files[*]} -eq 0 ]]; then
echo "Unable to determine the files affected by this PR"
exit 1
Expand Down
8 changes: 7 additions & 1 deletion ci/buildkite-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ cd "$(dirname "$0")"/..
output_file=${1:-/dev/stderr}

if [[ -n $CI_PULL_REQUEST ]]; then
IFS=':' read -ra affected_files <<< "$(buildkite-agent meta-data get affected_files)"
# filter pr number from ci branch.
[[ $CI_BRANCH =~ pull/([0-9]+)/head ]]
pr_number=${BASH_REMATCH[1]}
echo "get affected files from PR: $pr_number"

# get affected files
readarray -t affected_files < <(gh pr diff --name-only "$pr_number")
if [[ ${#affected_files[*]} -eq 0 ]]; then
echo "Unable to determine the files affected by this PR"
exit 1
Expand Down
8 changes: 7 additions & 1 deletion ci/buildkite-solana-private.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ cd "$(dirname "$0")"/..
output_file=${1:-/dev/stderr}

if [[ -n $CI_PULL_REQUEST ]]; then
IFS=':' read -ra affected_files <<< "$(buildkite-agent meta-data get affected_files)"
# filter pr number from ci branch.
[[ $CI_BRANCH =~ pull/([0-9]+)/head ]]
pr_number=${BASH_REMATCH[1]}
echo "get affected files from PR: $pr_number"

# get affected files
readarray -t affected_files < <(gh pr diff --name-only "$pr_number")
if [[ ${#affected_files[*]} -eq 0 ]]; then
echo "Unable to determine the files affected by this PR"
exit 1
Expand Down
Loading

0 comments on commit 29a7b40

Please sign in to comment.