Commit graph

3112 commits

Author SHA1 Message Date
Nathaniel
f9fcffbb4d
Safety Check: Part 2 -- Implement and Integrate Checks
Implement a safety check mechanism on object_database, based on the
safety_check_policy abstract interface. Create two standard
implementations of the safety_check_policy interface, one
(null_safety_check) which allows all modifications unconditionally, and
the other (database_lock_safety_check) which allows modifications only
when unlocked.

Integrate these safety checks into chain::database and plugins, so that
the consensus databases are locked at all times except during core
consensus code pathways. Also ensures that databases are re-locked when
calling code outside of consensus pathways from consensus pathways.

To make this work, it was necessary to move two objects from the
consensus object spaces to a new API object space. The
operation_history_object and account_transaction_history_object were
moved to the API object space, as they are not actually used by
consensus and are maintained by a plugin (which can no longer modify the
consensus object spaces, due to the safety checks).

Finally, add a mechanism to application and chain::database, which
allows the chain to start in "unit testing mode" and allows unchecked
actions upon the database within delimited scopes. This was necessary
because many tests edit the database directly to set up the environment
for their respective tests. This mode is activated by database_fixture so
tests can utilize it conveniently, but it is architecturally difficult to
enable this mode in production, i.e. from a plugin.
2022-03-12 14:04:08 -06:00
Nathaniel
e8b432c19f
Safety Check: Part 1 -- Evaluator Tagging
Pursuant to the requested safety checks on the database, to ensure that
plugin code (i.e., third party code) cannot modify the database, we
implement evaluator tagging so the chain can distinguish between
consensus evaluators and third party evaluators. Also, define a new kind
of evaluator base class, third_party_evaluator, so that fees are not
charged multiple times for operations with multiple evaluators.

Next step, implement the actual safety check mechanism on the database.
2022-03-07 16:37:53 -06:00
Nathaniel
659d135b9b
Merge remote-tracking branch 'glu/develop' into dapp-support 2022-02-13 14:25:06 -06:00
serkixenos
fcd360c2fd Merge branch 'feature_enable_multiple_SON_support_by_default' into 'develop'
Enable multiple SON support by default

See merge request PBSA/peerplays!64
2022-02-11 17:36:26 +00:00
serkixenos
8486b7a736 Merge branch 'feature/270-funtions-unified-form' into 'develop'
#270 functions to unified form

See merge request PBSA/peerplays!61
2022-02-11 15:41:47 +00:00
Vlad Dobromyslov
339adbb054 #270 functions to unified form 2022-02-11 15:41:47 +00:00
serkixenos
8b611c3f95 Merge branch 'bug/266-fee-assets' into 'develop'
#266 Fix hard-coded fee for issuing assets in sidechain plugin

See merge request PBSA/peerplays!66
2022-02-10 23:01:59 +00:00
Vlad Dobromyslov
bd08c4c6b0 #266 Fix hard-coded fee for issuing assets in sidechain plugin 2022-02-10 23:01:59 +00:00
serkixenos
a284f42ac9 Merge branch 'feature/260-voting-info' into 'develop'
#260 Added functions get_votes() and get_voters()

See merge request PBSA/peerplays!59
2022-02-10 21:11:09 +00:00
Vlad Dobromyslov
d7e24bfb07 #260 Added functions get_votes() and get_voters() 2022-02-10 21:11:08 +00:00
serkixenos
99119dbd7d Update git submodules docs and fc 2022-02-10 16:40:03 -04:00
hirunda
18bf848119 Enable multiple SON support by default 2022-02-09 18:36:03 +01:00
Nathaniel
2da369453e
Merge branch 'develop' into dapp-support 2022-02-08 13:15:07 -06:00
Nathaniel
d2ced50bbf
Bump FC 2022-02-08 11:27:26 -06:00
serkixenos
c456d4ec6b
Update README.md 2022-02-08 11:26:34 -06:00
serkixenos
f46a223dce
Update README for Ubuntu 20.04 2022-02-08 11:26:34 -06:00
serkixenos
7c7f768ce4
Replace vulnerable XML library 2022-02-08 11:26:34 -06:00
Vlad Dobromyslov
3a7187baba
bug #245 exception seen in witness logs 2022-02-08 11:26:34 -06:00
Vlad Dobromyslov
45e501b916
Resolve "port ES changes from Bitshares" 2022-02-08 11:26:34 -06:00
Vlad Dobromyslov
62a553ab5f
bug #267 Fix error in chain_test in gitlab autobuild 2022-02-08 11:26:34 -06:00
serkixenos
8c402d2e70
Fix list_active_son command output on deregistered SONs 2022-02-08 11:26:34 -06:00
serkixenos
dcdf406a2d
Fix cli wallet memo displaying 2022-02-08 11:26:34 -06:00
serkixenos
494482eba5 Update README.md 2022-02-03 21:18:41 +00:00
serkixenos
18775061ad Merge branch 'feature/switch-to-ubuntu-20-04' into 'develop'
Update README for Ubuntu 20.04

