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
Rob Walker
5a8da75d06
optimize process_ledger()
2018-07-11 10:37:47 -07:00
Greg Fitzgerald
dfa05a8742
Move bank benchmark outside src
...
This will make it available to third party benchmarking tools.
2018-07-10 19:38:29 -06:00
Anatoly Yakovenko
be2bf69c93
initial vote stage
...
wip
voting
wip
move voting into the replicate stage
update
fixup!
fixup!
fixup!
fixup!
fixup!
fixup!
fixup!
fixup!
fixup!
fixup!
update
fixup!
fixup!
fixup!
tpu processing votes in entries before write stage
fixup!
fixup!
txs
make sure validators have an account
fixup!
fixup!
fixup!
exit fullnode correctly
exit on exit not err
try 50
add delay for voting
300
300
startup logs
par start
100
no rayon
retry longer
log leader drop
fix distance
50 nodes
100
handle deserialize error
update
fix broadcast
new table every time
tweaks
table
update
try shuffle table
skip kill
skip add
purge test
fixed tests
rebase 2
fixed tests
fixed rebase
cleanup
ok for blobs to be longer then window
fix init window
60 nodes
2018-07-10 13:32:31 -06:00
Rob Walker
1dd467ed7d
fix issue #568
2018-07-09 22:27:11 -06:00
Rob Walker
ed0a590549
support an initial window filled with last up-to-WINDOW_SIZE blobs
2018-07-09 14:50:14 -07:00
Greg Fitzgerald
71f05cb23e
Vet timestamp source from contract, not leader
...
Per @aeyakovenko, contracts shouldn't trust the network for
timestamps. Instead, pass the verified public key to the
contract and let it decide if that's a public key it wants
to trust the timestamp from.
Fixes #405
2018-07-09 08:40:07 -06:00
Greg Fitzgerald
5f99657523
Remove last_time from bank
...
We had a test for this, but without `Bank::time_sources` (removed in the last
commit), there's no last_time that can be trusted.
2018-07-09 08:40:07 -06:00
Greg Fitzgerald
587ae1bf3c
Remove time_sources from bank
...
I wrote this, but per
https://github.com/solana-labs/solana#code-coverage , if it doesn't
break a test, it's fair game to delete.
2018-07-09 08:40:07 -06:00
Greg Fitzgerald
88a6fb86bf
Clean up read_entries() and its usage
2018-07-03 16:33:36 -06:00
Greg Fitzgerald
f6fe998ed4
Revert 1dd8c5ed362693fa46e4a281e1caaae427a88edc
...
Per @sakridge, this might cause a performance degradation. Need
to benchmark it.
2018-07-03 14:00:53 -06:00
Greg Fitzgerald
0dabdfd48e
Use zero to represent a nonexistent account
...
This also fixes a bug in the thin client where a nonexistent account
would have triggered a panic because we were using `balances[k]` instead
of `balances.get(key)`.
Fixes #534
2018-07-02 18:48:40 -06:00
Greg Fitzgerald
d2bb4dc14a
Purge empty accounts
2018-07-02 18:48:40 -06:00
Greg Fitzgerald
04a93050e7
No need to share a write lock across single-threaded methods
2018-07-02 15:25:16 -06:00
Greg Fitzgerald
4e3526394e
Use IntoInterator to simplify write_entries() usage
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
6806a14a3f
Use Cursor instead of tempfile.
...
Faster and one less dependency.
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
ec7e50b37d
Consolidate ledger serialization code
...
The new read_entries() works, but is overly-contrained. Not
using that function yet, but adding it here in the hopes some
Rust guru will tell us how to get that lifetime constraint out
of there.
Fixes #517
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
e7b7dfebf5
Add tests for process_ledger()
2018-07-02 09:51:39 -06:00
Greg Fitzgerald
c4b62e19f2
Do Proof of History verification before appending entries to the bank
...
Note: replicate_stage is still using `process_entries()` because
changing it to `process_blocks()` causes the `test_replicate` test to
fail.
2018-06-29 15:35:39 -06:00
Greg Fitzgerald
517d08c637
Cleanup
2018-06-29 09:51:13 -07:00
Tyera Eulberg
d354e85a9a
Return bool on signature check
2018-06-29 09:51:13 -07:00
Tyera Eulberg
0112a24179
Add confirm command to wallet, and update RPU to check bank for a signature
2018-06-29 09:51:13 -07:00
Stephen Akridge
d28536d76e
Fix spelling of signature
2018-06-28 16:31:33 -07:00
Rob Walker
2f42658cd4
...
2018-06-27 14:51:18 -07:00
Rob Walker
55ec7f9fe9
add entry.has_more
...
* quick fix for really big genesis
* longer term fix for possible parallel verification over multiple
Blobs/Entries
2018-06-26 13:57:10 -07:00
Rob Walker
1919ec247b
add a clock to validator windows (part 3 of #309 ) ( #448 )
...
* count entries processed by Bank
* initialize windows with initial height of Entries
2018-06-25 15:07:48 -07:00
Greg Fitzgerald
737dc1ddde
Per rustc 1.27.0, we can ensure nested results are used
2018-06-22 22:42:47 -07:00
Stephen Akridge
8be4adfc0a
Rename tr => tx and add back comments
2018-06-22 14:34:46 -07:00
Stephen Akridge
fed4cc3965
Remove commented code/imports
2018-06-22 14:34:46 -07:00
Stephen Akridge
7d1e074683
bump last_ids
2018-06-22 14:34:46 -07:00
Stephen Akridge
00516e50a1
last_ids opt
2018-06-22 14:34:46 -07:00
Stephen Akridge
e83d76fbd9
Remove mutexes
2018-06-22 14:34:46 -07:00
Stephen Akridge
304f152315
rwlock balances table
2018-06-22 14:34:46 -07:00
Greg Fitzgerald
9b202c6e1e
No longer flood log with emtpy entries
2018-06-14 18:04:36 -06:00
Stephen Akridge
87946eafd5
Lower processing transaction message to debug by default
2018-06-14 17:08:11 -06:00
Greg Fitzgerald
ee44e51b30
Better docs for the bank
2018-06-07 09:25:36 -06:00
Greg Fitzgerald
7e788d3a17
No longer need explicit refs in rustc 1.26
2018-06-04 21:43:46 -06:00
Greg Fitzgerald
587ab29e09
Don't register entry ID until after processing its transactions
2018-05-31 12:13:18 -06:00
Greg Fitzgerald
80f07dadc5
Generalize process_entries()
...
And use it in fullnode
2018-05-31 12:13:18 -06:00
Anatoly Yakovenko
e44e81bd17
fmt
2018-05-30 14:04:48 -06:00
Anatoly Yakovenko
f5eedd2d19
fmt
2018-05-30 14:04:48 -06:00
Greg Fitzgerald
9c9c63572b
cargo fmt
...
rustfmt was updated with 1.26.1
2018-05-29 20:33:45 -07:00
Greg Fitzgerald
6c0c6de1d0
Better error names
2018-05-29 20:33:45 -07:00
Greg Fitzgerald
b57aecc24c
Better error if Bank doesn't recognize tx last_id
2018-05-29 20:33:45 -07:00
Greg Fitzgerald
290dde60a0
Test invalid tokens and fees
2018-05-29 20:33:45 -07:00
Greg Fitzgerald
ac0791826a
plan.rs -> payment_plan.rs
2018-05-29 18:09:03 -06:00
Greg Fitzgerald
d2622b7798
Allow for addtional smart contract languages
...
Fixes #159
2018-05-29 18:09:03 -06:00
Greg Fitzgerald
f82cbf3a27
Move Budget EDSL into its own module
2018-05-29 18:09:03 -06:00
Greg Fitzgerald
aa7e3df8d6
Plan -> Budget
...
Budget is now an EDSL. PaymentPlan is the interface to it.
2018-05-29 18:09:03 -06:00
Greg Fitzgerald
ad00d7bd9c
Move plan methods to a trait
2018-05-29 18:09:03 -06:00
Greg Fitzgerald
cf5671d058
tr -> tx
...
Missed a few.
2018-05-29 10:38:58 -06:00
Greg Fitzgerald
2570bba6b1
Make apply_payment a method
...
History: the function was pulled out of Bank when each field wasn't
wrapped in a RwLock, and that locking 'balances' meant to lock
everything in the bank. Now that the RwLocks are here to stay,
we can make it a method again.
2018-05-29 10:38:58 -06:00
Greg Fitzgerald
71cb7d5c97
Better names
2018-05-29 10:38:58 -06:00
Greg Fitzgerald
0df6541d5e
Fewer public functions
2018-05-29 10:38:58 -06:00
Greg Fitzgerald
52145caf7e
Cleanup: make 'verified' qualifier implicit
...
History: Qualifying the method names with 'verified' was done to
distinguish them from methods that first did signature verification.
After we moved all signature verication to SigVerifyStage, we removed
those methods from Bank, leaving only the 'verified' ones.
This patch removes the word 'verified' from all method names, since
it is now implied by any code running after SigVerifyStage.
2018-05-29 10:38:58 -06:00
Greg Fitzgerald
8d26be8b89
Run benchmarks in nightly
...
And name functions the same way as test functions
2018-05-26 00:36:50 -06:00
Greg Fitzgerald
aaeb5ba52f
tr -> tx
2018-05-25 16:47:21 -06:00
Greg Fitzgerald
9f5a3d6064
events -> transactions
2018-05-25 16:47:21 -06:00
Greg Fitzgerald
4cdf873f98
Delete event.rs
2018-05-25 16:47:21 -06:00
Anatoly Yakovenko
c2c80232e3
logs
2018-05-24 17:40:33 -06:00
Greg Fitzgerald
e12e154877
Boot Event timestamp/singature constructors
2018-05-24 10:10:41 -06:00
Greg Fitzgerald
cc907ba69d
Add Instruction type
2018-05-24 10:10:41 -06:00
Greg Fitzgerald
f154c8c490
Add data to errors to ease debugging
2018-05-23 12:50:23 -06:00
Greg Fitzgerald
2e059f8504
Rename TransactionData to Contract
...
No longer a single place to get all the data that was signed.
2018-05-22 17:00:40 -06:00
Greg Fitzgerald
207b6686d1
Hoist last_id
...
First step in unifying Witness processing and Transaction processing
2018-05-22 17:00:40 -06:00
Robert Kelly
d42d024d9c
minor changes
2018-05-15 10:23:11 -04:00
Anatoly Yakovenko
2d635386af
rebased
2018-05-14 15:20:41 -07:00
Greg Fitzgerald
7736b9cac6
Boot Alice and Bob from the unit tests
2018-05-14 15:39:34 -06:00
Greg Fitzgerald
d2dd005a59
accountant -> bank
2018-05-14 15:33:11 -06:00