Jude Nelson
4e0f149edf
Merge branch 'next' into feat/parser-v2
2022-07-11 15:56:42 +00:00
Jude Nelson
094286cf45
Merge pull request #3166 from stacks-network/feat/pox-getters
...
Feat/pox getters
2022-06-30 20:18:29 +00:00
Jude Nelson
9f10bfb628
Merge branch 'next' into feat/pox-getters
2022-06-29 18:30:40 +00:00
Jude Nelson
fc54d150f2
Merge pull request #3164 from stacks-network/feat/coinbase-pay-to-contract
...
Feat/coinbase pay to contract
2022-06-29 17:42:20 +00:00
Jude Nelson
6376520bb3
Merge pull request #3180 from stacks-network/fix/3159
...
Fix/3159
2022-06-29 17:41:37 +00:00
Brice Dobry
a52eef3c59
test: test int/uint with leading zeros
2022-06-28 22:44:03 -04:00
Brice Dobry
5525fceadb
chore: add comments to tests
2022-06-28 22:34:12 -04:00
Brice Dobry
9324482ec2
refactor: remove decode_hex function
...
Replace with existing `stacks_common::util:#️⃣ :hex_bytes`.
2022-06-28 22:28:10 -04:00
Brice Dobry
9d2634ef9f
fix: check sugared contract name length
2022-06-28 22:15:55 -04:00
Brice Dobry
4851c38802
fix: lexer handling of int beginning with 0
...
Addresses issue from review.
2022-06-28 21:49:11 -04:00
Jude Nelson
768a6085fd
chore: plumb through refactoring
2022-06-28 15:16:29 -04:00
Jude Nelson
d813eb81b5
chore: fix #3159 by separating out miner tests into their own test modules, grouped by functional requirements tested
2022-06-28 14:56:33 -04:00
Jude Nelson
e8c85f817a
chore: test coverage for both paying to contracts and standard principals
2022-06-28 14:01:02 -04:00
Jude Nelson
00838aa7d3
chore: support both standard and contract principals when building coinbases
2022-06-28 14:00:46 -04:00
Jude Nelson
608eabff8d
chore: it's now [miner].block_reward_recipient
2022-06-28 14:00:30 -04:00
Jude Nelson
06f088afca
chore: API sync
2022-06-28 14:00:19 -04:00
Jude Nelson
6a4b3c3861
feat: coinbase can encode a standard or contract principal as an alternative recipient, via the StacksMessasgeCodec trait implementation for clarity::vm::Value.
2022-06-28 13:59:40 -04:00
Jude Nelson
2422882867
chore: test coverage for codec for standard and contract principals as alterantive block reward recipients
2022-06-28 13:57:20 -04:00
Jude Nelson
60ec41b9db
chore: test coverage for paying the block reward to either an alternative contract or standard principal
2022-06-28 13:57:00 -04:00
Jude Nelson
bc90068f93
feat: block reward recipient is unconditionally set now, and can be either a standard or contract principal
2022-06-28 13:56:32 -04:00
Jude Nelson
c0de7e7747
feat: block reward can be paid to a standard principal or contract principal
2022-06-28 13:56:14 -04:00
Jude Nelson
cabcd793c3
feat: recipient can be either a standard or contract principal, and is always set henceforth (even if there is no alternative recipient, this value is set to the miner address)
2022-06-28 13:55:29 -04:00
Jude Nelson
bb4fec8494
chore: support PrincipalData as an optional block reward recipient
2022-06-28 13:55:08 -04:00
Jude Nelson
3a6e7f14c7
chore: log txid in rejecting coinbase tx
2022-06-27 13:40:40 -04:00
Jude Nelson
d6dbd1b002
chore: "warning" --> "note"
2022-06-27 13:40:25 -04:00
Jude Nelson
65dcc53d04
chore: run new integration test to make sure pay-to-contract activates
2022-06-27 13:39:48 -04:00
Jude Nelson
9f06d43290
fix: make some private functions read-only
2022-06-27 08:54:27 -04:00
Brice Dobry
7ca1b8e34b
fix: handle comments in traits_resolver
2022-06-24 23:14:48 -04:00
Brice Dobry
27ecc4ab8b
test: add unit test for empty string
2022-06-24 23:00:48 -04:00
Brice Dobry
0ed401ff99
fix: handle comments in definition_sorter
2022-06-24 10:50:28 -04:00
Brice Dobry
2482122ecb
feat: use Comment expression type
2022-06-23 00:20:42 -04:00
Brice Dobry
c9004a16a1
fix: allow identifier then comment with no space
...
For example, `foo;; a comment` is valid and should result in an
identifier, `foo`, followed by a comment.
2022-06-23 00:20:42 -04:00
Brice Dobry
a1a7ffe7d6
feat: add placeholder type and refactor lexer
...
The placeholder type is used to hold the original string from the source
when the code is invalid and the lexer/parser reports an error.
The lexer has been refactored such that every token indicates the exact
string from the source file. The later processing of the string happens
in the parser. Only invalid character type of errors should be reported
by the lexer.
2022-06-17 16:00:53 -04:00
Brice Dobry
536c4a89d6
test: add unit tests for tuple variants
...
Verify that the new parser accepts these variants:
- `{foo: bar,}`
- `{foo:bar}`
- `{foo:bar,}`
- `{foo:bar }`
- `{foo:bar ,}`
- `{foo:bar,baz:goo}`
2022-06-13 12:44:44 -04:00
Brice Dobry
f3970235a5
chore: cleanup dead code
2022-06-13 12:44:44 -04:00
Brice Dobry
817471e587
refactor: clean up increment expressions
2022-06-13 12:44:44 -04:00
Brice Dobry
5d8d2b9a09
fix: check for valid utf8 escape codes
2022-06-13 12:44:44 -04:00
Brice Dobry
8e7c116ad1
chore: add clarifying comment
2022-06-13 12:44:44 -04:00
Brice Dobry
069a4849db
refactor: use string for int/uint lexer tokens
...
The lexer just ensures valid characters, and the parser handles
converting it to an integer. This fixes the problem of a number that
exceeds the limit of an `i128` or `u128`.
2022-06-13 12:44:44 -04:00
Brice Dobry
ccdc704737
test: add test for non-Crockford char in principal
2022-06-13 12:44:44 -04:00
Brice Dobry
9a03e08977
fix: principals must use Crockford alphabet
2022-06-13 12:44:44 -04:00
Brice Dobry
7e7b73c068
chore: fix formatting
2022-06-13 12:44:44 -04:00
Brice Dobry
55f42a29de
fix: detect and report non-ascii chars early
...
This fix also improves the error-reporting from the lexer, and properly
uses an otherwise illegal character for signalling the end of the file.
2022-06-13 12:44:44 -04:00
Brice Dobry
d090ea2ad5
fix: remove unused errors and add test
2022-06-13 12:44:43 -04:00
Brice Dobry
9a69f6e0c6
feat: add new parser with fixes and improvements
...
Use of the new parser is gated on epoch 2.1 and the old parser is used
prior to then.
Resolves : #3124 , #3123 , #3128
2022-06-13 12:44:40 -04:00
Jude Nelson
62182c1207
feat: unit tests for new PoX getters
2022-06-09 15:42:04 -04:00
Jude Nelson
eb2a4d21e5
feat: add getters for PoX state that is currently not exposed via contract-calls
2022-06-09 15:41:26 -04:00
Jude Nelson
dfbd0e0d2a
fix: failing to preprocess a stacks block because it is invalid (e.g. it has a microblock parent stream and crosses an epoch boundary) should be an InvalidStacksBlock error, not a NotFoundError
2022-06-08 13:08:11 -04:00
Jude Nelson
90a9f68b99
Merge branch 'next' into feat/coinbase-pay-to-contract
2022-06-07 22:00:35 -04:00
Jude Nelson
3c9a5bd8e6
feat: add integration test to verify that the miner will build pay-to-contract blocks after epoch 2.1 starts, if configured to do so
2022-06-07 21:52:22 -04:00