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

Template for an Inflation Candidate nomination #14724

Closed

Conversation

mvines
Copy link
Member

@mvines mvines commented Jan 21, 2021

To submit your nomination:

  1. Fork the solana project and apply the contents of this template to your fork by running curl https://patch-diff.githubusercontent.com/raw/solana-labs/solana/pull/14724.patch | git am
  2. Replace all instances of "my_name" with a suitable alternative then address the TODO code comments
  3. Submit a new Github pull request and work with the project contributors to merge your pull request

@mvines mvines force-pushed the full_inflation_nomination_template branch 6 times, most recently from 92f622e to 33d6597 Compare January 25, 2021 16:49
@codecov
Copy link

codecov bot commented Jan 25, 2021

Codecov Report

Merging #14724 (a8767d2) into master (e7f5318) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #14724     +/-   ##
=========================================
- Coverage    79.6%    79.6%   -0.1%     
=========================================
  Files         401      401             
  Lines      101568   101575      +7     
=========================================
+ Hits        80870    80875      +5     
- Misses      20698    20700      +2     

@mvines mvines force-pushed the full_inflation_nomination_template branch from 33d6597 to 7b373a9 Compare January 30, 2021 07:13
@pkrasam
Copy link
Contributor

pkrasam commented Feb 2, 2021

I am getting this error, when trying to run curl to apply the patch.
Am I missing something ?
Please Help.

❯ curl https://patch-diff.githubusercontent.com/raw/solana-labs/solana/pull/14724.patch | git am
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3059    0  3059    0     0   4684      0 --:--:-- --:--:-- --:--:--  4677
Applying: Template for an Inflation Candidate nomination
error: sdk/src/feature_set.rs: does not exist in index
Patch failed at 0001 Template for an Inflation Candidate nomination
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

@mvines
Copy link
Member Author

mvines commented Feb 2, 2021

I am getting this error, when trying to run curl to apply the patch.
Am I missing something ?
Please Help.

Hey it looks like you aren't running git am .. from the root directory of the solana source

@mvines mvines force-pushed the full_inflation_nomination_template branch from 7b373a9 to 2d16231 Compare February 2, 2021 16:17
To submit your nomination:
1. Replace all instances of "my_name" with a suitable alternative then address the "TODO" code comments
2. Submit a new Github pull request and work with the project contributors to merge your pull request
@mvines mvines force-pushed the full_inflation_nomination_template branch from 2d16231 to a8767d2 Compare February 4, 2021 16:28
@pkrasam
Copy link
Contributor

pkrasam commented Feb 5, 2021

I updated my fork w/ solana-labs master and re-ran the command and getting a new error.
Just to confirm, I am running git am piped after the curl from the root directory of my solana source on my Mac.
Please help?!

❯ curl https://patch-diff.githubusercontent.com/raw/solana-labs/solana/pull/14724.patch | git am
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0fatal: previous rebase directory .git/rebase-apply still exists but mbox given.
100  3232    0  3232    0     0   5477      0 --:--:-- --:--:-- --:--:--  5468
(23) Failed writing body

@pkrasam
Copy link
Contributor

pkrasam commented Feb 5, 2021

I tried pulling the contents from the curl URL and made the appropriate changes & saved it to a file locally -- see attached file w3m_inflation.txt, re-ran the command and still no luck.

The command I am using now is

cat w3m_inflation.txt | git am

and I get this error: corrupt patch at line 26

❯ cat ../w3m_inflation.txt | git am
Applying: Template for an Inflation Candidate nomination
error: corrupt patch at line 26
Patch failed at 0001 Template for an Inflation Candidate nomination
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

When I run git am --show-current-patch=diff here is the output:

---
 sdk/src/feature_set.rs | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/sdk/src/feature_set.rs b/sdk/src/feature_set.rs
index 8676db0cff4..3bea2759447 100644
--- a/sdk/src/feature_set.rs
+++ b/sdk/src/feature_set.rs
@@ -65,6 +65,26 @@ pub mod full_inflation {
             solana_sdk::declare_id!("5S9JDUb4vKY1CUxLf5oc96ZxjGrephj1jcPeTi62sYmP");
         }
     }
+
+    pub mod w3m {
+        pub mod vote {
+            solana_sdk::declare_id!("H44JGZCFs9uViWBeC8LodrbCn8VWjg8GkjtdeRx4LCLM");
+        }
+        pub mod enable {
+            solana_sdk::declare_id!("3dG48jJJT3nDBLiGyFABCpTEacP8JNYzjrmCZFv7mbUU");
+        }
+    }
+
     pub mod bl {
         pub mod vote {
             // The private key for this address is held by the Solana Foundation
@@ -275,6 +295,8 @@ lazy_static! {
         (track_writable_deescalation::id(), "track account writable deescalation"),
         (spl_token_v2_self_transfer_fix::id(), "spl-token self-transfer fix"),
         (matching_buffer_upgrade_authorities::id(), "Upgradeable buffer and program authorities must match"),
+        (full_inflation::w3m::vote::id(), "Community vote allowing w3m to enable full inflation"),
+        (full_inflation::w3m::enable::id(), "Full inflation enabled by w3m"),
         (full_inflation::stakeconomy::vote::id(), "Community vote allowing Stakeconomy.com to enable full inflation"),
         (full_inflation::stakeconomy::enable::id(), "Full inflation enabled by Stakeconomy.com"),
         (full_inflation::nam::vote::id(), "community vote allowing Nam to enable full inflation"),
@@ -318,6 +340,10 @@ lazy_static! {
             vote_id: full_inflation::candidate_example::vote::id(),
             enable_id: full_inflation::candidate_example::enable::id(),
         },
+        FullInflationFeaturePair {
+            vote_id: full_inflation::w3m::vote::id(),
+            enable_id: full_inflation::w3m::enable::id(),
+        },
         FullInflationFeaturePair {
             vote_id: full_inflation::stakeconomy::vote::id(),
             enable_id: full_inflation::stakeconomy::enable::id(),

@pkrasam
Copy link
Contributor

pkrasam commented Feb 5, 2021

Thank you @mvines

@mvines
Copy link
Member Author

mvines commented Feb 6, 2021

This PR is no longer required

@mvines mvines closed this Feb 6, 2021
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