See merge request PBSA/peerplays!58
2022-02-02 13:34:44 +00:00
serkixenos
3c19ea74dd Merge branch 'bug/replace-vulnerable-xml' into 'develop'
Replace vulnerable XML library

See merge request PBSA/peerplays!57
2022-02-02 13:34:26 +00:00
serkixenos
eb77c9dfb3 Update README for Ubuntu 20.04 2022-02-01 13:20:17 -04:00
serkixenos
7a9c90a218 Replace vulnerable XML library 2022-02-01 12:21:32 -04:00
serkixenos
66699f1e15 Merge branch 'bug/245-exception-in-witness' into 'develop'
bug #245 exception seen in witness logs

See merge request PBSA/peerplays!56
2022-01-31 14:14:25 +00:00
Vlad Dobromyslov
78fbf7c3cd bug #245 exception seen in witness logs 2022-01-31 14:14:24 +00:00
serkixenos
5247f76fc2 Merge branch '237-es7-fix' into 'develop'
Resolve "port ES changes from Bitshares"

See merge request PBSA/peerplays!53
2022-01-31 05:25:56 +00:00
Vlad Dobromyslov
39fcacd397 Resolve "port ES changes from Bitshares" 2022-01-31 05:25:56 +00:00
Nathaniel Hourt
ee0d2b21e0
Fix build
In some environments, build fails here due to `curl` dependency not being linked in time for `utilities` to see it.
2022-01-29 16:21:13 -06:00
serkixenos
10799a2148 Merge branch 'bug/267-fix-chain_test' into 'develop'
bug #267 Fix error in chain_test in gitlab autobuild

See merge request PBSA/peerplays!55
2022-01-28 15:05:49 +00:00
Vlad Dobromyslov
8c3a424bb6 bug #267 Fix error in chain_test in gitlab autobuild 2022-01-28 15:05:49 +00:00
Nathaniel Hourt
2a37d8a0a1
Fix build
In some environments, this fails to build without this header.
2022-01-27 15:29:23 -06:00
Nathaniel
f667fda2e4
Merge remote-tracking branch 'origin/beatrice' into to-upstream 2022-01-26 13:16:02 -06:00
serkixenos
6f6811eec4 Merge branch 'bug/fix-list-active-sons' into 'develop'
Fix list_active_sons output

See merge request PBSA/peerplays!54
2022-01-26 18:30:21 +00:00
serkixenos
0bcb0487a7 Fix list_active_son command output on deregistered SONs 2022-01-21 12:17:13 -04:00
serkixenos
b5a9a0101a Merge branch 'bug/cli-wallet-memo-display' into 'develop'
Fix cli wallet memo displaying

See merge request PBSA/peerplays!52
2022-01-17 18:25:33 +00:00
Nathaniel
d17eb5ec72
Add wallet command for custom_operation
Create a new cli_wallet command, run_custom_operation, which makes it
convenient to run custom_operation transactions which invoke third party
contracts (i.e., dapps)
2022-01-14 20:10:16 -06:00
Nathaniel
de87e1b82c
Canonicalize chain ID calculation
When using an external genesis file, it doesn't make sense to calculate
the chain ID as the literal text contents of the file, which are quite
volatile. Rather, it should be calculated based on the logical content
of the file. Serialize the genesis object to get a canonical
representation, and calculate the chain ID off of that.
2022-01-12 16:55:45 -06:00
Nathaniel
c833ca646f
Set CMAKE_INSTALL_RPATH for dynamic builds
When building dynamic libraries, set the RPATH so that binaries know
where to find their libraries.
2022-01-12 16:55:01 -06:00
Nathaniel
fe02a13685
Replace count_objects_in_space with inspect_all_indexes
The count_objects_in_space function, while providing the necessary
functionality, was clumsy and inconvenient, and was not idiomatic.
Replace it with inspect_all_indexes which resolves these shortcomings.
2022-01-05 17:27:52 -06:00
Nathaniel Hourt
25faf9b084
Merge pull request #2 from MichelSantos/graphene-dapp-support
Adjustments for snapshot validation
2022-01-04 13:06:42 -06:00
Michel Santos
4fea001586 Fix Bookie plugin to provide a consistent data state
even when the node is started in replay mode
2022-01-03 10:24:32 -05:00
Michel Santos
8ec87b404f Enhance secondary_index
Enhance secondary_index by distinguishing between
previous objects loaded from persistence versus
new objects created during the session
2022-01-03 09:49:44 -05:00
Michel Santos
8325b25d0e Harmonize the activation date of GPOS 2022-01-03 09:49:44 -05:00
Michel Santos
c2675b4423 Re-allow build of programs for compatibility with Commit 082df7 2022-01-03 09:49:44 -05:00
Nathaniel
5fe3408893
Allow querying number of objects in object space
Previously, there was no good way to determine how many objects are in
an object space. Add a way to do so.
2022-01-02 14:50:17 -06:00
Nathaniel
d2dedbc4e4
Remove database unity build
Upstream dropped it and it was causing problems, so let it go!
2022-01-02 14:32:56 -06:00