- 16 6月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
An account can now approve a producer, and that producer's votes are increased appropriately. The account can remove approval, and the votes are decreased appropriately. Additionally, the producer is added/removed to the account's approved producers list as desired. TODO: A producer with more votes than the rest is still never rotated in
-
- 14 6月, 2017 2 次提交
-
-
由 Nathan Hourt 提交于
This new interface allows the chain_controller to request a fresh round of producers and request the producers' median voted blockchain configuration. Net yet complete, but integrated sufficiently to get the tests to pass.
-
由 Nathan Hourt 提交于
And rename it to chain_initializer_interface
-
- 13 6月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
Aftermath of 55a84709 -- the chain library no longer ever touches genesis_state_type; this type is only recognized by native_contract now, so move its files from the chain library to the native_contract library.
-
- 09 6月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
OK, so this turned out to be a **massive** refactor that I thought I'd never finish, and no, I don't remember everything that changed here, but I think it all worked out to be better than before, and almost all of it was fairly necessary/the best of available options. Whew. I am SO glad this is finally done. High level goal: Continue refining the native contracts (ref #15), specifically walling off their state into their own contract DBs rather than globally shared (read: stuff that race conditions are made of) general blockchain state. The first real change I made in this commit, which precipitated the avalanche of changes that followed before the project became consistent again, was to move the account balance out of account_object (globally shared) to an object known only to the Eos Contract, thus eliminating the possibility of race conditions/nondeterministic behavior. The trouble is, balances are set at genesis. Genesis is processed by chain_controller. chain_controller cannot know about balances, since those are an abstraction defined on top of the Eos contract, which is an abstraction defined on top of chain_controller. So all of genesis had to be reimagined, and quite a lot of architectural changes had to be made in order to create a logically consistent solution. Changes (probably incomplete): - Fix up notifications within the native contract to support precondition validation as well as application - Add notify handlers for CreateAccount to Eos and Staked Balance contracts - Move account's liquid balance of EOS from account_object to BalanceObject - Replace {producer,account}_object::id_type with AccountName most everywhere except block_header, which still contains a producer_object::id_type (potentially in violation of protocol standards, but I want to confirm that before fixing it) - Reason: The name is not significantly slower, as it's fixed length so no heap allocs, and it simplifies the code in quite a few places by allowing us to look up objects directly rather than indirectly by looking up an ID to get an intermediate object to get a handle for the object we really wanted - Replace native_system_contract_plugin with native_contract library - Reason: The plugin was getting in the way. The native system contract C++ implementation is simply too fundamental unless/until we have a scripted implementation that works until the native implementation gets installed - Completely reimagine genesis initialization, taking it largely out of the hands of chain_controller and putting it in the hands of native_contract - Reason: chain_controller understands relatively little about genesis. It understands global_property_object and producer_object, but not BalanceObject or StakedBalanceObject, etc... It also doesn't understand the native_contract, and things like installing the native contract, setting up accounts/balances, etc. all need to be handled by something... native_contract is the most logical place to put it. Sorry for the enormous commit... alas, this was the first time I got it all building again and passing tests in days.
-
- 06 6月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
Create all three native contracts at genesis, and split the various messages among them appropriately.
-
- 01 6月, 2017 1 次提交
-
-
由 Daniel Larimer 提交于
- remove BTS P2P code which depended on fc threads which depended on deprecated boost::context API - remove fc submodule and making fc part of eos repository
-
- 29 5月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
This completes the refactor (to a buildable/tests passing state) from my last commit.
-
- 26 5月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
Rename database class to chain_controller, as this class manages blockchain state and operations. Database was a misnomer. Next step: make chain_controller a free-standing class, rather than having it inherit from chainbase::database. This should give us a better architecture, especially for testing, going forward.
-
- 10 5月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
Add support for producers specifying their votes on chain configuration values to CreateProducer and UpdateProducer. Add more tests around chain configuration, including a failing test case verifying that the blockchain itself handles configuration updates correctly. Presently this test fails because the chain does not yet attempt to keep track of rounds, thus it cannot update the configuration at the beginning of the round.
-
- 09 5月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
The macros to make testcases less tedious to write had opaque abbreviated names like UPPDCR (my own fault, I know haha). Replace those names with obvious ones like Update_Producer. Also, sweep all the backend/implementation detail macros into macro_support.hpp where they are hidden out of the way and unlikely to be accidentally used directly.
-
- 05 5月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
We have a number of types defined in eos::chain like transaction, message, etc. which parallel autogenerated types in eos::types. They are identical in storage, but the chain types have various helper methods which the autogenerated types, of course, lack. I've unified these by letting the generated classes in types:: store the data, and having the chain:: types inherit these data stores and add functionality to them via methods.
-
- 04 5月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
Add helper macros for common testing activities including making {keys, authorities, accounts, producers}, transferring funds, and updating producers. Replace the boilerplate transaction jockeying in the tests with these helpers. The tests are now much shorter and more readable. :)
-
- 27 4月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
The system contract C++ implementation is now in a plugin rather than directly on database. Note that testing_database installs this implementation on the testing database, even though the test framework does not use appbase or appbase plugins.
-
- 26 4月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
The simulated network was recursively calling push_block when propagating blocks, which caused a lock timeout. Fix this issue by not pushing a new block to the database that created it. Also, replace the currently_propagating_block flag with boost's slot blocker.
-
- 20 4月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
-
- 13 4月, 2017 1 次提交
-
-
由 Nathan Hourt 提交于
Bring in chain_plugin, net_plugin, http_plugin; wire appbase and plugins into existing infrastructure, remove old app infrastructure.
-
- 07 4月, 2017 2 次提交
-
-
由 Nathan Hourt 提交于
Also remove transaction_evaluation_state and the size_checker program.
-
由 Nathan Hourt 提交于
- Cleaned out some cruft - Added some new macros to remove boilerplate - Added some more test cases
-
- 06 4月, 2017 2 次提交
-
-
由 Nathan Hourt 提交于
Add a testing_network class to emulate a P2P network ferrying blocks between databases. Add some test cases exercising databases syncing with the testing_network and resolving forks.
-
由 Nathan Hourt 提交于
-