neodyme-labs / solana-poc-framework Goto Github PK
View Code? Open in Web Editor NEWA framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way
A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way
I had to change the source of the framework in my program to use a static temp folder.
this line lib.rs:704
:
let tmpdir = TempDir::new().expect("make tempdir");
creates a folder that gets deleted quickly, and the ledger would get an error writing there after a tx or two.
I changed line 708
to a hardcoded folder for now, but I know thats not a great fix.
thread 'main' panicked at 'Unable to create data file /tmp/.tmpt2Dr5x/0.6 in current dir(Ok("/home/redacted/code/redacted")): Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/danah/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-runtime-1.8.8/src/append_vec.rs:188:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2021-12-12T07:03:14.810088262Z DEBUG solana_runtime::accounts] bank unlock accounts
[2021-12-12T07:03:14.814666989Z INFO solana_runtime::accounts_db] remove_dead_slots_metadata: slots [0]
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', /home/redacted/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-runtime-1.8.8/src/accounts_db.rs:5376:60
Full error
err.txt
To reproduce:
$ rustup default 1.61
$ cargo build ✔
Compiling libsecp256k1 v0.5.0
...
Compiling poc-framework v0.1.6 (/home/sylvain/software/solana-poc-framework)
error: expected None-delimited group
--> src/lib.rs:741:21
|
741 | solana_bpf_loader_upgradeable_program!(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `solana_bpf_loader_upgradeable_program` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected None-delimited group
--> src/lib.rs:742:21
|
742 | solana_bpf_loader_program!(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `solana_bpf_loader_program` (in Nightly builds, run with -Z macro-backtrace for more info)
error: expected None-delimited group
--> src/lib.rs:743:21
|
743 | solana_bpf_loader_deprecated_program!(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `solana_bpf_loader_deprecated_program` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `poc-framework` due to 3 previous errors
It seems to be related to rust-lang/rust#92472. It is solved by switching to rust 1.60:
$ rustup default 1.60
Automatically cargo check
/ cargo test
; workign on this currently
I am currently doing some tests on Anchor programs and found that sometimes they may need a PDA signed to invoke certain instructions, for Solana official APIs we have invoke_signed() which allows passing PDA seeds into it such as workshop level0 examples:
However the execute_as_transaction() API for LocalEnvironment only allows keypairs, I am wondering if there is anything for it to allow similar functions? Thank you very much!
Hi there, I'm working on a closed-source Solana program. There are some sol_log in it but I can't see the output when I use poc-framework.
I have setup_logging(LogLevel::DEBUG) enabled, but it only helps to print some higher level logs ,obviously not from the .so
To fork network locally, what dependencies did the project use?
It looks similar to solana-test-validator
.
Placeholder issue; working on this currently
Hi, I added basic gdb debugging support for the solana rbpf vm and this poc-framework here https://github.com/jawilk/solana-poc-framework and put a simple example here https://github.com/jawilk/solana-poc-debugging-example
Since I had to fork a few dependencies I think a pull request is not feasible, so just putting it here.
It might be useful for some if the projects unoptimized binary size isn't too big
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.