aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-14 17:51:18 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-19 21:02:50 +0800
commitc41effd7c838b7925dc3ccc169e62be9be7af0e2 (patch)
tree714e0ae0bb60f85923ae836be1775b4919226e63 /docs
parent3413b8b7b382caa087442f000481180ca7e3b584 (diff)
downloaddexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.tar
dexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.tar.gz
dexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.tar.bz2
dexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.tar.lz
dexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.tar.xz
dexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.tar.zst
dexon-solidity-c41effd7c838b7925dc3ccc169e62be9be7af0e2.zip
Merge the selfdestruct sections
Diffstat (limited to 'docs')
-rw-r--r--docs/frequently-asked-questions.rst7
-rw-r--r--docs/introduction-to-smart-contracts.rst14
2 files changed, 9 insertions, 12 deletions
diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst
index a4315a14..489ad456 100644
--- a/docs/frequently-asked-questions.rst
+++ b/docs/frequently-asked-questions.rst
@@ -71,13 +71,6 @@ several blockchain explorers.
Contracts on the blockchain should have their original source
code published if they are to be used by third parties.
-Does ``selfdestruct()`` free up space in the blockchain?
-========================================================
-
-It removes the contract bytecode and storage from the current block
-into the future, but since the blockchain stores every single block (i.e.
-all history), this will not actually free up space on full/archive nodes.
-
Create a contract that can be killed and return funds
=====================================================
diff --git a/docs/introduction-to-smart-contracts.rst b/docs/introduction-to-smart-contracts.rst
index ad0a9650..7335ea07 100644
--- a/docs/introduction-to-smart-contracts.rst
+++ b/docs/introduction-to-smart-contracts.rst
@@ -455,13 +455,17 @@ receives the address of the new contract on the stack.
.. index:: selfdestruct
-``selfdestruct``
-================
+Self-destruct
+=============
The only possibility that code is removed from the blockchain is
when a contract at that address performs the ``selfdestruct`` operation.
The remaining Ether stored at that address is sent to a designated
-target and then the storage and code is removed.
+target and then the storage and code is removed from the state.
+
+.. warning:: Even if a contract's code does not contain a call to ``selfdestruct``,
+ it can still perform that operation using ``delegatecall`` or ``callcode``.
-Note that even if a contract's code does not contain a call to ``selfdestruct``,
-it can still perform that operation using ``delegatecall`` or ``callcode``.
+.. note:: The pruning of old contracts may or may not be implemented by Ethereum
+ clients. Additionally, archive nodes could choose to keep the contract storage
+ and code indefinitely.