Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new bank from file test #508

Closed

Conversation

aeyakovenko
Copy link
Member

compare bank loaded from the log file vs the one from the mint

@garious
Copy link
Contributor

garious commented Jul 1, 2018

You don't initialize that file with a genesis block. https://github.com/solana-labs/solana/blob/master/src/mint.rs#L55

@garious
Copy link
Contributor

garious commented Jul 1, 2018

Also, you can implement this test without any stages over here: https://github.com/solana-labs/solana/blob/master/src/entry_writer.rs#L124

@aeyakovenko
Copy link
Member Author

@garious

Also, you can implement this test without any stages over here: https://github.com/solana-labs/solana/blob/master/src/entry_writer.rs#L124

i don't see exactly how? do i hand append alice.create_entries and ledger::next_entries( and feed that to new_bank.process_ledger? its not clearly obvious to me that should work, or if that is the intent of how the apis should come together

@garious
Copy link
Contributor

garious commented Jul 1, 2018

@aeyakovenko, here's how the validator starts: https://github.com/solana-labs/solana/blob/master/multinode-demo/validator.sh#L75

cat genesis and all previous logs, and that's what should go to process_ledger().

@garious
Copy link
Contributor

garious commented Jul 1, 2018

If you did that in Rust (i.e. for a test), you'd chain() the line iterators.

@garious
Copy link
Contributor

garious commented Jul 1, 2018

"do i hand append alice.create_entries and ledger::next_entries( and feed that to new_bank.process_ledger"

I did that locally and it works as expected. Why are you thinking it's not obvious that'd work?

@garious
Copy link
Contributor

garious commented Jul 2, 2018

@aeyakovenko, see #516

@garious
Copy link
Contributor

garious commented Jul 2, 2018

@aeyakovenko, does this test still add value? Help you debug?

@aeyakovenko
Copy link
Member Author

@aeyakovenko, does this test still add value? Help you debug?

@garious we can kill it

@aeyakovenko
Copy link
Member Author

Fixed in #528

@aeyakovenko aeyakovenko closed this Jul 2, 2018
vkomenda pushed a commit to vkomenda/solana that referenced this pull request Aug 29, 2021
… withdrawal (solana-labs#508)

* token-swap: Add token supply in invariant calculation

* Refactor state classes into curve components for future use
* Align pool initialization with Uniswap using geometric mean of token
  amounts
* Fix deposit and withdraw instruction to work as a proportion of pool
  tokens
* Add math utilities to calculate the geometric mean with u64

* Improve variable names

* Use a fixed starting pool size

* Run cargo fmt

* Update js tests with new pool numbers

* Run linting

* Remove math

* Fix BN type issues found by flow
brooksprumo added a commit to brooksprumo/solana that referenced this pull request Apr 2, 2024
* add get_stored_account to append vec

* Update accounts-db/src/append_vec.rs

Co-authored-by: Brooks <brooks@prumo.org>

* renames

* accountshash -> accounthash

---------

Co-authored-by: Brooks <brooks@prumo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants