Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion book/src/drive/indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Let's break that down:

- **`DataContractDocuments`** — root tree byte (`u8` constant) for "this is a document index, not a contract definition or identity record".
- **`contract_id`** — 32-byte contract identifier.
- **`1`** — separator distinguishing the document storage area from the contract definition area within `contract_id`.
- **`1`** — separator distinguishing the document storage area from the contract definition area within `contract_id`. Its siblings under `contract_id` are `0`, the serialized contract (or, for a contract that keeps history, the history subtree whose key `0` references the latest revision), and, from protocol version 14, `2`, the contract's version number as a four-byte item that `getDataContractsLatestVersions` reads and proves without the contract.
- **`doc_type_name`** — UTF-8 bytes of the document type (`"person"`, `"contactRequest"`, etc.).
- **`propA_name, vA, propB_name, vB`** — alternating property key and serialized value, one pair per index property, in declaration order.
- **`0`** — the conventional "terminal slot" byte under each value level; it's where the actual reference (or sub-tree-of-references) lives.
Expand Down
22 changes: 14 additions & 8 deletions packages/dapi-grpc/protos/platform/v0/platform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,20 @@ message GetDataContractResponse {
oneof version { GetDataContractResponseV0 v0 = 1; }
}

// Returns the current version number of each requested data contract. The
// unproved form is answered from Drive's contract cache and carries one
// integer per contract, which makes it the cheap way for a client to check
// that the contracts it already holds are still current; serialized
// contracts are added only when `include_contracts` is set. Every requested
// id gets an entry; an id no contract has gets an entry without `version`.
// With `prove`, the proof is the multi-contract proof `getDataContracts`
// returns, and it carries the contracts whatever `include_contracts` says.
// Returns the current version number of each requested data contract: the
// cheap way for a client to check that the contracts it already holds are
// still current. Every distinct requested id gets an entry; an id no contract has gets
// an entry without `version`. Serialized contracts are added only when
// `include_contracts` is set.
//
// From protocol version 14 every contract carries a four-byte version item
// beside it in state. Without `include_contracts`, the unproved form answers
// from Drive's contract cache or that item without loading a contract, and
// the proof covers the items, a few hundred bytes of hash path per contract.
// With `include_contracts`, and on earlier protocol versions, the unproved
// form reads the contracts through the cache and the proof is the
// multi-contract proof `getDataContracts` returns, which carries the
// contracts.
message GetDataContractsLatestVersionsRequest {
message GetDataContractsLatestVersionsRequestV0 {
repeated bytes ids =
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-test-suite/test/e2e/withdrawals.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ describe('Withdrawals', function withdrawalsTest() {

expect.fail('should throw broadcast error');
} catch (e) {
expect(e.message).to.be.equal('withdrawal deletion is allowed only for COMPLETE statuses');
expect(e.message).to.be.equal('withdrawal deletion is allowed only for COMPLETE or FAILED statuses');
expect(e.code).to.equal(40500);
}
});
Expand Down
Loading
Loading