solana-program-library/account-compression
Alexandru Agache 668dcac11a
fix ConcurrentMerkleTreeHeader (de)serialization (#3572)
The `account_type` member of `ConcurrentMerkleTreeHeader` is currently
an `#[repr(u32)]` enum, but borsh only uses one byte to serialize or
deserialize an enum tag, which leads to issues with `try_from_slice`
calls that get passed slices computed based on applying `size_of` to
`ConcurrentMerkleTreeHeader`. This commit replaces the underlying
type of `account_type` with an integer type.

Signed-off-by: Alexandru Agache <alexandruag@gmail.com>

Signed-off-by: Alexandru Agache <alexandruag@gmail.com>
2022-09-06 18:28:50 -05:00
..
programs fix ConcurrentMerkleTreeHeader (de)serialization (#3572) 2022-09-06 18:28:50 -05:00
Anchor.toml Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
Cargo.lock Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
Cargo.toml Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
README.md Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
package.json Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
tsconfig.json Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00
yarn.lock Add on-chain compression program that uses CMT (#3489) 2022-08-25 08:51:35 -10:00

README.md

Account Compression

This on-chain program provides an interface for composing smart-contracts to create and use SPL ConcurrentMerkleTrees. The primary application of using SPL ConcurrentMerkleTrees is to make edits to off-chain data with on-chain verification.

Using this program requires an indexer to parse transaction information and write relevant information to an off-chain database.

SDK

The typescript SDK for this contract will be generated using Metaplex Foundation's Solita.

Testing

Testing contracts locally requires the SDK to be built. Then you can run: anchor test

Testing contracts against indexer + api: anchor test --skip-build --skip-local-validator --skip-deploy and limit the test script to only the continuous test.