-
Notifications
You must be signed in to change notification settings - Fork 96
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
Monero Development Harness #2786
base: master
Are you sure you want to change the base?
Conversation
get transaction development details from monerod including tx lock time; which is different from 'locked'/'unlocked' which refer to when a tx has 10 confirmations. Tx locktime can be any number of blocks in the future.
Added a new function - Gets many details about a transaction including tx lock time which will be needed for creating & sending Monero transactions which cannot be spent until some number of blocks in the future as part of the Monero swap protocol. This is different than the unlock fields in other rpc responses which refer to the normal Monero mandatory wait for a tx to have 10 confirmations. In contrast a locked tx cannot be spent until after the tx locktime expires which can be e.g. 1000 blocks in the future. We will need to calculate that future unix time based on an average block time * tx lock time in blocks I guess. |
Note: I have noticed during testing that the This may or may not have an effect on real transaction verification. Why? I noticed the forced change in the logs and I am guessing Monero is going to update to a rct size of 16 .. maybe soon, and keeps 16 for their own dev. I also noticed some of the daemon rpcs also spit out profiling info to |
I have also re-written all the rpc code in golang - methods, json structs, etc. for a head start. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do monero wallets only have one address?
Is it possible to add another node? There is only alpha. Would be good to have a beta, this way we can simulate different wallets on different nodes. Does monero have reorgs?
nit: There are some bad white spaces, or white spaces at the end of lines. If there is a setting on your editor you can see them maybe. Not a big deal.
Working! Looks good.
Can add |
No ... A wallet has One or more accounts each of which has a Primary Address - addr 0 subaddr index [0] Mainnet (& regtest) Primary Address
Here is a 55ps81tfB2JTdbHXYVJuZVeYCYagjLjBPgHtH6DRHXZ3eMLLtE7FECTMmGzJmFVqPz75KsVcVdGMfej8grDiEx5KDmU7NBA
secret: 1c8eb5be5d2488caa8b9058d23e709f0e8a8677834f07e6702889979c4625304
public: 696d1b57e07f939f3733fb16fc10f4e06cadd6c74e43faeae7faae9a95073adf
secret: 894b7da3b33a9a35bd434461a70a56c519bcef11268a6efc5fb9eb3c83797c01
public: 4df48d1418985c7c22d75c01243e752451486f0bb7c80ae18d322155e82d8e71
https://web.getmonero.org/resources/moneropedia/account.html The harness has deliberately simplified transfers and just uses 1 account and one primary address per wallet. Type: The go-monero code has a full set of wallet functions. |
Monero definitely gets attacked all the time and has reorgs. They are best seen in the daemon logs for stagenet where I see reorgs occasionally as if people were testing them. I recommend trying the same. I would prefer not to spend prop time at the present adding other nodes as last time I started with a couple of regtest nodes but could not connect wallets but am happy to try again if the need is there. |
Actually this can have an effect on some bash inbuilt functions! I will update this and push later (my) today. Did you see end-line whitespace in both script files? I have already updated |
- Rename monero_functions.inc -> monero_functions - Tidy extra whitespace at eol for harness.sh & monero_functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working well for me. One suggestion would be that instead of having a separate file for each function, we could have one file for wallet, and then the function that we want to call would be an argument. Instead of ./bill_balance
, we would call ./bill balance
. This way each time we add another function, the folder wouldn't get more cluttered.
I originally planned to do like bitcoin harnesses but monero has no concept of If you are working in golang try https://github.com/dev-warrior777/go-monero |
New monero-wallet-rpc server with no attached wallet. This is for programmatically creating/generating and using a new wallet. The wallet will be generated in "own" dir but can be named what- ever you need: "alice", "Bob", etc.
When the harness starts up there will be a new folder Then use the Go example code to There are other 'howto' examples here |
Monero Development Harness
closes #2753
Monero development Harness - documentation and notes
Useful Info
Monero is very different than btc in that it does not provide a single rpc tool like
bitcoin-cli
but rather a set of json 2.0 & other older json apis which can be accessed by sending curl requests for each one.Monero wallets are accounts based
https://web.getmonero.org/resources/moneropedia/account.html
Architecture
Embedded in Tmux
alpha is a monero p2p daemon
bill is a miner wallet .. you can top up more funds from bill if you run out
fred is a normal wallet user
charlie is a normal wallet user
charlie_view is a view-only wallet sibling of charlie full wallet - no spend key
Using
Prerequisites
Setup
monero-x86_64-linux-gnu-v0.18.3.3 should be in PATH
export PATH=$PATH:[path-to]/monero-x86_64-linux-gnu-v0.18.3.3
Background Mining
By default background mining is set up and mines to bill wallet every 15s
To disable:
export NOMINER="1" to your shell
or else invoke the harness with:
NOMINER="1" ./harness.sh
You should disable if attempting the manual offline cold signing using
monero-wallet-cli
experimentalYou should also Ctl-C charlie & charlie_view wallets for this
Run
./harness.sh
Data Directory
Known Issues
The transaction spend locking needs more investigation - Fixed
Commands Help
run
./help
from the tmux harness window 0