Navigation

    Vite Forum
    • Register
    • Login
    • Search
    • Unsolved
    • Solved
    • Recent
    • Tags
    • Popular
    • Groups
    • Github
    1. Home
    2. yxyhack
    Y
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    yxyhack

    @yxyhack

    1
    Reputation
    7
    Posts
    121
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    yxyhack Follow

    Best posts made by yxyhack

    • RE: Vite Developer Committee

      DECLARATION OF CANDIDACY

      Name:
      Ryan Yao

      Discord username:
      Ryan_Y

      Telegram username:
      Ryan

      How long you've been with Vite community:
      Since the beginning of Vite

      Why you are interested in becoming a member of the Vite Developer Committee:
      To help committee do some research and make a correct choise.

      What contribution you will be able to bring to this committee:
      I am a researcher of cyber security . I can help to check the project code or design whether security or not.

      Other information about you (Optional, such as example ideas of new projects to build on Vite, or your past involvement in tech):
      I have several million vite coins and i belived vite project will succeed.

      posted in Tech
      Y
      yxyhack

    Latest posts made by yxyhack

    • RE: Vite Developer Committee

      DECLARATION OF CANDIDACY

      Name:
      Ryan Yao

      Discord username:
      Ryan_Y

      Telegram username:
      Ryan

      How long you've been with Vite community:
      Since the beginning of Vite

      Why you are interested in becoming a member of the Vite Developer Committee:
      To help committee do some research and make a correct choise.

      What contribution you will be able to bring to this committee:
      I am a researcher of cyber security . I can help to check the project code or design whether security or not.

      Other information about you (Optional, such as example ideas of new projects to build on Vite, or your past involvement in tech):
      I have several million vite coins and i belived vite project will succeed.

      posted in Tech
      Y
      yxyhack
    • RE: VX Release Curve Poll Results

      @super said in VX Release Curve Poll Results:

      My point of view on this:
      any of the fast release options are a no go because DEXes are not ready yet to be used on a daily basis. At this point, the real trading on VITE DEX is very low. A fast release will benefit only the early holders and the people who market-buyed mined VX but for the people who will come, they'll be in a high disadvantage.
      A fast release has only disadvantages because the price of VX will be extremely volatile due to the high amount of tokens released daily and low buyers. A slow release has more benefits for the long run (stability in price, time for VX to be discovered by new people and many more)
      I'd opt for the 5 year release with the 50milion VX.

      I cannot agree with you more!

      posted in Announcement
      Y
      yxyhack
    • Build and debug VITE source code with GoLand in windows OS

      1, Prerequisite: Install golang and GoLand IDE
      Golang :https://golang.org/doc/install
      GoLand IDE :https://www.jetbrains.com/go/learn/ (Free 30-day trial)

      2, Build Project
      (1) Run the following command to get go-vite source code.

      go get github.com/vitelabs/go-vite
      

      (2) When the source code download finish, you can go to the path "%GOPATH%\src\github.com\vitelabs" to check.
      微信截图_20190821192022.png

      (3) Run GoLand IDE and click the open-project button.
      oepnproject.png

      Choose the go-vite source code path which you just downloaded.
      pojectgovite.png

      Then you will see the project has been opened.
      sucessful open.png
      3, Build Project
      (1) Open the Tab bar "Run" and select "Edit Configurations" function.
      build_config.png

      (2) Open "Templates" collapse and select "Go Build", actually you don't need to do anything to the default configuration, but you'd better make an output path for the future debug operation.

      create_output.png
      According to the makefile, we know the entrance of the project is the “gvite” command.

      Makefile:

      gvite-windows-amd64:
         @echo "package govite" > $(shell pwd)/buildversion.go
         @echo "const VITE_VERSION = \""$(shell git rev-parse HEAD)"\"" >> $(shell pwd)/buildversion.go
         @echo "const VITE_BUILD_VERSION = \""$(VITE_VERSION)"\"" >> $(shell pwd)/buildversion.go
         env GOOS=windows GOARCH=amd64 go build -i -o $(GOBIN)/gvite-$(VITE_VERSION)-windows/gvite-windows-amd64.exe $(SERVERMAIN)
         @cp  $(shell pwd)/node_config.json $(GOBIN)/gvite-$(VITE_VERSION)-windows/node_config.json
         @echo "Build server done."ls
         @ls -ld $(GOBIN)/gvite-$(VITE_VERSION)-windows/gvite-windows-amd64.exe
      

      So we need to fill in the “gvite” path in the "Package path" option and click “Apply” to confirm it.

      (3) Now let's build and run gvite.
      run_gvite.png

      Select “go build …../gvite”.

      select gvite.png
      If everything is OK, the gvite will be running success.
      sucessful run gvite.png

      4,Debug Project

      The entrance of gvite is very clearly. The best way to understand the whole project is to begin from the main function.

      // gvite is the official command-line client for Vite
      
      func main() {
         govite.PrintBuildVersion()
         gvite_plugins.Loading()
      }
      

      The first line of the main function is to print a version number, we can ignore it.
      We set the breakpoint at gvite_plugins.Loading()
      It’s too simple to make a breakpoint. You just need to click one time at the place of a code line number. If it shows a redpoint means setting is successful.

      bp gvite.png

      Now we use Debug mode to run the project.

      debug mode.png

      You will see the program break at “gvite_plugins.Loading()” ,then you can use 4 ways to debug the program,like F8(step over),F7(step into),Shift+F8(step out),Alt+F9(run to cursor).

      Due to this is the main entrance, so we use F7 to continue. Then the program will go to the following function.

      func Loading() {
         if err := app.Run(os.Args); err != nil {
            fmt.Fprintln(os.Stderr, err)
            os.Exit(1)
         }
      }
      

      The remaining work is to do "break and run, break and run, loop and loop" continuously until you understand the logic of the program.

      OK, that’s all! Maybe next time I will share some code analysis.

      posted in Tech News & Updates
      Y
      yxyhack