Jianping Wu
33bb11cdda
Re-arranged keva ops.
...
Changed genesis block reward to 0.00001 coin.
6 years ago
Jianping Wu
df20cfc6d2
WIP: implemented keva_delete.
...
Problem: after the call, the corresponding keva coin is gone!
6 years ago
Jianping Wu
e30e56ef11
OK, it was decided that MAX_SCRIPT_ELEMENT_SIZE shall be 3072.
6 years ago
Jianping Wu
2ba7b82896
Handled keva script with getAddress.
6 years ago
Jianping Wu
c56fb50b55
WIP: namespace/key
6 years ago
Jianping Wu
fb0acfc6d9
WIP: started implementing keva_namespace.
6 years ago
Jianping Wu
855dc114e9
WIP: support two OPs.
6 years ago
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
7 years ago
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
7 years ago
Anthony Towns
d601f16621
Fix invalid memory access in CScript::operator+=
7 years ago
Gregory Maxwell
08f71c29ea
[Trivial] Add a comment on the use of prevector in script.
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
7 years ago
Pieter Wuille
0aadc11fd8
Avoid dereference-of-casted-pointer
7 years ago
Pieter Wuille
e241a63c23
Clarify prevector::erase and avoid swap-to-clear
7 years ago
Andrew Chow
ac4e438229
Sanity check transaction scripts in DecodeHexTx
...
Make sure that the scripts of decoded transactions are valid scripts.
7 years ago
Andrew Chow
5b75c47784
Add a valid opcode sanity check to CScript
...
Added a function in CScript that checks if the script contains valid opcodes.
Add a test for that function
7 years ago
Gregory Sanders
cb184b3a54
Add constant for maximum stack size
7 years ago
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
8 years ago
Pieter Wuille
2ddfcfd2d6
Make CScript (and prevector) c++11 movable.
...
Such moves are used when reallocating vectors that contain them,
for example.
8 years ago
Pavel Janík
9de90bb749
Do not shadow variables (gcc set)
8 years ago
Pieter Wuille
f6fb7acda4
Move CTxInWitness inside CTxIn
8 years ago
BtcDrak
14d01309be
Rename OP_NOP3 to OP_CHECKSEQUENCEVERIFY
8 years ago
NicolasDorier
745eb678ef
[RPC] signrawtransaction can sign P2WSH
8 years ago
Pieter Wuille
449f9b8deb
BIP141: Witness program
8 years ago
Pieter Wuille
7030d9eb47
BIP144: Serialization, hashes, relay (sender side)
...
Contains refactorings by Eric Lombrozo.
Contains fixup by Nicolas Dorier.
Contains cleanup of CInv::GetCommand by Alex Morcos
8 years ago
Pieter Wuille
4f87af6fc7
Treat overly long scriptPubKeys as unspendable
8 years ago
Pieter Wuille
f8e6fb1800
Introduce constant for maximum CScript length
8 years ago
Patrick Strateman
d1d7775587
Improve worst-case behavior of CScript::FindAndDelete
...
Thanks to Sergio Lerner for identifying this issue and suggesting this kind of solution.
8 years ago
Patrick Strateman
c0f660c3a3
Replace c-style cast with c++ style static_cast.
8 years ago
Patrick Strateman
ec9ad5f199
Replace memcmp with std::equal in CScript::FindAndDelete
...
Function is stl; std::equal just makes more sense.
8 years ago
Mark Friedenbach
53e53a33c9
BIP112: Implement CHECKSEQUENCEVERIFY
...
- Replace NOP3 with CHECKSEQUENCEVERIFY (BIP112)
<nSequence> CHECKSEQUENCEVERIFY -> <nSequence>
- Fails if txin.nSequence < nSequence, allowing funds of a txout to be locked for a number of blocks or a duration of time after its inclusion in a block.
- Pull most of CheckLockTime() out into VerifyLockTime(), a local function that will be reused for CheckSequence()
- Add bitwise AND operator to CScriptNum
- Enable CHECKSEQUENCEVERIFY as a standard script verify flag
- Transactions that fail CSV verification will be rejected from the mempool, making it easy to test the feature. However blocks containing "invalid" CSV-using transactions will still be accepted; this is *not* the soft-fork required to actually enable CSV for production use.
8 years ago
mb300sd
37d271d7cc
Rename OP_NOP2 to OP_CHECKLOCKTIMEVERIFY.
9 years ago
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
9 years ago
Pieter Wuille
114b5812f6
Prevector type
9 years ago
David Hill
b48da5c189
script: Remove magic numbers
...
This adds two new constants, MAX_OPS_PER_SCRIPT and
MAX_PUBKEYS_PER_MULTISIG.
9 years ago
Peter Todd
da894ab5da
Accept any sequence of PUSHDATAs in OP_RETURN outputs
...
Previously only one PUSHDATA was allowed, needlessly limiting
applications such as matching OP_RETURN contents with bloom filters that
operate on a per-PUSHDATA level. Now any combination that passes
IsPushOnly() is allowed, so long as the total size of the scriptPubKey
is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings)
Also, this fixes the odd bug where previously the PUSHDATA could be
replaced by any single opcode, even sigops consuming opcodes such as
CHECKMULTISIG. (20 sigops!)
9 years ago
Peter Todd
5d8709c3b7
Add IsPushOnly(const_iterator pc)
...
Allows IsPushOnly() to be applied to just part of the script for
OP_RETURN outputs.
9 years ago
mruddy
af3208bfa6
Resolve issue 3166.
...
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts.
This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
9 years ago
Pieter Wuille
9e38d0f745
Separate core memory usage computation in core_memusage.h
9 years ago
Pieter Wuille
5098c47b24
Implement accurate memory accounting for mempool
9 years ago
Jonas Schnelli
5496253966
add CReserveScript to allow modular script keeping/returning
...
- use one CReserveScript per mining thread
9 years ago
Peter Todd
bc60b2b4b4
Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65)
...
<nLockTime> CHECKLOCKTIMEVERIFY -> <nLockTime>
Fails if tx.nLockTime < nLockTime, allowing the funds in a txout to be
locked until some block height or block time in the future is reached.
Only the logic and unittests are implemented; this commit does not have
any actual soft-fork logic in it.
Thanks to Pieter Wuille for rebase.
Credit goes to Gregory Maxwell for the suggestion of comparing the
argument against the transaction nLockTime rather than the current
time/blockheight directly.
9 years ago
Philip Kaufmann
5207f33f45
fix header include groups
9 years ago
Peter Todd
48e9c57cf0
Move LOCKTIME_THRESHOLD to src/script/script.h
...
Will now be needed by CHECKLOCKTIMEVERIFY code.
9 years ago
Peter Todd
99088d60d8
Make CScriptNum() take nMaxNumSize as an argument
...
While the existing numeric opcodes are all limited to 4-byte bignum
arguments, new opcodes will need different limits.
9 years ago
Wladimir J. van der Laan
4e853aa163
src/script/script.h: endian compatibility for PUSHDATA sizes
9 years ago
Pavel Janík
5262fde0ec
Remove whitespaces before double colon in errors and logs
10 years ago
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
10 years ago
Michael Ford
b9a36b15bf
Make comments in /src/script doxygen compatible
10 years ago
Pavel Janík
84738627ce
Fix all header defines
10 years ago