Skip to main content

Identification

Summary

ethdebug/format/data/identification is the canonical representation of what an object is. It contains the name of a schema and the version of the specification that defines that schema. An object carries it in an ethdebug field.

Each of the three root schemas, ethdebug/format/program, ethdebug/format/info and ethdebug/format/info/resources, includes ethdebug/format/data/identification under the key ethdebug. An object in any of these schemas may carry a field shaped like this:

{
"ethdebug": {
"schema": "ethdebug/format/program",
"version": "<the current version>"
}
}

schema is the name of the schema the object conforms to; each root schema pins this to its own name. The schema's $id is schema: followed by this name. version is the version of the ethdebug/format specification that defines schema.

Loading ....

Rules​

Which version to write​

A producer writes the version of the specification whose schemas it targets.

Absent field​

An object without this field predates it.

Nesting​

A program nested inside an info document (at programs[i]) may omit the field. If both the info document and the program carry it, their version values must be equal.

The same rule applies to a program that sits beside a resources object.

For example, in solc's standard JSON output, evm.bytecode.ethdebug and evm.deployedBytecode.ethdebug are programs that sit beside the top-level ethdebug wrapper, whose resources member is the resources object.

Required later​

The field is optional for now. It becomes required in the stable 0.1.0 release. ethdebug/format/program and ethdebug/format/info are closed objects (unevaluatedProperties: false), so the previous release's schemas reject an object that carries the field.

Resolution of names​

A schema value of ethdebug/format/<path> names the schema whose source is schemas/<path>.schema.yaml in the ethdebug/format specification, at the version named alongside it. The schema's $id is schema:ethdebug/format/<path>. The $id is an identifier, not a web address, and emitted data should not place it in a $schema key: editors treat $schema as a URL and report an error.