MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.97k stars 522 forks source link

Allow resending local txns #15719

Closed mrmr1993 closed 5 hours ago

mrmr1993 commented 3 weeks ago

This PR re-enables the re-broadcast of transactions by re-sending them via GraphQL.

This was tested locally by re-emitting the sample transaction

{
  "signature": "7D6E9CDA6A9A102504F5E77CC7F654DAF9D8CCECDB7FB181B8875D5BFD2DD6387F9D001AB542D503B83584175ACA616D0811ADD0A5786D9426B0A987D853390D",
  "payment": {
    "to": "B62qrG31LHaauEVVah44kUVkPNwzh5LZi9iUJFiBepZuK3tCTFALC8D",
    "from": "B62qrG31LHaauEVVah44kUVkPNwzh5LZi9iUJFiBepZuK3tCTFALC8D",
    "fee": "10000000000",
    "token": "1",
    "nonce": "0",
    "memo": null,
    "amount": "16571009648348",
    "valid_until": "4294967295"
  },
  "stake_delegation": null
}

to mina.exe advanced send-rosetta-transactions against a network using the config file

{
  "genesis": {
    "genesis_state_timestamp": "2024-06-06T12:00:00Z"
  },
  "ledger": {
    "accounts": [
      {
        "pk": "B62qrG31LHaauEVVah44kUVkPNwzh5LZi9iUJFiBepZuK3tCTFALC8D",
        "balance": "100000000.000000000",
        "delegate": "B62qrG31LHaauEVVah44kUVkPNwzh5LZi9iUJFiBepZuK3tCTFALC8D",
        "sk": null
      }
    ]
  }
}

Checklist:

mrmr1993 commented 3 weeks ago

!ci-build-me

nholland94 commented 3 weeks ago

!approved-for-mainnet

georgeee commented 3 weeks ago

@mrmr1993 could you add description about the problem behind this PR into the issue #15721?

  1. Is rebroadcast loop of transactions non-functioning?
  2. Is it happening for any transaction originated on the Mina node or just some subset of transactions (say, transactions from GraphQL)
  3. If "1" is false, then is this issue about ability to re-send a transaction when it became outdated in the rebroadcast loop of Mina node or after Mina node was restarted?/
mrmr1993 commented 3 weeks ago

!ci-nightly-me

mrmr1993 commented 3 weeks ago

This now includes an update to the latest mainnet genesis ledger, so that builds have the correct config available.

mrmr1993 commented 3 weeks ago

!ci-nightly-me

mrmr1993 commented 3 weeks ago

https://buildkite.com/o-1-labs-2/mina-end-to-end-nightlies/builds/2085

amc-ie commented 3 weeks ago

!ci-nightly-me

amc-ie commented 3 weeks ago

!ci-nightly-me

mrmr1993 commented 6 hours ago

!ci-build-me