Commit Graph

929 Commits

Author SHA1 Message Date
Jack May 8d362f682b
The constraints on compute power a program can consume is limited only to its instruction count (#11717) 2020-08-21 15:31:19 -07:00
Tyera Eulberg 2fd2aceeb2
Bump spl-token to clean up magic number (#11726) 2020-08-20 09:51:12 -06:00
Michael Vines b5f3ced860 Add base64 (binary64) encoding for getConfirmedTransaction/getConfirmedBlock 2020-08-17 17:26:29 -07:00
Jack May 7c736f71fe
Make BPF Loader static (#11516) 2020-08-14 12:32:45 -07:00
dependabot[bot] 191a2eb088 chore: bump indexmap from 1.4.0 to 1.5.1
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.4.0 to 1.5.1.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.4.0...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-10 22:49:55 -07:00
Tyera Eulberg 88ca04dbdb
Add config param to specify offset/length for single and program account info (#11515)
* Add config param to specify dataSlice for account info and program accounts

* Use match instead of if
2020-08-10 22:35:29 +00:00
Tyera Eulberg a9f76862fb
Decode native-program and sysvar accounts (#11463)
* Pass pubkey in to account-decoder for sysvars

* Decode sysvar accounts

* Decode config accounts; move validator-info lower

* Decode stake accounts

* Review comments

* Stringify any account lamports and epochs that can be set to u64::MAX
2020-08-09 07:50:45 +00:00
sakridge 068d23f298
Add Binary64 option for account data (#11474)
* Add Binary64 option for account data

* Decode into binary64

* Reword docs
2020-08-08 22:40:13 -07:00
Greg Fitzgerald edadd5d6d5
Remove Budget from CLI (#11451)
* Remove support for Budget

Also:
* Make "pay" command a deprecated alias for the "transfer" command

* chore: remove budget from web3.js

* Drop Budget depedency from core

Validators no longer ship with builtin Budget
2020-08-07 16:01:51 -06:00
carllin 7e25130529
Send votes from banking stage to vote listener (#11434)
*  Send votes from banking stage to vote listener

Co-authored-by: Carl <carl@solana.com>
2020-08-07 11:21:35 -07:00
Greg Fitzgerald bad486823c
Add a client for BankForks (#10728)
Also:
* Use BanksClient in solana-tokens
2020-08-07 08:45:17 -06:00
Michael Vines 175c0e611b Cargo.lock 2020-08-05 14:27:12 -07:00
Trent Nelson e12ab9d0dd Bump version to 1.4.0 2020-08-05 12:04:15 -06:00
carllin 5b4cb083f1
Add integration test for optimistic confirmation failure detection (#11353)
* Add optimistic conf failure test

* Add check for optimistic failure log

Co-authored-by: Carl <carl@solana.com>
2020-08-03 20:01:52 -07:00
Aaron Hill 8bcc8edf47 Remove calls to `unwrap()` in `respan!` macro
Previously, `proc_macro2::Span::resolved_at` was gated behind
cfg(procmacro2_semver_exempt). This gate has been removed in the latest
version of proc-macro2, allowing us to avoid using `unwrap()` to use the
underling method on `proc_macro::Span`
2020-08-02 19:15:06 -07:00
Michael Vines ffbd859c42 Update spl-token and spl-memo 2020-08-02 07:53:42 -07:00
Trent Nelson c421d7f1b8 Test that off-curve pubkeys fail signature verify 2020-07-31 14:21:03 -06:00
Tyera Eulberg 0f551d4f75
Decode token instructions (#11281)
* Token->SplToken

* Add spl_token instruction parsing

* Rebase on master

* Gracefully fail key len mismatches
2020-07-31 13:26:09 -06:00
Michael Vines c78e12a262 Avoid spl-sdk dependency, which inhibits crate publishing 2020-07-30 23:47:26 +00:00
Jack May 16ecce353f
Revert "Land program addresses on the curve (#11174)" (#11253)
This reverts commit f317c362a8.
2020-07-29 11:33:45 -07:00
Tyera Eulberg b45ac5d4db
Add SPL Token-specific rpc endpoints (#11231)
* Simplify account-decoder program ids + spl_token helper

* Spl program namespace version

* Add getTokenAccountBalance endpoint

* Remove token program id from getTokenAccountBalance request

* Add getTokenSupply endpoint

* Remove token program id from getTokenSupply request

* Add getTokenAccountsByOwner/Delegate endpoints

* Remove token program id from getTokenAccountsByOwner/Delegate requests

* Named parameter
2020-07-28 23:00:48 -06:00
Jack May f317c362a8
Land program addresses on the curve (#11174) 2020-07-27 10:45:59 -07:00
Michael Vines 6808a04abe Remove unmaintained btc programs 2020-07-25 06:04:07 +00:00
Tyera Eulberg 32fea0496e
Add token account decoding (#11136)
* Add token decoding

* Bump versions
2020-07-24 17:45:21 -06:00
Greg Fitzgerald 8ccce1e543
Upgrade ed25519-dalek (#11183) 2020-07-23 17:23:51 -06:00
Greg Fitzgerald 8b1b392be9
Remove move_loader and librapay (#11184)
* Remove move_loader and librapay

* Remove Embedding Move from implemented proposals

* Remove Move variant from CI

* Remove move_loader ID
2020-07-23 15:08:59 -06:00
dependabot[bot] 2e0fb37bfb Bump thiserror from 1.0.19 to 1.0.20
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.19 to 1.0.20.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.19...1.0.20)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-15 13:39:32 -07:00
dependabot[bot] 8548c3a7eb Bump humantime from 2.0.0 to 2.0.1
Bumps [humantime](https://github.com/tailhook/humantime) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/tailhook/humantime/releases)
- [Commits](https://github.com/tailhook/humantime/compare/v2.0.0...v2.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-15 08:27:33 -07:00
Aaron Hill 05445c718e Fix hygiene issues in `declare_program!` and `declare_loader!`
The `declare_program!` and `declare_loader!` macros both expand to
new macro definitions (based on the `$name` argument). These 'inner'
macros make use of the special `$crate` metavariable to access items in
the crate where the 'inner' macros is defined.

However, this only works due to a bug in rustc. When a macro is
expanded, all `$crate` tokens in its output are 'marked' as being
resolved in the defining crate of that macro. An inner macro (including
the body of its arms) is 'just' another set of tokens that appears in
the body of the outer macro, so any `$crate` identifiers used there are
resolved relative to the 'outer' macro.

For example, consider the following code:

```rust
macro_rules! outer {
    () => {
        macro_rules! inner {
            () => {
                $crate::Foo
            }
        }
    }
}
```

The path `$crate::Foo` will be resolved relative to the crate that defines `outer`,
**not** the crate which defines `inner`.

However, rustc currently loses this extra resolution information
(referred to as 'hygiene' information) when a crate is serialized.
In the above example, this means that the macro `inner` (which gets
defined in whatever crate invokes `outer!`) will behave differently
depending on which crate it is invoked from:

When `inner` is invoked from the same crate in which it is defined,
the hygiene information will still be available,
which will cause `$crate::Foo` to be resolved in the crate which defines 'outer'.

When `inner` is invoked from a different crate, it will be loaded from
the metadata of the crate which defines 'inner'. Since the hygiene
information is currently lost, rust will 'forget' that `$crate::Foo` is
supposed to be resolved in the context of 'outer'. Instead, it will be
resolved relative to the crate which defines 'inner', which can cause
incorrect code to compile.

This bug will soon be fixed in rust (see https://github.com/rust-lang/rust/pull/72121),
which will break `declare_program!` and `declare_loader!`. Fortunately,
it's possible to obtain the desired behavior (`$crate` resolving in the
context of the 'inner' macro) by use of a procedural macro.

This commit adds a `respan!` proc-macro to the `sdk/macro` crate.
Using the newly-stabilized (on Nightly) `Span::resolved_at` method,
the `$crate` identifier can be made to be resolved in the context of the
proper crate.

Since `Span::resolved_at` is only stable on the latest nightly,
referencing it on an earlier version of Rust will cause a compilation error.
This requires the `rustversion` crate to be used, which allows conditionally
compiling code epending on the Rust compiler version in use. Since this method is already
stabilized in the latest nightly, there will never be a situation where
the hygiene bug is fixed (e.g. https://github.com/rust-lang/rust/pull/72121)
is merged but we are unable to call `Span::resolved_at`.
2020-07-14 14:40:02 -07:00
dependabot-preview[bot] 5055028231 Bump serde_json from 1.0.54 to 1.0.56
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.54 to 1.0.56.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.54...v1.0.56)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-14 11:13:22 -07:00
dependabot-preview[bot] 95145672c8 Bump byte-unit from 3.1.3 to 4.0.8
Bumps [byte-unit](https://github.com/magiclen/byte-unit) from 3.1.3 to 4.0.8.
- [Release notes](https://github.com/magiclen/byte-unit/releases)
- [Commits](https://github.com/magiclen/byte-unit/compare/v3.1.3...v4.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-14 11:13:14 -07:00
Michael Vines d3784cab4f Bump spl-memo to 1.0.2 2020-07-13 23:59:33 +00:00
dependabot-preview[bot] cee9177ec7 Bump libc from 0.2.71 to 0.2.72
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.71 to 0.2.72.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.71...0.2.72)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-13 15:00:27 -07:00
dependabot-preview[bot] 5c86766fb2
Bump ctrlc from 3.1.4 to 3.1.5 (#11006)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/Detegr/rust-ctrlc/releases)
- [Commits](https://github.com/Detegr/rust-ctrlc/compare/3.1.4...3.1.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-12 20:59:29 -06:00
dependabot-preview[bot] 33f5c17e46
Bump generic-array from 0.14.1 to 0.14.3 (#11010)
* Bump generic-array from 0.14.1 to 0.14.3

Bumps [generic-array](https://github.com/fizyk20/generic-array) from 0.14.1 to 0.14.3.
- [Release notes](https://github.com/fizyk20/generic-array/releases)
- [Changelog](https://github.com/fizyk20/generic-array/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fizyk20/generic-array/commits)

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-07-12 20:59:05 -06:00
dependabot-preview[bot] 2e5cb71e54 chore(deps): bump base64 from 0.12.1 to 0.12.3
Bumps [base64](https://github.com/marshallpierce/rust-base64) from 0.12.1 to 0.12.3.
- [Release notes](https://github.com/marshallpierce/rust-base64/releases)
- [Changelog](https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/marshallpierce/rust-base64/compare/v0.12.1...v0.12.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-10 22:53:21 -07:00
Jack May f0b22b1b23
spl memo linking windows (#11000)
* Update spl-memo to fix windows linking error

* Only programs need the stubs

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
2020-07-10 18:39:52 -07:00
dependabot-preview[bot] 841ecfd927
chore(deps): bump bincode from 1.2.1 to 1.3.1 (#10867)
* chore(deps): bump bincode from 1.2.1 to 1.3.1

Bumps [bincode](https://github.com/servo/bincode) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/commits)

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

* [auto-commit] Update all Cargo lock files

* Switch from deprecated method

* Add options to maintain behavior with bincode::options()

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
2020-07-09 00:08:05 +00:00
Ryo Onodera 39b3ac6a8d
Introduce automatic ABI maintenance mechanism (2/2; rollout) (#8012)
* Introduce automatic ABI maintenance mechanism (2/2; rollout)

* Fix stable clippy

* Change to symlink

* Freeze abi of Tower

* fmt...

* Improve dev-experience!

* Update BankSlotDelta

$ diff -u /tmp/abi8/*7dg6BreYxTuxiVz6aLvk3p2Z7GQk2cJqfGvC9h4FAoSj* /tmp/abi8/*9chBcbXVJ4fK7uGgydQzam5aHipaAKFw6V4LDFpjbE4w*
--- /tmp/abi8/bank__BankSlotDelta_frozen_abi__test_abi_digest_7dg6BreYxTuxiVz6aLvk3p2Z7GQk2cJqfGvC9h4FAoSj      2020-06-18 18:01:22.831228087 +0900
+++ /tmp/abi8/bank__BankSlotDelta_frozen_abi__test_abi_digest_9chBcbXVJ4fK7uGgydQzam5aHipaAKFw6V4LDFpjbE4w      2020-07-03 15:59:58.430695244 +0900
@@ -140,7 +140,7 @@
                                                         field u8
                                                             primitive u8
                                                         field solana_sdk::instruction::InstructionError
-                                                            enum InstructionError (variants = 34)
+                                                            enum InstructionError (variants = 35)
                                                                 variant(0) GenericError (unit)
                                                                 variant(1) InvalidArgument (unit)
                                                                 variant(2) InvalidInstructionData (unit)
@@ -176,6 +176,7 @@
                                                                 variant(31) CallDepth (unit)
                                                                 variant(32) MissingAccount (unit)
                                                                 variant(33) ReentrancyNotAllowed (unit)
+                                                                variant(34) MaxSeedLengthExceeded (unit)
                                                     variant(9) CallChainTooDeep (unit)
                                                     variant(10) MissingSignatureForFee (unit)
                                                     variant(11) InvalidAccountIndex (unit)

* Fix some merge conflicts...
2020-07-06 20:22:23 +09:00
carllin f1699721ef
Bench RaptorQ (#10886)
Co-authored-by: Carl <carl@solana.com>
2020-07-02 18:31:32 -07:00
dependabot-preview[bot] 4deec51703
chore(deps): bump rayon from 1.3.0 to 1.3.1 (#10605)
* chore(deps): bump rayon from 1.3.0 to 1.3.1

Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/rayon-rs/rayon/releases)
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.3.0...v1.3.1)

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

* [auto-commit] Update all Cargo lock files

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
2020-07-01 08:09:28 -07:00
dependabot-preview[bot] 8b69f6c863
chore(deps): bump hidapi from 1.2.2 to 1.2.3 (#10866)
Bumps [hidapi](https://github.com/ruabmbua/hidapi-rs) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/ruabmbua/hidapi-rs/releases)
- [Commits](https://github.com/ruabmbua/hidapi-rs/commits)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-07-01 08:08:47 -07:00
Tyera Eulberg d97850f1d9
Add account-decoder utilities (#10846)
* Fix comment and make less pub

* Add account-decoder crate and use to decode vote and system (nonce) accounts

* Update docs

* Rename RpcAccount struct

* s/Rpc/Display

* Call it jsonParsed and update docs

* Revert "s/Rpc/Display"

This reverts commit 6e7149f503f560f1e9237981058ff05642bb7db5.

* s/Rpc/Ui

* Add tests

* Ui more things

* Comments
2020-07-01 04:55:11 +00:00
Greg Fitzgerald 3a3b7a399a
Fix netutils test (#10842) 2020-06-30 09:57:16 -06:00
carllin 2dfa48daf9
Add ability to parse logs in ledger-tool (#10840)
Co-authored-by: Carl <carl@solana.com>
2020-06-30 02:20:54 -07:00
sakridge 98621648cb
Add poh-bench (#10707) 2020-06-24 15:51:52 -07:00
carllin 77b8de193c
Add utility functions for testing (#10749)
* Add ancestor iterator

* Add blockstore generation from trees

Co-authored-by: Carl <carl@solana.com>
2020-06-23 12:05:00 -07:00
Trent Nelson d42247c652
ledger-tool: Ignore SIGUSR1 (#10730)
Prevents warehouse archive calls getting KO'd by logrotate
2020-06-21 18:08:17 +00:00
Tyera Eulberg fd2508b09e
Add jsonParsed option for EncodedTransactions; add memo parser (#10711)
* Add jsonParsed option for EncodedTransactions; add memo parser

* Use kebab case for program names

* Add account-key parsing

* Add parse test
2020-06-19 16:15:13 -06:00
Michael Vines b297d0b423 Permit users to assign labels to account addresses 2020-06-18 18:46:49 +00:00