Coder Social home page Coder Social logo

solana-poc-framework's People

Contributors

2501babe avatar bennofs avatar bhcsayx avatar boredperson avatar cherryworm avatar chhajershrenik avatar dependabot[bot] avatar eulerbeat5 avatar mosera avatar riptl avatar sintemal avatar thesoftwarejedi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

solana-poc-framework's Issues

CI

Automatically cargo check / cargo test; workign on this currently

Network forking question

To fork network locally, what dependencies did the project use?
It looks similar to solana-test-validator.

How to get sol_log output in binary contract?

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

Temp folder errors creating files

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

Framework does not build with rust 1.61

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

Is it possible to execute an instruction with PDA signed using framework LocalEnvironment?

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:
image
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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.