No action shall be maintained by any person seeking to take advantage of the benefit of such pledge, unless within 90 days after the completion of the contract and acceptance by the proper public authorities of the work done, the plaintiff shall serve upon the contractor and upon the state or such corporation or department a written notice specifying the nature and amount of the claim and the date of furnishing the last item thereof, nor unless the action is begun within one year after the service of such notice.