The problem ShadiBlock solves
Couples can use it to register their names as a memorable milestone on the blockchain permanently. It gives people a break who were carving their names on some trees or benches which was neither significant nor permanent. After registering they even get a certificate with their names, transaction hash, a link to their transaction, the place they met, and the date they started out. People can just plug in their details and get a clean certificate with their data stored permanently on the blockchain which can be visited by the link provided in the certificate. It makes the present task of carving names in public places much easier and memorable as the names registered on the blockchain are digital, permanent, and tamper-free(immutable) by others. The Solana blockchain comes with in-built features like safety, fast and affordable. ShadiBlock leverages these features and makes carving the names of couples on Blockchain Fast, Affordable, Permanent, Immutable, and ...Coool.
Challenges we ran into
Solana Errors:
- Cannot Options.Unwrap() a "none" value. -> Problem cropped up because the program was trying to deserialize data in an empty account. We solved the problem by initializing the data account with appropriate data (bytes) using buffer layout
- Unexpected length of Input -> The problem occurred as we were supposed to allocate a fixed length of data to variables while writing the program. We solved it by, passing the Input with the right length, after allocating data to variables
- Range of Index 1114 out of range for the index of 804 -> The problem occurred as the borsh.serialize function was passing the name of the structure as well which was not initialized by buffer layout. We solved it by adding the difference of bytes while deploying the program
- Unresolved Symbol -> It cropped because of the custom panic feature in the rust program. We solved it by disabling the feature in Cargo. toml
Backend Errors:
- Insufficient Lamports -> The program cropped up as the Buffer span function was unable to span through the buffer layout. We solved the problem by using the span on the complete layout itself.
- Insufficient Compute Units -> The program cropped up as Buffer layout cstr( ) function was used to create data structure while deploying but span function was unable to read bytes as it was empty string. We solved problem by creating data structure using the buffer layout blob function to allocate some Uint8 data to strings.
- We used buffer layout decode function to decode received data as data was stored as vectors in the account. But the received data had garbage values in-between. We solved it by slicing raw Uint8 array of data into appropriate size and then decoded it using the decode function then we cleaned any remaining garbage value and then structure it.
Frontend Errors:
- Unable to find "React" -> We had not imported the React module itself
- unable to resolve "Link" -> Link component in React Router Dom module was not initialized