Commit Graph

17040 Commits

Author SHA1 Message Date
Tyera Eulberg 422a095647
Add (preflight) simulation to BanksClient (#22084)
* Add more-legitimate conversion from legacy Transaction to SanitizedTransaction

* Add Banks method with preflight checks

* Expose BanksClient method with preflight checks

* Unwrap simulation err

* Add Bank simulation method that works on unfrozen Banks

* Add simpler api

* Better name: BanksTransactionResultWithSimulation
2021-12-28 19:25:46 +00:00
Okcan Yasin Saygılı e61a736d44
Revert host
Revert host
2021-12-28 18:22:20 +03:00
Okcan Yasin Saygılı f2c51653e4
Update init
As know that hostname was changed
2021-12-28 17:35:45 +03:00
Brooks Prumo e3b20c443a
Use load_accounts_data_len() instead of Atomic .load() (#22144) 2021-12-28 13:38:20 +00:00
Brooks Prumo 800472ddf5
Add AccountsDataMeter to InvokeContext (#21813) 2021-12-28 05:14:48 -06:00
axleiro e1a0660948
stopped explorer_preview.yml
after connecting the repo to the vercel we have to specify root directory in vercel setting
2021-12-28 11:38:54 +05:30
Alexander Meißner a06646631c
Feature: TransactionContext, InstructionContext and BorrowedAccount (#21706)
* Adds TransactionContext, InstructionContext and BorrowedAccount.

* Redirects the usage of accounts in InvokeContext through TransactionContext.
Also use the types declared in transaction_context.rs everywhere.

* Adjusts all affected tests.
2021-12-27 18:49:32 +01:00
dependabot[bot] bb97c8fdcd
Bump zstd from 0.9.0+zstd.1.5.0 to 0.9.1+zstd.1.5.1 (#22105)
* Bump zstd from 0.9.0+zstd.1.5.0 to 0.9.1+zstd.1.5.1

Bumps [zstd](https://github.com/gyscos/zstd-rs) from 0.9.0+zstd.1.5.0 to 0.9.1+zstd.1.5.1.
- [Release notes](https://github.com/gyscos/zstd-rs/releases)
- [Commits](https://github.com/gyscos/zstd-rs/compare/0.9.0...0.9.1)

---
updated-dependencies:
- dependency-name: zstd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-12-25 21:26:55 -07:00
Samuel Oloruntoba f643a8b425
docs: fix typo (#22116) 2021-12-25 21:12:06 -07:00
Kirill Fomichev 0a0fc85282 Add PubsubClient::vote_subscribe 2021-12-25 13:21:05 -08:00
dependabot[bot] 77b26b62e0
Bump anyhow from 1.0.51 to 1.0.52 (#22106)
* Bump anyhow from 1.0.51 to 1.0.52

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.51...1.0.52)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-12-25 12:22:57 -07:00
Alexander Meißner cc947cad03
Refactor: CPI Instruction Recording (#22111)
* Unifies all InstructionRecorders of a transaction into one.

* Stops explicitly compiling CPI instructions for recording,
uses the indices gathered from instruction_accounts instead.
2021-12-25 13:35:43 +01:00
Alexander Meißner 60ddd93d09
Cleanup: invoke_context.rs (#22107)
* Removes message::Message from invoke_context.rs completely.

* Simplifies sol_invoke_signed() of program-test

* Start search for non program accounts at front (instead of the back).
Program and programdata accounts use rposition(), everything else uses position().
2021-12-25 10:00:40 +01:00
Yueh-Hsuan Chiang b89cd8cd1a
Avoid cloning Vec<Entry> when calling entries_to_test_shreds() (#22093) 2021-12-24 12:32:43 -08:00
Alexander Meißner 2ab4f34c02
Refactor: Remove `Message` and `CompiledInstruction` from `InvokeContext` interfaces (#22102)
* Introduces InstructionAccount which is like AccountMeta but uses an index instead of a Pubkey

* Renames InvokeContext::create_message() to InvokeContext::prepare_instruction()

* Removes Message and CompiledInstruction from InvokeContext interfaces.

* Resolves TODOs of sol_invoke_signed() in program-test.

* Moves CompiledInstruction::visit_each_account() into invoke_context.rs
2021-12-24 16:17:55 +01:00
Jon Cinque 214b561a28
banks-client: Update return type to `BanksClientError` (#22058) 2021-12-24 09:44:19 -05:00
Justin Starry ec7536faf6
Add test to enforce that program id account info for CPI is optional (#22069)
* Update tests to demonstrate that program id account info for CPI is optional

* Clean up comments that say that program id account info is required
2021-12-24 00:43:15 +01:00
Trent Nelson b93ab5d295 validator: add contact-info query to admin port 2021-12-23 20:50:21 +00:00
Ryan Laursen d06c04d02c Update checks.rs 2021-12-23 05:14:37 -08:00
Ryan Laursen 52c1eb0160 Remove msg spam from deploying 2021-12-23 05:14:37 -08:00
Justin Starry 93c776ce19
Refactor packet deduplication and harden bench test (#22080) 2021-12-22 23:05:10 -06:00
Will Hickey f10407dbc3
Update release documentation (#22086) 2021-12-22 22:51:32 -06:00
Dmitri Makarov 298c2d0f62
Display bpf-tools version in cargo-build-bpf version string (#22061)
* Display bpf-tools version in cargo-build-bpf version string

* Print cargo-build-bpf version in CI for reference in stable-bpf jobs
2021-12-22 23:10:25 +00:00
splintred 67c8034fe5
Update jsonrpc-api.md to document 'owner' property (#22074)
* Update jsonrpc-api.md to document 'owner' property

Documents 'owner' property on the token balances struct.

* Update docs/src/developing/clients/jsonrpc-api.md

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
2021-12-22 21:48:27 +00:00
Tao Zhu dd80a525ef
Leader QoS service metrics (#21708)
* - qos_service metrics tagged with leader thread ids to separate gossip/tpu votes and transactions;
- qos_service metrics is reported with bank slot;
- replaced timer-based reporting with signal via channel; removed async report test as qos_service now lives within a thread

* - add tpu live packets (eg, not buffered packets) states to qos metrics reporting
2021-12-22 21:39:59 +00:00
Jeff Washington (jwash) 2be139ca61
Disk Buckets: cleanup api (is_free) (#22068) 2021-12-22 15:12:34 -06:00
carllin 37f6777ceb
Increment execution timings on errors as well (#22053) 2021-12-22 15:07:07 -05:00
behzad nouri f67ecd5c18
removes unused Cargo dependencies (#22022)
Also moving some to [dev-dependencies] so that they are not propagated
to other packages which depend on the package.
2021-12-22 17:01:33 +00:00
Jeff Washington (jwash) 61cc7b10a9
AcctIdx: respect disk idx mem size param (#22050) 2021-12-22 09:54:05 -06:00
behzad nouri 4d62f03297
uses enum instead of trait for VoteTransaction (#22019)
Box<dyn Trait> involves runtime dispatch, has significant overhead and
is slow. It also requires hacky boilerplate code for implementing Clone
or other basic traits:
https://github.com/solana-labs/solana/blob/e92a81b74/programs/vote/src/vote_state/mod.rs#L70-L102

Only limited known types can be VoteTransaction and they are all defined
in the same crate. So using a trait here only adds overhead.
https://github.com/solana-labs/solana/blob/e92a81b74/programs/vote/src/vote_state/mod.rs#L125-L165
https://github.com/solana-labs/solana/blob/e92a81b74/programs/vote/src/vote_state/mod.rs#L221-L264
2021-12-22 14:25:46 +00:00
Lijun Wang d6de4a2f4e
Fix transaction pk violation (#22057)
* Handle PK violation issue for transaction notification. The transaction might be replayed due to
validator restart.
2021-12-22 00:58:51 -08:00
Yueh-Hsuan Chiang bf8fbf8383
Add code comment for handle_chaining in blockstore.rs (#21876) 2021-12-21 22:36:24 -08:00
Yueh-Hsuan Chiang 3155a04189
Add comment block for insert_shreds_handle_duplicate in blockstore.rs (#21877) 2021-12-21 22:36:13 -08:00
dependabot[bot] ddde356b33
bump tarpc from 0.26.2 to 0.27.2 and add BanksClientError (#21739)
* chore: bump tarpc from 0.26.2 to 0.27.2

Bumps [tarpc](https://github.com/google/tarpc) from 0.26.2 to 0.27.2.
- [Release notes](https://github.com/google/tarpc/releases)
- [Changelog](https://github.com/google/tarpc/blob/master/RELEASES.md)
- [Commits](https://github.com/google/tarpc/commits)

---
updated-dependencies:
- dependency-name: tarpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

* Accommodate breaking changes

* Reword incorrect error message

* Add error module

* Revert client Error type to io::Error; easy transition to BanksClientError

* Bump tracing crates in programs

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2021-12-22 02:31:02 +00:00
Dmitri Makarov 7cc6262b5a Bump bpf-tools to v1.21 2021-12-21 16:40:42 -08:00
Jeff Washington (jwash) bdae2993e0
AcctIdx: hold ranges in memory uses multiple threads (#22031) 2021-12-21 17:31:48 -06:00
Jeff Washington (jwash) 5b464a32f5
Disk Buckets: unlock verifies expected (#22052) 2021-12-21 16:35:59 -06:00
Tao Zhu 9c5d82557a skip reporting all-zero stats 2021-12-21 16:20:36 -06:00
Jeff Washington (jwash) 1c0cd2cbb4
DiskBuckets: remove unnecessary atomic on uid (#22039) 2021-12-21 15:50:39 -06:00
Jeff Washington (jwash) b36f7151fc
Disk buckets: abstract UID_UNLOCKED (#22051) 2021-12-21 14:51:38 -06:00
Jeff Washington (jwash) 711856cad3
disk buckets: clone_from_slice -> copy_from_slice (#22038) 2021-12-21 13:52:03 -06:00
Jeff Washington (jwash) 84eaaae062
disk_buckets: factor out unsafe code (#22028) 2021-12-21 13:50:04 -06:00
Michael Vines d896ff74ec Remove Apple M1 resolver workaround 2021-12-21 08:30:36 -08:00
Alexander Meißner ba8e15848e
Fix #21986 (#22035)
* Partial revert "Updates documentation around what needs to be passed in CPI. (#21633)"

* Enforces the program_id being passed explicitly by removing it from get_instruction_keyed_accounts().

* instruction_accounts => instructions_account
2021-12-21 12:53:22 +01:00
dependabot[bot] 41ec7c8be9
chore: bump num_cpus from 1.13.0 to 1.13.1 (#22044)
* chore: bump num_cpus from 1.13.0 to 1.13.1

Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: num_cpus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-12-21 00:06:14 -07:00
AMAN VERMA 252b0554ca
docs: corrected the grammar (#22046) 2021-12-21 06:50:36 +00:00
dependabot[bot] 69d0b08dd8
chore: bump lru from 0.7.0 to 0.7.1 (#22018)
Bumps [lru](https://github.com/jeromefroe/lru-rs) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/jeromefroe/lru-rs/releases)
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.7.0...0.7.1)

---
updated-dependencies:
- dependency-name: lru
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-20 21:56:56 -07:00
dependabot[bot] 3356c6afb2
chore: bump signal-hook from 0.3.12 to 0.3.13 (#22037)
Bumps [signal-hook](https://github.com/vorner/signal-hook) from 0.3.12 to 0.3.13.
- [Release notes](https://github.com/vorner/signal-hook/releases)
- [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/signal-hook/compare/v0.3.12...v0.3.13)

---
updated-dependencies:
- dependency-name: signal-hook
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-20 21:40:16 -07:00
Lijun Wang 2347f65133
The sidebar for the plugin doc is showing the item as "Overview", corrected the styles (#22033) 2021-12-20 17:26:43 -08:00
dependabot[bot] 755e816521
chore: bump bytemuck from 1.7.2 to 1.7.3 (#22032)
* chore: bump bytemuck from 1.7.2 to 1.7.3

Bumps [bytemuck](https://github.com/Lokathor/bytemuck) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/Lokathor/bytemuck/releases)
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2021-12-20 16:34:55 -07:00