Commit Graph

118 Commits

Author SHA1 Message Date
Michael Vines aebf7f88e5
Various spelling fixes 2018-09-17 19:37:59 -07:00
Michael Vines aac1571670 mint now uses the SystemContract instead of Budget 2018-09-17 18:02:40 -07:00
anatoly yakovenko 6ec0e42220
budget as separate contract and system call contract (#1189)
* budget and system contracts and verification

* contract check_id methods
* system call contract
* verify contract execution rules
* move system into its own file
* allocate before transfer for budget
* store error in budget context
* budget contract and tests without bank
* moved budget of of bank
2018-09-17 13:36:31 -07:00
Anatoly Yakovenko fd36954477 clippy 2018-09-15 05:12:53 -06:00
Michael Vines 4196cf43e8 cargo fmt 2018-09-14 16:37:49 -07:00
sakridge 9d80eefb81
Log the number of accounts each 250k txes (#1178) 2018-09-10 17:40:00 -07:00
Michael Vines 2be0dbddbb
Correct spelling 2018-09-10 13:48:43 -07:00
anatoly yakovenko a89b611e9e
comments (#1165) 2018-09-09 07:07:38 -07:00
anatoly yakovenko c34d911eaf
Migrate Budget DSL to use the Account state (#979)
* Migrate Budget DSL to use the Account state instead of global bank data structures.

* Serialize Instruction into Transaction::userdata.
* Store the pending set in the Account::userdata
* Enforce the token balance rules on contract execution. This becomes the entry point for generic contracts.
* This pr will have a performance impact on the bank. The next set of changes will fix this by locking each account during multi threaded execution of all the contracts.
* With this change a contract transaction needs to store its state under an address. That address could be the destination of the tokens, or any random address. For the latter, an extra step would be needed to claim the tokens which isn't implemented by budget_dsl at the moment.
* test tracking issue 1157
2018-09-07 20:18:36 -07:00
Tyera Eulberg 5169c8d08f Add method to return hash of bank state 2018-09-07 15:38:53 -06:00
Pankaj Garg 05460eec0d
Open multiple sockets for transaction UDP port (#1128)
* Reuse UDP port and open multiple sockets for transaction address

* Fixed failing crdt tests

* Add tests for reusing UDP ports

* Address review comments

* Updated bench-streamer to use multiple receive sockets

* Fix minimum number of recv sockets for bench-streamer

* Address review comments

Fixes #1132

* Moved bind_to function to nat.rs
2018-09-06 14:13:40 -07:00
Greg Fitzgerald d5ef18337c Remove redundant return value
And don't log the same error twice.
2018-09-04 06:01:32 -10:00
sakridge f1785c76a4
Rework counter increment outside apply_debits loop (#1046)
Reduces prints/atomics work inside the process_transactions loop
2018-08-23 09:42:59 -07:00
Greg Fitzgerald 2d35345c50 Boot unused creates 2018-08-20 16:48:37 -06:00
Pankaj Garg b9ec97a30b
Add counter for bank transaction errors (#1015) 2018-08-20 14:56:01 -07:00
Anatoly Yakovenko a284030ecc Account type with state
comments

fixups!

fixups!

fixups for a real Result<> from get_balance()

on 2nd thought, be more rigorous

Merge branch 'rob-solana-accounts_with_state' into accounts_with_state

update

review comments

comments

get rid of option
2018-08-16 14:44:51 -07:00
anatoly yakovenko 88d6fea999 Revert "Accounts with state (#954)"
This reverts commit c23fa289c3.
2018-08-15 19:44:39 -07:00
anatoly yakovenko c23fa289c3
Accounts with state (#954)
* Account type with state

* fixed test according to @rob-solana
2018-08-15 14:32:11 -07:00
Greg Fitzgerald 2727067b94 Move winow into its own module 2018-08-13 20:17:16 -06:00
Pankaj Garg bf15cad36b
Add get_finality request and use it from multinode test (#941) 2018-08-13 08:55:13 -07:00
Rob Walker 5dbcb43abd more enhancements 2018-08-10 19:53:58 -07:00
anatoly yakovenko 2318ffc704
Use a different counter for validator account not found errors. (#931)
* Use a different counter for validator account not found errors.  This is a usefull signal of something going wrong with the ledger
2018-08-10 15:18:44 -07:00
Greg Fitzgerald 4a980568ac Rename sig variables to signature
We'll avoid introducing three-letter terms to free up the namespace
for three-letter acronyms.

But recognize the term "sigverify", a verb, to verify a digital
signature.
2018-08-09 13:41:37 -06:00
Greg Fitzgerald ad331e6d56 Rename PublicKey type to Pubkey
Recognize pubkey as a noun meaning the public key of a keypair.
2018-08-09 13:41:37 -06:00
Greg Fitzgerald c2bbe4344e Rename KeyPair to Keypair 2018-08-09 13:41:37 -06:00
Greg Fitzgerald ca7d4c42dd Rename cur_hashes to num_hashes 2018-08-09 10:15:10 -06:00
Stephen Akridge 38be61bd22 Check for log level before doing perf counter work
Perf counters, especially when running the dynamic test can cause
functions like crdt::apply_updates to be really slow (>500ms).
2018-08-08 00:16:53 -07:00
Stephen Akridge 1ac5d300a4 Rearrange start hash for process_ledger and add a unit test 2018-08-07 14:10:36 -07:00
Stephen Akridge db2392a691 Use last_id from the entries stream instead of last_id from bank
bank will only register ids when has_more is not set because those are
the only ids it has advertised, so it will not register all ids,
however the entry stream will contain unbroken last_id chain, so we
need to track that to get the correct start hash.
2018-08-07 08:14:06 -07:00
Rob Walker 63d2b2eb42 adjust bank notion of entry_count to aid debugging 2018-08-06 11:20:52 -07:00
Rob Walker 906d18a709 move VOTE to trace, info too verbose 2018-08-03 23:04:54 -07:00
Rob Walker f2b1a04bca cargo fmt fixups 2018-08-03 11:59:25 -07:00
Stephen Akridge ee0195d588 Try to measure finality from time seen to when 2/3 of validator..
..set has voted. Add a timestamp to last_ids and use that to
see how long from when 2/3s validator set has voted on them.
2018-08-02 13:21:29 -07:00
Tyera Eulberg 448b8b1c17 Add Hash wrapper and supporting traits 2018-08-01 17:00:51 -07:00
Stephen Akridge 6693386bc5 Lower errors to warnings so they don't print during tests
Negative tests should trigger the warnings, but errors look like
something is wrong.
2018-08-01 16:56:12 -06:00
sakridge 2ea6f86199 Submit leader's vote after observing 2/3 validator votes (#780)
* fixup!

* fixups!

* send the vote and count it

* actually vote

* test

* Spelling fixes

* Process the voting transaction in the leader's bank

* Send tokens to the leader

* Give leader tokens in more cases

* Test for write_stage::leader_vote

* Request airdrop inside fullnode and not the script

* Change readme to indicate that drone should be up before leader

And start drone before leader in snap scripts

* Rename _kp => _keypair for keypairs and other review fixups

* Remove empty else
* tweak test_leader_vote numbers to be closer to testing 2/3 boundary
* combine creating blob and transaction for leader/validator
2018-07-31 22:07:53 -07:00
Rob Walker 50e1e0ae47 use rust's rotate (in place, yay!) 2018-07-27 11:44:02 -07:00
Michael Vines 538c3b63e1 Log the last_id being voted on 2018-07-27 11:27:51 -07:00
Stephen Akridge 6bd18e18ea Add error messages to ledger verify 2018-07-24 17:35:41 -07:00
Stephen Akridge 313fed375c Add counter for tx count and limit error messages 2018-07-20 11:37:12 -07:00
Greg Fitzgerald bcc247f25f Clarify code comment 2018-07-20 12:31:23 -04:00
anatoly yakovenko 09f2d273c5
less intrusive counters (#655)
* less intrusive counters

* fixed arg

* tests

* comments
2018-07-16 18:33:50 -07:00
Anatoly Yakovenko 4631af5011 counters for vote not found 2018-07-15 20:31:23 -06:00
Greg Fitzgerald 73ae3c3301 Apply most of clippy's feedback 2018-07-12 09:40:40 -06:00
Rob Walker 705720f086 fixups 2018-07-11 10:37:47 -07:00
Rob Walker a219e78f00 fixups 2018-07-11 10:37:47 -07:00
Rob Walker 7a41868173 fixups 2018-07-11 10:37:47 -07:00
Rob Walker e16acec901 fixups 2018-07-11 10:37:47 -07:00
Rob Walker de44d7475e fixups 2018-07-11 10:37:47 -07:00
Rob Walker c2dd009e0b fixups 2018-07-11 10:37:47 -07:00