IP Library Granted Patent US 12682346
Granted Patent B1
US 12682346 · App. 19/402,886 · Granted Jul 14, 2026

Encoding data structures as bit pattern representations in smart contracts

Inventor: David Ngene (Portland, OR)
Assignee: Pacmodo Inc.
G06Q20/389G06Q20/36
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12682346
App. No.
19/402,886
Granted
Jul 14, 2026
Kind
B1
Abstract

Systems and methods for storing bit pattern representations of a data structure in a smart contract and performing algorithm identifying operations using the bit pattern representations are disclosed herein. In some embodiments, a data structure is encoded as a bit pattern representation using a predefined schema. A storage operation may then be performed to store the bit pattern representation and a schema identifier associated with the predefined schema within a smart contract. A request to determine an identity of an algorithm that generated a particular output may be received and the bit pattern representation may responsively be decoded from data stored in the smart contract to generate a set of data structure elements. A response may be provided to the request by performing zero-knowledge proof based on the set of data structure elements, a set of input values, and a set of output values.

Claims (94)

1 . A method comprising:

encoding, based on a predefined schema, a data structure as a bit pattern representation, wherein the bit pattern representation is a numerically-based memory image of the data structure, and wherein the bit pattern representation is stored in one or more slots having a fixed bit size;

based on the fixed bit size and a total bit size of the bit pattern representation, determining a set of slot indices to map to portions of the bit pattern representation;

performing a storage operation including, for each slot index in the set of slot indices:

storing, in a smart contract, a mapping of a schema identifier associated with the predefined schema to the slot index, wherein the smart contract is associated with a blockchain, and

storing, in the smart contract, a mapping of a particular portion of the bit pattern representation to the slot index, wherein the particular portion includes a first number of bits less than or equal to the fixed bit size;

receiving a request to determine an identity of an algorithm that generated a particular output, wherein the request includes a set of input values and a set of output values;

in response to receiving the request, decoding the bit pattern representation from data stored in the smart contract, thereby generating a set of data structure elements; and

providing a response to the request by performing a zero-knowledge proof, wherein the zero-knowledge proof is based on the set of data structure elements, the set of input values, and the set of output values, and wherein the response includes the identity of the algorithm.

2 . The method of claim 1 , further comprising:

receiving, from a user associated with a cryptographic wallet address, the data structure;

storing, in the smart contract, a mapping of the schema identifier to the cryptographic wallet address;

for each slot index in the set of slot indices:

storing, in the smart contract, a mapping of the particular portion of the bit pattern representation to the cryptographic wallet address; and

in response to receiving the request from the user, decoding the bit pattern representation by:

retrieving, using the cryptographic wallet address, the bit pattern representation and the schema identifier from the smart contract, and

based on the schema identifier, applying the predefined schema to the bit pattern representation.

3 . The method of claim 2 , further comprising:

storing, in the smart contract, the cryptographic wallet address within a list of authorized operators, wherein the list of authorized operators indicates a set of cryptographic wallet addresses having permission to modify the bit pattern representation;

receiving a modification to the bit pattern representation, wherein the modification is associated with a second cryptographic wallet address; and

upon determining that the second cryptographic wallet address is included in the set of cryptographic wallet addresses, modifying one or more mappings stored in the smart contract to reflect the modification.

4 . The method of claim 3 , further comprising:

upon performing the storage operation, recording a version identifier associated with the data structure to the blockchain; and

upon modifying the one or more mappings, updating the version identifier to reflect the modification.

5 . The method of claim 1 , further comprising:

recording an event log to the blockchain, wherein the event log is an immutable record of the storage operation that includes the set of slot indices, thereby enabling a listener to reconstruct the data structure based on the event log.

6 . The method of claim 5 , further comprising:

generating a schema registry including the predefined schema and the schema identifier; and

transmitting the schema registry to the listener, wherein the listener reconstructs the data structure by:

identifying the predefined schema based on the set of slot indices included in the event log and the schema registry, and

applying the predefined schema to the portions of the bit pattern representation to which the set of slot indices are mapped.

7 . The method of claim 1 , wherein:

the data structure is a set of model weights, and

the predefined schema is an algorithm for converting between individual weights and 32-bit portions of the bit pattern representation, the algorithm including shifting each weight from the set of model weights by a number of bit positions equal to 32 multiplied by an index of the weight within the set of model weights.

8 . The method of claim 1 , wherein:

the data structure includes an 8-bit opcode and a set of operands associated with the opcode,

the total bit size is 256 bits, and

the predefined schema is an algorithm that encodes the 8-bit opcode as a leftmost 8 bits of the bit pattern representation and the set of operands as a remaining 248 bits of the bit pattern representation by:

determining a bit size equal to 248 divided by a number of operands in the set of operands, and

encoding each operand from the set of operands in the bit pattern representation using a second number of bits equal to the bit size.

