Commit Graph

17117 Commits

Author SHA1 Message Date
Justin Starry 45458e7139
Refactor: Improve type safety and readability of transaction execution (#22215)
* Refactor Bank::load_and_execute_transactions

* Refactor: improve type safety of TransactionExecutionResult

* Add enum for extra type safety in execution results

* feedback
2022-01-05 10:15:15 +08:00
Yueh-Hsuan Chiang e201b41341
Avoid shred generation in ledger_cleanup.rs (#22091) 2022-01-04 15:29:43 -10:00
joeaba af7a2e3daa
Update metrics subdomain 2022-01-04 20:14:41 -05:00
Justin Starry 9725f2e319
docs: Fix typo in proposal (#22282) 2022-01-04 22:11:51 +00:00
Michael Vines 212e6ea4a4 Remove obsolete M1 setup information 2022-01-04 21:14:13 +00:00
behzad nouri 379feecae5 patches bug in recv_mmsg when npkts != nrecv
If recv_mmsg receives 2 packets where the first one is filtered out,
then it returns npkts == 1:
https://github.com/solana-labs/solana/blob/01a096adc/streamer/src/recvmmsg.rs#L104-L115

But then streamer::packet::recv_from will erroneously keep the 1st
packet and drop the 2nd one:
https://github.com/solana-labs/solana/blob/01a096adc/streamer/src/packet.rs#L34-L49

To avoid this bug, this commit updates recv_mmsg to always return total
number of received packets. If socket address cannot be correctly
obtained, it is left as the default value which is UNSPECIFIED:
https://github.com/solana-labs/solana/blob/01a096adc/sdk/src/packet.rs#L145
2022-01-04 21:06:59 +00:00
behzad nouri 4b24499916 removes total-size from return value of recv_mmsg 2022-01-04 21:06:59 +00:00
dependabot[bot] 6c65734330
Bump hidapi from 1.3.0 to 1.3.2 (#22265)
* Bump hidapi from 1.3.0 to 1.3.2

Bumps [hidapi](https://github.com/ruabmbua/hidapi-rs) from 1.3.0 to 1.3.2.
- [Release notes](https://github.com/ruabmbua/hidapi-rs/releases)
- [Commits](https://github.com/ruabmbua/hidapi-rs/commits)

---
updated-dependencies:
- dependency-name: hidapi
  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>
2022-01-04 10:47:58 -07:00
Brooks Prumo 1460f00e0f
Consume from AccountsDataMeter (#21994) 2022-01-04 10:00:21 -06:00
behzad nouri 01a096adc8 adds bitflags to Packet.Meta
Instead of a separate bool type for each flag, all the flags can be
encoded in a type-safe bitflags encoded in a single u8:
https://github.com/solana-labs/solana/blob/d6ec103be/sdk/src/packet.rs#L19-L31
2022-01-04 13:53:40 +00:00
behzad nouri 73a7741c49 uses std::net::IpAddr type for Packet.Meta.addr 2022-01-04 13:53:40 +00:00
behzad nouri aa9f7ed7e8 removes seed and slot fields from Packet.Meta
507367e6ac
updated window-service to send shreds (as opposed to packets) to
retransmit-stage and so seed and slot fields in Packet.Meta are unused:
https://github.com/solana-labs/solana/blob/d6ec103be/sdk/src/packet.rs#L27-L28
2022-01-04 13:53:40 +00:00
sakridge 2486e21ffe
Lower vote-only-mode to 400 (#22210) 2022-01-04 12:49:14 +01:00
Justin Starry ca5591bfa0
Updates to the address lookup table proposal (#22269) 2022-01-04 11:35:20 +00:00
glihm 9665da9d0b
Documentation typos (#22262)
* Fix typo markdown link

* Add missing punctuation full stop
2022-01-04 18:49:14 +08:00
Jeff Biseda ca8fef5855
retransmit consecutive leader blocks (#22157) 2022-01-04 00:24:16 -08:00
Justin Starry 2b5e00d36d
Limit number of accounts that a transaction can lock (#22201) 2022-01-04 14:25:23 +08:00
Victor Pontis 8b6310b179 fix: add owner to token balance type 2022-01-03 20:31:42 -08:00
Yueh-Hsuan Chiang e8b7f96a89
Add struct BlockstoreOptions (#22121) 2022-01-03 18:30:45 -10:00
Victor Pontis 33ad74fbcd chore: add encoding param to getMultipleAccounts 2022-01-03 19:26:03 -08:00
Michael Vines 6895eb7ef6 Correctly set CI_COMMIT when Buildkite provides HEAD instead of a real commit 2022-01-03 17:39:20 -08:00
Michael Vines 25cb859ed0 Switch from arm64-apple-darwin to aarch64-apple-darwin to align with Rust's target names 2022-01-03 16:54:46 -08:00
Lijun Wang 5b6027bef0
Fixed issue #22124 -- missing historical data if slot updated later. (#22193)
* Fixed issue #22124 -- missing historical data if slot updated later.

* Fixed a couple of comments
2022-01-03 16:10:44 -08:00
Michael Vines ed0b47c6f8 Use experimential docker virtualization framework for arm64 2022-01-03 15:57:06 -08:00
steviez 20b61e28b6
Flip iter operations to keep associated address/header/packets together (#22245)
Flip iter operations to keep associated address/header/packets together

Before this change, if cast_socket_addr() returned a None for any
address/header pair, the subsequent zip() would misalign the
address/header pair and packet. So, this change zips all three together,
then does filter_map() so keep things aligned.

Additionally, compute total_size inline to avoid running through packets
a second time.
2022-01-03 17:15:50 -06:00
Alexander Meißner 73e6038986
Refactor: Remove `KeyedAccount` from program runtime (#22226)
* Makes error handling in BorrowedAccount optional.
Adds BorrowedAccount ::get_rent_epoch().
Exposes InstructionContext::get_index_in_transaction().
Turns accounts and account_keys into pinned boxed slices.

* Introduces "unsafe" to InvokeContext::push().

* Turns &TransactionContext into &mut TransactionContext in InvokeContext.

* Push and pop InstructionContext in InvokeContext.
Makes test_process_cross_program and test_native_invoke symmetric.
Removes the borrow check from test_invoke_context_verify.

* Removes keyed_accounts from prepare_instruction()

* Removes usage of invoke_stack.

* Removes keyed_accounts from program-test.

* Removes caller_write_privileges.

* Removes keyed_accounts from BPF parameter (de-)serialization.
2022-01-03 23:30:56 +01:00
dependabot[bot] 672fed04cb
Bump serde from 1.0.132 to 1.0.133 (#22233)
* Bump serde from 1.0.132 to 1.0.133

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.132 to 1.0.133.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.132...v1.0.133)

---
updated-dependencies:
- dependency-name: serde
  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>
2022-01-03 22:19:39 +00:00
carllin 005592998d
Fix bug, add error specific timings (#22225) 2022-01-03 16:33:54 -05:00
behzad nouri 69d71f8f86
removes epoch_authorized_voters from VoteTracker (#22192)
https://github.com/solana-labs/solana/pull/22169
verifies authorized-voter early on in vote-listener pipeline; and so
VoteTracker no longer needs to maintain and check for epoch authorized
voters.
2022-01-03 21:07:47 +00:00
Michael Vines b18462737e Correctly set CI_OS_NAME for macOs buildkite agents 2022-01-03 12:54:05 -08:00
Michael Vines 53777f2fbf Add support for arm64-apple-darwin release/channel artifacts 2022-01-03 12:42:57 -08:00
Justin Starry bbe5b66324
Prevent lookup tables from being closed during deactivation slot (#22221) 2022-01-04 04:42:29 +08:00
Jeff Biseda 0e4ede46d1
work around rust 39364 for stats_reporter_sender (#22227) 2022-01-03 11:46:02 -08:00
Tyera Eulberg 9029b46570
Fix token-balance owner type in docs (#22240) 2022-01-03 18:00:13 +00:00
dependabot[bot] ecbfc70bfa
Bump serde_json from 1.0.73 to 1.0.74 (#22231)
* Bump serde_json from 1.0.73 to 1.0.74

Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.73 to 1.0.74.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.74)

---
updated-dependencies:
- dependency-name: serde_json
  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>
2022-01-03 10:36:59 -07:00
Michael Vines 56fd32bda2 Remove Xargo.toml reference 2022-01-03 17:12:45 +00:00
Brooks Prumo 04b76eb066
Use AtomicUsize for next_bucket_to_flush (#22095) 2022-01-03 10:35:35 -06:00
Jeff Washington (jwash) fb62407232
AcctIdx: appendvecid: u32 (#21842) 2022-01-03 10:35:17 -06:00
Justin Starry 2a00382d71
Refactor: cleanup solana_transaction_status crate (#22230) 2022-01-03 15:45:18 +00:00
axleiro 86acd8f6f9
Update .gitignore 2022-01-03 19:30:09 +05:30
joeaba 64b153fae0
connected github with vercel for preview deploy 2022-01-03 19:20:36 +05:30
Justin Starry ce6c76e45f
Remove unused serialization attributes from transaction status types (#22228) 2022-01-03 16:20:57 +08:00
Alexander Meißner d6ec103bee
Bump rbpf to v0.2.21 (#22216) 2022-01-01 20:22:48 +00:00
Tao Zhu a2a7e91ad6 set secp256k1 cost similar to sigverify 2021-12-31 17:45:50 -06:00
Tao Zhu d743c2917c re-calibrate limit based on mainnet data, see issue #21917 2021-12-31 17:45:50 -06:00
Tyera Eulberg 0b1b36f088
Exit early on BigTable error (#22200) 2021-12-31 13:36:57 -07:00
Alexander Meißner 8a43e2d889
Bump solana_rbpf to version v0.2.20 (#22164) 2021-12-31 19:50:45 +01:00
Alexander Meißner e529d03c11
Cleanup #22182 (#22205)
* Turns compute_units_consumed of ProcessInstructionResult into a &mut parameter.

* Removes second nesting level from test_process_instruction_compute_budget().

* Makes test_process_cross_program and test_native_invoke symmetric.

* Unifies test_process_cross_program(), test_native_invoke() and test_process_instruction_compute_budget() into test_process_instruction().
2021-12-31 17:55:27 +01:00
Yueh-Hsuan Chiang 557d35ec79
Remove duplicate code in ledger_cleanup_compaction_test (#22204) 2021-12-31 11:19:33 -05:00
Yueh-Hsuan Chiang 94a9b712b6
Fix check failure on (#22202) 2021-12-30 23:48:26 -10:00