Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
cc3c257
fix: remove hard-coded mainnet / chain_id / peer_version
lgalabru Dec 11, 2020
7d0710f
fix: addresses
lgalabru Dec 14, 2020
91c68e6
chore: cargo fmt
lgalabru Dec 14, 2020
88a93c8
fix: function update
lgalabru Dec 14, 2020
648ab6a
fix: streamline BITCOIN_*_FIRST constants
lgalabru Dec 15, 2020
95885f0
fix: strip additional hardcoded testnet params
lgalabru Dec 15, 2020
3d2ee76
fix: tests
lgalabru Dec 15, 2020
de50a78
Merge branch 'next' into fix/bitcoin-mainnet
lgalabru Dec 15, 2020
7b6453a
fix: atlas - bump timeout
lgalabru Dec 15, 2020
085194c
fix: bad merge
lgalabru Dec 15, 2020
a84f678
fix: bad merge
lgalabru Dec 15, 2020
0170c77
test: add coverage for genesis consistency
lgalabru Dec 17, 2020
1504d80
feat: add lockup events
lgalabru Dec 17, 2020
34854e4
feat: add lockup receipt
lgalabru Dec 17, 2020
c540368
chore: cargo fmt
lgalabru Dec 17, 2020
5638835
fix: split test
lgalabru Dec 17, 2020
e770417
feat: update contract with new constants
lgalabru Dec 22, 2020
1cf91bd
feat: attachment garbage collection
lgalabru Dec 22, 2020
9620578
feat: feed BNS data in genesis block
lgalabru Dec 22, 2020
64c382b
chore: cargo fmt
lgalabru Dec 22, 2020
0dee5f1
fix: test
lgalabru Dec 22, 2020
fe89bce
fix: typo
lgalabru Dec 22, 2020
7e4e9df
refactor: submit_mempool now taking a tx ref
lgalabru Dec 22, 2020
52579d5
feat: add some validation when importing BNS data
lgalabru Dec 22, 2020
afcb224
fix: tests
lgalabru Dec 22, 2020
b70e9bc
test: add coverage for test_keep_uninstantiated_attachments
lgalabru Dec 22, 2020
e8ed94c
chore: cargo fmt
lgalabru Dec 22, 2020
6f234f0
fix: regex
lgalabru Dec 22, 2020
035197a
Merge branch 'master' into feat/lockup-events
lgalabru Dec 22, 2020
a7c78d4
refactor: remove fields from config
lgalabru Dec 22, 2020
5187142
fix: attempt to avoid `MARF::dump_traverse` by using 1 clarity tx
lgalabru Dec 23, 2020
dc4200a
chore: cargo fmt
lgalabru Dec 23, 2020
c1e2817
chore: add note
lgalabru Dec 23, 2020
68073cd
refactor: 4 migrations, 1 clarity transaction
lgalabru Dec 23, 2020
7042e23
chore: cargo fmt
lgalabru Dec 23, 2020
757699f
Merge pull request #2209 from blockstack/master
Dec 23, 2020
d14be53
remove the VRF key register consensus hash validation. All VRF keys …
jcnelson Dec 24, 2020
aa813dd
address #2221 (removes duplicate key reference filter), and address #…
jcnelson Dec 27, 2020
0e14776
remove Burnchain::filter_block_commits_with_same_VRF_key (fixes #2221)
jcnelson Dec 27, 2020
3b90ac7
update the distribution calculation to correctly consider the correct…
jcnelson Dec 27, 2020
4bbb0d2
some boilerplate
jcnelson Dec 27, 2020
23d2138
generate commit_outs correctly for block-commits -- a PoB-only block-…
jcnelson Dec 27, 2020
dd664db
document MINING_COMMITMENT_WINDOW
jcnelson Dec 27, 2020
624d020
gah, wrong type!
jcnelson Dec 27, 2020
34a5bbb
remove wrong assertion
jcnelson Dec 27, 2020
fee1d75
disable windowing post-sunset
jcnelson Dec 28, 2020
54d63b3
fix failing test
jcnelson Dec 28, 2020
5075fb6
bump atlas integration test timeout to 120s
jcnelson Dec 28, 2020
8c9b3e8
Merge branch 'next'
lgalabru Dec 28, 2020
9c6d481
Merge remote-tracking branch 'origin/master' into next
Dec 28, 2020
18870e3
Merge remote-tracking branch 'origin/master' into next
Dec 28, 2020
76f428c
Merge remote-tracking branch 'origin/fix/bitcoin-mainnet' into feat/i…
Dec 28, 2020
dbe8f0a
fix: address remaining feedbacks
lgalabru Dec 28, 2020
383f070
Merge branch 'next' into fix/bitcoin-mainnet
lgalabru Dec 28, 2020
69bb4fb
fix: merge issue
lgalabru Dec 28, 2020
c956ec2
Merge branch 'fix/bitcoin-mainnet'
lgalabru Dec 28, 2020
513fc8c
add initial block reward start config
Dec 28, 2020
7277bbf
Merge remote-tracking branch 'origin/fix/bitcoin-mainnet' into feat/i…
Dec 28, 2020
ee68d3f
Merge pull request #2173 from blockstack/fix/bitcoin-mainnet
lgalabru Dec 28, 2020
8e5d276
add test for initial block reward height < first block height
Dec 28, 2020
d56b81e
Merge pull request #2225 from blockstack/feat/initial-reward-2224
Dec 29, 2020
888d059
Merge branch 'next' into feat/vrf-key-no-consensus-hash
jcnelson Dec 29, 2020
fde1655
update cost-voting to use block-height rather than burn-block-height
Dec 29, 2020
e38029b
add test for forking behavior in cost voting contract
Dec 29, 2020
9c6035c
address feedback and simplify distribution calculation
jcnelson Dec 29, 2020
20f7304
consolidate logic for deducing which prior block-commits must burn
jcnelson Dec 29, 2020
c9285de
add test to ensure that a block-commit can reference the same VRF key…
jcnelson Dec 29, 2020
8cbdabc
fix `stx-liquid-supply`
Dec 30, 2020
0bde46c
feat: pox adjustments
lgalabru Dec 30, 2020
27d0b1c
fix: prevent upload > 16mb
lgalabru Dec 30, 2020
6e6e6e9
feat: add index
lgalabru Dec 30, 2020
e3470b0
Merge pull request #2188 from blockstack/fix/chainstate-loading
lgalabru Dec 30, 2020
142e7e3
Merge pull request #2218 from blockstack/feat/vrf-key-no-consensus-hash
jcnelson Dec 30, 2020
89a40ae
Merge pull request #2227 from blockstack/feat/cost-vote-fixes-2223
Dec 30, 2020
319faf2
update xenon magic bytes
Dec 30, 2020
3a340fe
Merge branch 'next' into feat/atlas-followup
lgalabru Dec 30, 2020
7d3da3c
oops, integration tests check magic bytes!
Dec 30, 2020
a27d482
fix: merge issue
lgalabru Dec 30, 2020
51ca1e9
chore: cargo fmt
lgalabru Dec 30, 2020
dc69365
fix comment
lgalabru Dec 30, 2020
954f8c2
doc: explain edge case
lgalabru Dec 30, 2020
b30b8b9
fix: restore / rewrite previous check
lgalabru Dec 30, 2020
68f8f9e
chore: cargo fmt
lgalabru Dec 30, 2020
13d2958
Merge branch 'feat/atlas-followup' into feat/lockup-events
lgalabru Dec 30, 2020
62d90f0
chore: cargo fmt
lgalabru Dec 30, 2020
b26e6e9
fix: update test_chainstate_full_genesis_consistency
lgalabru Dec 30, 2020
0e51df9
fix: rewrite tests
lgalabru Dec 30, 2020
fd507c5
fix: pull first_block_height from context instead
lgalabru Dec 30, 2020
b77650a
chore: cargo fmt
lgalabru Dec 30, 2020
9c829a0
fix test cases in `next`
Dec 30, 2020
64c2507
Merge pull request #2204 from blockstack/feat/atlas-followup
lgalabru Dec 30, 2020
dcd6ce3
Merge pull request #2189 from blockstack/feat/lockup-events
lgalabru Dec 30, 2020
4ace18a
Merge branch 'next' into feat/reset-xe-2
Dec 30, 2020
5a4cb19
test: fix regression (padding odd recipients count)
lgalabru Dec 30, 2020
a54d7b8
Merge branch 'next' into feat/pox-fixes
lgalabru Dec 30, 2020
321fb17
feat: remove check
lgalabru Dec 30, 2020
be8da3b
Merge branch 'feat/pox-fixes' of github.com:blockstack/stacks-blockch…
lgalabru Dec 30, 2020
bea3467
fix pox test
Dec 30, 2020
2ba7970
chore: cargo fmt
lgalabru Dec 30, 2020
935f95b
fix remaining tests
lgalabru Dec 30, 2020
438e0e7
fix: reintroduce check
lgalabru Dec 30, 2020
fd71c6a
Merge pull request #2235 from blockstack/feat/reset-xe-2
Dec 30, 2020
1e5e08c
fix: warnings
lgalabru Dec 30, 2020
7db5c77
Merge branch 'next' into feat/pox-fixes
lgalabru Dec 30, 2020
0419ad2
fix: remove lockup events
lgalabru Dec 30, 2020
badd707
chore: cargo fmt
lgalabru Dec 30, 2020
8f662ef
Merge pull request #2233 from blockstack/feat/pox-fixes
lgalabru Dec 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ features = ["std"]
[dev-dependencies]
assert-json-diff = "1.0.0"
criterion = "0.3"
stx_genesis = { package = "stx-genesis", path = "./stx-genesis/."}

[features]
default = ["developer-mode"]
Expand Down
1 change: 1 addition & 0 deletions bns-test/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
},
},
moduleFileExtensions: ['js', 'ts', 'd.ts'],
testTimeout: 2000000
// setupFiles: ['./tests/global-setup.ts'],
// setupFilesAfterEnv: ['./tests/setup.ts'],
};
2 changes: 1 addition & 1 deletion bns-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lint": "tslint -p tsconfig.json 'src/**/*.ts' 'test/**/*.ts'",
"lint-fix": "tslint --fix -p tsconfig.json 'src/**/*.ts' 'test/**/*.ts'",
"test": "jest",
"test:watch": "jest --watch --coverage=false --runInBand"
"test:watch": "jest --watch --coverage=false"
},
"engines": {
"node": ">=10"
Expand Down
18 changes: 9 additions & 9 deletions bns-test/src/bns-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class BNSClient extends Client {
}

// (name-import (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
// (zonefile-hash (buff 20)))
async nameImport(namespace: string,
name: string,
Expand Down Expand Up @@ -168,7 +168,7 @@ export class BNSClient extends Client {
}

// (name-register (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
// (salt (buff 20))
// (zonefile-hash (buff 20)))
async nameRegister(namespace: string,
Expand All @@ -190,7 +190,7 @@ export class BNSClient extends Client {
}

// (name-update (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
// (zonefile-hash (buff 20)))
async nameUpdate(namespace: string,
name: string,
Expand All @@ -210,7 +210,7 @@ export class BNSClient extends Client {
}

// (name-transfer (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
// (new-owner principal)
// (zonefile-hash (optional (buff 20))))
async nameTransfer(namespace: string,
Expand All @@ -235,7 +235,7 @@ export class BNSClient extends Client {
}

// (name-revoke (namespace (buff 20))
// (name (buff 16)))
// (name (buff 48)))
async nameRevoke(namespace: string,
name: string,
params: {
Expand All @@ -253,7 +253,7 @@ export class BNSClient extends Client {
}

// (name-renewal (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
// (stx-to-burn uint)
// (new-owner (optional principal))
// (zonefile-hash (optional (buff 20))))
Expand Down Expand Up @@ -281,7 +281,7 @@ export class BNSClient extends Client {
}

// (get-name-zonefile (namespace (buff 20))
// (name (buff 16)))
// (name (buff 48)))
async getNameZonefile(namespace: string,
name: string,
params: {
Expand All @@ -299,7 +299,7 @@ export class BNSClient extends Client {
}

// (can-name-be-registered (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
async canNameBeRegistered(namespace: string,
name: string): Promise<Receipt> {
const args = [`0x${this.toHexString(namespace)}`, `0x${this.toHexString(name)}`];
Expand All @@ -315,7 +315,7 @@ export class BNSClient extends Client {
}

// (get-name-price (namespace (buff 20))
// (name (buff 16))
// (name (buff 48))
async getNamePrice(namespace: string,
name: string): Promise<Receipt> {
const args = [`0x${this.toHexString(namespace)}`, `0x${this.toHexString(name)}`];
Expand Down
8 changes: 4 additions & 4 deletions bns-test/test/name_import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe("BNS Test Suite - NAME_IMPORT", () => {
sender: cases[0].namespaceOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('Returned: u12');
expect(receipt.result).include('Returned: u146');

receipt = await bns.namespaceReveal(
cases[0].namespace,
Expand Down Expand Up @@ -222,7 +222,7 @@ describe("BNS Test Suite - NAME_IMPORT", () => {
expect(receipt.success).eq(true);


// Charlie trying to register 'alpha.blockstack' should fail
// Charlie trying to register 'alpha.blockstack' should succeed
receipt = await bns.namePreorder(
cases[0].namespace,
"alpha",
Expand All @@ -231,7 +231,7 @@ describe("BNS Test Suite - NAME_IMPORT", () => {
sender: charlie
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u29');
expect(receipt.result).include('u163');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand Down Expand Up @@ -280,7 +280,7 @@ describe("BNS Test Suite - NAME_IMPORT", () => {
expect(receipt.success).eq(false);

// Resolving an imported name should fail after expiration
await bns.mineBlocks(100);
await bns.mineBlocks(5100);

receipt = await bns.getNameZonefile(
cases[0].namespace,
Expand Down
8 changes: 4 additions & 4 deletions bns-test/test/name_preorder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe("BNS Test Suite - NAME_PREORDER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u33');
expect(receipt.result).include('u167');

// should fail if the same order is being re-submitted by Bob
receipt = await bns.namePreorder(
Expand All @@ -142,11 +142,11 @@ describe("BNS Test Suite - NAME_PREORDER", () => {
sender: alice
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u35');
expect(receipt.result).include('u169');


// should succeed once claimability TTL expired
await mineBlocks(bns, 10);
await mineBlocks(bns, 154);
receipt = await bns.namePreorder(
cases[0].namespace,
"bob",
Expand All @@ -155,7 +155,7 @@ describe("BNS Test Suite - NAME_PREORDER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u46');
expect(receipt.result).include('u324');
});
});
});
3 changes: 1 addition & 2 deletions bns-test/test/name_prices.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@ import {
await bns.deployContract();
});


it("Testing name prices", async () => {
// Given a launched namespace 'blockstack', owned by Alice
var receipt = await bns.namespacePreorder(cases[0].namespace, cases[0].salt, cases[0].value, {
sender: cases[0].namespaceOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u12');
expect(receipt.result).include('u146');

receipt = await bns.namespaceReveal(
cases[0].namespace,
Expand Down
22 changes: 11 additions & 11 deletions bns-test/test/name_register.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: cases[1].namespaceOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u33');
expect(receipt.result).include('u167');

receipt = await bns.namespaceReveal(
cases[1].namespace,
Expand All @@ -132,7 +132,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
100, {
sender: bob
});
expect(receipt.result).include('u35');
expect(receipt.result).include('u169');
expect(receipt.success).eq(true);

receipt = await bns.nameRegister(
Expand All @@ -152,7 +152,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: cases[0].namespaceOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u37');
expect(receipt.result).include('u171');

receipt = await bns.namespaceReveal(
cases[0].namespace,
Expand Down Expand Up @@ -194,7 +194,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: bob
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u42');
expect(receipt.result).include('u176');

// should fail
receipt = await bns.nameRegister(
Expand All @@ -216,7 +216,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u44');
expect(receipt.result).include('u178');

// Bob registering the name 'Bob.blockstack' should fail
receipt = await bns.nameRegister(
Expand All @@ -238,7 +238,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u46');
expect(receipt.result).include('u180');

// Bob registering the name 'bob.blockstack'
// should succeed
Expand Down Expand Up @@ -282,7 +282,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: charlie
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u50');
expect(receipt.result).include('u184');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand All @@ -309,7 +309,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u53');
expect(receipt.result).include('u187');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand All @@ -323,7 +323,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {


// should succeed once 'bob.blockstack' is expired
await mineBlocks(bns, cases[0].renewalRule);
await mineBlocks(bns, cases[0].renewalRule + 5000);

receipt = await bns.namePreorder(
cases[0].namespace,
Expand All @@ -333,7 +333,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u65');
expect(receipt.result).include('u5199');

receipt = await bns.getNameZonefile(
cases[0].namespace,
Expand Down Expand Up @@ -370,7 +370,7 @@ describe("BNS Test Suite - NAME_REGISTER", () => {
sender: charlie
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u69');
expect(receipt.result).include('u5203');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand Down
4 changes: 2 additions & 2 deletions bns-test/test/name_renewal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe("BNS Test Suite - NAME_RENEWAL", () => {

// When Bob is renewing 'bob.blockstack' at block #56 (expired)
// should fail renewing
await mineBlocks(bns, 16);
await mineBlocks(bns, 16 + 5000);

receipt = await bns.getNameZonefile(
cases[0].namespace,
Expand Down Expand Up @@ -307,7 +307,7 @@ describe("BNS Test Suite - NAME_RENEWAL", () => {
sender: dave
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u56');
expect(receipt.result).include('u5190');
block_height += 1;

receipt = await bns.nameRegister(
Expand Down
6 changes: 3 additions & 3 deletions bns-test/test/name_revoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe("BNS Test Suite - NAME_REVOKE", () => {
sender: bob
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u24');
expect(receipt.result).include('u158');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand Down Expand Up @@ -267,7 +267,7 @@ describe("BNS Test Suite - NAME_REVOKE", () => {
sender: bob
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u28');
expect(receipt.result).include('u162');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand Down Expand Up @@ -326,7 +326,7 @@ describe("BNS Test Suite - NAME_REVOKE", () => {
sender: alice
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u34');
expect(receipt.result).include('u168');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand Down
8 changes: 4 additions & 4 deletions bns-test/test/name_transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe("BNS Test Suite - NAME_TRANSFER", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u16');
expect(receipt.result).include('u150');
block_height += 1;

receipt = await bns.nameRegister(
Expand All @@ -164,7 +164,7 @@ describe("BNS Test Suite - NAME_TRANSFER", () => {
sender: charlie
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u18');
expect(receipt.result).include('u152');
block_height += 1;

receipt = await bns.nameRegister(
Expand Down Expand Up @@ -280,7 +280,7 @@ describe("BNS Test Suite - NAME_TRANSFER", () => {
"charlie", {
sender: cases[0].nameOwner
});
expect(receipt.result).include('0x00');
expect(receipt.result).include('(zonefile-hash 0x)');
expect(receipt.success).eq(true);

// Bob should not be able to update 'charlie.blockstack'
Expand Down Expand Up @@ -321,7 +321,7 @@ describe("BNS Test Suite - NAME_TRANSFER", () => {
"bob", {
sender: cases[0].nameOwner
});
expect(receipt.result).include('0x00');
expect(receipt.result).include('(zonefile-hash 0x))');
expect(receipt.success).eq(true);

// Bob should be able to update its zonefile
Expand Down
2 changes: 1 addition & 1 deletion bns-test/test/name_update.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ describe("BNS Test Suite - NAME_UPDATE", () => {
sender: cases[0].nameOwner
});
expect(receipt.success).eq(true);
expect(receipt.result).include('u20');
expect(receipt.result).include('u154');

receipt = await bns.nameRegister(
cases[0].namespace,
Expand Down
Loading