9 . The method of claim 1 , wherein:

the data structure is a set of nucleotide bases from a genetic sequence, and

the predefined schema is an algorithm for converting between individual nucleotide bases and 2-bit portions of the bit pattern representation.

10 . The method of claim 1 , wherein:

the data structure is a lexicographic sequence, and

the predefined schema is an algorithm for converting between individual characters in the lexicographic sequence and 8-bit portions of the bit pattern representation.

11 . A system comprising:

at least one hardware processor; and

at least one non-transitory memory storing instructions, which, when executed by the at least one hardware processor, cause the system to:

encode, based on a predefined schema, a data structure as a bit pattern representation, wherein the bit pattern representation is a numerically-based memory image of the data structure, and wherein the bit pattern representation is stored in one or more slots having a fixed bit size;

based on the fixed bit size and a total bit size of the bit pattern representation, determine a set of slot indices to map to portions of the bit pattern representation;

perform a storage operation including, for each slot index in the set of slot indices:

storing, in a smart contract, a mapping of a schema identifier associated with the predefined schema to the slot index, wherein the smart contract is associated with a blockchain, and

storing, in the smart contract, a mapping of a particular portion of the bit pattern representation to the slot index, wherein the particular portion includes a first number of bits less than or equal to the fixed bit size;

receive a request to determine an identity of an algorithm that generated a particular output, wherein the request includes a set of input values and a set of output values;

in response to receiving the request, decode the bit pattern representation from data stored in the smart contract, thereby generating a set of data structure elements; and

provide a response to the request by performing a zero-knowledge proof, wherein the zero-knowledge proof is based on the set of data structure elements, the set of input values, and the set of output values, and wherein the response includes the identity of the algorithm.

12 . The system of claim 11 , further comprising instructions causing the system to:

receive, from a user associated with a cryptographic wallet address, the data structure;

storing, in the smart contract, a mapping of the schema identifier to the cryptographic wallet address;

for each slot index in the set of slot indices:

store, in the smart contract, a mapping of the particular portion of the bit pattern representation to the cryptographic wallet address; and

in response to receiving the request from the user, decode the bit pattern representation by:

retrieving, using the cryptographic wallet address, the bit pattern representation and the schema identifier from the smart contract, and

based on the schema identifier, applying the predefined schema to the bit pattern representation.

13 . The system of claim 12 , further comprising instructions causing the system to:

store, in the smart contract, the cryptographic wallet address within a list of authorized operators, wherein the list of authorized operators indicates a set of cryptographic wallet addresses having permission to modify the bit pattern representation;

receive a modification to the bit pattern representation, wherein the modification is associated with a second cryptographic wallet address; and

upon determining that the second cryptographic wallet address is included in the set of cryptographic wallet addresses, modify one or more mappings stored in the smart contract to reflect the modification.

14 . The system of claim 13 , further comprising instructions causing the system to:

upon performing the storage operation, record a version identifier associated with the data structure to the blockchain; and

upon modifying the one or more mappings, update the version identifier to reflect the modification.

15 . The system of claim 11 , further comprising instructions causing the system to:

record an event log to the blockchain, wherein the event log is an immutable record of the storage operation that includes the set of slot indices, thereby enabling a listener to reconstruct the data structure based on the event log.

16 . The system of claim 15 , further comprising instructions causing the system to:

generate a schema registry including the predefined schema and the schema identifier; and

transmit the schema registry to the listener, wherein the listener reconstructs the data structure by:

identifying the predefined schema based on the set of slot indices included in the event log and the schema registry, and

applying the predefined schema to the portions of the bit pattern representation to which the set of slot indices are mapped.

17 . The system of claim 11 , wherein:

the data structure is a set of model weights, and

the predefined schema is an algorithm for converting between individual weights and 32-bit portions of the bit pattern representation, the algorithm including shifting each weight from the set of model weights by a number of bit positions equal to 32 multiplied by an index of the weight within the set of model weights.

18 . The system of claim 11 , wherein:

the data structure includes an 8-bit opcode and a set of operands associated with the opcode,

the total bit size is 256 bits, and

the predefined schema is an algorithm that encodes the 8-bit opcode as a leftmost 8 bits of the bit pattern representation and the set of operands as a remaining 248 bits of the bit pattern representation by:

determining a bit size equal to 248 divided by a number of operands in the set of operands, and

encoding each operand from the set of operands in the bit pattern representation using a second number of bits equal to the bit size.

19 . The system of claim 11 , wherein:

the data structure is a set of nucleotide bases from a genetic sequence, and

the predefined schema is an algorithm for converting between individual nucleotide bases and 2-bit portions of the bit pattern representation.

20 . The system of claim 11 , wherein:

the data structure is a lexicographic sequence, and

the predefined schema is an algorithm for converting between individual characters in the lexicographic sequence and 8-bit portions of the bit pattern representation.