Commit Graph

17825 Commits

Author SHA1 Message Date
Sean Young
8b9e472a6c feat: add ed25519 signature verify program
Solang requires a method for verify ed25519 signatures. Add a new
builtin program at address Ed25519SigVerify111111111111111111111111111
which takes any number of ed25519 signature, public key, and message.
If any of the signatures fails to verify, an error is returned.

The changes for the web3.js package will go into another commit, since
the tests test against a released solana node. Adding web3.js ed25519
testing will break CI.
2021-09-05 18:59:37 +01:00
Sean Young
d461a9ac10 verify_precompiles needs FeatureSet
Rather than pass in individual features, pass in the entire feature set
so that we can add the ed25519 program feature in a later commit.
2021-09-05 18:59:37 +01:00
bitkeepwallet
f0be3e4ea9 Update web-wallets.md (#19648) 2021-09-05 08:59:49 -07:00
Alexey Elizarov
266e7ce8cb fix(web3): export of errors (#19649)
for ability to do match of type on client-side
2021-09-05 08:57:05 -07:00
Michael Vines
b44ff347e2 Surface write transaction failures during program deployment 2021-09-04 21:04:47 -07:00
Michael Vines
787c62fb15 Generalize send_and_confirm_transactions_with_spinner() 2021-09-04 21:04:47 -07:00
Brooks Prumo
747a3caf9d Update num-bigint to 0.3.3 (#19643)
* Update num-bigint to 0.3.3

`cargo check` on nightly was erroring due to num-bigint:

```text
error[E0658]: use of unstable library feature 'int_roundings'
   --> [...]/.cargo/registry/src/github.com-1ecc6299db9ec823/num-bigint-0.3.1/src/biguint.rs:208:10
    |
208 |         .div_ceil(&big_digit::BITS.into())
    |          ^^^^^^^^
    |
    = note: see issue #88581 <https://github.com/rust-lang/rust/issues/88581> for more information
    = help: add `#![feature(int_roundings)]` to the crate attributes to enable
```

* pr: update enum-ordinalize and educe
2021-09-04 22:06:19 +00:00
Zahin Mohammad
f68ca3895b docs: fix typo (#19646) 2021-09-04 12:26:38 -06:00
Zahin Mohammad
497b6c152f docs: fix typo (#19641) 2021-09-04 16:48:10 +00:00
Brooks Prumo
333e5a9446 Make purge_old_snapshot_archives aware of maximum_incremental_snapshot_archives_to_retain (#19615) 2021-09-04 07:37:29 -05:00
Pierre/Long
8352bc48db update Telegram link at docs (#19638) 2021-09-04 08:08:36 +00:00
Tyera Eulberg
bd4d563db1 Bump dependency versions (#19634) 2021-09-04 07:02:29 +00:00
Tyera Eulberg
decec3cd8b Demote write locks on transaction program ids (#19593)
* Add feature

* Demote write lock on program ids

* Fixup bpf tests

* Update MappedMessage::is_writable

* Comma nit

* Review comments
2021-09-04 03:05:30 +00:00
Jeff Washington (jwash)
7578db7ee3 add lowest_pubkey_from_bin (#19617) 2021-09-04 02:20:55 +00:00
Jeff Washington (jwash)
b3fae0a01a move constants in functions to global space (#19622) 2021-09-03 19:46:42 -05:00
Michael Vines
f1ba759940 s/authorized_withdrawer_pubkey/authorized_withdrawer/ 2021-09-03 16:45:06 -07:00
Michael Vines
fa61b90796 Rework authorized_withdrawer usage 2021-09-03 16:45:06 -07:00
Bryan Ischo
e288459cf2 Removed the --authorized-withdrawer argument from create-vote-account
The parameter is now a required third argument.  This is because authorized
withdrawer should never be the same as vote account keypair or validator
identity keypair for security reasons.

Added a --allow-unsafe-authorized-withdrawer to override this restriction if
necessary.
2021-09-03 16:45:06 -07:00
Jeff Washington (jwash)
e6055010eb accounts index iterator takes &Range (#19618) 2021-09-03 18:00:49 -05:00
Michael Vines
ae43ca3bfb Add RpcClient::get_multiple_accounts_with_config() 2021-09-03 22:41:38 +00:00
microwavedcola1
f7a5c0301a Mango v3 integration (#19437)
* mango v3 integration

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* more instructions InitMangoAccount, Deposit, Withdraw, InitSpotOpenOrders, ConsumeEvents

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* add support for addPerpMarket

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* code review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* make group config handling generic

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* code review

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>

* fix issue where rpc calls would be done infinitely - basically react useeffect (when to change) was not narrow enough + added some caching

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-09-04 00:01:29 +02:00
Brooks Prumo
1828579580 Pass SnapshotConfig to SnapshotPackagerService (#19616) 2021-09-03 21:42:32 +00:00
Jon Cinque
2c3bdedea3 stake: Advance credits_observed on activation epoch (#19309)
* stake: Advance `credits_observed` on activation epoch

* Add test for merging stakes just after activation
2021-09-03 23:20:56 +02:00
Brooks Prumo
5e25ee5ebe Add maximum_incremental_snapshot_archives_to_retain to SnapshotConfig (#19612) 2021-09-03 20:21:32 +00:00
dependabot[bot]
bbc4fdb767 chore:(deps): bump typescript from 4.3.5 to 4.4.2 in /explorer (#19463)
* chore:(deps): bump typescript from 4.3.5 to 4.4.2 in /explorer

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.3.5...v4.4.2)

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

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

* fix error type

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Justin Starry <justin@solana.com>
2021-09-03 18:05:13 +00:00
dependabot[bot]
2efc519368 chore:(deps): bump @project-serum/serum in /explorer (#19607)
Bumps [@project-serum/serum](https://github.com/project-serum/serum-ts) from 0.13.57 to 0.13.58.
- [Release notes](https://github.com/project-serum/serum-ts/releases)
- [Commits](https://github.com/project-serum/serum-ts/commits)

---
updated-dependencies:
- dependency-name: "@project-serum/serum"
  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-09-03 09:52:39 -07:00
Brooks Prumo
fb1b853b14 Make wait_for_restart_window() aware of Incremental Snapshots (#19587)
When the validator is waiting to restart, the snapshot slot is checked.
With Incremental Snapshots, the full snapshot interval is going to be
_much_ higher, which would make this function wait for a looooong time.

So, if there's an incremental snapshot slot when checking, use that
slot, otherwise fall back to the full snapshot slot.
2021-09-03 11:42:22 -05:00
Brooks Prumo
7ab0aec61f Rename maximum_full_snapshot_archives_to_retain (#19610)
To prepare for adding maximum_incremental_snapshot_archives_to_retain,
rename the current field in SnapshotConfig.
2021-09-03 11:28:10 -05:00
Jeff Washington (jwash)
df040c05da get rid of unneeded mut and refactor addref (#19594) 2021-09-03 10:45:37 -05:00
dependabot[bot]
205f070a99 chore:(deps): bump @solana/spl-token-registry in /explorer (#19608)
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list) from 0.2.228 to 0.2.229.
- [Release notes](https://github.com/solana-labs/token-list/releases)
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.228...v0.2.229)

---
updated-dependencies:
- dependency-name: "@solana/spl-token-registry"
  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-09-03 09:00:26 +00:00
Tyera Eulberg
5fa3e5744c Populate memo in blockstore signatures-for-address (#19515)
* Add TransactionMemos column family

* Traitify extract_memos

* Write TransactionMemos in TransactionStatusService

* Populate memos from column

* Dedupe and add unit test
2021-09-03 00:28:52 -06:00
Jack May
170927b7c4 nit: Move builtins types to builtins file (#19597) 2021-09-02 21:29:11 -07:00
Brooks Prumo
38e1f7c4ba Add backwards compatibility support to get_highest_snapshot_slot() (#19591)
Co-authored-by: Michael Vines <mvines@gmail.com>
2021-09-02 20:47:35 -05:00
Jeff Washington (jwash)
3936c10aa0 rename var (#19588) 2021-09-03 00:55:35 +00:00
Jeff Washington (jwash)
9cc57fb076 remove file that accidentally got added (#19586) 2021-09-03 00:15:25 +00:00
Brooks Prumo
e9374d32a3 Revert "Make startup aware of Incremental Snapshots (#19550)" (#19599)
This reverts commit d45ced0a5d.
2021-09-02 19:14:41 -05:00
Brooks Prumo
d45ced0a5d Make startup aware of Incremental Snapshots (#19550) 2021-09-02 19:05:15 -05:00
Jeff Washington (jwash)
57f51352f6 refactor AccountEntry addref/unref (#19583) 2021-09-02 23:25:27 +00:00
Jeff Washington (jwash)
682daf1117 cleanup of allocate_accounts_index (#19585) 2021-09-02 22:58:07 +00:00
Jeff Washington (jwash)
78585a992b add IsCached trait bounds to AccountsIndex (#19584) 2021-09-02 22:45:35 +00:00
Jeff Washington (jwash)
2874f6b0a2 create remove_if_slot_list_empty to define accounts index behavior (#19581) 2021-09-02 16:54:37 -05:00
Jeff Washington (jwash)
0571962776 accounts index test uses # test bins (#19580) 2021-09-02 16:32:42 -05:00
Jeff Washington (jwash)
6ab8286e8d add logging for a handful of tests (#19582) 2021-09-02 16:32:19 -05:00
Jeff Biseda
7a8eba10b2 add synchronization comment to handle_new_root (#19571) 2021-09-02 13:52:14 -07:00
Brooks Prumo
8ac94b2cf4 Add Incremental Snapshot support to RPC (#19559)
#### Problem

There's no way to get incremental snapshot information from RPC.

#### Summary of Changes

- Add new RPC method, `getHighestSnapshotSlot` that returns a `SnapshotSlotInfo`, which contains both the highest full snapshot slot, and the highest incremental snapshot slot _based on_ the full snapshot.
- Deprecate old RPC method, `getSnapshotSlot`
- Update API docs

Fixes #19579
2021-09-02 15:25:42 -05:00
Trent Nelson
f4f14c42bb docs: update spl token exchange integration (#19573)
* docs: update spl token exchange integration

* Apply suggestions from code review

Co-authored-by: Michael Vines <mvines@gmail.com>

Co-authored-by: Michael Vines <mvines@gmail.com>
2021-09-02 11:32:08 -06:00
Jeff Washington (jwash)
f5388cfe71 tests which assert or panic in other threads now will report an error (#19532)
* tests which assert or panic in other threads now will report an error

* rename, add assert detecting time out
2021-09-02 11:26:57 -05:00
dependabot[bot]
770bdec924 chore:(deps): bump @solana/spl-token-registry in /explorer (#19574)
Bumps [@solana/spl-token-registry](https://github.com/solana-labs/token-list) from 0.2.226 to 0.2.228.
- [Release notes](https://github.com/solana-labs/token-list/releases)
- [Changelog](https://github.com/solana-labs/token-list/blob/main/CHANGELOG.md)
- [Commits](https://github.com/solana-labs/token-list/compare/v0.2.226...v0.2.228)

---
updated-dependencies:
- dependency-name: "@solana/spl-token-registry"
  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-09-02 08:09:11 +00:00
Jeff Washington (jwash)
7eb793a55e add debugging to test (#19563)
* add debugging to test

* update cargo
2021-09-02 02:52:16 +00:00
Jack May
622a6fba7f Add executor using the program's id during deploy (#19555) 2021-09-01 17:59:24 -07:00