mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-19 23:21:46 +03:00
2.0 updates (#15580)
* add names for new error codes (from chia_rs) * add constant for SOFTFORK condition opcode * add chialisp constant for SOFTFORK condition
This commit is contained in:
parent
2d437c6aa5
commit
3d94d3a7ff
@ -55,6 +55,10 @@ class ConditionOpcode(bytes, enum.Enum):
|
||||
ASSERT_BEFORE_HEIGHT_RELATIVE = bytes([86])
|
||||
ASSERT_BEFORE_HEIGHT_ABSOLUTE = bytes([87])
|
||||
|
||||
# to be activated with the 2.0 hard fork.
|
||||
# the first parameter is always the cost of the condition
|
||||
SOFTFORK = bytes([90])
|
||||
|
||||
# A condition that is always true and always ignore all arguments
|
||||
REMARK = bytes([1])
|
||||
|
||||
|
@ -175,6 +175,15 @@ class Err(Enum):
|
||||
|
||||
ASSERT_EPHEMERAL_FAILED = 140
|
||||
EPHEMERAL_RELATIVE_CONDITION = 141
|
||||
# raised if a SOFTFORK condition invokes an unknown extension in mempool
|
||||
# mode
|
||||
INVALID_SOFTFORK_CONDITION = 142
|
||||
# raised if the first argument to the SOFTFORK condition is not a valid
|
||||
# cost. e.g. negative or > UINT64 MAX
|
||||
INVALID_SOFTFORK_COST = 143
|
||||
# raised if a spend issues too many assert spend, assert puzzle,
|
||||
# assert announcement or create announcement
|
||||
TOO_MANY_ANNOUNCEMENTS = 144
|
||||
|
||||
|
||||
class ValidationError(Exception):
|
||||
|
@ -56,4 +56,8 @@
|
||||
|
||||
; A condition that is always true and always ignore all arguments
|
||||
(defconstant REMARK 1)
|
||||
|
||||
; A condition whose first argument specifies its cost, but is unkown otherwise
|
||||
; It's a place-holder for soft-forking in new conditions
|
||||
(defconstant SOFTFORK 90)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user